Testing the Drawing Module

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Thu Apr 03, 2014 8:40 pm

In order to avoid a crash after adding a page, a doubleclick onto the page icon in the document tree is needed. Then a drawing view is generated and a template can be specified.

There is may be something wrong with the document update mechanism.


Yes i did that and got the crash. BUT your answer made me try it again and i moved one of the default templates from PPA install location to the Desktop first and then specified it in dialogue and it worked fine! Now we are getting somewhere! ;)

I inserted single view and could move it on the template by drag and drop operation. Something not possible in the past! Interactive UI supports already started to show it benefits. Simply selecting an edge or circle and pressing add dimension does exactly that. In some CAD software you need to do much more clicks to do this! In Property View you can easily set type of dimension. Trying out Insert an orthographic projection... tool still crashes FreeCAD but based on the past discussion i guess this is WIP? Did you already decide if you will keep current dialogue or do a new one? Exporting the drawing as SVG worked and i could open it up in Inkscape easily. Wonderful!

As soon as the crashing part in some situations is sorted out a bit i think this should be merged into master. Great job and to be honest if somebody would ask me just a few months back when will FreeCAD get Drawing Workbench as feature rich as this one i would say probably it will take few years! Now the solid foundation to build on is here and basic CAD operations as user would expect too.

Great work!
ulrich1a
Posts: 1406
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Postby ulrich1a » Thu Apr 03, 2014 9:06 pm

triplus wrote:BUT your answer made me try it again and i moved one of the default templates from PPA install location to the Desktop first and then specified it in dialogue and it worked fine! Now we are getting somewhere

I am not the programmer of the Drawing workbench, I just tested it some days before.
So the good outlook belongs to mrlukeparry! Same from me.

Ulrich
mrlukeparry
Posts: 652
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Testing the Drawing Module

Postby mrlukeparry » Thu Apr 03, 2014 9:28 pm

once again thanks for your patience!

I've fixed a big instability that somehow got overlooked over several months. It should be more stable now i.e. no crashes when you create a page and try to edit. Also the template will update it self better when you change the svg file. This has been pushed to the git repo. [Remember git pull people ;)]

I'll try and work on this video guide soon. Fixing the previous issue was quite important and took about an 1 1/2hr to figure out, but atleast it got spotted now ;)

ulrich1a wrote:
triplus wrote:Yes i do believe i was facing this (template not being loaded) based on my impressions trying different things.
Did you have also a look here: http://freecad-tutorial.blogspot.de/201 ... qus_thread
Here Normand explains how to load a template.
It might be, that also the osifont is needed. This font was used, when I tested Lukes Drawing workbench. From the 4 buttons shown, for me only the first two produced something useful, not crashing.
I was able to make a view from a cube and give it a dimension after some trials.

Adding an angle dimension to the cube gave: The angle could not be calculated.
Ulrich


osifont isn't necessarily needed but it shouldn't need to be installed on your system because it is included with the Drawing Module. I am actually curious how all the comments never got passed on to me :)

jmaustpc wrote:
mrlukeparry wrote:Ideally I need help with ideas for the GUI. This also includes Icons too...


Hi Luke
I'm happy to make the icons if you like? I suggest you just don't have an icon at first for all the places you want one, such that the default white box with black cross shows up, then I will go through it and make something for all those spots, if you like?

Jim


Cool thanks Jim! I need to set which tools will be available in the tool bar but some icons you can think about in the mean time:

* Drawing Module Icon - Something that isn't just a piece of paper
* Create a 'General' Dimension'
* Create dimensions based on a type (old school mode similar to sketcher)
* Create a collection of orthographic views
* Create a view
* Create a template page (we have one already, but it could be more specific)

Tree Layout:
* A single orthographic view (maybe positions)
* Collection of orthographics views
* Template
* Dimension

It may be good if we could have ones for specific type of dimensions when they appear in the tree view - I'm not if we can set it, but it would be helpful. If it isn't we could possibly have a task view that lists all the dimensions for each view similar to sketch.

Also if you want to large graphic for the drawing module that could be useful :)
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Thu Apr 03, 2014 11:04 pm

I've fixed a big instability that somehow got overlooked over several months. It should be more stable now i.e. no crashes when you create a page and try to edit. Also the template will update it self better when you change the svg file. This has been pushed to the git repo. [Remember git pull people ;)]

I'll try and work on this video guide soon. Fixing the previous issue was quite important and took about an 1 1/2hr to figure out, but atleast it got spotted now ;)


Yes exactly bug reporting and probably fixing them based on feedback what affects users the most will be much easier now. You asked for some mock-ups and i have some early ideas and will hopefully post them today.
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Thu Apr 03, 2014 11:50 pm

