RhinoScript RectangularLightPlane Documentation Needs an Update

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[0]
# lightDirection == -quadVectors[3]
heightBasis = quadVectors[1] * quadLengths[0]
widthBasis = quadVectors[2] * quadLengths[1]
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

1 Like

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)
    if rc:
        plane, extents = rc
        rs.AddPlaneSurface( plane, extents[0], extents[1] )

=> A link to the corresponding online Python help page would resolved this question.

Hi @services,

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:

– Dale

Thank you so much!
That’s exactly the documentation resource I’ve been looking for.