Comments (14)
@poeschlr @SchrodingersGat
I just started a refactory of the structure...
ATM I've done it for resistors_SMD... the process to move the scripts to the new structure is very easy ...
I'm going to move all the scripts gradually...
Maurice
from kicad-3d-models-in-freecad.
capacitors_radial_SMD done 😀 capacitors_tantalum_SMD done 😊 QFN_packages done 😴
from kicad-3d-models-in-freecad.
GullWings QFP_SOIC_SSOP_TSSOP_SOT refactored 😸
from kicad-3d-models-in-freecad.
@poeschlr @SchrodingersGat
you may consider useful this folder:
https://github.com/easyw/kicad-3d-models-in-freecad/tree/master/cadquery/FCAD_script_generator/WIP
I added some WIP scripts...
- option to generate molded QFN, and then molded BGA
- option to load footprint beside the 3D generated model to easily check the result for all the family
(latest kicad StepUp Mod 4.1.2.8 needed)
from kicad-3d-models-in-freecad.
@poeschlr, @SchrodingersGat, @Shackmeister, @DASFrank, @metacollin
I was thinking of something like that:
The structure will be similar to github.com/KiCad pretty repo and when a family script generator is added, only one dir will be added to the repo.
In case of complex sub-models (i.e. JST connectors) the main generator DIR could have sub-dirs.
Output dir should be maintained empty on-line, but its structure is useful to test and generate models locally.
The reorganizing would be very easy but the result would be much cleaner than now...
What do you think?
from kicad-3d-models-in-freecad.
@easyw is my interpretation correct that what you suggest is very similar to option 2 but with the output directory moved to a separate directory within the root directory?
By the way i like the mention of the _tools folder. I would do this this regardless of how the rest of the repo is organized.
from kicad-3d-models-in-freecad.
Whichever way we go, we need to reduce the amount of duplicated files that are floating around. Currently it is a nightmare for maintenance.
e.g. a single license source script that gets copied into each file.
There's also much duplication of code which my PR #24 tries to address.
The other thing to address is naming convention. Currently the different scripts have random naming and there is no need to have multiple .sh / .bat files that just serve to pass different arguments through...
from kicad-3d-models-in-freecad.
e.g. a single license source script that gets copied into each file.
the new add_license.py is called with default license or with a custom one which is a variable in the main script
The other thing to address is naming convention
about naming convention we could have for main files:
- main_generator.py
- cq_parameters.py
- create_model.bat(sh) 'model_name' or 'all' to create all family models
other side files may be named with some grade of freedom
I like to have a single launcher inside the specific family folder to make the user approach to generation easier...
in _tool directory I would like to have: - cq_cad_tools.py
- exportPartToVRML.py
- shaders.py
- also the 'cq_helpers.py' made by @poeschlr :D
Version checking could be merged as function in cq_cad_tools.py
we could also add a DIR for 'screenshots' of the generated models/family and a 'doc' DIR for extra documentation
a todo.md and readme.md file will be at root to explain main usage and requirements
(FC 0.15 is best suggested for STEP generation and CQ 0.52 actual release which is tested ATM fine for all models)
Is this a good compromise for all of us?
Thx
Maurice
from kicad-3d-models-in-freecad.
Looks good
create_model.bat(sh) 'model_name' or 'all'
This means i need to change my scripts.
(Currently i'm expecting filter=model_name or filter=* one could also use something like filter=*01x02* which generates all 2 pol connectors.)
But this is easily done.
regarding the cq_helpers.py script: I need to play around a bit with that. currently i have a copy of it in all cq_models directories. I need to find a way to have a different python path for when the model is generated as standalone in the cadquery workbench and when it is generated from the export scripts.
(I'm sure there is a way. I was lacy when i made my last cleanup and i wanted to generate my models.)
I will look into this stuff today.
from kicad-3d-models-in-freecad.
capacitors_SMD done 😸
from kicad-3d-models-in-freecad.
DIP_packages done 😸
from kicad-3d-models-in-freecad.
🥇
from kicad-3d-models-in-freecad.
Pin Headers, Box Headers, Capacitors Radial THT completed! Only @poeschlr model scripts need to be slightly refactored to point to _tools and to generate in _3Dmodels sub dir ...
from kicad-3d-models-in-freecad.
cleanup completed :)
from kicad-3d-models-in-freecad.
Related Issues (20)
- python2 should die HOT 1
- Hard-coded paths in python scripts HOT 1
- Using the scripts with CADquery 1.2.0 and FreeCAD 0.18.3 HOT 3
- Using the scripts with CADquery 1.2.0 and FreeCAD 0.18.4 HOT 26
- Best way to add a new 3D model? HOT 5
- Support JST SMD connectors and SH Series
- SM resistors HOT 1
- BRepSweep_Translation error with epad line HOT 4
- DFN generator fails in FreeCAD 0.19 HOT 1
- Exception while processing file: main_generator.py [global name 'math' is not defined] HOT 3
- Buzzer_Beeper generator: Black screen in FC 0.18 HOT 2
- metric fuses HOT 5
- Problems running the scripts HOT 8
- move more stuff inside _tools ? HOT 1
- Add option for origin offset to scripts
- bugfix HOT 1
- Resistor_THT script can omit lead bends HOT 7
- Feedback concerning an often faced KiCad StepUp issue HOT 1
- Need PinSocket_1x08_2.54mm_Stacking for shields
- ./main_generator.py [No module named '_tools']
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-3d-models-in-freecad.