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
/
Subsystem *BCell* (Bend Cell Automation)

Subsystem *BCell* (Bend Cell Automation)

Prerequisite: Chapter 02 (Bend) read. BCell is layered on top of Bend — every BCell concept ultimately wraps a BendOp. Goal: understand the bend-cell automation subsystem well enough to localize any robot-cell bug to the right code area without writing a fix. Reading time: 60—​90 minutes. Companion to: chapter 02 §7.4 ("Robotic bend lives in BendOp, not separately") — that paragraph is the orientation; this chapter is the depth.


1. TL;DR — BCell in twelve lines

  • Domain: automated press-brake bending performed by a robot cell (Trumpf BendMaster 60/150, Cell5000, Cell7000, FlexCell 10, B23-attached cells).

  • Code root: Src\Core\BCell\ (34 files, ~1.2 MB) plus Src\UI\BCell\ (10 files).

  • Top-level model: BCellTech is abstract — concrete subclasses include BM5000/BM7000/BC7000 family. Lives at BendTech.Cell (every BendTech may have one cell).

  • Three primary stages: Pickup (BCPickup) → many Bends (regular BendOp plus possibly BCRegrip between them) → Deposit (BCDeposit).

  • Cell items: physical objects that can sit in the cell — BPallet, BDispenser, BCupGrip, BJawGrip, BProfileGrip, BFlipConveyor, BTiltConveyor, BLightBox, BFurniture — all under one base BCellItem.

  • Components vs. items: an item is the catalog object; a BCComponent is the placed instance in this cell at a specific transform.

  • Robot pose: kinematic state via BRobotPose (axes / wrist / part transforms); inverse kinematics included.

  • Routing: BRouting decides per-bend insert/bend/extract strategy (front, side-left, side-right, with-ram, vacuum-on, swivel).

  • Regrip flavors: BCRegrip.EFlavor — Pickup, Deposit, Station, Clamp, PostBend, DuringBend, CenteringTable, DoubleSheet. Each has different rules about where it can be added.

  • Output: robot code (proprietary text) + EIN files (Trumpf simulation) + standard NC for the brake.

  • UI controllers: BCellGlob, BPickupGlob, BRegripGlob, BDepositGlob, BWaypointGlob, BGripperGlob, BJawPickupGlob, BGripperToolGlob, BFlexiGripperGlob, BRobotStrategyGlob — all under Src\UI\BCell\.

  • Tests: Test\Bend\Cell\ — yearly bundles (Cell2021.cs …​ Cell2026.cs) plus thematic (CellBasic.cs, CellFixes.cs, CellGripper.cs, BCRegripTest.cs, BCPickupTest.cs, BCDepositTest.cs, BCRouting.cs, BCExtract.cs, CellCustomer.cs, CellUI.cs).


2. Vocabulary — 25 terms

Term Meaning Where in code

Cell

The bend cell — a robot, grippers, machine, peripherals

BCellTech.cs

BendMaster (BM60/BM150)

Trumpf robotic bending cell families (60 kg / 150 kg payload)

BCellItem.EFlags.BM60/BM150

Cell5000 / Cell7000

Newer Trumpf cell platforms

BCellTech subclasses; 7K\BC7000Tech.cs

B23

A Trumpf APC-controlled brake; can be cell-attached

BCellItem.EFlags.B23

FlexCell 10

Compact cell variant

BCellItem.EFlags.FC10

Pickup

Picking the unbent blank from a pallet/dispenser

BCPickup

Deposit

Putting the finished part on a pallet/conveyor

BCDeposit

Regrip

Mid-job change of how the gripper holds the part

BCRegrip (eight flavors)

Pallet

Passive part-storage shelf

BPallet : BStorage

Dispenser

Active blank-feeder with lifting suction

BDispenser : BStorage

Conveyor

Active transport (flip / tilt variants)

BFlipConveyor, BTiltConveyor

Light box

Transillumination platform for image-recognition

BLightBox

Cup gripper

Vacuum or magnetic suction-cup gripper