When exporting to SVG i noticed exported SVG probably uses pixels (1 unit = 1 px) by default? I did it like that in the past when i created my first custom SVG template. To get correct size (preferred units) in Inkscape i later did "conversion" in Inkscape itself. There is another way and that is to define the unit in the Template itself:

viewtopic.php?f=9&t=2087&start=20#p32867
viewtopic.php?f=10&t=4182&start=20#p32863

Maybe you could do something like that on SVG export too? Anyway about UX itself you asked for some material to think about.

Custom Drawing.png
Custom Drawing.png (39.93 KiB) Viewed 1437 times


It would be nice to have ability to create blank custom sized SVG templates directly from FreeCAD. Selecting the provided option would open dialogue in sidebar to set it up. Optionally there could be a check-box to save the template for later reuse from drop down menu. For this to happen i do believe current (strict) naming convention would have to go. Sidebar has a lot of additional space for future additions. Maybe to add "standard head", BOM or border by clicking some check-boxes but that is beyond what this first implementation should be about.

Second thing as seen on the image is added "dimension toolbar". I am sure jmaustpc will create nice standard dimension icons and i do believe it is better to have all the buttons for dimension Type in toolbar. You will notice i added additional button "interactive". When one would press this button the rest of the toolbar would become greyed out and what would happen "single click" mode would be activated. Instead of selecting what to dimension and to press appropriate button now you would only press what you want to be dimensioned instead. For explicitly setting DistanceXYZ maybe now when the UX is interactive to add this as an option to right click menu when opened on selected dimension but this one could easily be counted as distant future plan!

When creating icon work for Drawing Workbench probably distinctive colour scheme should be used reserved just for DW? But i am sure jmaustpc already has in mind what he will do.
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Fri Apr 04, 2014 12:50 am

And last "wish" from my side for you to consider. I find it is invaluable to have the option that automatically creates predefined drawing views. ATM i use macro for this purposes. I have basically few variations of this macro each takes predefined (custom) template and puts on it (predefined) views with single click!

View Points.png
View Points.png (66.48 KiB) Viewed 1434 times


This could be archived in variety of ways. One would be to have the possibility to define View points (center points of views) position in the template and for each View Point to have properties like scale (auto or manually defined), coordinates (position in units), view type (Top, front, Side, Iso...)... View Point could be added/defined in Inkscape text editor (or combination of both) or built in editor would allow to define this View Points. After template like this would be used inserted part views would be positioned automatically.

But maybe easier/better option would be to reuse what is already available in FreeCAD. Orthographic Projection tool is powerful and feature rich by itself. If you decide to rewrite it i guess that new one could be used instead. Basically this is how it would work.

  • User would select preferred template from drop down menu.
  • Orthographic Projection tool would be used to position views.
  • Settings from Orthographic Projection tool would be saved to the newly created template itself if the option for this would be selected.

This way user has powerful way to create views in FreeCAD and to reuse it with little effort when needed. What would happen when user selects previously saved template like this from template drop down menu?

Orthographic Projection tool would be opened with presets set and user would select part from Three View and press OK or to slightly modify it first if needed and then to apply! Ideally another option would be possible and that is to select the part from Three View first and after adding template like that to the Page it would just produce the predefined drawing without opening Orthographic Projection tool at all for this task to complete successfully. This latter option would be used when the user is sure no modifications are needed because the output should be as it was predefined!

Anyway i do believe i exceeded my Quota for now and if at least something from my suggestions will be implemented and after mayor stability issues will be sorted out i am really looking forward to use/test and explore new Drawing Workbench.

P.S. If you really would like more suggestion fine:

Image

viewtopic.php?f=8&t=5467&start=50#p49559

Put a tab or two somewhere and maybe to start a trend. :D
User avatar
NormandC
Posts: 12266
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Testing the Drawing Module

Postby NormandC » Fri Apr 04, 2014 4:23 am

Thanks for the tip Ulrich,

Now that I know how to work around the bug, I could play with the module a bit.

Luke, as I said over on your blog, wow! That's terrific work! I've been at it for just a few minutes, will try to set more time on it in the coming days.

The movable view fixes my 4-year old issue #143 feature request. Cool! :D

For the benefit of others:

As triplus said (I think), you select an edge then you can create a dimension (and it appears instantly). But you can also select two vertices (using Ctrl to add the second selection). Dimensions can be deleted and they instantly disappear, no refresh needed. Nice. :)

Anyway, back later with more comments.

Thanks for your work Luke!
jmaustpc
Posts: 8096
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Testing the Drawing Module

Postby jmaustpc » Fri Apr 04, 2014 5:46 am

mrlukeparry wrote:Cool thanks Jim! I need to set which tools will be available in the tool bar but some icons you can think about in the mean time:

No worries Luke, I'll get on with it. :)

