Image scaling Macro
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2611
- Joined: Tue Feb 21, 2012 8:07 pm
- Location: Torino - Italy
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Image scaling Macro
Very nice and useful.
I have done a short movie to illustrate the workflow:
Given the blueprint of a model create it again .. https://youtu.be/2iFE40uHrA8
Making the Image half transparent would be helpful ...
I have done a short movie to illustrate the workflow:
Given the blueprint of a model create it again .. https://youtu.be/2iFE40uHrA8
Making the Image half transparent would be helpful ...
Re: Image scaling Macro
hi JAndersM
I added the title in your macro to history, nice work
mario
I added the title in your macro to history, nice work
Code: Select all
__title__ = "Macro Image Scaling"
__author__ = "JAndersM"
__url__ = "http://www.freecadweb.org/index-fr.html"
__version__ = "00.01"
__date__ = "19/01/2016"
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: Image scaling Macro
Thanks!mario52 wrote:hi JAndersM
I added the title in your macro to history, nice work
Good video!microelly2 wrote:Very nice and useful.
I have done a short movie to illustrate the workflow:
Given the blueprint of a model create it again .. https://youtu.be/2iFE40uHrA8
Yes.microelly2 wrote:Making the Image half transparent would be helpful ...
Also noted from your video that a "move to origin" function would be useful. You click on the point in the image that you want to be in the 3D-origin and its moved there.
It seems to me that the Image Workbench can be improved a lot with a number of useful but not too complicated tools.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Image scaling Macro
Yes, indeed.JAndersM wrote: Also noted from your video that a "move to origin" function would be useful. You click on the point in the image that you want to be in the 3D-origin and its moved there.
It seems to me that the Image Workbench can be improved a lot with a number of useful but not too complicated tools.
* Position markers/move to origin
* Change the transparency of images (its possible in open inventor)
* and cuted images
are interesting next steps.
Re: Image scaling Macro
The workbench is written in c++ so it's not as easily accessible as if it was coded in Python. The image importer seems to use alpha-cannel for the displayed image but it's not exposed to the user-interface so you need to change the c++ code to enable setting semi-transparent images if I understands how it works.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Image scaling Macro
Programming in C++ is to to time consuming for me.
I see two steps
First have a prototype in pyhton with one or more macros
Then finding somebody who will port it into c++ and intergrate it to the workbench
I see two steps
First have a prototype in pyhton with one or more macros
Then finding somebody who will port it into c++ and intergrate it to the workbench
Re: Image scaling Macro
Or replace the workbench with python alltogether. I mean it only has two tools with very little functionlity, this could easily be done in python too, if someone is willing to put work into this.
Re: Image scaling Macro
This is probably the best solutionickby wrote:Or replace the workbench with python alltogether. I mean it only has two tools with very little functionlity, this could easily be done in python too, if someone is willing to put work into this.
Re: Image scaling Macro
I registered on this forum simply to say thank you for this macro. I have to use reference drawings a lot and this will save me sooo much time. Well done.