In V7 and before, I used a macro to show or hide isocurves, but it doesn’t work in V8. I don’t see a ‘showisocurves’ option on the command line in V8. How can I do this in V8?
V7 macro:
-properties pause object showisocurves y enter enter
In V7 and before, I used a macro to show or hide isocurves, but it doesn’t work in V8. I don’t see a ‘showisocurves’ option on the command line in V8. How can I do this in V8?
V7 macro:
-properties pause object showisocurves y enter enter
Yeah, that’s been bugging me as well!
-Jakob
Ha, weird, looks like the two isocurve related options got left out…
Apparent an issue that has been known for over a year…
Probably won’t get fixed for 8.0 release…
When a player drops the ball the game can’t continue until he picks it up…
Aw too bad. Maybe it’s scriptable?
Yes - in V8 (which is the only place that the problem needs to be fixed) - but not in V7. Perhaps that’s worth an explanation…
First, how the mechanism works:
The essential setting is the Rhino object’s attribute WireDensity
https://developer.rhino3d.com/api/rhinocommon/rhino.docobjects.objectattributes/wiredensity
You can see in the Properties panel on a sphere where the density is set to 3
When I uncheck “Show isocurves” it shows “-3”
This is essential, as it keeps it’s original “3” setting but the minus value means they are not shown. In theory at least, all one then has to do is invert the value each time and it toggles. It’s a very small script:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
def ToggleObjIsocurves():
msg="Select surface or polysurface objects to toggle isocurves"
obj_ids=rs.GetObjects(msg,8+16,preselect=True)
if not obj_ids: return
for obj_id in obj_ids:
rhobj=rs.coercerhinoobject(obj_id)
rhobj.Attributes.WireDensity*=-1 #invert the value
rhobj.CommitChanges() #commit the changes
sc.doc.Views.Redraw() #redraw the scene when done
ToggleObjIsocurves()
However, I first tested the script in V7 but it there is a bug. When you invert the wire density, it works, but when CommitChanges()
is applied, it automatically changes any negative value to -1. So it’s no longer an exact toggle if the original density was anything other than 1, afterwards the script will then only toggle between -1 and 1 - the original density setting is lost forever…
This seems to have been addressed in V8, the script works correctly to toggle isocurves on/off, keeping the original setting.
ToggleObjIsocurves.py (802 Bytes)