Mr. Vahid Jafari 0 Report post Posted February 8, 2019 Hi everyone, I'm wonking on a feature, which has to create some curves and surfaces as results. Is there any way to make each of these curves and surfaces visible/invisible separately (e.g. through setVisible() function) ? The "Is Drawable" setting on the "General" tab is active. Best Regards,Vahid Share this post Link to post Share on other sites
Jörg 29 Report post Posted February 8, 2019 Hi Vahid, Not sure where you are struggling. Sure, you can call .setVisible(false) for each object, for instance. You can also deactivate the access to these objects in the attributes tab of the definition. Finally, you can create a boolean that you set at each object, and control it through the interface of the feature (input). bool show(false) ... object1.setVisible(show) object2.setVisible(show) object3.setVisible(show) Share this post Link to post Share on other sites
Mr. Vahid Jafari 0 Report post Posted February 8, 2019 Hi Joerg, As you can see in the attached screenshots, I have a feature called "f1" and it has two curves ("a_Circle" and "bsp") I can switch on/off "toggle visibility" of my feature (f1) in the object tree. But there's no button "toggle visibility" for each of a_Circle and bsp separately. The problem is, if I turn on/off the visibility of "f1", then both a_Circle and bsp will be shown/hidden together. i want to have the possibility to turn on/off each of them individually in the object tree. Best,Vahid Share this post Link to post Share on other sites
Jörg 29 Report post Posted February 8, 2019 If you have several curves in your feature where you want to control the visibility separately, you need Boolean variables as input to this feature. Create a Boolean for each curve, deactivate "allow expression". See the attachment. The button you clicked in your screenshots switches on and off the entire feature object. Share this post Link to post Share on other sites
Mr. Vahid Jafari 0 Report post Posted February 11, 2019 Hi Joerg, Thank you for your reply. That's a goog idea. So I can obviously control the visibility of each curve. But If I have e.g. 15 objects (curves and surfaces etc.) in a feature, do I need to define 15 Boolean variables as argument !!?? Or would you mabe recommend to create an individual feature definition for each object? Best,Vahid Share this post Link to post Share on other sites
Jörg 29 Report post Posted February 11, 2019 Hi Vahid, Depends on your task. Typically, you are interested in a small set of visible geometry objects (from what I have seen so far). During feature definition creation, you can keep all of them visible (for checking them), but once you have finished the definition, make all unnecessary attributes inaccessible - and keep only the most important geometry object accessible. Share this post Link to post Share on other sites