For TechDraw I wanted to use the unit "px" for the width and height of images in pages. I realized that the unit system has no unit for pixel yet. it is clear that a pixel is no defined length and therefore it doesn't fit into the SI unit system.
The question is how I can nevertheless use the unit "px" (for example for a App::Propertyxxx).
how to use the unit "px"?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: how to use the unit "px"?
You could use CSS defined standard, which tells 1px=1/96in. But that's definitely weird to use px as a unit.
Re: how to use the unit "px"?
Not at all. There has been a weird definition in Inkscape SVG format using a default user unit at 90 ppi, up to version 0.92. I guess that's what causes your confusion. But it's not related.
Re: how to use the unit "px"?
Why is that weird? It is the standard unit for image sizes. See for example this screenshot:
Yo see there units of mm and ° but for the image size there is no unit. For IT affine persons it might be clear that the 100 means 100 pixel, but others might think these are mm since no unit means either no unit or often mm.
Yes, it is a very minor issue.
Re: how to use the unit "px"?
Aren't these unrelated issues? The 100x100 shown in your screenshot define the size of the source image to be extracted, not how big it is shown. Otherwise it would not zoom with the rest of the page. The px/inch conversion determines the size on the page. What you show in the image should indeed have the unit px.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: how to use the unit "px"?
Yes. I should have said more precisely that it is weird to use px to define dimensions.
'Size' is a bit ambiguous. Like in 'file size'. Actually it's similar to a weight. In case of a picture, resolution (dpi or ppi) would be similar to a density, and then dimensions are obtained by weight(size)/resolution.