Draft.Upgrade Does Not Always Work
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Draft.Upgrade Does Not Always Work
FIrst, Here is my system information from the FreeCAD about screen:
OS: Windows XP
Platform: 32-bit
Version: 0.13.1826
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.3.0
I've been trying to Draft a complicated aluminum extrusion cross section. I've been unsuccesful in getting my 2D Draft to upgrade into a wire, then a face for final extrusion into a 3D rail. I need to be able to follow this method, as I have about 25 different lengths of the cross section to extrude into final 3D shapes for my part database. So, modeling this in the Sketch or Part workbenches just will not give me the flexibilty I need.
The problem is with the Draft.Upgrade function. Sometimes it works as expected with simple shapes. Sometimes it does not. It never works with my cross section draft.
After alot of drawing, redrawing, and testing, I've found a simple, repeatable demo of the problem. Reference the attached files.
In the first file, 10 Shapes.FCStd, you will find 10 simple indentical shapes. Each shape was drawing in the Draft Workbench, using grid and endpoint snapto only. Each shape consists of an arc, drawn using the arc tool, and a line drawn using the line tool. They all appear identical.
Select the 2 components (arc, then line) for each shape, then click the Upgrade button. The first 3 shapes on each row appear to properly upgrade to a wire. The last 2 shapes on each row do not. I have repeated this process 5 times.
The 2nd file, 6 Wires.FCStd, is the result of the process above. Notice there are 6 successful upgrades to wires, and 4 unsuccessful upgrades.
Now, select each of the 6 wires, and click upgrade to change them to a solid face. The first wire on each row simply dissapears. The 2nd and 3rd wire on each row successfully upgrade to a face suitable for extrusion. The result can be seen in the 3rd file, 4 Faces.FCStd.
Obviously, the basic functionality of the upgrade tool is totally unpredictable and unreliable. At least for what I need to do, the software is unusable. My hats off though to all the developers for for the efforts they are making in getting FreeCAD to it's current state.
Comment, suggestions, and particularly a fix are welcome.
OS: Windows XP
Platform: 32-bit
Version: 0.13.1826
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.3.0
I've been trying to Draft a complicated aluminum extrusion cross section. I've been unsuccesful in getting my 2D Draft to upgrade into a wire, then a face for final extrusion into a 3D rail. I need to be able to follow this method, as I have about 25 different lengths of the cross section to extrude into final 3D shapes for my part database. So, modeling this in the Sketch or Part workbenches just will not give me the flexibilty I need.
The problem is with the Draft.Upgrade function. Sometimes it works as expected with simple shapes. Sometimes it does not. It never works with my cross section draft.
After alot of drawing, redrawing, and testing, I've found a simple, repeatable demo of the problem. Reference the attached files.
In the first file, 10 Shapes.FCStd, you will find 10 simple indentical shapes. Each shape was drawing in the Draft Workbench, using grid and endpoint snapto only. Each shape consists of an arc, drawn using the arc tool, and a line drawn using the line tool. They all appear identical.
Select the 2 components (arc, then line) for each shape, then click the Upgrade button. The first 3 shapes on each row appear to properly upgrade to a wire. The last 2 shapes on each row do not. I have repeated this process 5 times.
The 2nd file, 6 Wires.FCStd, is the result of the process above. Notice there are 6 successful upgrades to wires, and 4 unsuccessful upgrades.
Now, select each of the 6 wires, and click upgrade to change them to a solid face. The first wire on each row simply dissapears. The 2nd and 3rd wire on each row successfully upgrade to a face suitable for extrusion. The result can be seen in the 3rd file, 4 Faces.FCStd.
Obviously, the basic functionality of the upgrade tool is totally unpredictable and unreliable. At least for what I need to do, the software is unusable. My hats off though to all the developers for for the efforts they are making in getting FreeCAD to it's current state.
Comment, suggestions, and particularly a fix are welcome.
- Attachments
-
- 4 Faces.FCStd
- 3rd file showing result of second upgrade to faces.
- (10.85 KiB) Downloaded 55 times
-
- 6 Wires.FCStd
- 2nd file showing result of first upgrade to wires.
- (11.87 KiB) Downloaded 49 times
-
- 10 Shapes.FCStd
- First file with the starting shapes.
- (15.75 KiB) Downloaded 53 times
Re: Draft.Upgrade Does Not Always Work
I confirm this behavior on Ubuntu 12.04.
OS: Ubuntu 12.04.2 LTS
Platform: 64-bit
Version: 0.13.1827 (Git)
Branch: master
Hash: 372b4542ee4588328c31819a337a656eb276d596
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
For a failed upgrade the python console reports this.
The disappearing face does not produce any error message.
OS: Ubuntu 12.04.2 LTS
Platform: 64-bit
Version: 0.13.1827 (Git)
Branch: master
Hash: 372b4542ee4588328c31819a337a656eb276d596
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
For a failed upgrade the python console reports this.
Code: Select all
Running the Python command 'Draft_Upgrade' failed:
Traceback (most recent call last):
File "/usr/lib/freecad/Mod/Draft/DraftTools.py", line 2156, in Activated
self.proceed()
File "/usr/lib/freecad/Mod/Draft/DraftTools.py", line 2351, in proceed
w = Part.Wire(nedges)
BRep_API: command not done
I don't see any logic in this argument. You can copy sketches, and then change their placement. I can't see how they would lack flexibility. And it may allow you to get your work done.craigjl62 wrote:So, modeling this in the Sketch or Part workbenches just will not give me the flexibilty I need.
Re: Draft.Upgrade Does Not Always Work
normandc,
Glad to see that someone else sees the same behavior as I do. I thought maybe I was doing something wrong.
I figured someone might address my comment about the sketcher work bench. I actually tried to use it yesterday. I converted my draft to a sketch using the tool on the draft workbench. Part of the reason I tried the sketch is because I need a radius on each vertex where lines meet and the draft workbench does not have a chamfer or fillet tool. The sketch bench does.
The first thing I noticed was that I had 309 dregrees of freedom. Talk about a daunting task! After using the chamfer tool on all the vertices, I was down to almost 230 degrees of freedom. After nearly 10 hours of creating constraints, I got it down to 15. As I was working, the solving time got longer and longer as I added constraints. Eventually, at 15 degrees freedom left, it just quit working period. I even left it processing overnight, just to find that it had not done the last constraint.
Now, I can see how the sketch tool can be useful, it just doesn't work in my process. If I take all the time to draft my cross setion accurately, I shouldn't need to use sketcher to add the radii, and to constrain every end point and dimension. In my mind, I've already done that in the draft bench.
I just need to upgrade my draft to a face, then extrude it to the 25 or so different lengths I need.
I attached my draft and sketch file below.
Glad to see that someone else sees the same behavior as I do. I thought maybe I was doing something wrong.
I figured someone might address my comment about the sketcher work bench. I actually tried to use it yesterday. I converted my draft to a sketch using the tool on the draft workbench. Part of the reason I tried the sketch is because I need a radius on each vertex where lines meet and the draft workbench does not have a chamfer or fillet tool. The sketch bench does.
The first thing I noticed was that I had 309 dregrees of freedom. Talk about a daunting task! After using the chamfer tool on all the vertices, I was down to almost 230 degrees of freedom. After nearly 10 hours of creating constraints, I got it down to 15. As I was working, the solving time got longer and longer as I added constraints. Eventually, at 15 degrees freedom left, it just quit working period. I even left it processing overnight, just to find that it had not done the last constraint.
Now, I can see how the sketch tool can be useful, it just doesn't work in my process. If I take all the time to draft my cross setion accurately, I shouldn't need to use sketcher to add the radii, and to constrain every end point and dimension. In my mind, I've already done that in the draft bench.
I just need to upgrade my draft to a face, then extrude it to the 25 or so different lengths I need.
I attached my draft and sketch file below.
- Attachments
-
- OB_1515_Section_Draft.FCStd
- My cross section draft. Needs radii then conversion to face for extrusion.
- (85.53 KiB) Downloaded 60 times
Jim Craig
OS: Windows XP; Platform: 32-bit; Version: 0.13.1828
OS: Windows XP; Platform: 32-bit; Version: 0.13.1828
Re: Draft.Upgrade Does Not Always Work
When you said complicated, you were not kidding.
It is true that the sketcher becomes sluggish and even unusable the more degrees of freedom there are. But this extrusion can be done effortlessly and quickly in the PartDesign workbench, if you break down the process in chunks.

