API Maps
Goal: locate the central interfaces and abstract classes you will encounter while reading any Flux subsystem, understand who calls them, and know how stable each one is. Reading time: 45—60 minutes. Audience. You have read chapter 00 and 01. You can find a file by name and run
GrepoverSrc\. Stability legend.
๐ข Stable — public, well-known, edits are rare and reviewed carefully.
๐ก Internal — used widely inside Flux but not part of any 3rd-party contract; changes happen but with care.
๐ด Experimental / in flight — actively being migrated; expect inconsistency.
1. How to read this chapter
Each entry below answers four questions:
-
What is it? — the contract in plain English.
-
Who implements it? — the concrete classes you will encounter.
-
Who calls it? — the boundaries the interface mediates.
-
Stability — should you treat it as a fixed contract or as in-flight code?
This chapter does not repeat the C# signatures — read them in the source. It exists so that a name in a stack trace or PR diff is recognizable in a glance.
2. Cross-cutting infrastructure
2.1 ISheafSite ๐ข
Where: Src\Core\Settings\Sheaf.cs.
What: any object whose settings cascade up to a parent. Members: SHName, SHDict, SHParent.
Implementers: Part, BendTech, BendOp, BendMachine, many more.
Callers: the Sheaf resolution helpers — site.Get<T>(SH key), site.Set(SH key, value). Pervasive.
Stability: stable contract; this is the single mechanism for hierarchical settings.
2.2 INotifyPropChanged ๐ข
Where: Src\Base\ (Flux’s own variant of INotifyPropertyChanged).
What: broadcast of property changes, used to drive UI updates and undo registration.
Implementers: Part, BendSetup, BendMount, plus most domain models.
Callers: Globs and the BA.Set change-tracking helper.
Stability: stable; the dual-channel "notify + undo" routing is core to the editing experience.
2.3 Hub (static class) ๐ก
Where: Src\Core\Hub.cs.
What: the official replacement for the legacy "Hub whiteboard". A grab-bag of static Func<>/Action<> slots wired up at startup.
Implementers: Flux.App and (sometimes) Flux.API populate the slots.
Callers: any Core / UI code that needs to call back into the App layer without a project reference. Examples: Hub.BigChooser, Hub.ClosePartByJobID, Hub.APIWrapper.
Stability: internal; new slots get added regularly. Never throw on a null slot — it’s a valid headless state.
2.4 ITrigger and ETrigger ๐ข
Where: Src\Core\Hub.cs (enum) plus an event-broker interface.
What: notification points for external integrations (e.g. PartSaved, JobSaved, PartInJobSaved).
Callers: Boost integration, Praxis embedding.
Stability: stable but small; expect additions, no removals.
2.5 EResult ๐ข
Where: Flux.Base.
What: the standard return enum for operations that can succeed or fail predictably (OK plus a fixed set of failure modes).
Used by: BendTech.Make, BendTooler.Process, Part.DoFoldTo3D, etc.
Stability: stable; new failure modes get added carefully because callers exhaustive-switch on them.
3. The Tech family — domain projections of a Part
A Part aggregates several optional projections. Each is a "tech" — a domain-specific model rooted at the part. They are not formal interfaces but they share a clear contract.
3.1 Tech (base class) ๐ก
Where: Src\Core\Part\ or sibling.
What: the shared root for the projections below.
Concrete subclasses:
| Class | File | Role |
|--|--|--|
| BendTech | Src\Core\Bend\BendTech.cs | Press-brake projection (chapter 02). |
| FoldTech | Src\Core\Fold\ | Panel-bender projection. |
| FlatTech (a.k.a. CutTech) | Src\Core\Laser\ & Punch\ | Flat-cutting projection (laser, punch, combo). |
| PunchTech | Src\Core\Punch\ | Punching specialization. |
| LayoutTech | Src\Core\Layout\ | Layout / setup. |
Pattern: each tech is constructed via a static Make (Part p, Machine m, ...) factory returning EResult. The constructor is private and contains the heavy initialization.
Stability: internal — frequent extension. The factory pattern is stable.
3.2 The Part aggregate ๐ข
Where: Src\Core\Part\Part.cs (sealed class, ~77 KB).
What: the top-level "job" object. Implements ISheafSite, INotifyPropChanged. Holds BendTech, FoldTech, CutTech, Dwg, Model, machine references, and a static list of all open parts (Part.Active) with Part.Current as the active one.
Lifecycle: load โ optional DoFoldTo3D for unfolded inputs โ tech construction โ editing/auto-tooling โ save (FX) or NC export.
Stability: stable shape, but adding a tech requires touching Part.
4. Geometry — the Entity3 / E3* family
4.1 Entity3 (base class) ๐ก
Where: Src\Core\Model\Entity3.cs.
What: base class for all 3D entities in a part model.
Concrete subclasses:
| Class | Role |
|--|--|
| E3Plane | A flat region of sheet metal. |
| E3Flex | A bend zone (flex). |
| E3Patch | A non-developable patch (rare). |
| E3Thick | Thick-plate entity. |
Callers: every domain that walks a 3D model — Bend, Fold, Sim.
Stability: internal; the type hierarchy is mature but VModel rendering changes regularly.
4.2 IFlexSpine ๐ข
Where: Src\Core\Model\BendSpine.cs (and E3Flex.cs).
What: abstract description of a bend cross-section — GetSpine(double bendLie) returns the polyline at a given bend "lie" (0 = flat, 1 = fully folded), plus Thickness.
Implementers: FlatBendSpine, BendSpine, hem variants, Z-bend variants.
Callers: rendering (VModels), bend area modeling, simulation.
Stability: stable contract; documented in Notes\Dev\1005.BendAreaModeling.ftx.
4.3 Pline (polyline) ๐ข
Where: Src\Base\Geo\ and Src\Base\Pline\.
What: the workhorse 2D polyline. Used everywhere from CAD entities to bend spines and tool cross-sections.
Stability: stable; the most heavily used type in Flux.Base.
4.4 Mesh3 ๐ข
Where: Src\Base\Mesh\.
What: triangle mesh.
Used by: machine .mech files, tool meshes, render.
Stability: stable.
5. Rendering — VModel and Lux
5.1 VModel (abstract class) ๐ข
Where: Src\Base\Lux\VModel.cs.
What: the base class for everything renderable. Holds Obj (the underlying domain object), Id (unique once live), Nodes (linked list of SGNode), and Scene.
Subclasses (selection):
| Class | Renders |
|--|--|
| BendMountVM | A tool mount on the press brake. |
| BendNoVM | The bend number labels. |
| BendTechVM | Top-level bend view. |
| Entity3VM | Generic 3D entity. |
| LaserCutVM | A laser cut. |
Override: Draw() — does the actual scene-graph emission via Lux.DrawMesh, Lux.Layer, Lux.Mood.
Stability: stable; Draw() is the single override almost everyone uses.
5.2 Lux (static class) ๐ก
Where: Src\Base\Lux\Lux.cs.
What: the rendering "API" itself — Lux.DrawMesh, Lux.Layer = ELayer.BendMount, Lux.Mood = EMood.Selected, LuxShading, Lux.DrawCS, Lux.Redraw.
Stability: internal; new draw primitives added regularly, none removed without coordination.
5.3 Scene and SGNode ๐ก
Where: Src\Base\Lux\Scene.cs.
What: the scene graph. A live VModel owns a chain of SGNodes (geometry, transform, mood override).
Stability: internal; treat as black-box from domain code.
6. Bend domain — public surface
6.1 BendTech ๐ข — entry point
Constructor: BendTech.Make (Part owner, BendMachine bmc, EDoFlags flags = 0) โ EResult.
Members of interest:
-
Ops : List<BendOp> -
Setups : List<BendSetup> -
BMachine : BendMachine -
Inventory : BToolList -
Dump (TextWriter)— golden-file source.
6.2 BendOp (sealed partial) ๐ก
Where: Src\Core\Bend\BendOp.cs (210 KB).
What: one bending operation. Implements ISheafSite, IBSimStage. Holds Flexes, Phases, Kind, BG state, BA state, etc. ~200 properties.
Stability: internal; large surface area, edits common.
6.3 BendSetup and BendMount ๐ข
Where: Src\Core\Bend\BendSetup.cs, BendMount.cs.
Stable contract: Dump (TextWriter) is the test contract; ComputeHash is the equality contract.
6.4 IBendCalc ๐ข
Where: Src\Core\Bend\BendCalc.cs.
What: the bend-physics interface — GetDieVRange, SuggestDieWidth, SuggestPunchRadius, GetBendRadiusFactor, GetBendStaples.
Implementers: StdBendCalc, TBSBendCalc (Trumpf).
Selection: by BendMachine.BendCalc switching on IsTrumpf.
Stability: stable; the BendStaples struct is also stable.
6.5 BendTooler ๐ก
Where: Src\Core\Bend\Ops\BendTooler.cs.
What: the auto-tooling engine. Public entry: BendTooler.Process (BendTech, EDoFlags).
Stability: internal but the entry signature is stable.
6.6 BTool, BPunch, BDie, BHolder ๐ก
Where: Src\Core\Bend\BendTool.cs.
Stability: internal; new tool kinds and properties added per machine.
6.7 BToolLibrary and BToolList ๐ก
Where: Src\Core\Bend\BendToolLib.cs.
Stability: internal; library format is stable, in-memory list grows.
7. Laser / Punch / Flat domain — public surface
The flat-cutting projection (laser + punch + combo) is unified under
FlatTech(a.k.a.CutTech). The dedicated entry points:
7.1 LaserCore, LaserCut, LaserAuto ๐ก
Where: Src\Core\Laser\.
Highlights:
-
LaserCut— a single cut (the model). -
LaserCutVM— its renderer (in Core, beside the model). -
LaserAuto/AutoRouter— auto-routing of cut sequence. -
StitchCutter,Bevel3DTooler,TraceCut,SliceCut,ScrapCut,PlineCut— specialized cut variants. Stability: internal; large.
7.2 PunchCore and friends ๐ก
Where: Src\Core\Punch\ (13 files).
Stability: internal.
7.3 LaserMachine, PunchMachine ๐ข
Where: in their respective domain folders.
Pattern: subclass of Machine (mirrors BendMachine).
Stability: stable shape.
8. Fold domain (panel bender) ๐ก
8.1 FoldTech and friends
Where: Src\Core\Fold\ (42 files).
Pattern: mirrors BendTech but with panel-bender specifics — clamping beam, blade, gripper. Uses an air-gap table (Notes\Tech\2018.AirGapTables.ftx).
Stability: internal; active development for TecZoneFold.
9. Bend-cell automation (BCell) ๐ก
9.1 BCRegrip, gripper / waypoint family
Where: Src\Core\BCell\ (34 files).
What: robot cell, gripper, suction cups, regrip stations.
Coupling: orchestrated by BendOp's robotic properties (chapter 02 ยง7.4).
UI: Src\UI\BCell\ (BCellUI, BWaypointUI, BRegripUI, BPickupUI, BDepositUI, BGripperToolUI, BJawPickupUI, BGripperUI).
Stability: internal; very active (recent commits).
10. Machine model
10.1 Machine (base) ๐ข
Where: Src\Core\Model\ or Src\Core\ (search class Machine).
Pattern: abstract per-domain configuration. Loaded from X:\Data\Machine\<id>\Machine.curl.
Subclasses: BendMachine, LaserMachine, PunchMachine, panel-bender machines.
Members: Get(int id) factory, Default per domain, NCName, post-processor reference, Settings (a Sheaf), capability bits.
10.2 NC post-processor (press brake) ๐ข
Implementation: all dialects are C# classes under Src\API\Bend\Post\ — AccurpressWriter, Bystronic, BNCWriter (Cell5K / TrumpfB23), CinCinnatiWriter, CybelecWriter, DLCWriter, TrumpfDLD, NonTrumpfDLD (Delem), ESAWriter, Euromac, GeccoWriter, JupiduWriter, LVDWriter, MCBWriter (Komatsu), MuratecWriter, SafanWriter, SafanPBPWriter, PlatformBendWriter (Lua), BNCXWriter, External.
Dispatcher: Src\API\Basis\Basis.cs::GenerateNC (line 138). Wired into Hub.GenerateNC at startup. Dispatch key is the basename of BMachine.Post (e.g. TrumpfDLD).
Routing token: BMachine.Post may end with .hx for legacy reasons (e.g. wad:Post/Bend/TrumpfB23.hx). The extension is ignored; only the basename matters.
Stability: stable; new dialects are added by adding a new C# writer and a switch arm in Basis.GenerateNC.
11. IO surface
11.1 DXFReader / DXFWriter ๐ก
Where: Src\Core\IO\DXFReader.cs (57 KB), DXFWriter.cs (25 KB).
What: the most heavily used drawing-exchange format.
Stability: internal; dialect-specific quirks fixed regularly.
11.2 GeoReader / GeoWriter ๐ก
Where: Src\Core\IO\GeoReader.cs (33 KB), GeoWriter.cs (17 KB).
Stability: internal; .geo is the dominant test-input format.
11.3 HoopsReader (file is HXReader.cs) ๐ก
Where: Src\Core\IO\HXReader.cs (39 KB).
What: HOOPS-based 3D model loader despite the misleading filename. Uses Flux.Hula.dll to read CATIA / Parasolid / ACIS / Pro-E / STEP via the HOOPS library. Validates the HOOPS version on construction.
Stability: internal; track HOOPS version updates.
11.4 LWModelReader, STLModel, MeshIO ๐ข
Where: Src\Core\IO\.
Stability: stable.
11.5 BMC / DLD (Trumpf) ๐ก
Where: Src\Core\Bend\Ops\ImportBMC.cs, ExportBMC.cs, DLDExporter.cs.
Stability: internal; track machine firmware updates.
12. Persistence (Au / Curl / FX)
12.1 [PostLoad] attribute ๐ข
Where: Au-deserializer infrastructure in Flux.Base.
What: a method marked [PostLoad] runs after Au-deserialization, and gets AuType.ObjVersion for forward migration.
Stability: stable contract; the per-class migration list grows.
12.2 Curl read/write ๐ข
Where: Notes\Tech\2007.CurlFiles.ftx describes the format.
What: text-based serialization for machines, tool catalogs, settings.
12.3 Au binary ๐ข
Where: Notes\Dev\1003.AuGoldEncoding.ftx.
What: compact binary format for Part, BendTech, etc.
12.4 FX file ๐ข
What: a packaged native-Flux file (Curl + Au + thumbnail). Uses System.IO.Compression.
13. Globs (UI controllers)
13.1 Glob (base) ๐ข
Where: Src\UI\Glob.cs.
What: the controller base class. Constructed around a domain object.
Decoration: [Glob (Draw = true, Mouse = EMouse.LDown)].
Composite: when multiple objects are selected, the system constructs a composite glob showing shared properties. Multi-selection support is automatic if your individual glob exposes cooperating properties.
13.2 Concrete globs (selection)
| Glob | Wraps | File |
|--|--|--|
| BendOpGlob | BendOp | Src\UI\Bend\BendOpUI.cs |
| BendOpsGlob | composite | Src\UI\Bend\BendOpUI.cs line 661 |
| LaserCutGlob | LaserCut | Src\UI\Laser\LaserUI.cs |
| BCellGlob | BCell-related types | Src\UI\BCell\BCellUI.cs |
| Many more in Src\UI\ | | |
13.3 GElement ๐ก
Where: Src\UI\.
What: abstract description of a property (label, value editor, validation). Translated to WPF by PanelMaker.
Stability: internal; widely subclassed.
14. Helpers you’ll bump into often
14.1 FX (static) ๐ก
Where: Flux.Base.
Highlights:
-
FX.Out (EOut.Info, msgId, args)— logging. -
FX.Notes— persistent key-value store. -
FX.Testing— global flag for the Flit fixtures. -
FX.LoadTestPart,FX.TestFile,FX.TmpTestFile— test helpers. -
FX.CopyFields— reflection-based shallow copy used in shallow-copy constructors. Stability: internal; growing.
14.2 BA (static) ๐ก
Where: Flux.Base.
What: "Boilerplate Assist" — most importantly BA.Set<T>(ref field, value, โฆ) which combines value compare, change notification, and undo registration in one call.
Stability: internal; rarely-changed implementation, ubiquitous call sites.
14.3 CodingError ๐ข
Where: Flux.Base.
What: internal-invariant exception; carries a numeric ID. Should never fire in production.
Stability: stable.
15. Stability summary at a glance
| ๐ข Stable | ๐ก Internal | ๐ด In-flight |
|---|---|---|
|
|
Crash engines ( |
|
|
Some MetaCAM-import pathways |
|
|
Praxis (Engine flavor) wiring |
|
All |
Trumpf license-engine swap (TLM โ TLE) |
|
All IO readers/writers |
Notes refresh (chapter 00 ยง8) |
16. How to use this map
-
Reading a stack trace: look up class names here for two-line context.
-
Starting a bug investigation: identify the entry point (
*Tech.Make,BendTooler.Process, an IO reader) and walk inward. -
Reviewing a PR: the stability legend tells you how much scrutiny to apply.
-
Adding a new feature: prefer extending implementers of stable interfaces over adding new abstractions.
17. Self-check
-
Where do you find the cascaded-settings contract? (ยง2.1)
-
Why does
BendCalchave two implementations? (ยง6.4 + chapter 02 ยง7.5) -
What runs after Au deserialization to migrate older shapes? (ยง12.1)
-
Where is the auto-tooler entry point? (ยง6.5)
-
Which interface mediates between Core and the App layer? (ยง2.3)
-
What is the test-contract method on
BendTech? (ยง6.1)
Last updated: 2026-05-04. The interfaces and classes named here are verified to exist in the current Src\ tree. Stability ratings reflect a snapshot — when you find drift, update it.