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.
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
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