BCupGrip

Jaw gripper

Pincer-style gripper

BJawGrip

Profile gripper

Long-thin gripper with a slide for extruded profiles

BProfileGrip

Multi-circuit gripper

Cup gripper with independent vacuum groups

BGripperM/BGripperS plus CupGroup

Suction cup

A single cup on the cup gripper

BSuctionCup

Cup state

Per-cup on/off/leak state in a configuration

BCupGripConfig

Waypoint

Discrete 3D pose along the robot trajectory

BCellTech.Waypoints[], BWaypointUI.cs

Routing

Insert / bend / extract strategy per bend

BRouting (EIn.Normal/Left/Right, EOut.*)

Regrip station

Fixed cell location used for hand-off regrips

BRegripStnVM; tracked in RegripStnHome

Centering table

Cell component used to reference part position

BCellItem.EFlags.Centering

Separator sheet

Paper/foam sheet placed between parts in a stack

BSeparator

Lattice / DPlan

The deposit lattice: rows×cols×layers + pitch + start corner + weave

BDepositPlan

EIN file

Trumpf simulation output for the bend cell

BCellTech.EINWriter

Visuals: Doc\Img\BCell\ has the entire concept gallery — gripper anatomy, pickup cycle, deposit cycle, swivel side, slide, regrip station, separator sheet, image-point calculation, inverse-kinematics diagram. Every term above has a picture.


3. The data model — class hierarchy

Part
 └─ BendTech
     └─ Cell : BCellTech (optional, only for robotic parts)        [BCellTech.cs]
         ├─ BMachine (inherited via BendTech)
         ├─ Components : List<BCComponent>                          [BCComponent.cs]
         │   └─ Item : BCellItem (gripper / pallet / dispenser…)   [BCellItem.cs]
         ├─ Pickup : BCPickup                                       [BPickup.cs]
         ├─ Regrips : List<BCRegrip>                                [BRegrip.cs]
         ├─ Deposits : List<BCDeposit>                              [BDeposit.cs]
         ├─ Gripper : BGripper (active gripper for this run)        [BCellItem.cs]
         ├─ DPlan : BDepositPlan (the lattice)                      [BDepositPlan.cs]
         ├─ Routing : per-BendOp BRouting                           [BRouting.cs]
         ├─ Waypoints : List<Waypoint>                              [internal in BCellTech]
         ├─ RobotCode : string                                      (generated)
         └─ Separators : (per pallet/dispenser)                     [BSeparator.cs]

Cell-item hierarchy (from BCellItem.cs lines 8—​23)

BCellItem
 ├─ BStorage
 │   ├─ BPallet
 │   └─ BDispenser
 ├─ BGripper
 │   ├─ BCupGrip
 │   │   ├─ BProfileGrip
 │   │   ├─ BGripperM
 │   │   └─ BGripperS
 │   └─ BJawGrip
 ├─ BLightBox
 ├─ BFurniture
 └─ BEquipment
     ├─ BFlipConveyor
     └─ BTiltConveyor

Three subtleties

  1. BCellTech is abstract. Every concrete cell is one of a small set of subclasses (BM5000 family, BC7000Tech). When you read BCellTech.Foo(), look at the concrete class that the part actually owns — overrides matter.

  2. Items are catalog, components are placements. Editing a BCupGrip (item) potentially affects all parts that use it; editing its BCComponent (placement) only affects the current cell.

  3. Stages are siblings, but ordered. A cell run is Pickup → (Bends with optional Regrips between them) → Deposit. The Bend ops themselves are owned by the parent BendTech; BCell owns the inter-bend "glue".


4. Module map — the 34 files grouped

4.1 Root Src\Core\BCell\ (24 files)

Size File Contents

81 KB

BCellTech.cs

The abstract cell tech. Read first. Constructors, dump format, robot-code mangling, components/regrips/deposits lists.

85 KB

BCellItem.cs

The item type hierarchy (gripper, pallet, dispenser, conveyors). Long but the comment header (lines 8—​23) is the cheat-sheet.

