From 45851c1393e905bc9d86911e5fcf42c26ab1add3 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 14:56:29 +0000 Subject: [PATCH 1/8] Port BIMForge's PR #8 review fixes: restored ground, limit extents Before its dig, a hosted cut restores only its host's ground: the section fill is clipped to the host's uncut section (developed / cross sections, and the Blender add-on, whose Solid fill is clipped too), so a cut reaching past grade no longer fills air. Drawing extents take in the limit lines. developed.py matches BIMForge 0.1.100's copy; its new tests come along. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 19 +++ src/ifcsection/addon.py | 91 +++++++++++-- src/ifcsection/developed.py | 167 ++++++++++++++++-------- tests/blender/test_alignment_section.py | 53 ++++++++ tests/test_developed.py | 56 ++++++++ 5 files changed, 321 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c392f..10c30d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ Newest first. Versions follow `pyproject.toml`; a tag `vX.Y.Z` publishes the add-on zip. +## Unreleased + +### Fixed + +Ported from BIMForge 0.1.100 (its PR #8 review): + +- **Restored ground stays inside its host.** Before its dig date, a cut + that voids the ground restores only the ground, not the air above it. A + cut can reach past grade, as an opening runs past its wall. + - **Sections and DXF:** the restored fill is clipped to the host's uncut + section. + - **Blender add-on:** the same clip applies to Solid mode's + volume-removed fill. + + A pay-item excavation body (unhosted) is the soil itself, so it is still + restored whole. +- **Drawing extents take in the limits of excavation**, so a section of an + excavation alone is no longer clipped. + ## 0.1.0 - 2026-11-05 First release as its own project, split out of BIMForge (0.1.98 and the diff --git a/src/ifcsection/addon.py b/src/ifcsection/addon.py index 15d9dac..bd5c851 100644 --- a/src/ifcsection/addon.py +++ b/src/ifcsection/addon.py @@ -561,9 +561,10 @@ def _bisect(bm, co, look) -> list: def _cut_features() -> list: - """[(GlobalId, name, verts, tris)] of every IfcEarthworksCut in the open + """[(GlobalId, name, verts, tris, host)] of every excavation in the open IFC, world metres - read from the file, so they are there whether or not - the viewer imported the cuts as objects. Cached per file.""" + the viewer imported the cuts as objects. `host` is the (verts, tris) of + the ground a hosted cut voids, UNCUT, or None. Cached per file.""" f = _STATE.get("file") if f is None: return [] @@ -575,7 +576,7 @@ def _cut_features() -> list: cuts += f.by_type("IfcEarthworksCut") except RuntimeError: # IFC4: no such class cuts = [] - names = set() + names, uncut = set(), {} if cuts: import ifcopenshell.geom as geom s = geom.settings() @@ -587,9 +588,19 @@ def _cut_features() -> list: continue v, t = list(g.verts), list(g.faces) names.add(f"{e.is_a()}/{e.Name}") + hosts = [r.RelatingBuildingElement + for r in getattr(e, "VoidsElements", None) or ()] + host = None + if hosts: + h = hosts[0] + if h.id() not in uncut: + hv, ht = _dev._uncut(f, h) + uncut[h.id()] = None if hv is None else ( + [tuple(x) for x in hv], [tuple(x) for x in ht]) + host = uncut[h.id()] out.append((e.GlobalId, e.Name or "excavation", [tuple(v[i:i + 3]) for i in range(0, len(v), 3)], - [tuple(t[i:i + 3]) for i in range(0, len(t), 3)])) + [tuple(t[i:i + 3]) for i in range(0, len(t), 3)], host)) _STATE.update(cuts_key=id(f), cuts=out, cut_names=names) return out @@ -625,6 +636,51 @@ def _dug(gid, props) -> bool: return _ss.standing(_STATE["spans"].get(gid), day) +def _clip_to_host(cut_edges, host, co, look, shift): + """The cut's section clipped to its host's UNCUT section, as closed rings + of points in the plane; None when it cannot be clipped (no host section), + in which case the caller fills the cut as it is.""" + import bmesh + from mathutils import Vector + from shapely.geometry import Polygon + from shapely.geometry.polygon import orient + from shapely.ops import unary_union + x = look.orthogonal().normalized() + y = look.cross(x).normalized() + + def flat(p): + d = Vector(p) - co + return (d.dot(x), d.dot(y)) + + def region(segs): + rings = _dev._polygons(segs, -1e9, 1e9) + return unary_union([Polygon(r[0], r[1:]) for r in rings]) if rings else None + hv, ht = host + bm = bmesh.new() + try: + vs = [bm.verts.new(Vector(p) + shift) for p in hv] + for tri in ht: + try: + bm.faces.new([vs[i] for i in tri]) + except ValueError: + pass + host_edges = _bisect(bm, co, look) + ground = region([(flat(e.verts[0].co), flat(e.verts[1].co)) for e in host_edges]) + finally: + bm.free() + cut = region([(flat(e.verts[0].co), flat(e.verts[1].co)) for e in cut_edges]) + if ground is None or cut is None: + return None + kept = cut.intersection(ground) + out = [] + for g in getattr(kept, "geoms", [kept]): + if isinstance(g, Polygon) and not g.is_empty and g.area > 1e-10: + g = orient(g, 1.0) + for ring in [g.exterior, *g.interiors]: + out.append([co + x * u + y * v for u, v in list(ring.coords)[:-1]]) + return out + + def _dashes(segs, dash, gap): """Each segment broken into dashes `dash` long, `gap` apart.""" out = [] @@ -713,7 +769,7 @@ def cut(scene, props, co, look): from mathutils import Vector shift = Vector(props.shift) limit_segs = [] - for gid, _name, V, T in _cut_features(): + for gid, _name, V, T, host in _cut_features(): dug = _dug(gid, props) if dug and props.excavation == "HIDDEN": continue @@ -737,13 +793,24 @@ def cut(scene, props, co, look): fill = ((k.kind, k.rgb, k.paint) if not dug else SOLID_FILL) \ if by_style else ("Cut", None, "") new_edges = [] - vmap = {} - for e in cut_edges: - a, b = (vmap.get(v) or vmap.setdefault(v, out.verts.new(v.co)) - for v in e.verts) - if a is not b: - new_edges.append(out.edges.new((a, b))) - groups.append((fills.setdefault(fill, len(fills)), new_edges)) + rings = _clip_to_host(cut_edges, host, co, look, shift) \ + if host is not None else None + if rings is not None: + # a cut can reach past its host (over grade, as an opening + # runs past its wall): fill only what lies in the ground + for ring in rings: + vs_ = [out.verts.new(q) for q in ring] + new_edges += [out.edges.new((vs_[i], vs_[(i + 1) % len(vs_)])) + for i in range(len(vs_))] + else: + vmap = {} + for e in cut_edges: + a, b = (vmap.get(v) or vmap.setdefault(v, out.verts.new(v.co)) + for v in e.verts) + if a is not b: + new_edges.append(out.edges.new((a, b))) + if new_edges: + groups.append((fills.setdefault(fill, len(fills)), new_edges)) finally: bm.free() excavation_limits(scene, props, limit_segs, co, look) diff --git a/src/ifcsection/developed.py b/src/ifcsection/developed.py index 48e86dd..717edd5 100644 --- a/src/ifcsection/developed.py +++ b/src/ifcsection/developed.py @@ -181,7 +181,7 @@ def _all_bodies(f, date): hosts = [r.RelatingBuildingElement for r in getattr(el, "VoidsElements", None) or ()] undug.append((el.Name or el.is_a(), - hosts[0].Name if hosts else None, v, t)) + hosts[0] if hosts else None, v, t)) elif (el.is_a("IfcElement") and len(t) and not (spans is not None and not standing(spans.get(el.GlobalId), date))): @@ -214,9 +214,24 @@ def _all_bodies(f, date): break host_style = {name: (layer, trgb[0]) for name, layer, surf, _v, _t, trgb in out if surf is not LIMIT and trgb} + gross = {} for name, host, v, t in undug: - layer, rgb = host_style.get(host, (_layer_name("Earthwork"), (0.56, 0.44, 0.30))) - out.append((f"{name} (not yet dug)", layer, False, v, t, [rgb] * len(t))) + layer, rgb = host_style.get(host.Name if host is not None else None, + (_layer_name("Earthwork"), (0.56, 0.44, 0.30))) + if host is None: + # a pay-item body is the soil itself: restore it whole + out.append((f"{name} (not yet dug)", layer, False, v, t, [rgb] * len(t))) + continue + # a cut can reach past its host (over grade, as an opening runs past + # its wall): restore only what lies in the host's UNCUT body + if host.id() not in gross: + hv, ht = _uncut(f, host) + if hv is None: + continue + gross[host.id()] = True + out.append((host.Name, None, Clip(host.id()), hv, ht, [rgb] * len(ht))) + out.append((f"{name} (not yet dug)", layer, Restore(host.id()), v, t, + [rgb] * len(t))) _BODY_CACHE[key] = out return out @@ -240,6 +255,96 @@ def _named(f, m): diffuse=m.diffuse) +class Clip(int): + """A body that is not drawn: a host's UNCUT shape, clipping the ground + restored in its voids (Restore) before they are dug.""" + + +class Restore(int): + """Ground restored in a host's void before the dig: drawn clipped to the + host's uncut shape (Clip of the same host).""" + + +def _uncut(f, host): + """(verts, tris) of `host` without its voids, world coordinates.""" + import ifcopenshell.geom as geom + import numpy as np + s = geom.settings() + s.set("use-world-coords", True) + s.set("disable-opening-subtractions", True) + try: + g = geom.create_shape(s, host).geometry + except Exception: # no body: nothing to restore into + return None, None + return (np.asarray(g.verts, dtype=float).reshape(-1, 3), + np.asarray(g.faces, dtype=np.int64).reshape(-1, 3)) + + +def _cut_into(drawing, warped, to2d) -> None: + """The plane's cut of every warped body into `drawing`: filled rings per + layer, open surfaces as ground lines, excavations as limit lines, and + restored ground clipped to its host's uncut shape.""" + from shapely.geometry import Polygon + from shapely.geometry.polygon import orient + from shapely.ops import unary_union + clips, cuts = {}, [] + for _name, layer, surface, u, dist, z, t, trgb, _in in warped: + segs, rgbs = _plane_cut(u, dist, z, t, trgb) + if not segs: + continue + segs = [(to2d(*a), to2d(*b)) for a, b in segs] + if isinstance(surface, Clip): + rings = _polygons(segs, 0.0, drawing.length) + clips[int(surface)] = unary_union( + [Polygon(r[0], r[1:]) for r in rings]) if rings else None + continue + cuts.append((layer, surface, segs, rgbs)) + for layer, surface, segs, rgbs in cuts: + if surface is LIMIT: # the limit of excavation: a line + segs = _clip_segments_x(segs, 0.0, drawing.length) + drawing.limits += _chain(segs) if segs else [] + continue + rgb = max(set(rgbs), key=rgbs.count) + if isinstance(surface, Restore): + rings = _polygons(segs, 0.0, drawing.length) + region = clips.get(int(surface)) + if not rings or region is None: + continue + kept = unary_union([Polygon(r[0], r[1:]) for r in rings]).intersection(region) + rings = [[list(orient(g, 1.0).exterior.coords)] + + [list(i.coords) for i in orient(g, 1.0).interiors] + for g in getattr(kept, "geoms", [kept]) + if isinstance(g, Polygon) and not g.is_empty and g.area > 1e-8] + if rings: + drawing.cut.append((layer, rgb, rings)) + continue + rings = [] if surface else _polygons(segs, 0.0, drawing.length) + if not rings: + segs = _clip_segments_x(segs, 0.0, drawing.length) + if not segs: + continue + if rings: + drawing.cut.append((layer, rgb, rings)) + else: # a surface, or a body whose cut does not close + for line in _chain(segs): + drawing.ground.append((layer.replace("E-CUT-", "E-GROUND-"), rgb, line)) + + +def _extent(drawing) -> list: + """Every drawn elevation: cuts, ground lines, edges beyond, limits.""" + zs = [p[1] for _l, _r, polys in drawing.cut for poly in polys for loop in poly + for p in loop] + zs += [p[1] for _l, _r, line in drawing.ground for p in line] + zs += [p[1] for line in drawing.beyond for p in line] + zs += [p[1] for line in drawing.limits for p in line] + return zs + + +def _drawn(w) -> bool: + """A warped body whose edges beyond the cut are drawn.""" + return not (w[2] is LIMIT or isinstance(w[2], (Clip, Restore))) + + def is_excavation(el) -> bool: """Excavation: an IfcEarthworksCut (voiding the ground), or the pay-item body emit_ifc writes for an unhosted one (IfcEarthworksElement, @@ -436,35 +541,13 @@ def to2d(u, z): warped.append((name, layer, surface, u, dist, z, t, trgb, inside)) drawing.elements = len(warped) # ---------------------------------------------------------------- cut - for name, layer, surface, u, dist, z, t, trgb, inside in warped: - segs, rgbs = _plane_cut(u, dist, z, t, trgb) - if not segs: - continue - segs = [(to2d(*a), to2d(*b)) for a, b in segs] - if surface is LIMIT: # the limit of excavation: a line - segs = _clip_segments_x(segs, 0.0, drawing.length) - drawing.limits += _chain(segs) if segs else [] - continue - rgb = max(set(rgbs), key=rgbs.count) - rings = [] if surface else _polygons(segs, 0.0, drawing.length) - if not rings: - segs = _clip_segments_x(segs, 0.0, drawing.length) - if not segs: - continue - if rings: - drawing.cut.append((layer, rgb, rings)) - else: # a surface, or a body whose cut does not close - for line in _chain(segs): - drawing.ground.append((layer.replace("E-CUT-", "E-GROUND-"), rgb, line)) + _cut_into(drawing, warped, to2d) # ----------------------------------------------------- visible beyond - drawing.beyond = _visible_edges([w for w in warped if w[2] is not LIMIT], to2d, + drawing.beyond = _visible_edges([w for w in warped if _drawn(w)], to2d, drawing, view, depth * k, k) # ---------------------------------------------------------- ticks drawing.ticks = _ticks(st, un, view, d0, d1, to2d, unit, k) - zs = [p[1] for _l, _r, polys in drawing.cut for poly in polys for loop in poly - for p in loop] - zs += [p[1] for _l, _r, line in drawing.ground for p in line] - zs += [p[1] for line in drawing.beyond for p in line] + zs = _extent(drawing) if zs: drawing.extent = (0.0, min(zs), drawing.length, max(zs)) return drawing @@ -515,27 +598,8 @@ def to2d(u, z): warped.append((name, layer, surface, across + half, dist, za + zb * v[:, 2], t[idx], [trgb[i] for i in idx], None)) drawing.elements = len(warped) - for _name, layer, surface, u, dist, z, t, trgb, _in in warped: - segs, rgbs = _plane_cut(u, dist, z, t, trgb) - if not segs: - continue - segs = [(to2d(*a), to2d(*b)) for a, b in segs] - if surface is LIMIT: # the limit of excavation: a line - segs = _clip_segments_x(segs, 0.0, drawing.length) - drawing.limits += _chain(segs) if segs else [] - continue - rgb = max(set(rgbs), key=rgbs.count) - rings = [] if surface else _polygons(segs, 0.0, drawing.length) - if not rings: - segs = _clip_segments_x(segs, 0.0, drawing.length) - if not segs: - continue - if rings: - drawing.cut.append((layer, rgb, rings)) - else: # a surface, or a body whose cut does not close - for line in _chain(segs): - drawing.ground.append((layer.replace("E-CUT-", "E-GROUND-"), rgb, line)) - drawing.beyond = _visible_edges([w for w in warped if w[2] is not LIMIT], to2d, + _cut_into(drawing, warped, to2d) + drawing.beyond = _visible_edges([w for w in warped if _drawn(w)], to2d, drawing, view, depth * k, k) # an offset tick every whole unit: (x, offset left); looking ahead the # left is on the viewer's left @@ -545,10 +609,7 @@ def to2d(u, z): drawing.ticks.append((float(w2 + (o if view.look_back else -o)), float(o))) o += 1 drawing.ticks.sort() - zs = [p[1] for _l, _r, polys in drawing.cut for poly in polys for loop in poly - for p in loop] - zs += [p[1] for _l, _r, line in drawing.ground for p in line] - zs += [p[1] for line in drawing.beyond for p in line] + zs = _extent(drawing) if zs: drawing.extent = (0.0, min(zs), drawing.length, max(zs)) else: diff --git a/tests/blender/test_alignment_section.py b/tests/blender/test_alignment_section.py index 1f2f659..476acf2 100644 --- a/tests/blender/test_alignment_section.py +++ b/tests/blender/test_alignment_section.py @@ -748,3 +748,56 @@ def body(name, ring, ifc): bpy.data.objects.remove(ob) props.ifc_path = home_path bpy.ops.ifcsection.section_load() + + +@pytest.mark.skipif(not HAS_VOIDS, reason="needs BIMForge with Element.voids") +def test_restored_ground_stays_inside_its_host(addon, tmp_path): + """A cut reaching 1 ft past grade (as an opening runs past its wall): + before its dig only the host's ground is restored, not the air over it.""" + mod, m, al, _prof = addon + from bimforge.author.emit_ifc import emit_ifc + from bimforge.author.model import Element, StructureModel + from bimforge.author.sweep import SweptSection + sc = bpy.context.scene + props = sc.ifcsection + home_path = props.ifc_path + dm = StructureModel("over", m.ctx) + + def body(name, ring, ifc, **kw): + sw = SweptSection(name, ring, al, 1010.0, 1360.0, origin=m.ctx, ifc=ifc) + dm.add(Element.from_geometry(name, sw, ifc_class=ifc, + quantities={"volume_cf": sw.volume_cf}, **kw)) + box = lambda x0, x1, z0, z1: [(x0, z0), (x1, z0), (x1, z1), (x0, z1)] # noqa: E731 + body("existing ground", box(-20, 20, -12, 0), "IfcGeographicElement") + body("structure excavation", box(-6, 6, -6, 1), "IfcEarthworksCut") + dm.element("structure excavation").voids = "existing ground" + dm.alignments.append((al, None)) + path = tmp_path / "over.ifc" + emit_ifc(dm, str(path)) + f = ifcopenshell.open(str(path)) + before = set(bpy.data.objects.keys()) + _import_meshes(f) + made = [bpy.data.objects[n] for n in set(bpy.data.objects.keys()) - before] + next(o for o in made if o.name.startswith("structure excavation")).name = \ + "IfcEarthworksCut/structure excavation" + try: + props.ifc_path = str(path) + assert bpy.ops.ifcsection.section_load() == {"FINISHED"} + props.goto = 1200.0 + bpy.ops.ifcsection.section_goto() + props.excavation = "LIMITS" + gid = f.by_type("IfcEarthworksCut")[0].GlobalId + mod._STATE["spans"] = {gid: mod._ss.Span("2027-01-10", None, ("dig",))} + props.date = "2027-01-05" + props.date_filter = True + bpy.ops.ifcsection.section_cut() + me = bpy.data.objects[mod.CUT].data + earth = sum(p.area for p in me.polygons + if "Earthwork" in me.materials[p.material_index].name) / SQ_M_PER_SQ_FT + assert earth == pytest.approx(40 * 12, rel=1e-2) # not 40 x 12 + 12 x 1 + finally: + props.date_filter = False + for ob in made: + bpy.data.objects.remove(ob) + props.ifc_path = home_path + bpy.ops.ifcsection.section_load() diff --git a/tests/test_developed.py b/tests/test_developed.py index 0fcae40..5bc75f0 100644 --- a/tests/test_developed.py +++ b/tests/test_developed.py @@ -495,3 +495,59 @@ def ring(x0, x1, y0, y1): # two separate bodies side by side both stay solid rings = _polygons(ring(0, 4, 0, 4) + ring(5, 9, 0, 4), 0.0, 10.0) assert sum(Polygon(r[0], r[1:]).area for r in rings) == pytest.approx(32) + + +def _section_model(tmp_path, name, bodies): + ctx = _ctx() + al = Alignment(POB, RUN, name="ML") + m = StructureModel(name, ctx) + for nm, ring, ifc, voids in bodies: + sw = SweptSection(nm, ring, al, 1010.0, 1100.0, origin=ctx, ifc=ifc) + el = Element.from_geometry(nm, sw, ifc_class=ifc, + quantities={"volume_cf": sw.volume_cf}) + if voids: + el.voids = voids + m.add(el) + m.alignments.append((al, None)) + out = tmp_path / f"{name}.ifc" + emit_ifc(m, str(out)) + return ifcopenshell.open(str(out)) + + +@pytest.mark.skipif(not HAS_VOIDS, reason="needs BIMForge with Element.voids") +def test_restored_ground_stays_inside_its_host(tmp_path, monkeypatch): + """A cut that reaches past its host (1 ft over grade, as an opening runs + past its wall) restores only the host's ground before the dig - not the + air above grade (PR #8 review).""" + from shapely.geometry import Polygon + from ifcsection import developed as D + from ifcsection import schedule_state as SS + box = lambda x0, x1, z0, z1: [(x0, z0), (x1, z0), (x1, z1), (x0, z1)] # noqa: E731 + f = _section_model(tmp_path, "over", [ + ("existing ground", box(-20, 20, -12, 0), "IfcGeographicElement", None), + ("structure excavation", box(-6, 6, -6, 1), "IfcEarthworksCut", "existing ground")]) + cut = f.by_type("IfcEarthworksCut")[0] + monkeypatch.setattr(SS, "element_spans", + lambda f: {cut.GlobalId: SS.Span("2027-01-10", None, ("dig",))}) + D._BODY_CACHE.clear() + before = cross_section(f, SectionView("B", 1050.0, width=50.0, depth=1.0, + date="2027-01-05")) + area = sum(Polygon(p[0], p[1:]).area for _l, _r, ps in before.cut for p in ps) + assert area == pytest.approx(40 * 12, rel=1e-3) # not + 12 x 1 of air + assert max(p[1] for _l, _r, ps in before.cut for r in ps for p in r[0]) <= 1e-6 + D._BODY_CACHE.clear() + + +def test_the_extent_takes_in_the_limits_of_excavation(tmp_path): + """A section of an excavation alone still frames its limit lines + (PR #8 review), not a default band around grade.""" + from ifcsection import developed as D + box = lambda x0, x1, z0, z1: [(x0, z0), (x1, z0), (x1, z1), (x0, z1)] # noqa: E731 + f = _section_model(tmp_path, "alone", [ + ("structure excavation", box(-6, 6, -9, 0), "IfcEarthworksCut", None)]) + D._BODY_CACHE.clear() + dr = cross_section(f, SectionView("S", 1050.0, width=30.0, depth=1.0)) + assert dr.limits and not dr.cut + _x0, y0, _x1, y1 = dr.extent + assert (y0, y1) == (pytest.approx(-9.0, abs=1e-3), pytest.approx(0.0, abs=1e-3)) + D._BODY_CACHE.clear() From 021b41dd39db7a65a37ed67e9b648f46c99a69ce Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 15:06:46 +0000 Subject: [PATCH 2/8] Restore no ground where the section misses the cut's host When the plane cut a hosted cut but not its host, _clip_to_host returned None and the caller filled the whole cut: soil drawn outside the ground, in the pre-dig view and in Solid mode. Return no rings there, as the DXF path (developed._cut_into) already skips a Restore with no host region. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 4 ++ src/ifcsection/addon.py | 9 +++-- tests/blender/test_alignment_section.py | 54 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c30d3..b065dd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ Ported from BIMForge 0.1.100 (its PR #8 review): A pay-item excavation body (unhosted) is the soil itself, so it is still restored whole. +- **No ground is restored where the section misses the host.** When the + section plane cuts a hosted cut but not the ground it voids, the add-on + no longer fills the whole cut there (in either the pre-dig view or Solid + mode). This matches the DXF sections. - **Drawing extents take in the limits of excavation**, so a section of an excavation alone is no longer clipped. diff --git a/src/ifcsection/addon.py b/src/ifcsection/addon.py index bd5c851..a48c6d0 100644 --- a/src/ifcsection/addon.py +++ b/src/ifcsection/addon.py @@ -638,8 +638,9 @@ def _dug(gid, props) -> bool: def _clip_to_host(cut_edges, host, co, look, shift): """The cut's section clipped to its host's UNCUT section, as closed rings - of points in the plane; None when it cannot be clipped (no host section), - in which case the caller fills the cut as it is.""" + of points in the plane: none when the plane misses the host (no ground + there to restore); None when the cut's own section does not close, in + which case the caller fills the cut as it is.""" import bmesh from mathutils import Vector from shapely.geometry import Polygon @@ -669,7 +670,9 @@ def region(segs): finally: bm.free() cut = region([(flat(e.verts[0].co), flat(e.verts[1].co)) for e in cut_edges]) - if ground is None or cut is None: + if ground is None: # the plane misses the host + return [] + if cut is None: return None kept = cut.intersection(ground) out = [] diff --git a/tests/blender/test_alignment_section.py b/tests/blender/test_alignment_section.py index 476acf2..75fc252 100644 --- a/tests/blender/test_alignment_section.py +++ b/tests/blender/test_alignment_section.py @@ -801,3 +801,57 @@ def body(name, ring, ifc, **kw): bpy.data.objects.remove(ob) props.ifc_path = home_path bpy.ops.ifcsection.section_load() + + +def test_no_ground_is_restored_where_the_plane_misses_the_host(addon, tmp_path): + """The host stops short of the section; its cut runs on through it. Before + the dig nothing is restored there: there is no ground to restore.""" + mod, m, al, _prof = addon + from bimforge.author.emit_ifc import emit_ifc + from bimforge.author.model import Element, StructureModel + from bimforge.author.sweep import SweptSection + sc = bpy.context.scene + props = sc.ifcsection + home_path = props.ifc_path + dm = StructureModel("short", m.ctx) + + def body(name, ring, ifc, s1, **kw): + sw = SweptSection(name, ring, al, 1010.0, s1, origin=m.ctx, ifc=ifc) + dm.add(Element.from_geometry(name, sw, ifc_class=ifc, + quantities={"volume_cf": sw.volume_cf}, **kw)) + box = lambda x0, x1, z0, z1: [(x0, z0), (x1, z0), (x1, z1), (x0, z1)] # noqa: E731 + body("existing ground", box(-20, 20, -12, 0), "IfcGeographicElement", 1150.0) + body("structure excavation", box(-6, 6, -6, 0), "IfcEarthworksCut", 1360.0) + dm.element("structure excavation").voids = "existing ground" + dm.alignments.append((al, None)) + path = tmp_path / "short.ifc" + emit_ifc(dm, str(path)) + f = ifcopenshell.open(str(path)) + before = set(bpy.data.objects.keys()) + _import_meshes(f) + made = [bpy.data.objects[n] for n in set(bpy.data.objects.keys()) - before] + next(o for o in made if o.name.startswith("structure excavation")).name = \ + "IfcEarthworksCut/structure excavation" + try: + props.ifc_path = str(path) + assert bpy.ops.ifcsection.section_load() == {"FINISHED"} + props.goto = 1200.0 + bpy.ops.ifcsection.section_goto() + gid = f.by_type("IfcEarthworksCut")[0].GlobalId + mod._STATE["spans"] = {gid: mod._ss.Span("2027-01-10", None, ("dig",))} + props.date = "2027-01-05" + props.date_filter = True + for mode in ("LIMITS", "SOLID"): + props.excavation = mode + bpy.ops.ifcsection.section_cut() + me = bpy.data.objects[mod.CUT].data + earth = sum(p.area for p in me.polygons + if "Earthwork" in me.materials[p.material_index].name) + assert earth == pytest.approx(0.0, abs=1e-6), mode + finally: + props.date_filter = False + props.excavation = "LIMITS" + for ob in made: + bpy.data.objects.remove(ob) + props.ifc_path = home_path + bpy.ops.ifcsection.section_load() From 967ac448f732de8caf20466e6f74f9fc97a0188e Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 15:08:42 +0000 Subject: [PATCH 3/8] Guard the new host-miss test on Element.voids like its siblings Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- tests/blender/test_alignment_section.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/blender/test_alignment_section.py b/tests/blender/test_alignment_section.py index 75fc252..fcf06e5 100644 --- a/tests/blender/test_alignment_section.py +++ b/tests/blender/test_alignment_section.py @@ -803,6 +803,7 @@ def body(name, ring, ifc, **kw): bpy.ops.ifcsection.section_load() +@pytest.mark.skipif(not HAS_VOIDS, reason="needs BIMForge with Element.voids") def test_no_ground_is_restored_where_the_plane_misses_the_host(addon, tmp_path): """The host stops short of the section; its cut runs on through it. Before the dig nothing is restored there: there is no ground to restore.""" From 5516acb5d360f92b4dd38f0e79b02a3af41be096 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 15:10:01 +0000 Subject: [PATCH 4/8] Release 0.1.1 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 2 +- pyproject.toml | 2 +- src/ifcsection/__init__.py | 2 +- src/ifcsection/addon.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b065dd6..73b097f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Newest first. Versions follow `pyproject.toml`; a tag `vX.Y.Z` publishes the add-on zip. -## Unreleased +## 0.1.1 - 2026-11-05 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 79a1a8d..de29735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ifcsection" -version = "0.1.0" +version = "0.1.1" description = "Cross sections and developed elevations along an IFC alignment: a Blender (Bonsai) add-on and the Python it carries" readme = "README.md" license = "Apache-2.0" diff --git a/src/ifcsection/__init__.py b/src/ifcsection/__init__.py index 36ba937..11bf5d2 100644 --- a/src/ifcsection/__init__.py +++ b/src/ifcsection/__init__.py @@ -9,4 +9,4 @@ Importing the package does not import Blender. """ -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/src/ifcsection/addon.py b/src/ifcsection/addon.py index a48c6d0..40d4cdf 100644 --- a/src/ifcsection/addon.py +++ b/src/ifcsection/addon.py @@ -42,7 +42,7 @@ bl_info = { "name": "IfcSection", "author": "Brandon Lewis", - "version": (0, 1, 0), + "version": (0, 1, 1), "blender": (4, 2, 0), "location": "View3D > Sidebar > Section", "description": "Sections and developed elevations along an IFC alignment", From e6ff8fa042c4398dfa170bc43a28711be49738a9 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 15:21:16 +0000 Subject: [PATCH 5/8] Draw ground still to dig beyond the cut, uncut (port from BIMForge) Before the dig, the edges beyond a section showed the ground with its hole already dug, and a ground solid wholly behind the plane that its cut removes vanished. A host whose every void is still to dig is now drawn beyond the cut as its uncut shape, in place of its voided body. No 3D boolean. Raised in the review of #1. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 14 ++++++++ src/ifcsection/developed.py | 64 ++++++++++++++++++++++++++++++------- tests/test_developed.py | 34 ++++++++++++++++++-- 3 files changed, 98 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73b097f..2de1701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ Newest first. Versions follow `pyproject.toml`; a tag `vX.Y.Z` publishes the add-on zip. +## Unreleased + +### Fixed + +Ported from BIMForge (its fix for this project's PR #1 review): + +- **Ground still to dig draws its edges beyond the cut.** Before the dig + date, the visible edges beyond a section or elevation now show the ground + as it stands, not the ground with its hole already dug. When every void + of a host is still to dig, the host is drawn uncut beyond the plane. A + ground solid that its cut removes entirely, lying behind the plane, no + longer vanishes from the pre-dig view. A host with some voids already + dug is drawn as before, with all of its voids. + ## 0.1.1 - 2026-11-05 ### Fixed diff --git a/src/ifcsection/developed.py b/src/ifcsection/developed.py index 717edd5..28c7be5 100644 --- a/src/ifcsection/developed.py +++ b/src/ifcsection/developed.py @@ -181,7 +181,7 @@ def _all_bodies(f, date): hosts = [r.RelatingBuildingElement for r in getattr(el, "VoidsElements", None) or ()] undug.append((el.Name or el.is_a(), - hosts[0] if hosts else None, v, t)) + hosts[0] if hosts else None, v, t, el.id())) elif (el.is_a("IfcElement") and len(t) and not (spans is not None and not standing(spans.get(el.GlobalId), date))): @@ -208,14 +208,17 @@ def _all_bodies(f, date): pt = t if sel is None else t[sel] ptr = tri_rgb if sel is None else [prgb[0]] * len(pt) layer, ptr = _cut_layer(el, pmat, pm, prgb, ptr) - out.append((el.Name or el.is_a(), layer, - (not solid) and _is_surface(v, pt), v, pt, ptr)) + surf = bool((not solid) and _is_surface(v, pt)) + if getattr(el, "HasOpenings", None): + surf = Voided(surf, el.id()) + out.append((el.Name or el.is_a(), layer, surf, v, pt, ptr)) if not it.next(): break host_style = {name: (layer, trgb[0]) for name, layer, surf, _v, _t, trgb in out if surf is not LIMIT and trgb} gross = {} - for name, host, v, t in undug: + undug_ids = {i for *_x, i in undug} + for name, host, v, t, _id in undug: layer, rgb = host_style.get(host.Name if host is not None else None, (_layer_name("Earthwork"), (0.56, 0.44, 0.30))) if host is None: @@ -229,7 +232,12 @@ def _all_bodies(f, date): if hv is None: continue gross[host.id()] = True - out.append((host.Name, None, Clip(host.id()), hv, ht, [rgb] * len(ht))) + # every void still to dig: the uncut host IS the ground before + # the dig, and draws beyond the cut in the voided host's place + whole = all(r.RelatedOpeningElement.id() in undug_ids + for r in host.HasOpenings or ()) + out.append((host.Name, None, Clip(host.id(), whole), hv, ht, + [rgb] * len(ht))) out.append((f"{name} (not yet dug)", layer, Restore(host.id()), v, t, [rgb] * len(t))) _BODY_CACHE[key] = out @@ -256,8 +264,25 @@ def _named(f, m): class Clip(int): - """A body that is not drawn: a host's UNCUT shape, clipping the ground - restored in its voids (Restore) before they are dug.""" + """A host's UNCUT shape, clipping the ground restored in its voids + (Restore) before they are dug. Not cut; `whole` when every void of the + host is still to dig, and then drawn beyond the cut in place of the + voided host (Voided of the same host).""" + + def __new__(cls, host_id, whole=False): + c = super().__new__(cls, host_id) + c.whole = whole + return c + + +class Voided(int): + """The surface flag (0 or 1) of a body with voids, carrying its `host` + id: beyond the cut, a whole Clip of the same host draws in its place.""" + + def __new__(cls, surface, host): + v = super().__new__(cls, bool(surface)) + v.host = host + return v class Restore(int): @@ -340,9 +365,24 @@ def _extent(drawing) -> list: return zs -def _drawn(w) -> bool: - """A warped body whose edges beyond the cut are drawn.""" - return not (w[2] is LIMIT or isinstance(w[2], (Clip, Restore))) +def _beyond(warped) -> list: + """The warped bodies whose edges beyond the cut are drawn: not limits + or restored ground; before the dig, a host whose every void is still to + dig is drawn uncut (its whole Clip) in place of its voided body.""" + whole = {int(w[2]) for w in warped if isinstance(w[2], Clip) and w[2].whole} + + out = [] + for w in warped: + s = w[2] + if s is LIMIT or isinstance(s, Restore): + continue + if isinstance(s, Clip): + if s.whole: # a solid: its flag is a host id, not + out.append((*w[:2], False, *w[3:])) # a surface flag + continue + if not (isinstance(s, Voided) and s.host in whole): + out.append(w) + return out def is_excavation(el) -> bool: @@ -543,7 +583,7 @@ def to2d(u, z): # ---------------------------------------------------------------- cut _cut_into(drawing, warped, to2d) # ----------------------------------------------------- visible beyond - drawing.beyond = _visible_edges([w for w in warped if _drawn(w)], to2d, + drawing.beyond = _visible_edges(_beyond(warped), to2d, drawing, view, depth * k, k) # ---------------------------------------------------------- ticks drawing.ticks = _ticks(st, un, view, d0, d1, to2d, unit, k) @@ -599,7 +639,7 @@ def to2d(u, z): za + zb * v[:, 2], t[idx], [trgb[i] for i in idx], None)) drawing.elements = len(warped) _cut_into(drawing, warped, to2d) - drawing.beyond = _visible_edges([w for w in warped if _drawn(w)], to2d, + drawing.beyond = _visible_edges(_beyond(warped), to2d, drawing, view, depth * k, k) # an offset tick every whole unit: (x, offset left); looking ahead the # left is on the viewer's left diff --git a/tests/test_developed.py b/tests/test_developed.py index 5bc75f0..47a1ab6 100644 --- a/tests/test_developed.py +++ b/tests/test_developed.py @@ -501,8 +501,9 @@ def _section_model(tmp_path, name, bodies): ctx = _ctx() al = Alignment(POB, RUN, name="ML") m = StructureModel(name, ctx) - for nm, ring, ifc, voids in bodies: - sw = SweptSection(nm, ring, al, 1010.0, 1100.0, origin=ctx, ifc=ifc) + for nm, ring, ifc, voids, *span in bodies: + s0, s1 = span[0] if span else (1010.0, 1100.0) + sw = SweptSection(nm, ring, al, s0, s1, origin=ctx, ifc=ifc) el = Element.from_geometry(nm, sw, ifc_class=ifc, quantities={"volume_cf": sw.volume_cf}) if voids: @@ -538,6 +539,35 @@ def test_restored_ground_stays_inside_its_host(tmp_path, monkeypatch): D._BODY_CACHE.clear() +@pytest.mark.skipif(not HAS_VOIDS, reason="needs BIMForge with Element.voids") +def test_ground_still_to_dig_draws_beyond_the_cut(tmp_path, monkeypatch): + """A ground solid wholly beyond the plane, all of it to be dug: before + the dig its edges are drawn beyond the cut (the host drawn uncut), after + it nothing is (PR #1 review).""" + from ifcsection import developed as D + from ifcsection import schedule_state as SS + box = lambda x0, x1, z0, z1: [(x0, z0), (x1, z0), (x1, z1), (x0, z1)] # noqa: E731 + f = _section_model(tmp_path, "behind", [ + ("existing ground", box(-20, 20, -12, 0), "IfcGeographicElement", None, + (1060.0, 1090.0)), + ("structure excavation", box(-21, 21, -13, 1), "IfcEarthworksCut", + "existing ground", (1055.0, 1095.0))]) + cut = f.by_type("IfcEarthworksCut")[0] + monkeypatch.setattr(SS, "element_spans", + lambda f: {cut.GlobalId: SS.Span("2027-01-10", None, ("dig",))}) + + def beyond(date): + D._BODY_CACHE.clear() + dr = cross_section(f, SectionView("S", 1050.0, width=50.0, depth=60.0, + date=date)) + assert not dr.cut # the plane misses the ground + return sum(math.dist(a, b) for ln in dr.beyond for a, b in zip(ln, ln[1:])) + # the near face of the ground, 40 x 12 ft, outlined + assert beyond("2027-01-05") == pytest.approx(2 * (40 + 12), rel=1e-2) + assert beyond("2027-01-12") == pytest.approx(0.0, abs=1e-6) + D._BODY_CACHE.clear() + + def test_the_extent_takes_in_the_limits_of_excavation(tmp_path): """A section of an excavation alone still frames its limit lines (PR #8 review), not a default band around grade.""" From 69e4afbce1451cde0e492fc5dc8a28c063930948 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 15:50:44 +0000 Subject: [PATCH 6/8] Restore no ground in a host that is not standing at the date Port of the BIMForge fix: an undug cut restored ground, and a whole Clip drew the host beyond the cut, even when the host's own schedule had it not yet placed or already removed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 3 ++- src/ifcsection/developed.py | 2 ++ tests/test_developed.py | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de1701..c000cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ Ported from BIMForge (its fix for this project's PR #1 review): of a host is still to dig, the host is drawn uncut beyond the plane. A ground solid that its cut removes entirely, lying behind the plane, no longer vanishes from the pre-dig view. A host with some voids already - dug is drawn as before, with all of its voids. + dug is drawn as before, with all of its voids. Ground that is not + standing at the date (placed later, or already removed) restores nothing. ## 0.1.1 - 2026-11-05 diff --git a/src/ifcsection/developed.py b/src/ifcsection/developed.py index 28c7be5..be0d272 100644 --- a/src/ifcsection/developed.py +++ b/src/ifcsection/developed.py @@ -225,6 +225,8 @@ def _all_bodies(f, date): # a pay-item body is the soil itself: restore it whole out.append((f"{name} (not yet dug)", layer, False, v, t, [rgb] * len(t))) continue + if spans is not None and not standing(spans.get(host.GlobalId), date): + continue # no ground there yet, or none left # a cut can reach past its host (over grade, as an opening runs past # its wall): restore only what lies in the host's UNCUT body if host.id() not in gross: diff --git a/tests/test_developed.py b/tests/test_developed.py index 47a1ab6..bbc31b5 100644 --- a/tests/test_developed.py +++ b/tests/test_developed.py @@ -565,6 +565,12 @@ def beyond(date): # the near face of the ground, 40 x 12 ft, outlined assert beyond("2027-01-05") == pytest.approx(2 * (40 + 12), rel=1e-2) assert beyond("2027-01-12") == pytest.approx(0.0, abs=1e-6) + # ground not there at the date (placed later): nothing is restored + host = f.by_type("IfcGeographicElement")[0] + monkeypatch.setattr(SS, "element_spans", lambda f: { + cut.GlobalId: SS.Span("2027-01-10", None, ("dig",)), + host.GlobalId: SS.Span("2027-01-07", None, ("place",))}) + assert beyond("2027-01-05") == pytest.approx(0.0, abs=1e-6) D._BODY_CACHE.clear() From d1d6941488cb4f698feca63edb1a6e2e0916f86b Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 16:21:06 +0000 Subject: [PATCH 7/8] Make the 4D back buttons step back Each date-step button set only one of `event` / `days`, and Blender gives an operator's unset, saved properties their last-used values: after "next event", the -1 day and -7 day buttons ran with event=+1 and jumped forward to the next event. Mark both SKIP_SAVE and set both on every button. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 5 +++++ src/ifcsection/addon.py | 23 +++++++++++++---------- tests/blender/test_alignment_section.py | 5 +++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c000cc8..0648716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ Newest first. Versions follow `pyproject.toml`; a tag `vX.Y.Z` publishes the add ### Fixed +- **The 4D back buttons step back.** After "next event", the -1 day and + -7 day buttons jumped forward to the next event: Blender gave each + button the step operator's last-used `event`. The step's properties are + no longer remembered, and each button sets both. + Ported from BIMForge (its fix for this project's PR #1 review): - **Ground still to dig draws its edges beyond the cut.** Before the dig diff --git a/src/ifcsection/addon.py b/src/ifcsection/addon.py index 40d4cdf..249ad1e 100644 --- a/src/ifcsection/addon.py +++ b/src/ifcsection/addon.py @@ -1518,8 +1518,12 @@ class IFCSECTION_OT_section_date_step(bpy.types.Operator): bl_label = "Step Date" bl_description = ("Move the 4D date by days, or to the previous / " "next day something appears or is removed") - days: bpy.props.IntProperty(default=1) - event: bpy.props.IntProperty(default=0) # -1 / +1: jump to event + # SKIP_SAVE: a panel button sets only one of the two, and Blender + # otherwise gives the other its LAST value - after "next event", a + # "-1 day" button would jump to the next event again + days: bpy.props.IntProperty(default=1, options={"SKIP_SAVE"}) + event: bpy.props.IntProperty(default=0, # -1 / +1: jump to event + options={"SKIP_SAVE"}) def execute(self, context): props = context.scene.ifcsection @@ -1645,16 +1649,15 @@ def draw(self, context): row.prop(props, "date_filter", text="") row.prop(props, "date", text="") row = dbox.row(align=True) - for icon, kw in (("PREV_KEYFRAME", {"event": -1}), - ("TRIA_LEFT", {"days": -7}), - ("REW", {"days": -1}), - ("FF", {"days": 1}), - ("TRIA_RIGHT", {"days": 7}), - ("NEXT_KEYFRAME", {"event": 1})): + for icon, event, days in (("PREV_KEYFRAME", -1, 0), + ("TRIA_LEFT", 0, -7), + ("REW", 0, -1), + ("FF", 0, 1), + ("TRIA_RIGHT", 0, 7), + ("NEXT_KEYFRAME", 1, 0)): op = row.operator("ifcsection.section_date_step", text="", icon=icon) - for k, v in kw.items(): - setattr(op, k, v) + op.event, op.days = event, days ev = _STATE["events"] dbox.label(text=f"schedule {ev[0]} to {ev[-1]}") c = _STATE["counts"] diff --git a/tests/blender/test_alignment_section.py b/tests/blender/test_alignment_section.py index fcf06e5..e467a36 100644 --- a/tests/blender/test_alignment_section.py +++ b/tests/blender/test_alignment_section.py @@ -365,6 +365,11 @@ def test_the_date_filter_hides_what_is_not_built_and_skips_its_cut(addon): assert len(bpy.data.objects[mod.CUT].data.polygons) > 0 bpy.ops.ifcsection.section_date_step(days=-1) assert props.date == "2027-09-14" and not deck.visible_get() + # a panel button sets one of `event` / `days`; Blender gives an unset, + # saved property its LAST value, so after "next event" every back + # button jumped forward. Neither may be remembered. + rna = bpy.ops.ifcsection.section_date_step.get_rna_type().properties + assert rna["event"].is_skip_save and rna["days"].is_skip_save props.date_filter = False # everything back assert deck.visible_get() and not mod._STATE["hidden"] From 58f62983b20b64fb5f2b90064dde69840d282b29 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Thu, 5 Nov 2026 16:25:04 +0000 Subject: [PATCH 8/8] Release 0.1.2 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu --- CHANGELOG.md | 2 +- pyproject.toml | 2 +- src/ifcsection/__init__.py | 2 +- src/ifcsection/addon.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0648716..b52193e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Newest first. Versions follow `pyproject.toml`; a tag `vX.Y.Z` publishes the add-on zip. -## Unreleased +## 0.1.2 - 2026-11-05 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index de29735..162dafb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ifcsection" -version = "0.1.1" +version = "0.1.2" description = "Cross sections and developed elevations along an IFC alignment: a Blender (Bonsai) add-on and the Python it carries" readme = "README.md" license = "Apache-2.0" diff --git a/src/ifcsection/__init__.py b/src/ifcsection/__init__.py index 11bf5d2..396ca96 100644 --- a/src/ifcsection/__init__.py +++ b/src/ifcsection/__init__.py @@ -9,4 +9,4 @@ Importing the package does not import Blender. """ -__version__ = "0.1.1" +__version__ = "0.1.2" diff --git a/src/ifcsection/addon.py b/src/ifcsection/addon.py index 249ad1e..c5ae2e5 100644 --- a/src/ifcsection/addon.py +++ b/src/ifcsection/addon.py @@ -42,7 +42,7 @@ bl_info = { "name": "IfcSection", "author": "Brandon Lewis", - "version": (0, 1, 1), + "version": (0, 1, 2), "blender": (4, 2, 0), "location": "View3D > Sidebar > Section", "description": "Sections and developed elevations along an IFC alignment",