Is the RhinoScript documentation for RectangularLightPlane incorrect?
The claim is that the returned type will be a list of 4 vectors, which is not true in Python + Rhino7.
In order to verify parameter meanings I have used the following code:
quadVectors, quadLengths = rs.RectangularLightPlane(light)
position = quadVectors
# lightDirection == -quadVectors
heightBasis = quadVectors * quadLengths
widthBasis = quadVectors * quadLengths
clone = rs.AddRectangularLight(position, position + widthBasis, position + heightBasis)
I’ll update this post after testing with Rhino6 and Rhino5.
In your last line of code you add the clone to your doc with rs.AddRectangularLight
Btw to see what exactly happens in the rhinoscriptsyntax methods: put a debug marker and run your code and choose “step into” when it arrives at the marker
Thank you for your reply - I have edited my original post to clarify that the question is about the documentation, not the code.
Looking at the in-editor help that appears (only after running once) on typing
rs.RectangularLightPlane( the correct info is presented in the form of an example.
rc = rs.RectangularLightPlane(id)
plane, extents = rc
rs.AddPlaneSurface( plane, extents, extents )
=> A link to the corresponding online Python help page would resolved this question.
Make sure not to confuse
RhinoScript (VBS) with
rhinoscryptsyntax (Python, RhinoCommon). The functions are similar, but not identical.
Here is the proper help for the function you’ve referenced:
Thank you so much!
That’s exactly the documentation resource I’ve been looking for.