Update drawing after modifying a part?

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!
Post Reply
rsxy
Posts: 6
Joined: Sun Jul 10, 2016 8:25 am

Update drawing after modifying a part?

Post by rsxy »

Hi,

is it possible to update a drawing after having added features to the object?

I have created a couple of drawings and added a lot of dimensions using the drawing dimensioning WB.

Now I added some minor features to the parts (holes, chamfer), but the drawing seems to refer to the object earlier in tree.

Is there a way to keep the drawing + dimensions, and just let it refer to the new (modified) object, so that the additional features get included?
Or do I always have to re-do the complete drawing?

Any hint would be highly appreciated

rsxy



I have created the part using rev0.16 and continued to work in rev0.17 because originally the drawing dimensioning WB did not work in 0.16 (wrong python version, as I learned later). So the part has been created with the "old" workflow (not using body).

OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.7745 (Git)
Build type: Release
Branch: master
Hash: 79dcdfbc782e24bb34db882143af7ce8ebd237bd
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Update drawing after modifying a part?

Post by NormandC »

rsxy wrote:Is there a way to keep the drawing + dimensions, and just let it refer to the new (modified) object, so that the additional features get included?
Or do I always have to re-do the complete drawing?
Currently in 0.16 or 0.17 there is no way to change the referenced object in Drawing views. You'll have to redo your views from scratch. Yes you can, see follow up post below! If you had used Draft Dimensions projected to the Drawing page, you could salvage those, but I'm not sure you can with dimensions created with the Drawing dimensioning plug-in.
rsxy wrote:I have created the part using rev0.16 and continued to work in rev0.17 because originally the drawing dimensioning WB did not work in 0.16 (wrong python version, as I learned later). So the part has been created with the "old" workflow (not using body).
What's very interesting in V0.17 is that with the Body (or Part) container, you can select the Body when you create your views. That way, if you add features to the body, the drawing views will automatically update (I just tested it). There's a utility to migrate an existing file made in 0.16 to the new 0.17 work flow. On the other hand, 0.17 has brought massive changes, and also quite a lot of bugs. I usually recommend people not to use 0.17 for production work, but only for testing and bug reporting.

Also, the Drawing workbench has been reworked from scratch in a separate development branch (code name is "TechDraw"), it should be merged to the master source code branch soonish, which means it will be available soon after in the 0.17 pre-release builds. This version now supports dimensions natively, but it won't be compatible with drawing pages created in the current Drawing workbench. It will also probably suffer from a lot of bugs. At first it will be available alongside the existing Drawing wb, under a different name.

In any case, my advice is: do not create drawing views of your part if it is not finalized.

Blue = edit (2016-07-11)
Last edited by NormandC on Tue Jul 12, 2016 3:14 am, edited 1 time in total.
rsxy
Posts: 6
Joined: Sun Jul 10, 2016 8:25 am

Re: Update drawing after modifying a part?

Post by rsxy »

Thank you for your remarks - as I now realized, "final" is relative :-)

I was now thinking to use 0.16 for modifying the parts (to stay on the save side) and only do the drawing now in 0.17. However, the conversion process did not work well, the sketches did not get included into the part folder, and every feature (holes, chamfer) appeared as body without sketch. The part looked OK, but there were errors in the tree.

So for now, I will just re-do the drawing to get the (re-finalized) part made and try the part/body approach in 0.17 next time, with a new part from scratch. FreeCAD is amazing, both the functionality that is already there and what seems to be in the pipeline.

Thanks for your help!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Update drawing after modifying a part?

Post by NormandC »

Wait!!!
NormandC wrote:Currently in 0.16 or 0.17 there is no way to change the referenced object in Drawing views.
I would like to take back what I wrote previously, because I was wrong. Sorry about that! Mea culpa! :oops:

To be clear: YES!!! It's possible in either 0.16 or 0.17 to change the referenced object in Drawing views, I had completely forgotten about that! :)
  1. Under the Page in the Drawing view, select the view for which you want to change the referenced object.
  2. Under the Data tab, locate the Source property - it's under the "Shape view" section.
    FC_Drawing_View_Source_Edit_01.png
    FC_Drawing_View_Source_Edit_01.png (62.72 KiB) Viewed 12289 times
  3. Click on "Edit...", then select the new object to be referenced in the list.
    FC_Drawing_View_Source_Edit_02.png
    FC_Drawing_View_Source_Edit_02.png (24.03 KiB) Viewed 12289 times
And that's it, once you click OK, click on the Refresh button to update the view.

You will have to repeat the process for each and every view in the drawing page.

Hope it was not too late!

My :ugeek: status took quite a hit here... :roll: :mrgreen:
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Update drawing after modifying a part?

Post by NormandC »

NormandC wrote:Also, the Drawing workbench has been reworked from scratch in a separate development branch (code name is "TechDraw"), it should be merged to the master source code branch soonish,
It's just been merged today! :) I figure new 0.17 pre-release binaries including the TechDraw workbench should be available in no more than a few days.

It's not as complete as the Drawing Dimensioning workbench at this point, but there is a Section tool. I still have to understand how it works... (I use Ubuntu 14.04, and I got the update today)
rsxy
Posts: 6
Joined: Sun Jul 10, 2016 8:25 am

Re: Update drawing after modifying a part?

Post by rsxy »

Awesome, that is just the thing I was looking for - great catch!

This is again a good example for much control FreeCAD offers over just about everything, as a new user (2 weeks now) I am really impressed.