66 KB

BCellUtil.cs

Cross-cutting helpers used by the cell stages.

28 KB

BCellVM.cs

View-models for cell rendering: BCellVM, BM5000VM, BCComponentVM, BDispenserVM, BProfileGripVM, BRegripStnVM, PartForPickupVM, PartAtDepositVM. The header comment (lines 7—​16) lists everything.

14 KB

BCMiscTypes.cs

Small types and enums shared across the module.

7 KB

BCOperations.cs

Operations facade.

28 KB

BCComponent.cs

The "placed instance" wrapper around a BCellItem.

57 KB

BPickup.cs

Pickup operation (vacuum from pallet, jaw from dispenser, with light-box imaging). Implements IBSimStage and IGripSource.

9 KB

BPickupPlan.cs

Lattice/plan for the pickup pile.

61 KB

BRegrip.cs

Regrip operation. Eight flavors in EFlavor. The most subtle file in the module.

34 KB

BDeposit.cs

Deposit operation.

46 KB

BDepositPlan.cs

The deposit lattice (DPlan): rows, cols, layers, pitch, weave, two-part stagger.

42 KB

BCupGrip.cs

Cup gripper, suction cups, multi-circuit configuration.

11 KB

BFlexiGripper.cs

Flexible gripper variant.

14 KB

BEquipment.cs

Active equipment (flip/tilt conveyors).

21 KB

BSeparator.cs

Separator-sheet model.

31 KB

BRouting.cs

Per-bend insert/bend/extract strategy.

34 KB

BRobotPose.cs

Robot kinematics — FK/IK, axes ↔ wrist ↔ part transforms.

45 KB

BSimStepNeo.cs

Step-by-step simulation of a cell run.

9 KB

Cell5KNCSim.cs

NC-side simulation for Cell5000.

10 KB

BNCInterface.cs

NC-code interface.

21 KB

GripperTool.cs

Tooling-side gripper representation.

9 KB

7K\BC7000Tech.cs

Cell7000 specialization.

13 KB

Fanuc\BCFanucTech.cs

Fanuc-controller specialization.

4.2 Src\Core\BCell\Ops\ (10 files — algorithms)

Size File Contents

39 KB

BCComputer.cs

Cell-level computation orchestrator.

22 KB

BCellImport.cs

Importing grippers (ARV / JSON / DXF / GEO — see Note 2017).

45 KB

BDepositExpert.cs

The lattice/deposit expert (decides where each part lands).

16 KB

BRegripExpert.cs

Decides whether / which regrips to insert.

42 KB

BRegripAux.cs

Regrip auxiliary algorithms.

20 KB

PickupExpert.cs

Decides pickup parameters (which gripper config, which cups, which approach).

24 KB

DispenserExpert.cs

Special-case logic for dispenser pickups.

29 KB

BStepComputer.cs

Per-step computer (waypoints, simulation steps).

40 KB

CellRefine.cs

Refinement passes after initial planning.

26 KB

RPathPlanner.cs

Robot-path planner (between any two cell poses).

4.3 UI hooks Src\UI\BCell\ (10 files)

File Wraps

BCellUI.cs

BCellGlob — top-level cell editor (largest at 35 KB)

BPickupUI.cs

BPickupGlob

BRegripUI.cs

BRegripGlob

BDepositUI.cs

BDepositGlob

BWaypointUI.cs

BWaypointGlob

BGripperUI.cs

BGripperGlob

BGripperToolUI.cs

BGripperToolGlob

BJawPickupUI.cs

BJawPickupGlob

BFlexiGripperUI.cs

BFlexiGripperGlob

BRobotStrategyUI.cs

strategy editor

4.4 Notes

Note Content

Notes\Tech\2017.CupGripperInfoInDwg.ftx

Required reading. How DXF/GEO files import cup-gripper data (cup positions, groups, baseplate, multi-circuit).

Notes\Tech\2016.ImportBMC.ftx

BMC machine format (cell-aware machines too).

