Skip to content

Conversation

@webdevred
Copy link
Owner

Implement type-aware support vertex connection tracking described in #69

  • Updated vertexConns to compute connection counts per VertexTreeType.
  • Changed VertexConnMap to Map VertexTreeType (Map Text Int) for per-type tracking of vertex connections.
  • Support vertex detection now operates within each vertex tree:
    • Counts direct connections for each vertex within its tree.
    • Identifies the most connected vertex in each tree.
    • Classifies it as a support node if its connection count exceeds
      80% of that tree’s total vertex count.

This improves accuracy by detecting support vertices relative to their structural group instead of across the entire mesh.

@webdevred webdevred added enhancement New feature or request transformation labels Nov 3, 2025
@webdevred webdevred force-pushed the better-support-node-detection branch 2 times, most recently from e7fde29 to b075244 Compare November 11, 2025 18:33
- Updated vertexConns to take a Map VertexTreeType [Vertex] argument.
- Modified logic to compute connection counts per vertex type instead of a flat map.
- Introduced helper typeForNames to map vertex names to their corresponding types.
- Changed VertexConnMap type to Map VertexTreeType (Map Text Int) for type-aware connection tracking.
- Add `max-support-coordinates` option to YAML config and Config.hs
- Replace `x-breakpoints` map with structured `x-group-breakpoints` list (breakpoint + vertex-type)
- Introduce `defaultMaxSupportCoordinates` and integrate it into TransformationConfig
- Simplify `vertexConns` logic: limit top vertices per type and flatten VertexConnMap
- Change VertexConnMap type to Map Text (VertexTreeType, Int)
- Rewrite `moveSupportVertices` to use new config-driven threshold logic
- Split and clarify `sortVertices` / `sortSupportVertices` functions
- Improve readability, consistency, and configurability of transformation pipeline
- Replace `passingBreakpoint :: Scientific -> Bool` with `XGroupBreakpoint Operator Scientific`
- Introduce `Operator` type (OpLT, OpGT, OpLE, OpGE) and `applyOperator` function
- Update FromJSON instance to parse operator and number from YAML
- Adjust default breakpoints to match explicit operator logic
- Update `determineGroup` in VertexExtraction to use `applyOperator`
- Make dump_ast/Main.hs load config using current working directory
@webdevred webdevred force-pushed the better-support-node-detection branch from e563fe7 to 58ec9d9 Compare November 12, 2025 07:37
@webdevred
Copy link
Owner Author

  • Support vertex detection

    • Updated vertexConns to compute connection counts per VertexTreeType.
    • Changed VertexConnMap to Map Text (VertexTreeType, Int) for per-type tracking of vertex connections.
    • For each vertex tree:
      • Count total vertices and all internal beam connections.
      • Identify the most connected vertex in that tree.
      • Classify it as a support node if its connection count exceeds 80% of the total number of vertices in that tree (configurable via support-threshold).
    • Added max-support-coordinates (default: 3) to limit the number of top connected vertices considered per tree.
  • Configuration & parsing

    • Updated examples/jbeam-edit.yaml:
      • Raised support-threshold from 80 -> 96.
      • Added new max-support-coordinates parameter.
      • Replaced flat x-breakpoints with structured x-group-breakpoints entries using breakpoint and vertex-type.
    • In Config.hs:
      • Introduced new Operator type (OpLT, OpGT, OpLE, OpGE) and refactored breakpoint handling.
      • Added applyOperator helper to evaluate operator-based conditions.
      • Improved YAML parsing, error reporting, and default handling.
  • Transformation pipeline

    • Reworked moveVerticesInVertexForest:
      • Integrates vertexConns to dynamically compute support connections.
      • Extracts support vertices using moveSupportVertices and builds SupportTree.
    • Added updateSupportVertexName to rename support vertices ending in l/m/r according to their tree type.
    • Simplified buildTreeForType and addPrefixComments for clarity and correctness, given the new support vertex handling code.
  • Types

    • VertexConnMap now includes both tree type and connection count for each vertex.
  • Overall effect

    • Support vertex classification is now data-driven and per-tree.
    • Naming and prefixing of support nodes are consistent across all transformations.
    • Configuration is more flexible and readable with explicit operators and thresholds.

@webdevred webdevred merged commit 6ce28ee into master Nov 12, 2025
14 checks passed
@webdevred webdevred deleted the better-support-node-detection branch November 12, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request transformation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants