FCS Configurator and Parametric-Design Patterns

This document covers multi-file parametric-architecture patterns: gclass/gblock composition, distributions, deep-parameter hierarchies, constraint triggers, and the .fcc project folder structure.

1. Single-File Component (GClass / GBlock)

The most basic unit of reuse is a gclass + gblock pair.

# define the reusable component type
gclass {gcFence} filename "fence.fcs"

# instantiate with a local coordinate system (LCS)
gblock {gbFence1} gclass {gcFence} lcs { Origin={0,0,0}, Axes=GCS.Axes }
gblock {gbFence2} gclass {gcFence} lcs { Origin={5,0,0}, Axes=GCS.Axes }

Inside fence.fcs the geometry is authored in the local frame. The lcs transforms it to world position.

Parameter passing

gclass {gcWeight} filename "weight.fcs" parameters { H = T, B = T }
gblock {gbW1}     gclass {gcWeight} lcs { Origin={0,0,0}, Axes=GCS.Axes }

Variables in weight.fcs receive the values from the parameters { } block.


2. gblock … if (condition) — Conditional Placement

A gblock is only instantiated when the condition is true:

gblock {gbWindow} gclass {gcWindow} lcs { ... } if (buildingHasWindows)

This is the primary mechanism for optional geometry — openings, add-ons, accessories.


3. Distribution — Repeated Parametric Elements

distribution creates N copies of a gclass along a path, with per-instance parameter overrides.

distribution {dColumns} gclass {gcColumn}
    lcs { Origin={0,0,0}, Axes=GCS.Axes.Ry(-PI/2).Rx(PI/2) }
    transformation translation direction {1,0,0}
    repetitions spacings (columnSpacings)
    specialization ithparameters {
        ith 0 parameters { CssHead:= { h:=0.34 }, CssEnd:= { h:=0.54 } },
        ith 1 parameters { CssHead:= { h:=0.30 } }
    }
Field Description
repetitions spacings (array) One entry per bay; value = bay width
repetitions count N N evenly spaced copies
specialization ithparameters Per-index parameter overrides

Source files


4. simpleRepresentation — LOD Switching

A coarser "view" of a component is shown at lower zoom levels. Declare it inside the gclass file:

simpleRepresentation {srFence}
    curve {cSimpleLine} vertex {v1} {v2}

The 3-D geometry is hidden when the viewer switches to simplified mode; only simpleRepresentation entities are rendered.


5. Constraint / Trigger System

Parameters in FCS can enforce consistency through constraints. A constraint fires when a watched variable changes and re-evaluates the target variable.

# Constraint: keep array length = SOA_N
SOA_N_trigger := {
    Constraints := [
        SecurityOpeningsArray_constraint_SOA_N
    ]
}

SecurityOpeningsArray_constraint_SOA_N := {
    Variable  = "SecurityOpeningsArray",
    Condition := (SecurityOpeningsArray.Count == SOA_N),
    Init      := SecurityOpeningsArrayUpdate,
    Explanation := "Number of openings has been changed"
}

# Update lambda: grow or trim the array to match the target count
SecurityOpeningsArrayUpdate := (
    (SecurityOpeningsArray.Count == SOA_N)
        ? SecurityOpeningsArray
        : ( (SecurityOpeningsArray.Count > SOA_N)
                ? SecurityOpeningsArray.Take(SOA_N)
                : SecurityOpeningsArray +
                  (SOA_N - SecurityOpeningsArray.Count) * [NewDefaultWindow(3.0, PrototypeWindow)] )
)

The three fields of a constraint object:

Field Type Description
Variable string Name of the variable being guarded
Condition bool expression True when the variable is already consistent
Init expression New value to assign when Condition is false

Source file

TestData/new-HiDumbbell.fcc/FenceGlobal.fcs


6. Deep-Property Paths in _updated.fcs