Notes\Tech\2020.ImportBComponent.ftx

Importing cell components.


5. The eight regrip flavors (the most subtle topic)

BCRegrip.EFlavor (in BRegrip.cs) drives where and how a regrip can be inserted. Each flavor has different placement rules — see BendOpGlob.AddRegrip in Src\UI\Bend\BendOpUI.cs lines 21—​55.

Flavor Where it occurs Notes

Pickup

Right after the pickup, before the first bend

Available if the pickup pose differs from what the first bend wants.

Deposit

Right before deposit, after the last bend

Available if the deposit pose differs from the last-bend hold.

Station

At a fixed regrip station between two bends

Requires HasRegripStns and not jaw-grip.

Clamp

While the part is held by the brake clamp

Available if previous regrip wasn’t a station/pickup/centering-table.

PostBend

Right after a bend, before the next

Cannot stack with another Station-type regrip.

DuringBend

While the part is being bent (rare, machine-dependent)

Requires RegripDuringBend = true on the prior op.

CenteringTable

At a centering-table component

Requires a Centering-flagged component.

DoubleSheet

At a double-sheet station for paired processing

Requires HasDoubleSheetStn.

When debugging "regrip in the wrong place" or "regrip cannot be added", the answer is almost always in this enum’s rules combined with the per-cell capability flags.


6. Lifecycle of a robotic part — sequence in words

1. Part loads (.fx or 3D import).
2. BendTech.Make creates the bend projection (chapter 02 §5).
3. If the target machine is cell-attached:
   a. BCellTech is constructed (concrete subclass: BM5000 / BC7000 / Fanuc).
   b. Cell components (gripper, pallet, dispenser, regrip stns) are placed.
   c. BendTech.Cell = cellTech.
4. BendTooler.Process runs (still chapter 02).
   ─ But: now mRobotic = true → tool-scoring / sequencing rules differ.
5. Cell-level expert passes:
   a. PickupExpert / DispenserExpert decide pickup parameters.
   b. BRegripExpert decides regrips between bends.
   c. BDepositExpert decides the deposit lattice.
   d. CellRefine refines the plan.
   e. RPathPlanner plans robot motion between every pose.
   f. BStepComputer materializes per-step waypoints.
6. BSimStepNeo simulates the run end-to-end.
7. Validation: per-stage EBCStatus / EBStatus flags collected.
8. Output:
   ─ NC code for the brake — produced by a C# writer in Src\API\Bend\Post\
     (e.g. BNCWriter for Cell5K / TrumpfB23, TrumpfDLD, ...) via Hub.GenerateNC.
   ─ Robot code (cell-specific text) — generated by BCellTech.RobotCode + MangleRobotCode.
   ─ Optionally an EIN file (Trumpf simulation) via BCellTech.EINWriter.

7. Three canonical reading tours (15 min each)

Tour A — "What does a cell run actually consist of?"

  1. Src\Core\BCell\BCellTech.cs lines 27—​80 — the abstract base, components/regrips/deposits lists.

  2. Src\Core\BCell\BCellTech.cs Dump method lines 45—​78 — exactly what gets compared in tests.

  3. Test\Bend\Cell\CellBasic.cs lines 13—​137 — a fixture with Test helper. Note the helper calls tech.Cell.CheckDump (...) and tech.CheckBNC (...): two golden files per test (cell text + NC).

Self-check: name the three lists on BCellTech that determine cell behavior. What does MangleRobotCode do?

Tour B — "What is a regrip, mechanically?"

  1. Src\Core\BCell\BRegrip.cs lines 14—​60 — class declaration and constructor.

  2. BCRegrip.EFlavor enum (search enum EFlavor inside BRegrip.cs) — the eight kinds.

  3. Src\UI\Bend\BendOpUI.cs lines 21—​55 — BendOpGlob.AddRegrip. The rules of "what flavor can be added next" live here.

Self-check: if the user clicks "Add Regrip" on the first bend, which flavors are eligible?

