Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
bgoodr
Posts: 227
Joined: Sat Jun 14, 2014 9:40 pm

Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby bgoodr » Mon Oct 21, 2019 1:30 am

Code: Select all

OS: Ubuntu 19.04 (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.3
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
I'm testing out Sheet Metal workbench for making a simple cardboard box. I intend to use TechDraw workbench to draw the resulting unfolded box. Find attached my work in progress file. To add the view, I selected one face of the unfolded object, and added it to the view, and then rotated it so that it would fit on a 8.5in X 11in US Letter paper for printing on a laser printer. But the only thing showing there is the polygons for the face I selected (well of course, because it was the only thing I selected), but then, how to I get both the fold lines on that view in place with the unfolded object?

This does seem like it should be fairly easy to do. I looked for some button that said "print unfolded object and fold lines", but it is not there. Presumably this is intended to go into g-code for some CNC cutter or something, but I'm intending to just cut it out with a knife as a proof of concept (probably never will go to a laser cutter).

Thanks,
Brent
Attachments
cardboard_box_test1.fcstd
(134.34 KiB) Downloaded 10 times
User avatar
Willem
Posts: 1324
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby Willem » Mon Oct 21, 2019 6:17 am

You can insert the unfold sketch in the Techdraw workbench as a "Draft workbench object.
The colors defined in the properties of the sketch has to be changed to the colors you want to see in the Techbraw view
User avatar
papyblaise
Posts: 1363
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby papyblaise » Mon Oct 21, 2019 6:33 am

Hello
please read my last answhere dated 18th octb
https://forum.freecadweb.org/viewtopic. ... 20#p341834
turn the vue at 90° (the sketch of unfold) to place it on the sens of the sheet of paper , select it , and place it on the techdraw vue , place the dim as a other thing
Attachments
unfold carboard.FCStd
(106.76 KiB) Downloaded 8 times
unfold carboard.PNG
unfold carboard.PNG (17.93 KiB) Viewed 567 times
User avatar
bgoodr
Posts: 227
Joined: Sat Jun 14, 2014 9:40 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby bgoodr » Mon Oct 21, 2019 4:21 pm

First, thanks to both responses. Quite helpful. I'm responding to both Willem and papyblaise's posts below:
papyblaise wrote:
Mon Oct 21, 2019 6:33 am
Hello
please read my last answhere dated 18th octb
https://forum.freecadweb.org/viewtopic. ... 20#p341834
...
In my initial searching to find this problem, I did see that post, but the first few posts on that thread had nothing to do specifically with the problem of transferring fold lines in the sketches produced onto the View in TechDraw, so I cut my reading of that thread short. Little did I know that, midway through, chrisb merged a separate topic into it, that other topic merged in apparently did have some the info was relevant to my issue here. And so thanks for calling my attention to it.

However, I don't understand what you said, here:
papyblaise wrote:
Mon Oct 21, 2019 6:33 am
... turn the vue at 90° (the sketch of unfold) to place it on the sens of the sheet of paper , select it , and place it on the techdraw vue , place the dim as a other thing
My confusion is perhaps because there are two things that look to me to be "views": One is the area of the application that shows what I think of as a "model" (what is it called again?) and the other is this TechData View (the things that are housed in the things that have "Page", "Page001" etc in the tab titles).

But the root of my issue was that I was selecting a face of the unfolded object, but I needed to select the Unfold Sketch instead. Once I did that, I at least saw the fold lines (granted, the colors of the fold lines are equal to the colors of the outer edges, but that is a separate issue I'll investigate later on). Once I got the Unfolded Sketch selected the model view, then selecting the TechData Workbench, and only then adding that as a view, then I was able to see it.

As to rotation, here is what I found worked for me (which might not be what you were intending in your post, and if so, please post a followup correction), as a picture of the result:

Image

So why, in the first place, did I select a face of the Unfolded object, versus the Unfolded Sketch? Because I reasoned that the unfolded sketch was of one color, but the face of the unfolded object was a different color, and if I could eventually figure out how to select *both* the face of the unfolded sketch *and* the Unfolded Sketch, and place them both into the TechData View in a single operation, then I would have everything I need to do a manual cutout. Then, in the printed result, I would clearly know where to fold the lines, because then the fold lines would be printed with a different color than the cut lines, to avoid making mistakes in cutting (e.g., cutting a line that is a fold line, versus a line that needs to be a cut line).

And to this:
Willem wrote:
Mon Oct 21, 2019 6:17 am
You can insert the unfold sketch in the Techdraw workbench as a "Draft workbench object.
The colors defined in the properties of the sketch has to be changed to the colors you want to see in the Techbraw view
That works, but see prior paragraph dealing with wanting to see both cut lines and fold lines, rendered in different colors. I did see that the color of the Unfolded Sketch was properly propagated into the TechData View, so I think I'm getting quite close to the final goal. :)

So is there a way to see both cutlines and fold lines in a different color? Perhaps that is what was referred to by "place the dim as a other thing", in which case I need to fully read that other post (which I have not done at time of this post).
User avatar
wandererfan
Posts: 3674
Joined: Tue Nov 06, 2012 5:42 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby wandererfan » Tue Oct 22, 2019 12:50 am

bgoodr wrote:
Mon Oct 21, 2019 4:21 pm
So is there a way to see both cutlines and fold lines in a different color?
Like this?
cardboard_box_test1_lineColours.png
cardboard_box_test1_lineColours.png (10.74 KiB) Viewed 499 times

You can do it manually with TechDraw_DecorateLine
User avatar
papyblaise
Posts: 1363
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby papyblaise » Tue Oct 22, 2019 9:57 am

As to rotation, here is what I found worked for me (which might not be what you were intending in your post, and if so, please post a followup correction), as a picture of the result:
Sory old practice for me , but the resulte, is same
I'm not sure I have the uptodate version of Techdraw , and I return in a old version V.16 Where drawingDimension was hable to draw "axis line" free of place in dot/dash line bleue , redraw your sketch with after erase all redondance lines (but an angle was lost in translation the red one)
When Techdraw 'll be at a same lewel as the old drawingDim, maibe we 'll hable to change aesily the type of lines
Attachments
unfold carboard.16.PNG
unfold carboard.16.PNG (4.15 KiB) Viewed 468 times
User avatar
bgoodr
Posts: 227
Joined: Sat Jun 14, 2014 9:40 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby bgoodr » Tue Oct 22, 2019 3:06 pm

wandererfan wrote:
Tue Oct 22, 2019 12:50 am
bgoodr wrote:
Mon Oct 21, 2019 4:21 pm
So is there a way to see both cutlines and fold lines in a different color?
You can do it manually with TechDraw_DecorateLine
Yes like that. But TechDraw_DecorateLine does not work for me. I did this:

Selected the Unfold Sketch object.
Switched to the TechDraw workbench
Inserted a page.
Pressed the "Insert a View of a Draft Workbench object" button.
Then I saw the view show up.
But then try to select lines individually does not seem to have any visible effect. Or it is selecting the entire set of lines comprising the sketch lines, which is not what I want if I want to change the color of individual lines.

Perhaps the "Insert a View of a Draft Workbench object" was wrong?
User avatar
bgoodr
Posts: 227
Joined: Sat Jun 14, 2014 9:40 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby bgoodr » Tue Oct 22, 2019 4:00 pm

My Ubuntu box updated some packages and might have updated FreeCAD Daily that I'm using, so the current version I'm using is:

Code: Select all

OS: Ubuntu 19.04 (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.3
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
For the following, I have also updated the Sheetmetal Workbench as of today, Oct 22, 2019.

Here are the colors I see in the Sketch object:

Image

That means to me that there is a single color for the entire sketch object, not separate colors for the fold lines and a different
color for the cut lines.

I then unfolded again retried with the following settings for unfolding that where I changed the colors as an experiment to see if it had any effect:

Image

Then I got this:

Image

Hiding the unfold object, showing the unfold sketch object:

Image

But then I went back in and discovered "Separate projection layers" (ok, to be honest, I did see this option before but there is no documentation for what it does, which I speculate is a documentation defect because "projection layers" is pretty meaningless unless you are a FreeCAD developer; maybe it's obvious to everyone except me, but I doubt it), checked it:

Image

I did the unfolding and it produced this result:

Image

That looks very promising! So I selected both "Unfold_Sketch_Outline" and "Unfold_Sketch_bends" and used "Insert a View of a Draft Workbench object" to insert them into a new TechData Page, then I saw this:

Image

Switching back to the model, changing the view to look at it from the top ("Set to top view (2)" button), I see the original lines do not match what TechDraw placed above:

Image

So perhaps I'm getting close, but the above is either a completely new defect, or a user error on my part.

Any ideas on what is going wrong here?

Thanks for everyone's patience with this noob! :)

Update: I reattached the new fcstd file to this post, that resulted from the above workflow.
Attachments
cardboard_box_test1.fcstd
(151.29 KiB) Downloaded 8 times
User avatar
wandererfan
Posts: 3674
Joined: Tue Nov 06, 2012 5:42 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby wandererfan » Tue Oct 22, 2019 4:56 pm

bgoodr wrote:
Tue Oct 22, 2019 3:06 pm
Pressed the "Insert a View of a Draft Workbench object" button.
TechDraw can not modify DraftView or ArchView. Those modules do their own formatting (as Svg) and pass the result to TechDraw for display.

My understanding is that things like line style or colour are adjustable in Draft/Arch, and are reflected in the Svg code passed to TechDraw.

Sketches can be displayed in regular TD Views so all the TD formatting and dimensioning functions are available.
User avatar
bgoodr
Posts: 227
Joined: Sat Jun 14, 2014 9:40 pm

Re: Sheet Metal Workbench: How to add unfold lines and unfold sketch to TechDraw View

Postby bgoodr » Wed Oct 23, 2019 4:56 pm

wandererfan wrote:
Tue Oct 22, 2019 4:56 pm
TechDraw can not modify DraftView or ArchView. Those modules do their own formatting (as Svg) and pass the result to TechDraw for display.
Got it.

I'm believing what I'm seeing now in my last post is probably a completely new bug that has little to do with the SheetMetal workbench, and I can reproduce it without the involvement of the SheetMetal Workbench. Thus, I will post a separate/new forum post to inquire with that (and add a link back here for cross-reference).