Faces or Edges constraint among non cylindrical parts Macro

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by easyw-fc »

renatorivo wrote:
easyw-fc wrote:added to the Macro page
Only for consistency. It seems to me that all the other icons to the toolbar are .png

Renato
The good part of svg is that will render nice on different icon sizes (svg is vectorial)
So I would suggest to move, when possible, all icons to svg :D
Maurice
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by renatorivo »

easyw-fc wrote:The good part of svg is that will render nice on different icon sizes (svg is vectorial)
So I would suggest to move, when possible, all icons to svg :D
Maurice
We can suggest this, in the section Wiki
Note that, in the wiki, the .svg images are not resizable. They create a messy page.
If .svg images are better for the application (in the toolbar) would need a link to download them

EDIT: Attach them to the macro?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by easyw-fc »

renatorivo wrote: We can suggest this, in the section Wiki
Note that, in the wiki, the .svg images are not resizable. They create a messy page.
If .svg images are better for the application (in the toolbar) would need a link to download them

EDIT: Attach them to the macro?
what I do is put the png for the wiki and add a svg as icon
(I export a png version of the svg to be placed to the wiki page)
svg.png
svg.png (73.67 KiB) Viewed 2170 times
jp-willm
Veteran
Posts: 1118
Joined: Sat Feb 06, 2016 4:11 pm
Location: France (Alsace)
Contact:

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by jp-willm »

renatorivo wrote:
easyw-fc wrote:added to the Macro page
Only for consistency. It seems to me that all the other icons to the toolbar are .png

Renato
It seems that the workbench icons are .svg

jp willm
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by renatorivo »

I try to explain better.
svg image is not resizable, so in a wiki page takes too much space. As in this case.
icona-svg.png
icona-svg.png (5.78 KiB) Viewed 2159 times
My guess is
- have the page with the icon png, that looks like this
icona-png.png
icona-png.png (4.17 KiB) Viewed 2159 times
- attach to png icon a link to download the same icon, but in svg, from an archive that can be, for example, Artwork, or a special archive.

In this way the page is easier to read, and users can download the image in the best format for their toolbar

Renato
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by kkremitzki »

I looked into resizing SVGs inline in Mediawiki, and it should be possible, but I didn't get any result. For example if you do something like [[File:Path_to_image.svg|50px]] it should work.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by renatorivo »

kkremitzki wrote:I looked into resizing SVGs inline in Mediawiki, and it should be possible, but I didn't get any result. For example if you do something like [[File:Path_to_image.svg|50px]] it should work.
==Script== <!--T:4-->
The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg|16px]]
It returns the same image as
The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
Renato
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by kkremitzki »

Ah sorry, I hit post too soon, I forgot to mention that I had tried it but it didn't work. :oops: It should be possible though and may require more digging.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by easyw-fc »

renatorivo wrote:I try to explain better.
svg image is not resizable, so in a wiki page takes too much space. As in this case.
icona-svg.png
My guess is
- have the page with the icon png, that looks like this
icona-png.png
- attach to png icon a link to download the same icon, but in svg, from an archive that can be, for example, Artwork, or a special archive.

In this way the page is easier to read, and users can download the image in the best format for their toolbar

Renato
ok, I updated like that:
the page is diplaying the png file 50px; the image is linking to the corresponding svg image :D

Code: Select all

==Script== <!--T:4-->
The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.png|50px|link=https://www.freecadweb.org/wiki/File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
https://www.freecadweb.org/wiki/Macro_C ... s_or_Edges
svg-png.png
svg-png.png (74.23 KiB) Viewed 2150 times
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Faces or Edges constraint among non cylindrical parts Macro

Post by renatorivo »

I created this preview
https://www.freecadweb.org/wiki/WikiPag ... _for_icons
clicking on the image go to image svg
icona3.png
icona3.png (8.33 KiB) Viewed 2149 times

Code: Select all

* The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.png|16px|link=File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
* The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.png|24px|link=File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
* The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.png|32px|link=File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
* The icon for your toolbar [[File:Macro_Center_Align_Objects_with_Faces_or_Edges.png|link=File:Macro_Center_Align_Objects_with_Faces_or_Edges.svg]]
Edit we cross one another ;)
Post Reply