Tour C — "How are grippers imported?"

  1. Notes\Tech\2017.CupGripperInfoInDwg.ftx — the entire note (~90 lines).

  2. Src\Core\BCell\Ops\BCellImport.cs lines 1—​30 — the BCupGripImport.Load entry, ARV vs. JSON.

  3. Src\Core\BCell\BCupGrip.cs lines 13—​40 — the ICupGrip interface, what the imported gripper must expose.

Self-check: what is a "multi-circuit" gripper, and where in the DXF does the circuit grouping appear?


8. Common stumbling blocks

8.1 BCell logic is split across BendOp and BCRegrip

Robotic-bend awareness lives partly in BendOp (Robotic, RegripDuringBend, IsFirstOp/IsLastOp cell-stage logic) and partly in BCRegrip (the regrip itself). When a "regrip in wrong place" bug arrives, both places need inspection, not just BCell.

8.2 BCellTech is abstract — every override matters

BCellTech defines the contract; BM5000, BC7000Tech, BCFanucTech override behavior. A bug "only on Cell7000" usually points at 7K\BC7000Tech.cs. A "only on Fanuc" bug → Fanuc\BCFanucTech.cs.

8.3 Versioning is everywhere

BPickup.PostLoad (BPickup.cs lines 31—​50) does an in-line migration based on mCell.FXBuildRev and mCell.FXBuildNo — not just AuType.ObjVersion. The pattern is: turn off status flags that older builds couldn’t set correctly. When you find a flag mysteriously missing, check the build-number gates.

8.4 Robot-code post-processing is in the dump

BCellTech.MangleRobotCode (lines 80—​119) post-processes the raw robot code to produce the canonical text used in tests. If you see odd DZ/DY/DX deltas in golden files, that’s this method emitting compact relative motion.

8.5 Cell items have EFlags for capability gating

BCellItem.EFlags (25 flags!) gates compatibility (BM60 vs. BM150 vs. B23 vs. FC10 vs. Cell7000 vs. TBC7030, plus structural attributes like Conveyor, Centering, DoubleSheet, Inclined, RotateBy180). When a component doesn’t appear in a placement dialog, the answer is here.

8.6 The IGripSource interface

BCPickup and BCRegrip both implement IGripSource (search the interface in BCupGrip.cs or sibling) — they are the two places the part transitions to a new gripper hold. Bugs about "gripper hold transform after regrip/pickup" are at this interface.

8.7 Two output streams

A cell test uses two golden files: a .txt (the cell dump) and a .nc (the brake NC code). Changing one without the other = one of the two will fail.


9. Tests — how they are organized

Inventory (X:\Test\Bend\Cell\, 15 files; plus Cell7K\Cell7KBase.cs)

Category Files

Cell5000 basics

CellBasic.cs (~360 tests)

Yearly regression bundles

Cell2021.cs …​ Cell2026.cs

Per-stage tests

BCPickupTest.cs, BCRegripTest.cs, BCDepositTest.cs

Routing & extraction

BCRouting.cs, BCExtract.cs

Customer-specific

CellCustomer.cs

Grippers

CellGripper.cs

Misc / fixes

CellFixes.cs

UI

CellUI.cs

Cell7000

Cell7K\Cell7KBase.cs

Cell-aware IO

Test\IO\CellCfgReaderTest.cs

The standard test pattern

From Test\Bend\Cell\CellBasic.cs lines 131—​137:

public static Part Test (string infile, int idMC = 93, bool checkBNC = true) {
   var part = FX.LoadTestPart (infile);
   part.DoSwitchToBending (EDoFlags.NoGAPAdjust, BendMachine.Get (idMC));
   part.BendTech.Cell.CheckDump (Path.ChangeExtension (infile, ".txt"));
   if (checkBNC) part.BendTech.CheckBNC (Path.ChangeExtension (infile, ".nc"));
   return part;
}

