Comments (6)
I found the reason
If you create the 3D model like this
f.append(Model(filename="${{KISYS3DMOD}}/Valve.3dshapes/{}.wrl".format(s), at=(0, 0, socket_H)))
The result in the .kicad_mod file is
(model ${KISYS3DMOD}/Valve.3dshapes/Valve_Socket_Belton_VT9_PT-B9A-D21.00mm_Tap.wrl
(at (xyz 0 0 3.5))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
but kicad itself will scale up 3.5 with 25.4 so the z position will become 88.9000 when 3D-viewing the foot print in the foot print editor.
If you change it back to 3.5 and save the foot print, kicad change it to this
(model ${KISYS3DMOD}/Valve.3dshapes/Valve_Socket_Belton_VT9_PT-B9A-D21.00mm_Tap.wrl
(offset (xyz 0 0 3.5))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
so apparently kicad re scale distance if you use (at (xyz 0 0 3.5))
but not if yo use (offset (xyz 0 0 3.5))
this is clearly some mistake in kicad.
from kicad-footprint-generator.
Also
There is a serializer function in Model.py but that is not used becaouse KicadFileHandler.py is ignoring this function and use it's own, def _serialize_Model(self, node):
at line 149
So, it is not possible to modify Model.py to handle both at and offset arguments to Model.py
from kicad-footprint-generator.
With the valve push I will include a fix both in KicadFileHandler.py and Model.py so it will handle both at and offset where at supersede offset
from kicad-footprint-generator.
Closing, see push
KiCad/kicad-footprints#1111
from kicad-footprint-generator.
When I create a new footprint just for testing and add a 3D model in v5 I see this:
(model ${KISYS3DMOD}/Button_Switch_SMD.3dshapes/SW_DIP_x10_W6.15mm_Slide_Omron_A6H.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
For what it's worth, I think the wording has changed and offset
is no longer used.
from kicad-footprint-generator.
I can not use 'at' for the valve socket + valve (2 3D models in one foot print)
If 'at' is used, then kicad automatically will multiply with 25.4 first time (and convert it into an offset and save it like that)
But the 'offset' is not recalculated but stays as it should be and the second 3D model is placed in the correct place
from kicad-footprint-generator.
Related Issues (20)
- Abstract settings from IPC-compliant scripts
- PadArray exclude pad only works with pure numerical initial pin. HOT 3
- Some footprints are generated by the IPC scripts but do not appear in the footprint repo HOT 1
- Crystals generation scripts inconsistency
- Molex KK 254 series drill size too big (conn_molex_kk_254_tht_top.py) HOT 12
- yaml file for mounting holes? HOT 1
- Extratexts generate a line in the footprint even if the string is empty
- Make manage.sh into python script
- pad clearance HOT 3
- Define center pad paste pad grid HOT 3
- documentation for footprint generation, fix pad size? HOT 4
- deprecate 'at' keyword
- SMA footprint
- Similar script directory names HOT 2
- Error in yaml HOT 8
- Footprint generator for AC/DC, DC/DC converters HOT 4
- GitLab migration HOT 1
- Reproducable builds, Basic CI HOT 3
- Offset in Pad not taken into account
- Commandline paramters of ipc_* generators are not described well
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kicad-footprint-generator.