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
Flux Workflow
/
Flux.Test
/
LaserAuto.cs Detailed Documentation

LaserAuto.cs Detailed Documentation

LaserAuto.cs contains regression and behavior tests for automatic laser tooling.

General pattern in many tests:

  1. LoadPart(…​)

  2. Configure part/tech settings when needed

  3. Call DoCutTooling(…​) or layout code generation

  4. Validate with boolean assertions or text comparisons (Assert.AreTextEqual)

Detailed Test Coverage

Group A: Baseline and Layer Semantics

Test1 (6147)

Scenario: Performance timing on ZuriTrimmed.geo. Validation: DoCutTooling completes in under 8 seconds. Why it matters: Guards against performance regressions in a representative geometry.

Test2 (6149)

Scenario: Mark-layer entity tooling in MarkLayer.fx. Validation:

  • Mark-layer points are tooled as PointCut with pierce type EPierce.Mark.

  • Mark-layer polylines remain PlineCut with marking enabled (CC.IsMarking).

Why it matters: Prevents simplification rules from incorrectly converting mark polylines into pierce points.

Test3 (6156)

Scenario: GEO file containing point entities. Validation: Every E2Point is represented by a PointCut step.

Test4 (6174)

Scenario: Layer-based behavior in MarkLayer2.fx. Validation:

  • Std polyline cuts are not marking.

  • Mark polyline cuts are marking.

  • Aux entities are not allowed to be tooled.

Test5 (6175)

Scenario: Approach markers from AppMarkers.fx. Validation:

  • PlineCut.ApproachBase matches expected marker points.

  • Marker-layer points are not tooled as PointCut.

Group B: Text Marking and Rule Parameter Sweeps

Test6 (6206)

Scenario: Automatic laser text placement with parameter sweep. Validation: For all combinations of orientation, horizontal alignment, vertical alignment, and multiple heights, generated LaserText placement/angle/text data matches LaserText.txt. Why it matters: Exhaustive regression net for text placement logic.

Test24 (9063)

Scenario: Special macros in TC_WRITE. Validation: Generated code from a macro-based text rule matches C41979.lst.

Test25 (9064)

Scenario: DataMatrix marking (TC_LABEL_DMC). Validation: Mixed variable/literal DataMatrix rules generate expected code (C43021.lst).

Test26 (9065)

Scenario: Grouping behavior for multiple text marks. Validation: Across orientation/alignment combinations and toggled grouping flags, dumped mark info matches C43327.txt.

Test27 (9066)

Scenario: Missing marking generation regression (C43151). Validation: Two related parts both generate expected mark outputs (C43151.txt).

Test28 (9067)

Scenario: Multiple marking output types. Validation: Output code supports/serializes expected mixed types (TC_LABEL_DMC, TC_LABEL_Text, TC_WRITE, Geometry) and matches C44634.lst.

Test31 (9070)

Scenario: Marking overlap issue with open polyline inner contours (C45360). Validation: Mark placement dump matches C45360.txt after applying varied mark rules.

Group C: Process Rules, Contours, and Open Polyline Behavior

Test7 (6217)

Scenario: DXF with countersinks and material context. Validation: Trace output equals CounterSink.txt.

Test8 (6218) and Test9 (6219)

Scenario: Dashed lines in GEO files. Validation: No undesired approaches; trace outputs match NoAppOnDashed*.txt references.

Test11 (6312)

Scenario: Open contour piercing behavior. Validation: Every TraceCut has a non-None pierce type.

Test18 (9005)

Scenario: Pie slugout strategy selection. Validation: A non-inner-circular case does not use pie slugout.

Test20 (9034)

Scenario: Open polylines processing mode. Validation:

  • Mark-layer open polylines default to mark operation.

  • Std-layer open polylines default to cut operation.

  • Forced modes (Cut, Mark, None) override behavior as expected.

Test30 (9517)