Do you need the 25 or so different lengths in the same file, or in separate files?craigjl62 wrote:I just need to upgrade my draft to a face, then extrude it to the 25 or so different lengths I need.
It is true that the sketcher becomes sluggish and even unusable the more degrees of freedom there are. But this extrusion can be done effortlessly and quickly in the PartDesign workbench, if you break down the process in chunks.
Re: Draft.Upgrade Does Not Always Work
I just finished modeling your aluminum extrusion with sketches and the PartDesign workbench. It took me less than 20 minutes, as I said it can be a lot faster to break down the process in small steps. I first padded a 15x15 square. Then on its top face I sketched a single slot and pocketed it. I then applied a PolarPattern feature on the Pocket. Next I sketched and pocketed the v-notches on a corner, and applied another polar pattern. Finally, I created a sketch with the center hole and the cutout that goes through a slot on one side.
In all I did 4 separate sketches, but they were a lot simpler to draw (and will be a lot easier to manage, if changes are required) than a single complex one.
I didn't add any fillets, because they can be added as 3D features on the solid, that way it simplifies the sketches further.
Double-click on the first Pad feature to change the length of the extrusion.
BTW you can extract a face from this solid, if a face is what you want to extrude your numerous lengths.
In all I did 4 separate sketches, but they were a lot simpler to draw (and will be a lot easier to manage, if changes are required) than a single complex one.
I didn't add any fillets, because they can be added as 3D features on the solid, that way it simplifies the sketches further.
Double-click on the first Pad feature to change the length of the extrusion.
BTW you can extract a face from this solid, if a face is what you want to extrude your numerous lengths.
- Attachments
-
- OB_1515_Alternate_normandc.fcstd
- (77.34 KiB) Downloaded 60 times
Re: Draft.Upgrade Does Not Always Work
I was planning on using seperate files. 1 file for each different length. Then, as I design complete frameworks for equipment, I can import the length I want and position as required. Just like a part database in those other expensive 3D modelers.
I've done some further testing, and I think the big hangup in getting an extrudable face is the arc I'm using in the center of the cross section. I've suspected it was the problem during the last 40 hours or so of trying to get this to work. Of course, alot of that time has just been learning the software, as this is my first foray into FreeCAD. I come from a 2-D background, so it's taking quite a lot to get used to the 3D.
I successfully did a length earlier this week, but added all the chamfers in the Part workbench. But, it makes it hard to do the differrent lengths I need, unlesss I am missing some critical method.
Thanks for your followup and help.
I've done some further testing, and I think the big hangup in getting an extrudable face is the arc I'm using in the center of the cross section. I've suspected it was the problem during the last 40 hours or so of trying to get this to work. Of course, alot of that time has just been learning the software, as this is my first foray into FreeCAD. I come from a 2-D background, so it's taking quite a lot to get used to the 3D.
I successfully did a length earlier this week, but added all the chamfers in the Part workbench. But, it makes it hard to do the differrent lengths I need, unlesss I am missing some critical method.
Thanks for your followup and help.
Jim Craig
OS: Windows XP; Platform: 32-bit; Version: 0.13.1828
OS: Windows XP; Platform: 32-bit; Version: 0.13.1828
Re: Draft.Upgrade Does Not Always Work
Here's something I didn't think about until now.
First a very quick explanation on the inner working of FreeCAD and the Draft workbench. Basic elements in 3D creation are as follows: vertices (points), edges (lines), wires (set of edges that create a closed or open profile), face. A face evidently needs a closed wire. From a face you can extrude a solid.
The Draft workbench creates 2D elements, but these elements are higher-level objects than FreeCAD's "basic elements". For example, a Rectangle, a Circle and a closed DWire are automatically faces, you can extrude them directly. They may not show as faces, it depends on their display mode, which can be set in the "View" tab of the side panel.
If you prefer to work in 2D to get your face, I think that instead of drawing a complex profile out of single elements and then try to convert it to a face, you should work with already closed objects as much as possible, not with single lines and arcs. Even if the Up arrow should upgrade a set of connected Lines to a DWire, I found that often it will create a block instead, which is next to useless in 3D creation.
Use the Upgrade (Up arrow) and Downgrade (Down arrow) to fuse or cut closed wires from one another. When selecting two closed DWires and clicking the up arrow, it works as a boolean fuse; clicking on the down arrow will operate a boolean cut with the first selected element being cut by the second.
Based on that, just for fun I used the DWire tool and retraced your profile. Since the DWire tool does not have an arc mode, I bypassed the center arc and made a straight segment instead. Closing the DWire creates a face. On thing cool with DWire is it has a fillet radius property. If you set a value all points will get rounded. You can access it in the Data tab from the side panel.
Now I drew a Circle in the center and tried to cut it from the DWire, but even if the Cut operation is created, it seems to fail. So what you'll have to do is extrude the DWire, then extrude the Circle, and do a boolean cut in the Part workbench.
First a very quick explanation on the inner working of FreeCAD and the Draft workbench. Basic elements in 3D creation are as follows: vertices (points), edges (lines), wires (set of edges that create a closed or open profile), face. A face evidently needs a closed wire. From a face you can extrude a solid.
The Draft workbench creates 2D elements, but these elements are higher-level objects than FreeCAD's "basic elements". For example, a Rectangle, a Circle and a closed DWire are automatically faces, you can extrude them directly. They may not show as faces, it depends on their display mode, which can be set in the "View" tab of the side panel.
If you prefer to work in 2D to get your face, I think that instead of drawing a complex profile out of single elements and then try to convert it to a face, you should work with already closed objects as much as possible, not with single lines and arcs. Even if the Up arrow should upgrade a set of connected Lines to a DWire, I found that often it will create a block instead, which is next to useless in 3D creation.
Use the Upgrade (Up arrow) and Downgrade (Down arrow) to fuse or cut closed wires from one another. When selecting two closed DWires and clicking the up arrow, it works as a boolean fuse; clicking on the down arrow will operate a boolean cut with the first selected element being cut by the second.
Based on that, just for fun I used the DWire tool and retraced your profile. Since the DWire tool does not have an arc mode, I bypassed the center arc and made a straight segment instead. Closing the DWire creates a face. On thing cool with DWire is it has a fillet radius property. If you set a value all points will get rounded. You can access it in the Data tab from the side panel.
Now I drew a Circle in the center and tried to cut it from the DWire, but even if the Cut operation is created, it seems to fail. So what you'll have to do is extrude the DWire, then extrude the Circle, and do a boolean cut in the Part workbench.
Why does it make it hard, could you elaborate?craigjl62 wrote:I successfully did a length earlier this week, but added all the chamfers in the Part workbench. But, it makes it hard to do the differrent lengths I need, unlesss I am missing some critical method.
- Attachments
-
- OB_1515_Section_Draft_normandc.FCStd
- (108.5 KiB) Downloaded 48 times
Re: Draft.Upgrade Does Not Always Work
The behavior you described with dwires, circles/arcs, and the upgrade function are exactly what I've been struggling with. Thanks for the explanation about the inner workings. It helped clear up a few things. However, I still think I should be able to draft a complete cross section in 2D, complete with all chamfers and contours as I described. Then I should be able to create a face, and extrude to length.
On the upside, the first alternate method using the greatly simplified sketches you did was a godsend. I looked at what you did, and set out duplicating it from scratch. Such a good learning experience. I can now see how powerful the sketch tool can be. I never thought of using the Polar Pattern to duplicate the various cut outs required. That alone reduces the work and complexity by 75% on a part like this.
Now, it took me more than 20 minutes, but I successfully copied your process, fine tuned dimensions and relationships of the various contours.
2 questions.
First, I could not figure out how to use the external edge tool in the sketch as you did. Can you describe the process for me? (This Question has been successfully answered below.)
Second, I haven't figured out how to extract the face from my completed part. Any help there would be appreciated. I don't think I'll need it for this, but it could be a good fall back position if I need it. (I have since figured out how to use the Section tool to get a Face extracted for later extrusion of multiple Lengths.)
Thanks so very much for your help on this problem. Besides getting me to a completed project, I learned a lot, especially by working your solution fully myself. Hopefully, the developers will attempt to correct the funny upgrade issue in the 2D Draft, and add some chamfer/fillet tools.
In response to your second question about the extrusion and adding the chamfers afterwards was related more to not fully understanding the way things work. At the time, I believed that every time I extruded a copy, I would have to add all the chamfers in again manually. I think it was more of a work flow issue than anything else.
On the upside, the first alternate method using the greatly simplified sketches you did was a godsend. I looked at what you did, and set out duplicating it from scratch. Such a good learning experience. I can now see how powerful the sketch tool can be. I never thought of using the Polar Pattern to duplicate the various cut outs required. That alone reduces the work and complexity by 75% on a part like this.
Now, it took me more than 20 minutes, but I successfully copied your process, fine tuned dimensions and relationships of the various contours.
2 questions.
First, I could not figure out how to use the external edge tool in the sketch as you did. Can you describe the process for me? (This Question has been successfully answered below.)
Second, I haven't figured out how to extract the face from my completed part. Any help there would be appreciated. I don't think I'll need it for this, but it could be a good fall back position if I need it. (I have since figured out how to use the Section tool to get a Face extracted for later extrusion of multiple Lengths.)
Thanks so very much for your help on this problem. Besides getting me to a completed project, I learned a lot, especially by working your solution fully myself. Hopefully, the developers will attempt to correct the funny upgrade issue in the 2D Draft, and add some chamfer/fillet tools.
In response to your second question about the extrusion and adding the chamfers afterwards was related more to not fully understanding the way things work. At the time, I believed that every time I extruded a copy, I would have to add all the chamfers in again manually. I think it was more of a work flow issue than anything else.
Last edited by craigjl62 on Mon Feb 04, 2013 11:05 pm, edited 2 times in total.
Re: Draft.Upgrade Does Not Always Work
Hi
1) to Map a sketch
Either
start by selecting a single face of an existing solid and then click "new sketch" icon in the tool bar in PartDesign workbench, a new sketch will be created attached to the previously selected face
or
Use the "Map a sketch to a face" tool also in the PartDesign workbench
Now that the sketch is mapped to a face of a pre-existing solid, you can use the external geometry tool, while editing/creating your sketch, to put a construction line linked to one of the edges of the face your sketch is mapped to. Currently the tool does not work when the edge is obscured by one of the two Axes of the sketch (Green Y or Red X lines).
I hope this helps.
Jim
To use that tool, you have to firstly map your sketch the the face of a pre-existing solid.craigjl62 wrote:First, I could not figure out how to use the external edge tool in the sketch as you did. Can you describe the process for me?
1) to Map a sketch
Either
start by selecting a single face of an existing solid and then click "new sketch" icon in the tool bar in PartDesign workbench, a new sketch will be created attached to the previously selected face
or
Use the "Map a sketch to a face" tool also in the PartDesign workbench
Now that the sketch is mapped to a face of a pre-existing solid, you can use the external geometry tool, while editing/creating your sketch, to put a construction line linked to one of the edges of the face your sketch is mapped to. Currently the tool does not work when the edge is obscured by one of the two Axes of the sketch (Green Y or Red X lines).
I hope this helps.
Jim
Re: Draft.Upgrade Does Not Always Work
Hi,
There is indeed a problem with Draft upgrade and face creation from wires which is already a known bug ( http://sourceforge.net/apps/mantisbt/fr ... php?id=921 )
But I still haven't found a solution for it...
There is indeed a problem with Draft upgrade and face creation from wires which is already a known bug ( http://sourceforge.net/apps/mantisbt/fr ... php?id=921 )
But I still haven't found a solution for it...