Toggle Construction geometry?
-
I'm not finding anything that toggles the display of Construction geometry - missing or am I just blind?
-
Sketchup.active_model.rendering_options['HideConstructionGeometry']( dont like the Hide* prefixed type of settings )
-
What's more awkward about 'Hide*' any more than 'Show*' or 'Display*' ?
ros=Sketchup.active_model.rendering_options if ros['HideConstructionGeometry'] ros['HideConstructionGeometry']=false else ros['HideConstructionGeometry']=true endOr use one of your one-line tests "? ||" or "=!"...
-
I prefer to negate logic using the ! operator. The API is inconsistent and makes reading the code logic random.
-
Sketchup.active_model.rendering_options['HideConstructionGeometry'] =! Sketchup.active_model.rendering_options['HideConstructionGeometry']would work logically too ? Doesn't it just reverse the current setting ? -
I mean in the way you read code.
This article explains:
http://truelogic.org/wordpress/2009/02/27/how-not-to-name-a-boolean-variable/ -
I note there are 7 other settings that are positive, and begin with the prefix "Display".. and one positive that begins with the prefix "Show"...
The lack of convention is annoying.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement