mcneel / rhinocommon

RhinoCommon is the .NET SDK for Rhino5 / Grasshopper
http://wiki.mcneel.com/developer/rhinocommon
242 stars 93 forks source link

Line Transform #9

Closed jmirtsch closed 13 years ago

jmirtsch commented 13 years ago

Hi,

I've just noticed some existing code has stopped work, the Transform method on a line is not changing anything. Rhinocommon version shipping with GH0.8.0009 (sorry if this has been identified or fixed)

mPerimLines is a List and I had to substitute this line:

                            mPerimLines[icounter].Transform(xform);

with this: Point3d f = mPerimLines[icounter].From; f.Transform(xform); Point3d t = mPerimLines[icounter].To; t.Transform(xform); mPerimLines[icounter] = new Line(f, t);

Thanks, Jon

jmirtsch commented 13 years ago

Actually, I just figured, Line is a Struct so I need to reference a copy, sorry for the post.