Note the differences from chapter-02 Bend tests:

  • idMC = 93 is the standard cell-attached machine (X:\Data\Machine\93\), not 13.

  • DoSwitchToBending not BendTech.Make directly (cell-aware switching).

  • Two golden checks: Cell.CheckDump (cell text) + BendTech.CheckBNC (brake NC).

  • BendCellMisc adds EIN-file tests (EINTest, lines 169—​174) and recognition-image tests (Test, lines 175—​187).

Test inputs live under X:\TData\Cell\<area>\ with the same subdirectory taxonomy as the test categories above. Customer cases use the prefix C<number> (e.g. C45292, C42921); internal tickets use T<number> (e.g. T4715, T8574).


10. The four standard machines / cells

ID What Where

93

Default cell-attached test machine

X:\Data\Machine\93\ — used for CellBasic tests

13

Default standalone bend test machine

X:\Data\Machine\13\

99

BendMachine.Default in BA.Testing mode

X:\Data\Machine\99\

custom

Customer machines (delivered with installation)

X:\Data\Machine\<custom>\

Cell-aware machines have additional cell metadata in their Machine.curl. The cell-tech subclass is selected based on the machine’s cell type.


11. When a BCell bug arrives — 60-second triage

Symptom Likely code area First file

"Wrong gripper choice"

Pickup expert

Ops\PickupExpert.cs

"Cup state wrong / waypoints don’t update"

Pickup setter logic

BPickup.cs (notice the build-version gates around line 42)

"Regrip inserted in wrong place"

Add-regrip rules

Src\UI\Bend\BendOpUI.cs lines 21—​55 + BRegrip.cs EFlavor

"Regrip-station collision"

Regrip-station Y position / shift

BRegrip.cs ShiftX (line 32) and RegripStnHome

"Deposit lattice wrong"

Deposit expert

Ops\BDepositExpert.cs + BDepositPlan.cs

"Robot motion through obstacle"

Path planner

Ops\RPathPlanner.cs

"Wrong insert/extract direction"

Routing

BRouting.cs (EIn/EOut)

"Robot code looks wrong"

Mangling

BCellTech.MangleRobotCode (lines 80—​119)

"EIN file mismatch"

EIN writer

BCellTech.EINWriter

"Component missing from placement dialog"

Capability flags

BCellItem.EFlags

"Gripper import fails"

Import path

Ops\BCellImport.cs (ARV/JSON), Notes\Tech\2017

"Cell-only on Cell7000"

Cell7000 override

7K\BC7000Tech.cs

"Cell-only on Fanuc"

Fanuc override

Fanuc\BCFanucTech.cs

"Image recognition off"

Pickup imaging

BPickup.cs IImageRecogSrc and mImages (line 37)

"Separator-sheet stack wrong"

Separator

BSeparator.cs, BDepositPlan

"Force/payload check wrong"

Cup load

BCupGrip.cs cup-state logic

"Stroke / reach error"

Robot pose

BRobotPose.cs (FK/IK)

"Sim step wrong"

Step computer

Ops\BStepComputer.cs + BSimStepNeo.cs


12. Exercise 1 — "Find & Explain" (30 min, read-only)

Task. Explain in half a page what happens when a user adds a "Station" regrip to the second bend of a cell-attached part.

Approach:

  1. Src\UI\Bend\BendOpUI.cs lines 21—​55 — AddRegrip. Which conditions enable EGTag.AddAtStation?

  2. Src\Core\BCell\BRegrip.cs lines 14—​60 — what does the constructor do, and what is mGripXfmAfter?

  3. Src\Core\BCell\Ops\BRegripExpert.cs — does the expert recompute anything, or is the user’s edit final?

  4. BCellTech.Dump — where in the cell text does this regrip appear?

  5. Bonus: what test in Test\Bend\Cell\BCRegripTest.cs is closest to this scenario?

Rubric:

Level Criterion

1

Locates AddRegrip and the Station flavor

2

Explains the eligibility conditions

3

Plus: traces to a re-validation pass and to the dump

4

Plus: identifies the corner case where station regrips collide with regrip-station home positions


13. Exercise 2 — "Trace a real cell bug" (45 min, read-only)

