algorithmic modeling for Rhino
I had to set the Type hint to "ghdoc". Had it on "bool "and "curve".
Great! Thanks again.
i set it 'ghdoc',it works,but why it cant be 'curve'?
rhinoscriptsyntax function rs.MirrorObject() requires a guid as an input, not an object ("Curve" in this case).
Doing the same thing with an object, would require creating a mirror plane, and then a mirror matrix:
import Rhino
import rhinoscriptsyntax as rs
if mirror:
vec1 = endPt-stPt
normal_vec = rs.coerce3dvector([0,0,1])
vec2 = Rhino.Geometry.Vector3d.CrossProduct(vec1, normal_vec)
mirror_matrix = Rhino.Geometry.Transform.Mirror(stPt, vec2)
a = crv.Transform(mirror_matrix)
a = crv
else:
a = crv
This is basically what upper rs.MirrorObject() function does under the hood.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by