There should be an option in the layer object to disable that behaviour...rmz wrote: ↑Sun Aug 16, 2020 4:04 pm Hello,
I tried to use the new Draft layer feature but it does not work as described by Yorik at the beginning of this thread as the layer seems to "consume" the object. I did the following:
Dragging the object to the layer removes the object from the original parent group which should not be the case. In fact it renders the layer concept unusable for controlling the display. Am I doing something wrong, or did I misunderstand the purpose of layers?
- Open an existing document which has a group tree (Site --> Building --> Floor --> objests ..)
- Change to the Draft bench
- Create some layers
- Changed to the BIM bench
- Dragged an object from a group to a layer with the mouse
This is the build information (but I don't think it matters):Thanks for all your work and engangement on FreeCAD, it is really great!Code: Select all
OS: Ubuntu 20.04.1 LTS (MATE/mate) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.22039 (Git) AppImage Build type: Release Branch: master Hash: 2bfc6301bc80c0344cbf13dbfe041fbd78cac93d Python version: 3.8.2 Qt version: 5.12.5 Coin version: 4.0.0 OCC version: 7.4.0 Locale: German/Germany (de_DE)
-Rainer
Draft Layers
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Draft Layers
follow my experiments on BIM modelling for architecture design
Re: Draft Layers
I created a small test file to check this. I did not find a repective property setting. When dragging an object into a layer the following is printed on the python console:
So it seem the dragged object is intentionally deleted from the source group. When adding objects through the Group attribute of the layer it works as expected. However, this is not as convenient.
Also, I noticed the following:
Unfortunately, it's not possible for me to contribute to improving that. FreeCAD is quite complex. Just for my interest, is the source code / project structure and architecture of FreeCAD somewhere explained in a document?
Cheers,
-Rainer
Code: Select all
App.getDocument('Unnamed').getObject('Layer001').ViewObject.dropObject(App.getDocument('Unnamed').getObject('Wall'),None,'',[])
Also, I noticed the following:
- Moving Groups to the layer leads to an error
Code: Select all
setattr(o.ViewObject, p, getattr(vobj, p)) <class 'AttributeError'>: 'Gui.ViewProviderDocumentObject' object has no attribute 'ShapeColor'
That means for larger number of objects all single objects must be explicitly moved - When empyting a layer trough the Group attribute, the following error occurs:
Code: Select all
<Exception> type must be 'DocumentObject' or list of 'DocumentObject', not NoneType
That means the GUI sets a None, but an empty array [] must be set.
Unfortunately, it's not possible for me to contribute to improving that. FreeCAD is quite complex. Just for my interest, is the source code / project structure and architecture of FreeCAD somewhere explained in a document?
Cheers,
-Rainer
Re: Draft Layers
No, I didn't, because this was not explained anywhere. But now, as you mentioned it, I did and the behavior was indeed as expected. Thanks!