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
Probably not, and it wouldn't help with the problem: "collect all {obj} and put them in a layer", {obj} being one of {sketches, walls, part, whatever}.
Re: Draft Layers
In my case, the layer's icon doesn't show any color.
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16945 (Git)
Build type: Release
Branch: master
Hash: d818a9638424a934bd9da74d187a1af4cb773f05
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
Also, one question. How do you create a new layer in the Layers group?OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16945 (Git)
Build type: Release
Branch: master
Hash: d818a9638424a934bd9da74d187a1af4cb773f05
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Re: Draft Layers
Layers go automatically into the layer group.
I found that the tree doesn't request new icons all the time. Only at certain moments, for ex. when hiding/showing layers. Not sure yet how to attack that issue...
I found that the tree doesn't request new icons all the time. Only at certain moments, for ex. when hiding/showing layers. Not sure yet how to attack that issue...
Re: Draft Layers
Hi Yorik,
I am glad to see Layers implemented.
I made an experiment about this.
I have not been able to solve the "update icon" issue.
It would be really great to be able to force icon update.
This little icon is a very "UX friendly" way to communicate some information to the user.
I suppose it means something like adding a "updateIcon" method to the viewprovider ???
I have never been much outside PartWB code, so I don't know all the mechanics up there .
I am glad to see Layers implemented.
I made an experiment about this.
I have not been able to solve the "update icon" issue.
It would be really great to be able to force icon update.
This little icon is a very "UX friendly" way to communicate some information to the user.
I suppose it means something like adding a "updateIcon" method to the viewprovider ???
I have never been much outside PartWB code, so I don't know all the mechanics up there .
Re: Draft Layers
Oh wow, I hadn't seen you had done something similar...
Will have a better look, there might be stuff to merge between the two.
For the icons, basically, the getIcon() method accepts two possibilities: a file path to an image, or XPM data. So I made another function that produces an XPM icon, simply by "drawing" it with Qt painting tools: https://github.com/FreeCAD/FreeCAD/blob ... er.py#L211
and then caching the XPM data so the getIcon() can serve it when needed without the need to recalculate it.
But indeed I haven't been able to force an icon recompute...
Will have a better look, there might be stuff to merge between the two.
For the icons, basically, the getIcon() method accepts two possibilities: a file path to an image, or XPM data. So I made another function that produces an XPM icon, simply by "drawing" it with Qt painting tools: https://github.com/FreeCAD/FreeCAD/blob ... er.py#L211
and then caching the XPM data so the getIcon() can serve it when needed without the need to recalculate it.
But indeed I haven't been able to force an icon recompute...
- wandererfan
- Veteran
- Posts: 6309
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Draft Layers
Don't have a Python example, but here is how I change the icon for the various dimension types. Might spark something for you.
Code: Select all
void ViewProviderDimension::updateData(const App::Property* p)
{
if (p == &(getViewObject()->Type)) {
if (getViewObject()->Type.isValue("DistanceX")) {
sPixmap = "TechDraw_Dimension_Horizontal";
} else if (getViewObject()->Type.isValue("DistanceY")) {
sPixmap = "TechDraw_Dimension_Vertical";
} else if (getViewObject()->Type.isValue("Radius")) {
sPixmap = "TechDraw_Dimension_Radius";
} else if (getViewObject()->Type.isValue("Diameter")) {
sPixmap = "TechDraw_Dimension_Diameter";
} else if (getViewObject()->Type.isValue("Angle")) {
sPixmap = "TechDraw_Dimension_Angle";
} else if (getViewObject()->Type.isValue("Angle3Pt")) {
sPixmap = "TechDraw_Dimension_Angle3Pt";
}
}
ViewProviderDrawingView::updateData(p);
}
-
- Posts: 991
- Joined: Wed Mar 27, 2019 10:45 am
Re: Draft Layers
Hello gents,
the implementation of layers seems really cool. Coming from the laser cutting point of view, this is exactly the method needed to have control over more complex .dxf cutting files.
in a more CAD oriented aspect, my experience with other CAD packages such as Siemens NX, shows that using layers is also very useful within a single part design, where layers can be used to separate or suppress the skeleton and master sketches. I'm sure down the line this will enable a part design workflow that will not phase new people coming from this background, which definitely propels FreeCAD front and center.
Just a positive thought on your work and tribulations.
the implementation of layers seems really cool. Coming from the laser cutting point of view, this is exactly the method needed to have control over more complex .dxf cutting files.
in a more CAD oriented aspect, my experience with other CAD packages such as Siemens NX, shows that using layers is also very useful within a single part design, where layers can be used to separate or suppress the skeleton and master sketches. I'm sure down the line this will enable a part design workflow that will not phase new people coming from this background, which definitely propels FreeCAD front and center.
Just a positive thought on your work and tribulations.
Re: Draft Layers
Layers now have a Line Color and a Shape Color. I wonder if Point Color should be added (Draft_Point objects).
Re: Draft Layers
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:
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!
-Rainer
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:
- 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):
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
Re: Draft Layers
@yorik seems do not have proper access to the network recently, you may try to ping him so he may have a better idea which thread needs himrmz wrote: ↑Sun Aug 16, 2020 4:04 pmCode: 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)
BTW, the FC info is good to have for ease of debugging by developers.yorik wrote: Ping