Macro Automatic drawing
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Macro Automatic drawing
Very good indeed!
I would like to integrate that as a command into Part or Drawing workbench..
I would like to integrate that as a command into Part or Drawing workbench..
Stop whining - start coding!
Re: Macro Automatic drawing
hi there,
I'm back to activity!
Off-topic (let's begin with good old habits ): I think one of the things we need to tackle for 0.14 is how to put dimensions on the drawing view. I'll redo all the draft dimension tool, but maybe it's time for something more ambitious...
I'm back to activity!
Off-topic (let's begin with good old habits ): I think one of the things we need to tackle for 0.14 is how to put dimensions on the drawing view. I'll redo all the draft dimension tool, but maybe it's time for something more ambitious...
Re: Macro Automatic drawing
We should probably start a new topic on this, but I would love to try and spearhead this. I've actually already begun! I started a wiki page to just keep track of my thoughts as I comprehend the current status and methods of the Drawing module, and to add new stuff that I program:yorikvanhavre wrote:Off-topic (let's begin with good old habits ): I think one of the things we need to tackle for 0.14 is how to put dimensions on the drawing view. I'll redo all the draft dimension tool, but maybe it's time for something more ambitious...
https://sourceforge.net/apps/mediawiki/ ... umentation
I know it is horribly incomplete and poorly written, I hope to improve as I go! The problem, as always, is finding enough time to program.
Re: Macro Automatic drawing
Hey! I know these parts from somewhere!
If approach from the macro would be used (centerpoint and maximum width/height) then it would probably be possible to have "recompute" support for drawing views? Right now in Drawing Workbench if you create drawing of part and if you change the size of the part then you would have to manually change scale/position for each view. I think it might be possible to simply "recompute" the drawing if centerpoint and maximum width/height would be used and this data would be stored and could be used later on? I don't know if this (recompute) would affect for example dimensions because it shouldn't delete them but dimensions should persist and new scale factor should be used. This is one important thing i think should be implemented for great drawing/dimension support in FreeCAD.I would like to integrate that as a command into Part or Drawing workbench..
Re: Macro Automatic drawing
I have one questions about (recent) changes introduced to FreeCAD. I am not sure i am after "solution" because after Luke work lands everything will probably work differently but still:
My macro does not work as it used to work. Something probably changed because looking at First Angle Isometric View in the past one would set Direction 1,1,1 Rotation 60. This changed to Direction 1,-1,1 Rotation 60? At least based on opening old .fcstd files from my archive in current FreeCAD master version this is how i get correct Isometric View back and quick test in my macro indicates this is the case?
My macro does not work as it used to work. Something probably changed because looking at First Angle Isometric View in the past one would set Direction 1,1,1 Rotation 60. This changed to Direction 1,-1,1 Rotation 60? At least based on opening old .fcstd files from my archive in current FreeCAD master version this is how i get correct Isometric View back and quick test in my macro indicates this is the case?
Re: Macro Automatic drawing
That comes down to the fact that Y axis is different in CAD and SVG.triplus wrote:I have one questions about (recent) changes introduced to FreeCAD. I am not sure i am after "solution" because after Luke work lands everything will probably work differently but still:
My macro does not work as it used to work. Something probably changed because looking at First Angle Isometric View in the past one would set Direction 1,1,1 Rotation 60. This changed to Direction 1,-1,1 Rotation 60? At least based on opening old .fcstd files from my archive in current FreeCAD master version this is how i get correct Isometric View back and quick test in my macro indicates this is the case?
In the SVG standard Y0 is the top of the page, like a word processors line numbers, the Y value increases as you go down the page. So in the SVG file standard origin is top left corner. In CAD origin is bottom left. The gui in some drawing applications (for example Inkscape, which the default SVG application) has origin bottom left like CAD in the GUI even though the SVG file itself is origin top left, the application translates it.
Because originally Drawing work bench was mostly SVG oriented in many important ways, it was originally to the SVG standard, origin top left, but after some discussion a consensus was reached that it should be changed the much more common, and CAD default, origin bottom left.
This all happened just a few months ago, so earlier 0.14dev would be different from more recent 0.14dev versions.
Jim
Re: Macro Automatic drawing
There is a recently change in the Draft workbench. The Draft-workbench Drawing projection gives now the same projection as the Drawing-workbench projection button. So you can have the same property settings in both projections and can combine both projections easily.triplus wrote:My macro does not work as it used to work. Something probably changed
This should nothing change for functions used from the Drawing workbench.
I had also another problem in a macro. In former times "0" could be used as "False" at some function calls. I had to change the macro to use True and False instead of 1 and 0.
Ulrich
Re: Macro Automatic drawing
Thanks for detailed explanation.Because originally Drawing work bench was mostly SVG oriented in many important ways, it was originally to the SVG standard, origin top left, but after some discussion a consensus was reached that it should be changed the much more common, and CAD default, origin bottom left.
On a side note to be honest in the future stuff like this should not be done unless absolutely needed. And maybe to give timestamps or version of FreeCAD the file was created with or simply "drawing format version" like v1.1 stamp and opening old drawing made in FreeCAD before the change was introduced to convert it to the new system. Basically ATM this does not make much sense because new DW workbench will land and will change things all around. But imagine that would not be the case and just because of some "administration difference" all .FCstd files created in the past do not show the views correctly anymore.
Well the change (orientation standard) that affects my macro also affects all .FCstd files containing drawings that where made before the change was introduced. Views are oriented differently.There is a recently change in the Draft workbench. The Draft-workbench Drawing projection gives now the same projection as the Drawing-workbench projection button. So you can have the same property settings in both projections and can combine both projections easily.
This should nothing change for functions used from the Drawing workbench.
Anyway thanks for confirming what i suspected and for detailed info.
Re: Macro Automatic drawing
My view is, mrlukeparry needs some help from others before the new DW workbench will land.triplus wrote:Basically ATM this does not make much sense because new DW workbench will land and will change things all around. But imagine that would not be the case and just because of some "administration difference" all .FCstd files created in the past do not show the views correctly anymore.
I do understand the problem of changing the behavior of a function, but the Drawing workbench needs improvements to get a better usability. There was also a bug fix in the Drawing workbench from tanderson69. There were some projections wrong due to a wrong approach for the determination of the svg-coordinates.
Ulrich
Re: Macro Automatic drawing
As i understand above info basically Y - axis switched orientation? That was done intentionally and if something like that happens again in the future then i guess FreeCAD should handle this and convert old .FCstd files with drawings in them to new standard.
We probably will not be doing conversion from current SVG to new DW method and this is therefore only theoretical example but if in the future (when we will not change the whole DW in its core as it is done ATM) similar sort of decision is made with the similar effects switching Y -axis in current DW has then i guess for FreeCAD to handle this in a way old .FCstd files with drawings in them to still work correctly in newer FreeCAD.
We probably will not be doing conversion from current SVG to new DW method and this is therefore only theoretical example but if in the future (when we will not change the whole DW in its core as it is done ATM) similar sort of decision is made with the similar effects switching Y -axis in current DW has then i guess for FreeCAD to handle this in a way old .FCstd files with drawings in them to still work correctly in newer FreeCAD.