mrlukeparry wrote:Also if you want to large graphic for the drawing module that could be useful :)


I don't understand what you mean?
mrlukeparry
Posts: 652
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Testing the Drawing Module

Postby mrlukeparry » Fri Apr 04, 2014 7:51 am

triplus wrote:When exporting to SVG i noticed exported SVG probably uses pixels (1 unit = 1 px) by default? I did it like that in the past when i created my first custom SVG template. To get correct size (preferred units) in Inkscape i later did "conversion" in Inkscape itself. There is another way and that is to define the unit in the Template itself:

viewtopic.php?f=9&t=2087&start=20#p32867
viewtopic.php?f=10&t=4182&start=20#p32863

Maybe you could do something like that on SVG export too? Anyway about UX itself you asked for some material to think about.

Custom Drawing.png


It would be nice to have ability to create blank custom sized SVG templates directly from FreeCAD. Selecting the provided option would open dialogue in sidebar to set it up. Optionally there could be a check-box to save the template for later reuse from drop down menu. For this to happen i do believe current (strict) naming convention would have to go. Sidebar has a lot of additional space for future additions. Maybe to add "standard head", BOM or border by clicking some check-boxes but that is beyond what this first implementation should be about.

Second thing as seen on the image is added "dimension toolbar". I am sure jmaustpc will create nice standard dimension icons and i do believe it is better to have all the buttons for dimension Type in toolbar. You will notice i added additional button "interactive". When one would press this button the rest of the toolbar would become greyed out and what would happen "single click" mode would be activated. Instead of selecting what to dimension and to press appropriate button now you would only press what you want to be dimensioned instead. For explicitly setting DistanceXYZ maybe now when the UX is interactive to add this as an option to right click menu when opened on selected dimension but this one could easily be counted as distant future plan!

When creating icon work for Drawing Workbench probably distinctive colour scheme should be used reserved just for DW? But i am sure jmaustpc already has in mind what he will do.


Cool. Thanks for that.

Yeah, I think Yorik wanted to have separate dimension icons too. This I have no problem with and can implement. This means we need Jim to make some icons. I'm used to coming from Solidworks, so automatically attempting to decide which type I find quick and easy. The logic was just built into one toolbar command, so it's not stopping us having the other way.

I think the only thing we need to be sure we do is be consistent across FreeCAD. I remember a few months back the fuss over the slightly non standard selection in Sketcher.

jmaustpc wrote:I don't understand what you mean?


Sorry I meant a large logo if we wanted to use this on the wiki or website

normandc wrote:The movable view fixes my 4-year old issue #143 feature request. Cool!
.

Haha I didn't even release that existed. Two birds with one stone!

triplus wrote:This could be archived in variety of ways. One would be to have the possibility to define View points (center points of views) position in the template and for each View Point to have properties like scale (auto or manually defined), coordinates (position in units), view type (Top, front, Side, Iso...)... View Point could be added/defined in Inkscape text editor (or combination of both) or built in editor would allow to define this View Points. After template like this would be used inserted part views would be positioned automatically.


For now, I think for now keeping to what joe did makes sense. i.e. automatically calculating the scale and position. I see your idea could be useful, but I think would be better approached using python scripting.

triplus wrote:When exporting to SVG i noticed exported SVG probably uses pixels (1 unit = 1 px) by default? I did it like that in the past when i created my first custom SVG template. To get correct size (preferred units) in Inkscape i later did "conversion" in Inkscape itself. There is another way and that is to define the unit in the Template itself:


The drawing module will now automatically pick the units defined in SVG, just ensure this is set in your inkscape document. This means you can get away with inches hopefully.

triplus wrote:When creating icon work for Drawing Workbench probably distinctive colour scheme should be used reserved just for DW? But i am sure jmaustpc already has in mind what he will do.


If people want to decide on a 'default' colour scheme, please say. So far it's only blue for selection.
ulrich1a
Posts: 1406
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Postby ulrich1a » Fri Apr 04, 2014 4:33 pm

The latest update made the template and the white background displaying at different locations. Tested with the A3-template in data/Mod/Drawing/Templates.

The angle dimension error is still there. Adding a dimension for two edges gives the following:
Exception (Fri Apr 4 16:10:44 2014): Cannot measure the true angle
The python console shows:

Code: Select all

>>> App.activeDocument().addObject('Drawing::FeatureViewDimension','Dimension')
>>> App.activeDocument().Dimension.Type = 'Angle'
>>> App.activeDocument().Dimension.Content = '%value�'
>>> App.ActiveDocument.recompute()

After deleting "%value�" in the dimension properties, the dimension arc appears in the drawing.
Ulrich
exception_dimension_angle.png
exception_dimension_angle.png (109.71 KiB) Viewed 1402 times