BRW v3.0 demo cell - 4 x KUKA KR6 welding a car body shell + door pick & place
=============================================================================

Files (keep them in one folder):
  demo.brw            workspace: 4 x Kuka kr6 (model 0) around the body, 3 STL objects, camera
  brw-plugin.js       the plugin (userCommand 1 / 2 / 3)
  pen_holder.stl      welding torch stand-in, mounted on arms 0 / 2 (BRW v3.1 tools)
  car_body.stl        car body shell, real size (~3.9 m x 1.6 m x 1.3 m), mm, Z up, origin = floor centre
  car_door_left.stl   door panel, origin = bottom centre of the inner face, outer face toward +Y
  car_door_right.stl  mirrored door panel, outer face toward -Y

How to run
  1. BRW -> Import / Export -> select this folder (loads demo.brw + brw-plugin.js).
     Tool (v3.1): demo.brw lists pen_holder.stl as a tool and mounts it on the welding arms 0 / 2
     (offset [160, 0, 56]); keep pen_holder.stl beside demo.brw. The plugin re-attaches it by name if
     needed (CFG.weldingArms); arms 1 / 3 (CFG.handlingArms) never carry a tool.
  2. User command 1  WELD  : arms 0 and 2 (torch) weld the sills and pillars simultaneously; arms 1 and 3
                            are handling robots (magnet flange, no tool) and stay idle.
  3. User command 2  DOORS : arms 1 and 3 pick the doors from the racks and hang them in the
                            door bays, arms 0 and 2 weld the rear sills - all from the posture
                            queue, played concurrently (press "Play full" if needed).
  4. User command 3  RESET : clears the queues, returns the doors to the racks, arms go home.
  The console at the bottom of the workspace reports every stage.

Layout (mm, car centred at the origin, nose toward +X)
  arm 0 [-900, 1950] Rz -90   arm 1 [900, 1950] Rz -90   arm 2 [-900,-1950] Rz 90   arm 3 [900,-1950] Rz 90
  body side faces at y = +-780, sill top z = 440, pillars z 440..1290 at x = -1150 / -40 / 1080
  door racks at [1950, +-1400, 0]; arms enter/leave through a safe point at y = +-1080, z = 900; door targets [500, +-780, 430]

Swapping in a downloaded car model
  Replace car_body.stl with any STL (mm, Z up, centred on the origin) and edit CFG at the top of
  brw-plugin.js: bodyHalfWidth, sillX / pillarX / pillarZ per arm, and the door rack / target
  positions. Every target is verified with forward kinematics; unreachable points are reported
  in the console and skipped. If the body is wider, move the arms outward in demo.brw
  (basePosition) or via the Robot Model window; keep targets under ~1250 mm from each base.