Scenario: End optimization scope and interactions with finish rules. Validation:

  • End optimization applies only to inner closed contours.

  • Outer and open contours remain unoptimized.

  • Settings (AppAngle, AppRadius) are correct for optimized and non-optimized paths.

  • With pie strategy and finish rules enabled, optimized contour count and approach defaults remain correct.

Test32 (13517)

Scenario: Cavity cut generation level. Validation: Cavity cuts are produced at part level, ordering is deterministic, and first two cut ranges match C45774.txt. Special note: Uses try/finally to restore global experimental flag.

Group D: Layer Filtering, Import Semantics, and Geometry Selection

Test10 (6263)

Scenario: Info-layer geometry handling. Validation: Tooling excludes info-layer geometry (only one step remains).

Test12 (6317)

Scenario: Point-on-polyline skipping policy. Validation: With default config, one point entity is tooled; with PointEntitiesToSkip = All, point tooling is removed.

Test13 (6318)

Scenario: Form footprint marking. Validation: Enabling MarkFormingFootprint increases marking step count.

Test14 (2556)

Scenario: Outer geometry detection when one outline is smaller than a hole. Validation: OuterPlines count equals 2.

Test16 (6387)

Scenario: Red geometry in GEO used for nesting when no closed polyline exists. Validation: Standard outer polylines are discovered.

Test16B (6448)

Scenario: Handling red polylines when standard closed geometry exists. Validation:

  • One polyline is assigned to Aux.

  • Tooling completes successfully.

  • At least one outer closed standard LaserPathCut exists.

Test19 (9009)

Scenario: Import setting for text entities (TextProcess). Validation:

  • None maps imported texts to Info layer.

  • Mark maps imported texts to Mark layer.

  • Setting restored to ByLayer.

Test22 (9059)

Scenario: GEO reader and PROCESS_SIDE = BOTTOM. Validation: Entities are flagged SkipLaserTooling and excluded from final tooling (single step remains).

Test29 (17518)

Scenario: Blue contour handling in GEO. Validation: Blue entities may exist in drawing, but none appear in generated tooling steps.

Group E: Layout, Code Generation, and Special Regressions

Test15 (6376)

Scenario: Conversion of point operations when thickness changes. Validation: Reducing thickness from 8 to 1 mm converts previously pierce-only point operations into path-cut operations (no PointCut remains).

Test17 (2564)

Scenario: Pre-cutting exception regression (C32519). Validation: With sheared-sheet enabled, tooling traces match C32519.txt.

Test21 (9036)

Scenario: Condition selection by area under sheet slicing. Validation: All generated SliceCut operations use condition ID 1.

Test23 (9061)

Scenario: Performance/robustness for saw-blade-like geometry (C39426). Validation: Generated code equals C39426.lst.

Helper Methods and Their Roles

FilePath(string fileName)

Builds path to fixture data under Laser\\Auto\\.

DumpMarkInfo(StringBuilder sb, FlatTech tech)

Serializes each LaserText step into deterministic text lines including text value, height, position, angle, and DataMatrix flag. Used by tests that verify marking placement/output stability.

LoadPart(string file)

Loads a part from test data path. Centralizes input loading and keeps tests concise.

TestTooling(FlatTech tech, string refFile)

Collects TraceCut.Trace0 curl representation into text and compares with golden file. Used for compact regression checks where full object assertions are unnecessary.

Contents

  • Detailed Test Coverage
  • Group A: Baseline and Layer Semantics
  • Group B: Text Marking and Rule Parameter Sweeps
  • Group C: Process Rules, Contours, and Open Polyline Behavior
  • Group D: Layer Filtering, Import Semantics, and Geometry Selection
  • Group E: Layout, Code Generation, and Special Regressions
  • Helper Methods and Their Roles
  • FilePath(string fileName)
  • DumpMarkInfo(StringBuilder sb, FlatTech tech)
  • LoadPart(string file)
  • TestTooling(FlatTech tech, string refFile)
BasicBendAuto Test Laserexample:Test1

      Copyright © 2025 TRUMPF Metamation. All rights reserved.

    Compiled by Bento