I’m on the Grasshopper forum, uber confused about how to make real Rhino dimensions at some angle other than horizontal. There are several posts out there about dimensions being just odd. And Grasshopper developers avoided Rhino dimensions altogether, perhaps for this reason.
Please go here to comment:
@NikWillmore, have you seen this post ?
I’ve tried something with python, eg. make a plane from the 3 input points to create an aligned dimension from two vertically spaced points. Note that this works only if the text point is not on the line between p1 and p2.
def AddAlignedDimension(p1, p2, p_text):
plane = Rhino.Geometry.Plane(p1, p2, p_text)
style = scriptcontext.doc.DimStyles.Current
align = Rhino.Geometry.AnnotationType.Aligned
dim = Rhino.Geometry.LinearDimension.Create(
p1, p2, p_text, 0.0)
if not Rhino.RhinoApp.ExeVersion == 6: return
p1 = Rhino.Geometry.Point3d( 3.0, 3.0, 1.0)
p2 = Rhino.Geometry.Point3d( 8.0, 8.0, 3.0)
p_text = Rhino.Geometry.Point3d( 5.0, 5.0, 0)
AddAlignedDimension(p1, p2, p_text)