Page 1 of 2

How to generate TechDraw Views from Sketches with different colors

Posted: Sun Oct 27, 2019 6:29 pm
by bgoodr
Provenance: https://forum.freecadweb.org/viewtopic. ... 10#p342714 led to https://forum.freecadweb.org/viewtopic.php?f=3&t=40319 that led to this.

Version info:

Code: Select all

$ dpkg --list freecad\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version                              Architecture Description
+++-=====================-====================================-============-======================================================
rc  freecad               1:0.17.13541-1ppa3~ubuntu18.04.1     amd64        Extensible Open Source CAx program (beta)
ii  freecad-daily         0.19~pre2~201910260323~ubuntu19.10.1 all          Extensible Open Source CAx program
ii  freecad-daily-common  0.19~pre2~201910260323~ubuntu19.10.1 all          Extensible Open Source CAx program - common files
un  freecad-daily-doc     <none>                               <none>       (no description available)
un  freecad-daily-python2 <none>                               <none>       (no description available)
ii  freecad-daily-python3 0.19~pre2~201910260323~ubuntu19.10.1 amd64        Extensible Open Source CAx program - Python 3 binaries
un  freecad-daily-runtime <none>                               <none>       (no description available)
un  freecad-doc           <none>                               <none>       (no description available)
$ 
(See https://forum.freecadweb.org/viewtopic. ... 30#p343530 for why I posted the above), and Help/About FreeCAD reads:

Code: Select all

OS: Ubuntu 19.10 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.5rc1
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Using helpful instructions at https://forum.freecadweb.org/viewtopic. ... 10#p343376 I was able to create a TechDraw Page containing views that have units that match with the original model units of "inches". All good so far!

However, I have two sketches that I want to be "colored differently", because I ...
bgoodr wrote: Tue Oct 22, 2019 4:00 pm ... discovered "Separate projection layers" ...:

Image
I took my example FreeCAD file in
bgoodr wrote: Wed Oct 23, 2019 5:46 pm <snip>
renamed it, and attached it here. The difference in this attached file is that I changed the colors of the Sketches, one being colored red and another colored blue:

Image

to simulate what the SheetMetal Workbench produces when the "Separate projection layers" option is selected. Now, if I select both of those sketch objects, and then use TechDraw's "Insert View in Page" button, the colors of the lines rendered into the TechDraw View are black, not red for one Sketch and not blue for the other Sketch, as I intend.

I do not believe I can revert back to using the "Insert a View of a Draft Workbench object":

Image

due to my reading of:
wandererfan wrote: Thu Oct 24, 2019 1:48 pm ...
It did allow me to select two different sketch objects and didn't complain when I added it to the TechDraw Page.
Lack of clarity on my part - you can create multiple sources for DraftView, but it creates 1 View per source object. NewView puts all selected objects in a single View.
And a failed reattempt into a new TechDraw Page I renamed to "Page from Insert a View of a Draft Workbench object":

Image

The latter picture above showing that the colors are what I intend, but the placement is not. What I intend for the placement is from the "Page from Insert View in Page" like this:

Image

But for the latter View, the colors are not what I intend, but the placement of the resulting lines in the View is correct.

Is there a way to have TechDraw (or whatever component) respect the coloration of the Sketch objects and not require me to manually change coloration in the TechDraw View (I know I can do that, and no I don't want to because it is redundant with what SheetMetal Workbench produces in the Sketch objects).

Thanks to everyone that has helped me so far get to this juncture!

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Mon Oct 28, 2019 1:00 pm
by wandererfan
bgoodr wrote: Sun Oct 27, 2019 6:29 pm Is there a way to have TechDraw (or whatever component) respect the coloration of the Sketch objects and not require me to manually change coloration in the TechDraw View (I know I can do that, and no I don't want to because it is redundant with what SheetMetal Workbench produces in the Sketch objects).
No. Drawing sketches properly has been on the TODO list for a long time, but has yet to make it to the front of the queue.

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Tue Oct 29, 2019 1:25 pm
by bgoodr
wandererfan wrote: Mon Oct 28, 2019 1:00 pm No. Drawing sketches properly has been on the TODO list for a long time, but has yet to make it to the front of the queue.
Understood. If there is a enhancement request that I need to file to make the request explicit in the tracking system, let me know and I will file it.

wandererfan, thanks for your ongoing help here!

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Tue Oct 29, 2019 5:35 pm
by wandererfan
bgoodr wrote: Tue Oct 29, 2019 1:25 pm Understood. If there is a enhancement request that I need to file to make the request explicit in the tracking system, let me know and I will file it.
I thought there was already a ticket for this, but I couldn't find one. I've added issue #0004181 so this doesn't get lost. Feel free to flesh it out.

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Tue Oct 29, 2019 7:59 pm
by bgoodr
What you wrote on that ticket is perfect. If you need to add any additional info let me know.

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Sat Nov 09, 2019 10:01 am
by petit_chat_noir
Hello,
I think this is what I want too !
https://forum.freecadweb.org/viewtopic.php?f=8&t=40752

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Tue Nov 12, 2019 3:57 pm
by bgoodr
petit_chat_noir wrote: Sat Nov 09, 2019 10:01 am Hello,
I think this is what I want too !
https://forum.freecadweb.org/viewtopic.php?f=8&t=40752
I read your request on that other post and I'm concluding that this request, and your request, differ substantially: I say this because, here in this thread, I'm specifically requesting that TechDraw generated views of Sketch objects faithfully preserve the Sketch object colors, such that they show up in the TechDraw Views, whereas your other post above is for whatever the "copy Edge/Lines colors from the 3Dview" means inside FreeCAD's data structures, classes, objects, etc.

I am trying to stay mostly ignorant about FreeCAD internals, so as to remain a user and not be a developer at this point in time, which means I must respect the limitations that developers have to operate under, as wanderfan indicated in that other forum thread at:
wandererfan wrote: Sat Nov 09, 2019 2:31 pm ...

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Tue Nov 12, 2019 5:34 pm
by vocx
bgoodr wrote: Tue Nov 12, 2019 3:57 pm ... generated views of Sketch objects faithfully preserve the Sketch object colors, ... whereas your other post above is for whatever the "copy Edge/Lines colors from the 3Dview" means inside FreeCAD's ...
It is the same. Sketches are collection of edges in the 3D view.

If you are able to preserve the color of edges when they are projected in the TechDraw page, this means it will work for Sketches, and for just about any other object, solid, 3D or 2D.

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Wed Nov 13, 2019 1:03 am
by bgoodr
vocx wrote: Tue Nov 12, 2019 5:34 pm It is the same. Sketches are collection of edges in the 3D view.
...
I stand corrected. Thanks vocx!

Re: How to generate TechDraw Views from Sketches with different colors

Posted: Fri Jan 05, 2024 11:10 am
by HoWil
Are there any changes/development on this topic "displaying sketches in Techdraw"?
BR