The top is with the with writen without a unit:
Code: Select all
<rect x="5mm" y="2.5mm" width="10" height="5"/>
Code: Select all
<rect x="5mm" y="2.5mm" width="10mm" height="5mm"/>
Code: Select all
<rect x="5mm" y="2.5mm" width="10" height="5"/>
Code: Select all
<rect x="5mm" y="2.5mm" width="10mm" height="5mm"/>
Please correct the title in case you mean "SVG".
Hard to say without the svg file to look at, but my guess would be that the lines are not using mm as the unit, so they use px.tobiasfalk wrote: ↑Sat Mar 18, 2023 9:04 am I do not know if this is a Problem of FreeCAD TD or Qt but when importing SVG's and the rectangle with is set in mm the size in FreeCAF TD is way of.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20mm" height="10mm" version="1.1" viewBox="0 0 20mm 10mm" xmlns="http://www.w3.org/2000/svg">
<description name="Resistor"
designator="R"
description="This is the Simbol the normal resistor"
name-alias="Widerstand"
symbol-alias="Resistor_US.svg"/>
<g stroke="#000000" fill="none" stroke-width=".35mm" stroke-linecap="round">
<rect x="5mm" y="2.5mm" width="10mm" height="5mm"/>
<line x1="0mm" x2="5mm" y1="5mm" y2="5mm" />
<pin pin="1" x="0mm" y="5mm" type="electric" e-type="passiv"/>
<line x1="15mm" x2="20mm" y1="5mm" y2="5mm" />
<pin pin="2" x="20" y="5" type="electric" e-type="passiv"/>
</g>
</svg>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20mm" height="10mm" version="1.1" viewBox="0 0 20mm 10mm" xmlns="http://www.w3.org/2000/svg">
<description name="Resistor"
designator="R"
description="This is the Simbol the normal resistor"
name-alias="Widerstand"
symbol-alias="Resistor_US.svg"/>
<g stroke="#000000" fill="none" stroke-width=".35mm" stroke-linecap="round">
<rect x="5mm" y="2.5mm" width="10" height="5"/>
<line x1="0mm" x2="5mm" y1="5mm" y2="5mm" />
<pin pin="1" x="0mm" y="5mm" type="electric" e-type="passiv"/>
<line x1="15mm" x2="20mm" y1="5mm" y2="5mm" />
<pin pin="2" x="20" y="5" type="electric" e-type="passiv"/>
</g>
</svg>
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git)
Build type: Release
Branch: (HEAD detached from 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods:
* 3DfindIT 1.2.0
* A2plus 0.4.56a
* AirPlaneDesign 0.4.0
* Assembly3 0.11.4
* Assembly4 0.11.10
* CADExchanger
* cadquery_module
* CurvedShapes 1.0.4
* dxf-library
* DynamicData 2.46.0
* ExplodedAssembly
* fasteners 0.3.40
* fcgear 1.0.0
* FeedsAndSpeeds 0.5.0
* FEM_FrontISTR 0.1.0
* FreeCAD_Electric
* FreeCAD_Schematics
* GDML 2.0.0
* kicadStepUpMod 10.11.7
* Plot 2022.4.17
* pyrate
* Render 2022.2.0
* sheetmetal 0.2.56
* Ship 2022.4.11
* SteelColumn
* ThreadProfile 1.82.0
* timber
* trails 2022.1.0
It is getting late here - are we investigating the size of the resistor body or the leads not being attached to the body?
I don't know enough about Svg to explain it, but I managed to make a symbol that comes very close to being 10 x 5.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20mm" height="10mm" version="1.1" viewBox="0 0 20mm 10mm" xmlns="http://www.w3.org/2000/svg">
<description name="Voltmeter"
designator="V"
description="This is the Simbol for a voltmeter"/>
<g stroke="#000000" fill="none" stroke-width=".35mm" stroke-linecap="round">
<circle cx="10mm" cy="5mm" r="5mm" stroke="black" />
<text x="10mm" y="7.6mm" font-family="osifont" font-size="7mm" fill="black" stroke="black" text-anchor="middle" always-horizontal="true">V</text>
<line x1="0mm" x2="5mm" y1="5mm" y2="5mm" />
<pin pin="1" x="0mm" y="5mm" type="electric" e-type="passiv"/>
<line x1="15mm" x2="20mm" y1="5mm" y2="5mm" />
<pin pin="2" x="20" y="5" type="electric" e-type="passiv"/>
</g>
</svg>
Code: Select all
<circle cx="10mm" cy="5mm" r="5mm" stroke="black" />