I am running through an issue using RhinoScriptSyntax. I want to create planes along a curve and I want them to be centered on the curve. I am using the rs.PlaneFromNormal() function and it creates a plane with the origin being the point on the curve. The planes aren’t parallel to any global C-plane or global axis.
Now I want the plane to be centered on that point. For that I can use both rs.MovePlane() or rs.Move Object() but I need in both cases (new origin or translation vector) I need the center of the plane.
I didn’t find how to create the contour of my plane to use rs.CurveAreaCentroid(). And neither how to create a diagonal to get its center point.
If any of you has already faced the problem, I’d be very glad to hear how you solved it.
I’m sorry for not being clear. Here is a code sample to explain what I’m trying to do along with some screenshots of the current state and the expected result.
Here is the code sample:
`import rhinoscriptsyntax as rs
crv = rs.GetObject(“Pick the curve”, 4)
orig_point = rs.GetObject(“Pick the origin”, 1)
In order to do that, I need to translate the plane and thus I need the coordinates of the center point of the plane. With that I can create a translation vector and move the plane accordingly.
OK, you were referring to a surface the whole time. “Plane” is usually understood here as a geometrical construct defined by an origin, and a x- and y-axis, not a planar surface.
Thank you very much ! I did not find any evidence of the SurfaceAreaCentroid method, just of the CurveAreaCentroid method. That’s why I was lost !
Thanks so much !