Missing an hide/unhide entity comand
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
As most of the cad pakage Pythoncad need a hide/uncover command ..
workaround is to work with layer and hide uncover the layer ..
but will be nice to have a specific command for all the entity and that it works in all level not only the current ..
Matteo
Maybe a solution is to add a set of common properties to the entities.
F.i. a variable "visible" (true/false)
Also a properties inspector window is needed to view or modify these properties.
the Entity class have already a variable and method that define this state..
we have the show() and hide() method ...
so may be we just need a way to show visible entity or hidden entity ...
we need to decide how to do this command ...
my proposal is:
create a hide() comand that allow the use to select the entity and hide it.
create a show() command that temporary show the hidden entity with a different color. and allow the user to select only the hidden entity changing the color..
Yes, I see, it is controlled by the self.__visible property of the Entity class.
I can check this value when drawing the entities.
So what I need for this function is new viewport state in which hidden entities are drawn.
Besides that I need to know the color, linestyle and lineweight for the hidden and visible entities.
I think these colors can be defined in the program (not variable to the user) there must only be a contrast between the two (gray for normal, white for hidden?)
I will add a function to control the viewport state, changing the state means a redraw in the new state.
The show() command:
1) change the state of the viewport, viewport draws all hidden entities.
2) user picks some hidden entities.
3) entity properties are updated
4) change the state of the viewport, viewport hides all hidden entities.
Same kind of function for locked entities?