Metamation Developer Notes

  • Developer Notes
  • Resource Map
  • Tools
    • Code Formatting
    • Configuring Git
    • Assignments
    • Testing with Windows Sandbox
    • Single Binary Applications
    • Self-Updating Applications
  • Flux Workflow
    • Flux Workflow
    • Flux Development Style Guide
    • Release notes for Flux
    • SonarCloud analysis for Flux
    • Build a Flux SDK Program
    • Shipping Flux
    • Flux.Test
      • BasicBendAuto Test
      • LaserAuto.cs Detailed Documentation
      • Laserexample:Test1
  • Technical Notes
    • File formats
      • .FX File Format
      • Au(Gold) streams
      • .GEO File Format
      • .LST File Format
      • .LST file - technology
      • .BNC File Format
      • .WAD Files: Flux Resource Packages
      • .Curl Files: ASCII config information
    • Folders App
      • Data\Bendtools
      • Data\Machines
    • FluxCode
      • Welcome & Repo Map
      • Architecture & System Context
      • Subsystem *Bend* (Press Brake)
      • Subsystem *BCell* (Bend Cell Automation)
      • API Maps
      • Data Model Catalog
      • Design Patterns -- A Reader's Guide
      • Tests and Golden Paths
      • Guided Code Tours
      • CAM Glossary with Code Mapping
      • Assignments
      • Flux Onboarding Handbook
    • Data flow
      • Part
        • Part.Dwg
        • Part.Load
        • Part.Load to Part.Dwg
      • BendTech.cs
      • Bend Technology
      • Laser Cutting Technology
    • LTS (Long term support mechanism)
    • Machine ID Scheme
  • FluxTester
    • Commands and Scripts
    • Command Cookbook
    • Script Commands
    • BendTooling.cs Test Inventory
    • LaserTooling.cs Test Steps
    • Fluxtester Recipe Book
    • Nesting.cs Overview
    • Nesting.cs Recipe Book
    • Job.cs Overview
    • Job.cs Recipe Book
  • Software license
  • 3d party software
    • Python
  • Documentation
    • Bento documentation
      • Structure of a Bento page
      • Attributes
    • Software
      • Software Requirement
      • Installation
      • Git workflow for documentation contributors
    • Quick start guide
    • Workflow
      • Roles and responsibilities
      • Analyze
      • Edit
      • Proofread
      • Pre-Publish
      • Publish
      • Release cycle
      • Information required for Documentation Team
      • Checklist for Documenters
    • Styleguide
    • Flavoring
    • Translation
      • Ordering translation for a new document
    • Citations
    • Annotation
Technical Notes
/
FluxCode
/
API Maps

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 Grep over Src\. 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:

  1. What is it? — the contract in plain English.

  2. Who implements it? — the concrete classes you will encounter.

  3. Who calls it? — the boundaries the interface mediates.

  4. 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

ISheafSite, INotifyPropChanged, EResult

Hub, FX, BA, Lux

Crash engines (BendOpCrash โ‡„ NBendCrash)

IBendCalc, BendStaples, BendSetup.Dump contract

BendTech, BendOp, BendTooler (large surfaces, internal use)

Some MetaCAM-import pathways

IFlexSpine, Pline, Mesh3

Glob, GElement

Praxis (Engine flavor) wiring

Machine, post-processor selection

All *Tech projections

Trumpf license-engine swap (TLM โ†” TLE)

[PostLoad] migration contract

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

  1. Where do you find the cascaded-settings contract? (ยง2.1)

  2. Why does BendCalc have two implementations? (ยง6.4 + chapter 02 ยง7.5)

  3. What runs after Au deserialization to migrate older shapes? (ยง12.1)

  4. Where is the auto-tooler entry point? (ยง6.5)

  5. Which interface mediates between Core and the App layer? (ยง2.3)

  6. 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.

Contents

  • 1. How to read this chapter
  • 2. Cross-cutting infrastructure
  • 2.1 ISheafSite ๐ŸŸข
  • 2.2 INotifyPropChanged ๐ŸŸข
  • 2.3 Hub (static class) ๐ŸŸก
  • 2.4 ITrigger and ETrigger ๐ŸŸข
  • 2.5 EResult ๐ŸŸข
  • 3. The Tech family — domain projections of a Part
  • 3.1 Tech (base class) ๐ŸŸก
  • 3.2 The Part aggregate ๐ŸŸข
  • 4. Geometry — the Entity3 / E3* family
  • 4.1 Entity3 (base class) ๐ŸŸก
  • 4.2 IFlexSpine ๐ŸŸข
  • 4.3 Pline (polyline) ๐ŸŸข
  • 4.4 Mesh3 ๐ŸŸข
  • 5. Rendering — VModel and Lux
  • 5.1 VModel (abstract class) ๐ŸŸข
  • 5.2 Lux (static class) ๐ŸŸก
  • 5.3 Scene and SGNode ๐ŸŸก
  • 6. Bend domain — public surface
  • 6.1 BendTech ๐ŸŸข — entry point
  • 6.2 BendOp (sealed partial) ๐ŸŸก
  • 6.3 BendSetup and BendMount ๐ŸŸข
  • 6.4 IBendCalc ๐ŸŸข
  • 6.5 BendTooler ๐ŸŸก
  • 6.6 BTool, BPunch, BDie, BHolder ๐ŸŸก
  • 6.7 BToolLibrary and BToolList ๐ŸŸก
  • 7. Laser / Punch / Flat domain — public surface
  • 7.1 LaserCore, LaserCut, LaserAuto ๐ŸŸก
  • 7.2 PunchCore and friends ๐ŸŸก
  • 7.3 LaserMachine, PunchMachine ๐ŸŸข
  • 8. Fold domain (panel bender) ๐ŸŸก
  • 8.1 FoldTech and friends
  • 9. Bend-cell automation (BCell) ๐ŸŸก
  • 9.1 BCRegrip, gripper / waypoint family
  • 10. Machine model
  • 10.1 Machine (base) ๐ŸŸข
  • 10.2 NC post-processor (press brake) ๐ŸŸข
  • 11. IO surface
  • 11.1 DXFReader / DXFWriter ๐ŸŸก
  • 11.2 GeoReader / GeoWriter ๐ŸŸก
  • 11.3 HoopsReader (file is HXReader.cs) ๐ŸŸก
  • 11.4 LWModelReader, STLModel, MeshIO ๐ŸŸข
  • 11.5 BMC / DLD (Trumpf) ๐ŸŸก
  • 12. Persistence (Au / Curl / FX)
  • 12.1 [PostLoad] attribute ๐ŸŸข
  • 12.2 Curl read/write ๐ŸŸข
  • 12.3 Au binary ๐ŸŸข
  • 12.4 FX file ๐ŸŸข
  • 13. Globs (UI controllers)
  • 13.1 Glob (base) ๐ŸŸข
  • 13.2 Concrete globs (selection)
  • 13.3 GElement ๐ŸŸก
  • 14. Helpers you’ll bump into often
  • 14.1 FX (static) ๐ŸŸก
  • 14.2 BA (static) ๐ŸŸก
  • 14.3 CodingError ๐ŸŸข
  • 15. Stability summary at a glance
  • 16. How to use this map
  • 17. Self-check
Subsystem *BCell* (Bend Cell Automation) Data Model Catalog

      Copyright © 2025 TRUMPF Metamation. All rights reserved.

    Compiled by Bento