Solution Summary: Finding True Center of Multi-Segment MH Linestrings in TBC
The issue was that multi-segment MH symbols (linestrings) were not storing a true “center” directly, and all common methods (centroid, bbox, best-fit circle, etc.) produced small but unacceptable offsets (0.005’–0.05’).
After deeper inspection, the key discovery was:
The true center is stored internally in the PolySeg arc nodes as RadiusPoint.
What worked
Instead of trying to compute the center from vertices, I did this:
- Called:
polyseg = linestring.ComputePolySeg()
- Iterated through:
polyseg.Nodes
- Identified arc nodes:
Trimble.Vce.Geometry.PolySeg.Node.Arc
- Extracted:
node.RadiusPoint
Why this works
- Linestring MH symbols are stored as arc segments, not true circles
- Each arc node contains:
Point / EndPoint → perimeter points ❌
RadiusPoint → center of the arc (true MH center) ✅
So instead of approximating the center, it is now reading it directly from TBC’s geometry engine.
Result
- Exact center location (no offset)
- Works for:
- exploded multi-seg linestrings
- joined linestrings
- Eliminates need for centroid / best-fit / fallback logic
Key takeaway
If your geometry is built from arcs, don’t infer the center—extract it from the arc definition (RadiusPoint).