Task. The recent commit 4a5119dcb ("Case 45728: Changing the suction cup state no longer deletes adjusted waypoints") is a textbook BCell bug. Read the diff and answer:

  1. Which class’s setter triggered the bug? (Hint: cup state lives in a cup-grip-config type.)

  2. Which setter forgot to invalidate which dirty flag? (See EBDirty / EBInvalid.)

  3. Which test fixture covers the case?

  4. Bonus: the second recent commit 3a1791bf8 ("Case 46197: Don’t change GripperHoldXfm when changing base plane for centering regrip") is a related class. Compare the two: same module? Same flavor of fix?

Rubric:

Level Criterion

1

Names the file and the property

2

Identifies the dirty / invalidate flag pattern

3

Plus: locates the test

4

Plus: explains why the centering-regrip variant needed the opposite of the first fix


14. What this chapter does not cover

  • NC code generation for the brake — see chapter 02 §10. NC writing is handled by C# writers in Src\API\Bend\Post\ (e.g. BNCWriter for Cell5K / TrumpfB23, TrumpfDLD, …​) dispatched via Hub.GenerateNC.

  • The Bend Tooler proper — chapter 02. BCell influences it via mRobotic; it does not reimplement it.

  • Cell7000 / Fanuc deep specifics — separate chapters when those subsystems mature further.

  • The wider Sim subsystem — Src\Core\Sim\ is invoked by BCell but is its own area.

  • Individual gripper-import format details — see Notes\Tech\2017 for cup grippers; jaw / profile have their own notes.


15. If you take just one thing from this chapter

BCell lives at BendTech.Cell and orchestrates three stages — Pickup, Regrips, Deposit — around the existing Bend sequence. Almost every cell-specific bug is a flavor / capability / version gate in one of those three stages, or the regrip-add rules in BendOpGlob.AddRegrip. Models are catalog (BCellItem); placements are instances (BCComponent). Always check both.


Last updated: 2026-05-04. Code paths verified against Src\Core\BCell\, Src\UI\BCell\, Test\Bend\Cell\, and Note 2017.

Contents

  • 1. TL;DR — BCell in twelve lines
  • 2. Vocabulary — 25 terms
  • 3. The data model — class hierarchy
  • Cell-item hierarchy (from BCellItem.cs lines 8—​23)
  • Three subtleties
  • 4. Module map — the 34 files grouped
  • 4.1 Root Src\Core\BCell\ (24 files)
  • 4.2 Src\Core\BCell\Ops\ (10 files — algorithms)
  • 4.3 UI hooks Src\UI\BCell\ (10 files)
  • 4.4 Notes
  • 5. The eight regrip flavors (the most subtle topic)
  • 6. Lifecycle of a robotic part — sequence in words
  • 7. Three canonical reading tours (15 min each)
  • Tour A — "What does a cell run actually consist of?"
  • Tour B — "What is a regrip, mechanically?"
  • Tour C — "How are grippers imported?"
  • 8. Common stumbling blocks
  • 8.1 BCell logic is split across BendOp and BCRegrip
  • 8.2 BCellTech is abstract — every override matters
  • 8.3 Versioning is everywhere
  • 8.4 Robot-code post-processing is in the dump
  • 8.5 Cell items have EFlags for capability gating
  • 8.6 The IGripSource interface
  • 8.7 Two output streams
  • 9. Tests — how they are organized
  • Inventory (X:\Test\Bend\Cell\, 15 files; plus Cell7K\Cell7KBase.cs)
  • The standard test pattern
  • 10. The four standard machines / cells
  • 11. When a BCell bug arrives — 60-second triage
  • 12. Exercise 1 — "Find & Explain" (30 min, read-only)
  • 13. Exercise 2 — "Trace a real cell bug" (45 min, read-only)
  • 14. What this chapter does not cover
  • 15. If you take just one thing from this chapter
Subsystem *Bend* (Press Brake) API Maps

      Copyright © 2025 TRUMPF Metamation. All rights reserved.

    Compiled by Bento