Part of the Structure tab redesign (concrete, steel, timber). Sub-project 1, the parametric profile library, is merged (#313). This sub-project, 2a, splits the Structure tab by material and adds a multi-storey grid frame. Sub-project 2b, the parametric steel building (portal frames, purlins and girts), follows with its own spec and uses a host element that owns real members.
Out of scope:
cc_core:
StructuralMaterial { Concrete, Steel, Timber } with ALL, code()
(concrete, steel, timber), from_code and an i18n key().Project::structural_material(&TypeData) -> Option<StructuralMaterial>
for column and beam types (None for other data):
ProfileMaterial:
profile_material_for already does:
Project::types_of_material(category, material) gives the types of a
category whose structural material is material, in id order.structural_type_forstructural_type_for { category: "column" | "beam", material } is an
edit command. It returns { id, name, created }.
created: false, no undo step).profile_import and profile_type_create:
W row W200x26,6.Glulam row MLC 9x32.rect profile 0.20 x 0.40 named 20x40.
An existing profile of that name and shape is reused.type_material).InvalidArguments.grid_frame_createAn edit command with these parameters:
grids: ids; default every grid.base_level and top_level: Refs; default the lowest level and the
one above it.column_type and beam_type: Refs. When missing, they come from
material through structural_type_for.material: default steel.secondary: { parallel_to: grid id, spacing: meters }, optional.What it creates:
base_level up to top_level are ordered by
elevation. Each consecutive pair is a storey.ColumnsAtGrids does.BeamsOnGrids does.top_offset 0).parallel_to (within 1°) and two consecutive crossing grids. All
four of its corners must be grid intersections.n = ceil(width / spacing) - 1 beams run parallel to
parallel_to, evenly spaced. width is the distance between the
two parallel grids.commands::edit). It reuses the span
and intersection helpers of commands::structure, which become
pub(crate) where needed.Limits and errors:
MAX_MEMBERS (2000) members per run. The count is checked
before any edit, and a larger run is refused with InvalidArguments.base_level must be lower than top_level.InvalidArguments.spacing must be finite and at least 0.3 m.parallel_to must be one of the grids.The command returns { columns, beams, secondary, skipped, skipped_bays }.
columns, beams and secondary are lists of ids; skipped and
skipped_bays are counts.
State:
AppState::structure_material: StructuralMaterial, saved in
Preferences (eframe storage key structure_material, validated on
load, default Concrete).Ribbon (ribbon::structure_tab):
selectable_value) that report their role and state through
widget_info.Place(Floor)), and Reinforcement.Tools:
Tool::Column and Tool::Beam gain material: Option<StructuralMaterial>.UiCommand::StructurePlace(Category, StructuralMaterial) is what the
Structure tab’s Column and Beam buttons are. Running it:
structural_type_for, so a missing type is created as an
undo step;tools::tool_types keeps only the types of the filter’s material.
Tools started elsewhere keep material: None and list every type.type_ref of the selected material,
resolved through structural_type_for.Grid frame dialog:
UiCommand::GridFrame, icon grid-frame, opens the dialog in
grid_frame_ui.rs, built on dialog::Dialog with OK and Cancel.types_of_material;grid_frame_create. Errors go to the dialog.All interface text is new i18n keys in the 12 languages.
Engine (crates/cc_engine/tests/structure_materials.rs, declared in
tests/main.rs):
structural_material:
structural_type_for:
grid_frame_create on 3 x 3 grids and 3 storeys:
MAX_MEMBERS it is refused with no undo step;App (ui_tests.rs):
Also:
docs/commands.md regenerated.docs/interface.md, docs/interface.pt-BR.md,
AGENTS.md and the CHANGELOG.