Eventually I noticed my design tree had been messed up by going forth and back from rev0.16 to rev17, the sketches were not attached to the features (mostly pockets) anymore. The final part looked OK but I was not able to change anything, i.e. redo the individual steps. Also my fault because I did not keep enough backup versions.

I last night I redid every step in rev0.16, copying over the sketches (this did save a lot of work) and eventually adding new drawings again.

Today I made another version of my part using different diameter grooves and got some weird confusion with a chamfer, being applied to a wrong edge. As it was the last step in the tree I just re-did it, and hence the drawing did not refer to the right object anymore. I can confirm that I was able to specify the new object the way you described, and most of the dimensions that I had made with the drawing dimensioning workbench did actually survive. Only a few got messed up but that were easy to remove and add again.


Another note, not related to the original drawing issue which is now solved: I would like to get a better understanding of the overall design process, and the differences between rev0.16 and 17. I think I got the design tree thing (mostly working with part design wb in 0.16), and finally got it working to add statements to refer to dimensions between files using a spreadsheet in the base part (I had a stack of different plates with common screw holes that had to fit to each other). It worked but I am not sure if this was the best (easiest) possible approach.

Then, using rev0.17 I learned about the new body/part paradigm, but only found rather sparse information (I saw this viewtopic.php?f=20&t=12373 and viewtopic.php?f=20&t=12373 ) on what all that means in practical terms, me being a new user to FreeCAD (some limited previous CAD experience, though).

For example, for creating multi-part objects (boxes, enclosures, stacks) parametrically in 0.17, is there already more detailed documentation? Or anything more detailed on the overall concepts in 0.17? I would appreciate any pointers in this regard, and also offer my help with creating such documentation.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Update drawing after modifying a part?

Post by sgrogan »

rsxy wrote:is there already more detailed documentation? Or anything more detailed on the overall concepts in 0.17? I would appreciate any pointers in this regard, and also offer my help with creating such documentation.
The documentation is sparse and scattered on the forum. Using "Part Design Next" or "PDN" in the forum search is probably your best bet. Also the developers that implemented these new features are active in the forum and a very generous with their time to answer questions. The 0.17 changes are pretty dramatic and even the long time FreeCAD experts, like NormandC, are still learning.
Help with the documentation is always welcome :) You can PM one of the moderators and they will set up an account for you. You should probably discuss your intentions in the wiki forum. 0.16 is still the official release, but as you noted the 0.17 documentation is sparse. How to support the transition is a topic in and of itself. 3 posts and already offering to help! Thanks :D
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Update drawing after modifying a part?

Post by NormandC »

sgrogan wrote:The 0.17 changes are pretty dramatic and even the long time FreeCAD experts, like NormandC, are still learning.
Yeah, and I can't dedicate as much time as I'd like... But I like very much what I've seen so far. :)
rsxy wrote:Today I made another version of my part using different diameter grooves and got some weird confusion with a chamfer, being applied to a wrong edge. As it was the last step in the tree I just re-did it
You probably encountered the "topological naming" bug. The problem comes from the geometric modeling kernel used by FreeCAD. It's a complex third-party software library that handles anything related to modeling. When you make edits on a part that produce significant changes to its topology, internally the edges and faces get renumbered. For example,what the system considered Edge2 before the edit becomes Edge5. Hence some sketches and features "jump" from one edge or face to another one, wreaking havoc to the end model.

That's one of the reasons that it's always best to apply fillets and chamfers at the very end.

BTW in v0.17, you can edit a PartDesign Fillet/Chamfer and reassign different edges, so you can repair the feature instead of having to delete it and make a new one.
NormandC wrote:Also, the Drawing workbench has been reworked from scratch in a separate development branch (code name is "TechDraw"), it should be merged to the master source code branch soonish, which means it will be available soon after in the 0.17 pre-release builds.
sgrogan published new 0.17 pre-release builds yesterday, they include the new TechDraw workbench. :)
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Update drawing after modifying a part?

Post by ezzieyguywuf »

If this is in fact a topo naming bug, can someone post a bug report about it please?
rsxy
Posts: 6
Joined: Sun Jul 10, 2016 8:25 am

Re: Update drawing after modifying a part?

Post by rsxy »

Thank you all for your comments, I really appreciate your time helping other people. That's why I wish to try to give something back, perhaps I could help with documentation. As I am learning all the new stuff from 0.17 and becoming more proficient with FreeCAD in general, I wouldn't mind to write that down e.g. as a tutorial page that the pro users could comment on before making it public. I will get back to that some time soon and contact the admins.


As to the drawings, I may have encountered another bug. I have two drawing pages in one file and another one in a second file (of which some dimensional constraints refer to a spreadsheet in the first file). The drawings do not update correctly after making changes to the part:

There is an error message "Cannot open file C:\Program Files\FreeCAD 0.16\data\Mod\Drawing\Templates\A3_Landscape1.svg"

All drawings use the same template, but the first drawing in one file seems to block file access for the others. I just duplicated the template files, having one copy of the svg file for each drawing. In the data tab of the drawing, I can specify the new template file and press update - it works, but I guess it is not the way it should. Also, doing it this way, the editable strings for the annotation fields get lost, i.e. are overwritten by the template defaults.

Edit: This seems to happen only after reopening a saved file. I just created a part, two drawings, changed the dimensions in the sketch, no problem.
After closing and opening the file again, I changed again a dimension and the error occured.

Seemingly, this is not the case for 0.17.7965 which I just tried.



OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6704 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: 0c449d7e8f9b2b1fb93e3f8d1865e2f59d7ed253
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Post Reply