Script Error when toggeling lines off

Next
 From:  edwinfuman
10964.1 
hey fellow moi people.

at some point in my modeling phase i am not able to disable the lines and i get this error.
and idea whats the matter?
greetings!


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
10964.2 In reply to 10964.1 
Hi edwinfuman,

That script works for me here. Does it work for you if you start a new file with something simple in it like a box?

If you post your 3dm I'll try and see if the script works here.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  edwinfuman
10964.3 In reply to 10964.2 
hey.
yes in a new file it works perfectly. it also worked in the beginning but at some point of
the project it stopped working. its not super importent for the project but i was just curious what
could havee caused it to crash.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
10964.4 In reply to 10964.1 
Hi Edwin, I guess it looks like the script will throw an error if you have managed somehow to create a solid/surface object that has no edges in it, which isn't supposed to happen. Maybe there's something like a solid that's squashed down to a point.

If you update your shortcut key script to this does it work ok then? :

script: /* Toggle edge display */ var breps = moi.geometryDatabase.getObjects().getBReps(); var hide = -1; for ( var i = 0; i < breps.length; ++i ) { var edges = breps.item(i).getEdges(); if ( edges.length != 0 ) { if ( hide == -1 ) { hide = !edges.item(0).hidden; } edges.setProperty( 'hidden', hide ); } }


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All