Rhino6 dimensions strange behavior when stretched

We have a set of dimensions that are created with a rhinoscript method and when those dimensions are stretched their behavior is abnormal.

[rhino.addaligneddimension] is the rhino command used to create the dims.

Hello - please post an example file with one of the dimensions, and the code that created it.

-Pascal

dim-test-file.3dm (39.5 KB)

Rhino.AddLinearDimension Rhino.ViewCPlane, PtS, SrtdHoles(0), Rhino.XformCPlaneToWorld(Array(5, -8), Rhino.ViewCPlane), “Part Drawing”

    Rhino.ObjectLayer Rhino.FirstObject, "DIMs"

    Rhino.AddLinearDimension Rhino.ViewCPlane, SrtdHoles(y - 1), PtE, Rhino.XformCPlaneToWorld(Array(5, -8), Rhino.ViewCPlane), "Part Drawing"

    Rhino.ObjectLayer Rhino.FirstObject, "DIMs"

   

    If y > 1 Then

        For i=0 To y - 2

            Rhino.AddLinearDimension Rhino.ViewCPlane, SrtdHoles(i), SrtdHoles(i + 1), Rhino.XformCPlaneToWorld(Array(5, -4), Rhino.ViewCPlane), "Part Drawing"

            Rhino.ObjectLayer Rhino.FirstObject, "DIMs"

        Next

    End If

Hello - it looks to me like RhinoScript is (incorrectly? not sure) adding a DimAligned and not a DimRotated - still poking.

https://mcneel.myjetbrains.com/youtrack/issue/RH-53150

For now, it looks like if you change your script to use AddAlignedDimension() you’ll get what you actually want… meantime, I can make you a thing that converts existing dims into the ‘correct’ type. Let me know.

-Pascal

I dont need an aligned dimension, i need a linear dimension based upon the spacing of the holes from the sides of the “red square” and from each other, based on the center of the holes, the placement of them seems correct, but when dims overlap, we must manually move them, but with their strange behavior, i am not able to stretch them, but have to repull a new dimension for it to act correctly.

Hello - the bug you have run across is that RhinoScript, from what I can see, has swapped the output of AddLinearDimension() and AddAlignedDimension(). The former should add a dim of type ‘Rotated’ and the latter of type ‘Aligned’. These are reversed. The ‘Rotated’ type will behave the way you like, I believe.

@Mason, I’ll attach a converter to, hopefully, make your previously placed dims behave better.

ConvertDimToRotated.py (646 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

That’s it. How in the frack did that happen?.. We have bunch of scripts in rhinoscript that pull all kinds of dimensions. I have neither time nor desire to “break” all of them to fix this issue. We need to have it fixed asap. The whole department is using mass dim scripts.

Hello - I don’t think anything will break using the tool I posted above - the dimensions should just be converted to the type they should have been to begin with.

-Pascal

I’m talking about revising our current scripts that pull dims to fix this issue by changing aligned dim to linear and vice versa essentially breaking them.

26 people can’t be running a “fix” script on literally hundreds of dims in every current drawing. We are not 2 guys dabbling in 5MB model files. The scope of our department’s work is beyond the band-aid fixes.

R6 just keeps on giving… Somewhere there’s Rhino in that bug…

Seriously, we need that fixed.

RH-53150 is fixed in the latest Service Release Candidate

1 Like