Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5892

Python rs.Command() args broken in Version 5 SR12 64-bit (5.12.50810.13095, 8/10/2015)?

$
0
0

@Craighyattusa wrote:

I just updated to the Rhino version in the subject line, and it looks to me like args to rhinoscriptsyntax.Command() running under Python are broken. I whipped up a small demo script below and pasted in the script output from the command window. I am pretty sure that this exact syntax was working before the newly installed release. Anybody else seeing this? Is there a way to back out a Rhino update so I can check if the new release is the problem?

Thanks,
Craig

-------------------------------------------------------------------------------------------------------------

import rhinoscriptsyntax as rs

def main():
# Make a test shape
shape = rs.AddCylinder([0,0,0],20,20)
# Commands using previously selected objects
rs.SelectObject(shape)
rs.Command("-ReduceMesh _ReductionPercentage 20 _Accuracy 10 -Enter")
rs.SelectObject(shape)
rs.Command("-Smooth _SmoothFactor 0.5 -Enter");
# Commands using SelID and the object ID
rs.Command("-ReduceMesh _SelID " + str(shape) + " _ReductionPercentage 20 _Accuracy 10 -Enter")
rs.Command("-Smooth _SelID " + str(shape) + " _SmoothFactor 0.5 -Enter");
return

main()

-------------------------------------------------------------------------------------------------------------

Script output:

Creating meshes... Press Esc to cancel

( Debugging=Off ): -ReduceMesh
Select meshes: _ReductionPercentage
Unknown command: _ReductionPercentage
Select meshes: 20
Unknown command: 20
Select meshes: _Accuracy
Unknown command: _Accuracy
Select meshes: 10
Unknown command: 10
Select meshes: -Enter
Select meshes:
Command: -Smooth
Select objects to smooth: _SmoothFactor
Unknown command: _SmoothFactor
Select objects to smooth: 0.5
Unknown command: 0.5
Select objects to smooth: -Enter
Select objects to smooth:
Command: -ReduceMesh
Select meshes: _SelID
Object ID to select: b7374db5-a9f8-4000-822e-fc18dad2e34e
No objects added to selection.
Select meshes: _ReductionPercentage
Unknown command: _ReductionPercentage
Select meshes: 20
Unknown command: 20
Select meshes: _Accuracy
Unknown command: _Accuracy
Select meshes: 10
Unknown command: 10
Select meshes: -Enter
Select meshes:
Command: -Smooth
Select objects to smooth: _SelID
Object ID to select: b7374db5-a9f8-4000-822e-fc18dad2e34e
No objects added to selection.
Select objects to smooth: _SmoothFactor
Unknown command: _SmoothFactor
Select objects to smooth: 0.5
Unknown command: 0.5
Select objects to smooth: -Enter
Select objects to smooth:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5892

Trending Articles