TBC Macros and Extensions

 View Only
Expand all | Collapse all

found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

  • 1.  found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

    Posted 03-04-2023 01:45

    @Gary Lantaff

    From the object browser

    Summary:
    Creates a closed polyseg that is parallel to and smaller or
     larger than the specified closed polyseg. Specify a negative
     offset to shrink the polyseg or a positive offset to expand the polyseg.

    That doesn't work. The line is always offset to the outside, no matter what sign you use for the offset. Tested with 5.71 and 5.81.

    Will have to use .Offset instead and test for clockwise first.



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


  • 2.  RE: found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

    Posted 03-05-2023 23:56

    Ronny,

    You have to tell it which Side, ie Side.Left or Side.Right, to perform the offset.  I'm pretty sure the absolute value of the supplied offset is used. You will need to use the IsClockWise api to determine which side to perform the offset to.

    Peter



    ------------------------------
    Peter Kistler
    peter.kistler@rockpilesolutions.com
    ------------------------------



  • 3.  RE: found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

    Posted 03-06-2023 14:47

    Hello Peter,

    you're partly right. It always offsets to the right. So I have to check for clockwise first. But that is not what the documentation implies.

    As soon as I try to add a Side parameter it is complaining that it is already expecting the strongbox for the Polyseg.

    There is no overloading intended for this method.

    From my point of view that is a bug, since it isn't doing what the documentation says.

    But this method would be handy since you wouldn't have to check for clockwise and don't have to define a side. It's supposedly done with the positive or negative value of the offset and the clockwise check is included.



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



  • 4.  RE: found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

    Posted 03-06-2023 22:45

    I missed that you were using the Expand api. I've never used that api even when I was on the dev team. I've always called the Offset api.  Using JetBrains dotPeek, you can see that the Expand api calls the Offset api. So I'm guessing there is an issue with the Expand api as you mentioned.



    ------------------------------
    Peter Kistler
    peter.kistler@rockpilesolutions.com
    ------------------------------



  • 5.  RE: found a bug in Trimble.Vce.Geometry.PolySeg.PolySeg.Expand

    Posted 06-19-2023 16:15

    In V5.90 the .Expand seems to be broken, it doesn't do anything anymore, the line doesn't change. Had to change the code to .Offset.



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