TBC Macros and Extensions

 View Only
Expand all | Collapse all

Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

  • 1.  Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

    Posted 20 days ago

    Hi,

    when I create feasibility models for ramps I usually set all elements to smooth at the beginning, just to get a rough idea what shape is best.

    Later I tend to replace the smooth elements with straight segments and tangent arcs. Be dragging the vertices around with no-snap I can still adjust the shape.

    But sometimes it's very hard to see if the tangent arc is a proper solution or a kink.

    That's why I'm working on a macro that combines showing the line direction and highlighting element types. Preferably I also want to draw an exclamation mark if a segment has no viable solution, i.e. the orange "pi arc" below.

    I assume there is a "solver" involved. Is there any way to get a solution report per linestring?



    ------------------------------
    Ronny Schneider
    ------------------------------


  • 2.  RE: Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

    Posted 16 days ago

    Hopefully @Bryce Haire can point you to a flag or something on a per linestring element basis.

    Outside of that, I was going to suggest that there's a method to get a PolySeg from an element - that's how the Plan View mouse cursor is created in Edit Linestring.

    But from your screenshot, it looks like you've already found that, great job!

    So for non-straight elements, you can see if the PolySeg is just a straight segment, if so, the calculation must have bailed.



    ------------------------------
    Quan Mueller
    quan@revenantsolutions.com
    Revenant Solutions | TBC Extension Developer
    Superuser Program | superuser@revenantsolutions.com
    ------------------------------



  • 3.  RE: Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

    Posted 16 days ago

    Interesting suggestion.

    • Loop through the linestring elements
    • if it contains arc elements check if the same chainage range in the PolySeg contains any PolySeg.Segment.Arc

    will at least work for the arc types

    I'll need to investigate the other element types, and which ones can potentially fail.

    With PI arc I believe I need to check the radii against each other as well. My quick test line has a PI arc with set radius 50 m, but the solution on screen is less than 1 m.



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 4.  RE: Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

    Posted 14 days ago

    If you are just looking for polyseg calculations that fail, I believe that the fallback to a failed calculation is a straight segment from the previous endpoint to the endpoint of the current element.

    So if you get to an element that is not supposed to be a straight segment, but the PolySeg is just a straight segment, then you know that the calculation failed.

    Now with your PI arc, you may have found an issue - or the logic for calculating the arc has a nuance you're not expecting...



    ------------------------------
    Quan Mueller
    quan@revenantsolutions.com
    Revenant Solutions | TBC Extension Developer
    Superuser Program | superuser@revenantsolutions.com
    ------------------------------



  • 5.  RE: Trimble.Vce.Alignment.Linestring - indicator for invalid element solutions?

    Posted 13 days ago

    Is not that easy. A PI arc element in a Linestring will potentially split into 3 segments in the polyseg, depending on the arc solution. Can have a leading straight, arc and trailing straight. Didn't have enough time the other day to fully investigate. But Claude Code had issues to match the resulting polyseg segments to the Linestring elements of a failed solution.

    I'll have another look on the weekend probably.



    ------------------------------
    Ronny Schneider
    ------------------------------