In an .fcc project the entry-point file *_updated.fcs initialises the parametric model's property tree. Deep properties are set with dotted paths and array indexing:

# from benchmark-HBC-2/Buildings.fcc/BuildingsComponentMain_updated.fcs
site.definitionBuildingsBase[0].inWidth_m            := 24
site.definitionBuildingsBase[0].inLength_m           := 48
site.definitionBuildingsBase[0].inEaveHeight_m       := 6
site.definitionBuildingsBase[0].inRoofPlaneSlope_per := 10

# nested array element (LINQ-object constructor inside array literal)
site.definitionBuildingsBase[0].inRoofPlaneProperties_CtArray := [
    RoofSectionSegmentInput{
        inRoofPlaneSlope_deg=10,
        roofSlopeMultiplierId="upwards",
        inRoofSlopeInputMethod="percent"
    }
]

# key-value shorthand (string value)
site.wallSheetingInput.pur.inColorSchemeVertical := "singleColor"

Rules:


7. _viewAll.fcs — Component Entry Point

Each .fcc folder has a pair of entry-point files:

File Purpose
*_updated.fcs Sets initial parameter values (test / snapshot)
*_viewAll.fcs Imports all sub-components; root that the FLI evaluates

The _viewAll.fcs file typically just imports the main component script:

# _viewAll.fcs (minimal example)
import "BuildingsComponentMain.fcs"

8. placeableItem2 — Insertable Component

Some gclasses are declared as placeableItem2, meaning the UI allows a user to drag and drop them at a pick point:

placeableItem2 {pi1}
    gclass {gcDoor}
    pickPoint {0, 0, 0}
    normal    {0, 1, 0}

This declares the insertion origin and orientation for interactive placement.


9. Expert-System Rule Propagation (fcsdrs)

Per-instance display configuration is stored in .fcsdrs / .fcsdrv resource files and loaded via gblock fcsdrs:

gblock {gbPanel} gclass {gcPanel} lcs { ... } fcsdrs ("panelStyle.fcsdrs")

The .fcsdrs file contains style assignments (colors, visibility flags, layer overrides) that are merged with the gblock's geometry.

Source folders


10. _resources.fcs — Shared Resource Registration

In a multi-file project, one file (often _resources.fcs or Resources.fcs) defines all shared materials, section libraries, and helper gclasses. All other files import it:

# Resources.fcs
res := Resources{}     # singleton pattern
# PrimaryFrame.fcs
res := Resources{}
# ... use res.cssLib.mySection, etc.

The {} trailing brace allows parameter overrides when needed.


11. Quick Reference

# Basic gclass/gblock
gclass {gcX} filename "X.fcs" parameters { P1=v1, P2=v2 }
gblock {gbX1} gclass {gcX} lcs { Origin={x,y,z}, Axes=GCS.Axes }
gblock {gbX2} gclass {gcX} lcs { ... } if (someCondition)

# Distribution
distribution {dX} gclass {gcX}
    lcs { Origin={0,0,0}, Axes=GCS.Axes }
    transformation translation direction {1,0,0}
    repetitions count 5

# Constraint trigger
trigger := { Constraints:=[{ Variable="V", Condition:=(V==target), Init:=updateFn }] }

# Deep property path
site.subObject[0].propertyName_m := 12.5

12. Relevant Test Folders

Folder Feature
new-JevanyHouse/ Nested multi-file gclass tree
new-HiDumbbell.fcc/ Constraint triggers, conditional gblock
new-Speed2/ Distribution with ithparameters, PrimaryFrame
benchmark-HBC-2/ Deep property paths, _updated.fcs pattern
examples/parametric-warehouse/ Complete 6-file parametric warehouse
bug-UpdateExpertSystem-*/ Expert-system edge cases
bug-DeepUpdaterEn/ Deep-updater resolution issues
new-GBlockFcsdrs/, new-GBlockFcsdrs2/ Per-instance display resources