Files
cnx_vinyl/docs/CNX_apply_Params.FCMacro
grabowski 7688d03be6 Payap scenario: Part/Draft model with roof, rooftop PV and PV parking canopies
New FreeCAD model docs/cnx_vinyl_parametric_payap_parts.FCStd: the Payap
scenario rebuilt from plain Part solids and Draft (arrays, labels,
dimensions) on the same Params sheet, no BIM objects, plus:

- monopitch roof 10 deg, low eave 7.0 m south, high side 11.4 m north
  (phase 1 RFQ geometry); gables and the fire wall follow the roof
- rooftop PV: 901 x 580 W placeholder modules, ~523 kWp, 17 rows in
  blocks of four with walkways, 1 m edge strip, 2.5 m clear over the
  fire wall (estimate)
- car canopy (10 bays, 72 modules) and scooter canopy (30 spaces,
  22 modules), ~54 kWp, RFQ footprints and heights
- module counts and kWp as sheet expressions; ~577 kWp in all

FreeCAD 26.3 RC1 does not propagate spreadsheet edits: CNX_apply_Params
macro touches the dependents and recomputes; parametric test (factory
length, pitch, car bays, walkway) matches the sheet counts.

site-candidates.md: roof/PV/canopy section with the export, battery and
BOI questions a 577 kWp array raises; mirrors in sustainability.md and
scale.md; README layout lines.
2026-10-14 20:32:43 +07:00

20 lines
898 B
Plaintext

# CNX: apply Params
# FreeCAD 26.3 RC1 does not pass spreadsheet edits on to the objects that read them
# (a normal recompute only recomputes the sheet). Run this macro after editing Params:
# it touches every object whose expressions read the sheet, then recomputes; anything
# further down the chain (arrays, dimensions) follows normally.
import FreeCAD as App
doc = App.ActiveDocument
sheet = doc.getObject("Params") if doc else None
if sheet is None:
App.Console.PrintError("CNX apply Params: the active document has no Params sheet\n")
else:
sheet.recompute()
deps = [o for o in sheet.InList if o is not sheet]
for o in deps:
o.touch()
n = doc.recompute()
bad = [o.Label for o in doc.Objects if "Invalid" in o.State or "Error" in o.State]
App.Console.PrintMessage(f"CNX apply Params: {len(deps)} objects read Params, {n} recomputed, errors: {bad[:10]}\n")