ConstructCraft

Spline walls: notes for the next tasks (#307)

Stage 1 (model, geometry, plans, commands, refusals, IFC export) is on feat/spline-walls, stacked on feat/wall-profiles, and so is the app task (the wall tool’s Spline mode, see The app). These notes are for the later stages (openings, the other hosts, IFC).

The representation

Tolerances and bounds (constants of cc_core::wall_spline)

Constant Value Meaning
SAGITTA 0.5 mm a chord strays at most this from the location line
MAX_TURN 6° the curve turns at most this over one chord
MAX_CHORDS 2048 past it the two tolerances loosen (×2, ×1.5 per round, 16 rounds, then 16 chords per segment)
MAX_SEGMENTS 64 Bézier segments (spline::MAX_SEGMENTS)
MAX_COORD 1e6 m control points lie within it
MIN_LENGTH 5 cm least length, and least distance between the ends (no closed splines)
MIN_FACE_RADIUS 5 cm least radius left to the face inside a bend
MAX_KINK_DEG 1° direction change allowed where two segments join

What happens where: every arc / bulge consumer

“Supported” = works on the curve. “Skipped” = silently left out. “Refused” = the command fails with a message; repair neutralizes it in a file.

Consumer Spline wall How
Wall::arc() — None; Wall::is_curved() is true
Wall::length/at/point_at/project/tangent_at/normal_at/offset_line supported spline_path()
Project::wall_axis, wall_length, wall_path, wall_faces supported offset path
Element::translate/transform (mirror) supported control points mapped; a mirror reverses them
copy, delete supported nothing hosted to carry
dim_refs (dim_ref_at, resolve_dim_ref, base_point) supported the arc branch reads is_curved(): along/across on the path
dim_refs::opening_frame n/a no hosted elements
wall_ops::split supported WallSpline::split (exact)
wall_ops::offset_copy supported spline::offset (approximate: exact on straight parts, a few mm on bends), result checked
wall_ops::move_endpoint (and walls sharing the moved end) supported the sync stretches the end knot and handle
wall_ops::trim_corner, trim_to, align_to, path, path_of refused EditError::Spline → msg-spline-wall; path_of gives None
wall_ops::curve_of supported SketchCurve::Spline
sync_wall_profiles, repair of profiles skipped a spline wall keeps no profile
repair of bulge — a spline wall’s bulge is set to 0
wall_framing::frame (layout) skipped no members on a curved wall
cc_geom WallLine (length, end_ray, locate, tangent_at, face, locate_point) supported WallLine::path; faces are Curve::Poly
resolve_join, t_join, core_through supported see Joins
embedded_in (curtain wall inside a wall) skipped a spline wall neither embeds nor is embedded
WallGeom::world/local/tangent/normal_at/frame_at/path/outline/footprint supported WallGeom::spline
outline_area, strip_area, volume, layer_volumes, centroid_u supported chord polygons; heights are level along a spline wall
to_solid, banded_solid (layer extents) supported steps(): a break at every station of either face; smooth facets
recess_area, recess_faces, set_openings with openings n/a build_walls gives a spline wall no openings or recesses
build_walls: profiles, hosted, curtain skipped no profile, no hosted elements; a curtain type gets no path (straight)
attach_wall_tops skipped spline walls are filtered out
bounding_footprints (rooms), closed_meshes, shared_volume, joins of elements supported footprints and meshes
rebar (wall sets), wall_rebar::scale skipped a set hosted by a spline wall gets no bars
cc_views::plan (draw_wall, draw_banded_wall, layer cleanup, hatches, below/above cut) supported path/world only
projected::render, 3D, shadows, path tracer supported from the solid
schedule (Length, Area, Volume, materials) supported wall_length, length × height, geometry
annotate (door/window tags) n/a none hosted
wall_create supported through / control
element_get / element_set supported params.spline, derived.spline; checked by wall_spline::check_wall
check_arc, arc derived (center, radius, sweep) n/a arcs only
door_create, window_create, niche_create, a hosted element’s host refused hosted_at, element_set
wall_attach, attach_top in element_set refused  
wall_profile_set/slope, sketch_set on a wall, wall_create profile refused check_takes_profile
curtain wall type (wall_create type, element_set type) refused check_wall; type_set turning a type used by spline walls into a curtain type, or thickening it past a curve, is stopped by the repair check (generic message)
wall_rebar_create refused / skipped named walls refused; by level or project left out
rebar_copy to a spline wall refused  
wall_framing_create refused “curved”
strip_footings_under_walls skipped counted in skipped
trim_extend, trim_corner, element_align refused subject or reference
element_split, element_offset, move, rotate, mirror, copy, delete supported  
elements_mirror axis_element = a spline wall approximate the chord between the centerline’s ends
defaults::walls_loop (roof and floor outlines from walls) supported the path’s points
nearest_wall (hosting by point) supported distance to the path (then refused)
mass_walls_create unaffected makes straight walls
IFC write_wall supported Brep body, see IFC
IFC wall_body, wall_axis, layer_bodies, openings n/a not reached for a spline wall
IFC import fallback a component with mesh pieces, class IfcWall
app model_snaps supported the location line’s chords snap as lines; curved outlines are not snapped
app properties (sweep row), arc grips, axis_of, wall tool done (app) see The app below

Joins (what was achieved)

Layer extents (base branch)

The band code only needed world, span_at, steps and the strip area: banded spline walls build (stepped solid, per-layer volumes; test layers_with_their_own_extents_step_a_spline_wall). In a mitered end column an interior layer boundary of the solid is broken at interpolated stations, so it can stray up to a couple of millimeters from the plan’s line there (the plan itself uses the exact stations). layer_outlines and IFC layer_bodies are not reached: a spline wall is exported as one shell.

Commands

The app (wall tool Spline mode) — done

Left for later (app)

For the later stages

Pitfalls