Giter Club home page Giter Club logo

Comments (43)

grob6000 avatar grob6000 commented on May 18, 2024 1

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024 1

Should be ported to cadquery anyway :p

from kicad-3d-models-in-freecad.

grob6000 avatar grob6000 commented on May 18, 2024 1

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024 1

@Shackmeister you mentioned DIP switches above. As I have just made a script for DIP sockets and since I am a newbie to pyton I wanted to learn more about the language. I am in the process of recoding my script to utilize object oriented programming and I have started to add other DIP parts as "part" objects to verify my approach, the first beeing slide type DIP switches. As these has text/numbers on the body (ON and switch number) I wonder if anyone has successfully added text to the body via CadQuery and if so how and which font to use. Or should the text be left out to reduce file size?

bilde

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024 1

@terjeio That is really nice looking! is it made for the Kicad footprints?
I havent made anything with text on the model, also adds too much size for my taste.
You could consider making a small triangle for pin 1 and leave it like that :)
Make sure to upload the models to the Kicad Library when you are finished :D
can you also make the SMD version? :)

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024 1

@Shackmeister It is for the Kicad footprints and I have a SMD version in the pipeline. Triangle it will be and I am going to upload when I am happy with the script.

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024 1

@easyw I couldn't agree more! My point was merely we should prepare :)

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

Hi,
thx a lot for your contribution!
TO92s is fine though!
We are missing also TH resistors if you want to go with...
Thx 😸
Maurice

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

Things I would like to see:
SMD Inductors!! WE_MAPI especially :)
THT TO_SOT packages
THT reisistors
THT LEDs
Pin Sockets
JST_GH connector
Molex Clikmate connectors
Molex Duraclik connectors
AC/DC and DC/DC converters
Relays SMD andT
LDR resistors
Terminal blocks
Dip switches, SMD and THT
SMD crystals and Oscilattors

A small note, Jan has made a few of these using freecad and then using a script to change the parameters. The problem with these scripts are that the WRL scaling is wrong, the WRL material properties are wrong, and it cannot generate a STEP file without the fusion :) I went over all the capacitors and simply rewrote the script to cadquery framework, was the easiest way IMO

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

and it cannot generate a STEP file without the fusion

for THT resistors there is also a small problem with the Sketch not fully constrained that will generate a wrong STEP file

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

Wasn't that with Kammutierspules resistors?

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

not only... I made only few test with TH resistors, but if you open the STEP exported i.e. in Varicad, you will see the errors...
i.e. the R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal.FCStd
PS it is always useful to check STEP models not only in FC but also in DesignSparkMechanical or Varicad or even in CadAssistance of Open Cascades

dsm-resistor-errors
varicad-resistor-errors
cada

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

@grob6000 are you working on the THT resistors?

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

very nice though!
It would be possible to add a fillet like in this picture?
resistor-tht

and if I remember correctly Mario suggested "light brown body" as color for resistors
wrl materials

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

Awesome :) ill be digging into the SMD inductors soon :)

from kicad-3d-models-in-freecad.

grob6000 avatar grob6000 commented on May 18, 2024

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

I haven't verified some of the parameters properly

if you want to easily check the model over its footprint you can add some code to load the fp in FC while generating the model.
Please have a look at i.e BGA generator ...

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

@Shackmeister During QC of my footprints I see that the THT DIP-sockets has different models assigned for "normal" version and LongPads version. Maybe I am a bit thick but aren't the models supposed to be the same? If not what are the (physical) differences?

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

I strongly believe both should refer to the same model ("normal"). I noticed the kicad-library is still containing the old wings models. Can you please make sure both are up to date and has all the "possible" models?

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

I see that the footprints are already updated - I need to update more often...
I now have 126 models ready for review, next step is to learn how to make a PR.

bilde

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

You should always update footprints before adding models :) would you like some tips on the kicad PR? Or is it the git stuff in general which is trouble some? :)

BTW those models look really sweet! Keep up the good stuff!

from kicad-3d-models-in-freecad.

Misca1234 avatar Misca1234 commented on May 18, 2024

Oh, it seems that we have made the same work in parallel without knowing each other work, i just pushed some 3D models for DIP switched SMD
KiCad/kicad-packages3D#151

Fell free to overwrite mine

from kicad-3d-models-in-freecad.

Misca1234 avatar Misca1234 commented on May 18, 2024

@Shackmeister
About the THT LEDs, in kicad-library there are extensive amount of .wrl files for THT Leds, but they have not been copied to the package3D repository

A couple are made in wings but they are few

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

@Misca1234 these are made by Jan with a Freecad script but not CQ.. For this reason they don't make step models, correctly scaled WRL or step models at all... My take for the caps made by him was simply to rewrite them to CQ. After this I modified his footprint generator to output the correct parameters

from kicad-3d-models-in-freecad.

Misca1234 avatar Misca1234 commented on May 18, 2024

Ok

from kicad-3d-models-in-freecad.

Misca1234 avatar Misca1234 commented on May 18, 2024

FYI, so we don't get efforts made in parallel, I am currently fixing 3D models for Coverters_ACDC_DCDC

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

And I am working on socket strips - coding is nearly finished, need to verify parameters.

bilde

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

wow ... what a great MCAD team we are getting!
Thanks all for your great job!
Maurice

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

Great job guys! @terjeio I did a pretty big overhaul of the pinheader footprints, can you have a look at the socket strips footprints or should I? Also we should prepare ourself for people going apesh*t if we add 2000 models more for the socket strips

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

@Shackmeister I believe I have the code ready for the socket strips now, but need to fine tune pin-parameters. A previous test run generated over 1GB...

What to do about the footprints for these? They have model-parametes (offset and rotation) incompatible with StepUp and there are many. Do you know if they have been generated by a script that could be rerun?

Another example, too much details?...

bilde

...maybe not, your pin headers folder is 1.4GB.

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

any kind of rotation, scaling or offset should be done in the 3D mode, not the footprint! they should always be 111 for scaling, 000 for rotation and 000 for offset.
I love the high detail level, I think we should deal with the size issue in another way than cutting down the quality.

footprint script can be found here, please let me know if you need some help :)
https://github.com/pointhi/kicad-footprint-generator/tree/master/scripts/pin-headers_socket-strips
the footprints will probably need some adjustment. but its much easier to use to change the wrong scalings

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

@Shackmeister I think you misunderstand me, the footprints do not have standard values, for example:

(model ${KISYS3DMOD}/Socket_Strips.3dshapes/Socket_Strip_Angled_2x31_Pitch2.00mm.wrl
(at (xyz 0.03937 -1.181102 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 90))
)

(model ${KISYS3DMOD}/Socket_Strips.3dshapes/Socket_Strip_Angled_1x20_Pitch2.00mm.wrl
(at (xyz 0 -0.748031 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 90))
)

So, should I adjust the generated models accordingly or should the footprints be changed? I believe the footprints should be changed to comply with the standard convention.

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

I didnt misunderstand you :)
All footprints should be changed like so:
(model ${KISYS3DMOD}/Socket_Strips.3dshapes/Socket_Strip_Angled_1x20_Pitch2.00mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)

From here the 3D model should be fitted to the footprint

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

Ok, the easiest way would be to rerun the script then. Should I do that and make a PR for the footprints also? Or is this something that the librarians takes care of?

For the models: when a PR is merged for scripts who makes a PR for them?

Maybe the workflow is described somewhere, but for now I am a bit overwhelmed by all the details surrounding this.

from kicad-3d-models-in-freecad.

Shackmeister avatar Shackmeister commented on May 18, 2024

If you can fix the footprints it would be awesome, if not I can probably fix it :)
Change the script part which makes the offset on the model to 000, the scaling to 111 etc.
Make a PR on the library and note this shouldn't be merged until the new models are ready (since they break compatability with the current models). From here you should have the stuff you need to finish the 3D models.
Once you finished these you should generate the models and make a PR in kicad-library and packages3D (remember screenshots). And make a PR in this to make sure your script is kept here for future revisions.
From here a Librarian (possibly me) will check your PR's and review it (and possibly specify some needed changes.

Once the librarian is satisfied the footprint and 3D models will be merged :)

from kicad-3d-models-in-freecad.

easyw avatar easyw commented on May 18, 2024

@Shackmeister @SchrodingersGat @poeschlr

Also we should prepare ourself for people going apesh*t if we add 2000 models more for the socket strips

you will find users complain also for missing footprints ... it is impossible to cover all users needs ...
I would consider better to have a ready to go library and not asking users to build they own models from scripts... The big issue IMO is to create a way to download only needed 3D parts...

An interesting option would be to have a function to be called inside Kicad or pcbnew to create a full list of needed 3D parts for the user kicad project, then check automatically if those models are already in the users local 3D library and give an option to retrieve with a 'wget' process the missing models from kicad on-line library; finally the downloaded missing models would be placed automatically in the right local folder by the function itself.
For example if you need:
'Buttons_Switches_SMD.3dshapes/SW_SP3T_PCM13.step'
your wget could point to:
https://github.com/KiCad/kicad-packages3D/raw/master/Buttons_Switches_SMD.3dshapes/SW_SP3T_PCM13.step
and download it directly, placing it to local configured
'KISYS3DMOD'+Buttons_Switches_SMD.3dshapes/
folder.
This could be done as a python Action Script for Kicad

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

@Shackmeister

If you can fix the footprints it would be awesome, if not I can probably fix it :)

I have been looking into this and it is a mess, the script you referred to has been changed, most likely after it was committed, and is broken. From what I can glean from the master footprints it is higly likely that a variant of this script has been used to generate the footprints since many matches exactly.

I have managed to correct the scaling and rotation but there are other errors as well, for example:

bilde

This is Socket_Strip_Straight_2x10_Pitch2.54mm_SMD.kicad_mod, as you can see the pads are overlapping.

I do not think I want to try to fix the script as there are other changes as well, maybe the correct way forward is to raise an issue for the source?

BTW the models are ready for review, I had to take most of the measurements from the footprints though as there are a zillion variants available.

from kicad-3d-models-in-freecad.

antoniovazquezblanco avatar antoniovazquezblanco commented on May 18, 2024

Wow guys. I wanted to congratulate you on the work done. 3D library is looking nicer every day.

I miss FPC connector 3D models. Particularly Hirose FH12 series. I made a PR for a single connector footprint but I plan to submit an scripted generated version of the family when I find some time for investigating the footprint generation scripts.

Thank you!

from kicad-3d-models-in-freecad.

terjeio avatar terjeio commented on May 18, 2024

@antoniovazquezblanco

I have started work on Molex 52271 and in the process I am adding a class based approach to scripting the models since I like reusing code. One class is for polylines, due to I find it cumbersome to work in absolute coordinates, it allows code like this:

        body = Polyline(cq.Workplane("XY"))\
                    .addPoint(0,1)\
                    .addThreePointArc((0.5, -0.2), (1, 0))\
                    .addPoint(0,-1).make().extrude(self.body_height)

and this (for the ribbon inside the body in the example below):

        r = Polyline(cq.Workplane("XZ").workplane(offset=-self.body_width / 2.0), origin=(-self.cable_slot / 2 + 1.0 , self.body_height / 2))

        r.addPoint(0.0, 0.5)
        r.addPoint(0.8, 0.0)

        for i in range(1, self.num_pins):
            r.addPoint(0.0, -self.pin_thickness)
            r.addPoint(self.pin_width, 0.0)
            r.addPoint(0.0, self.pin_thickness)
            r.addPoint(1.0 - self.pin_width, 0.0)

        r.addPoint(0.8, 0.0)
        r.addPoint(0.0, -0.5)

        int = r.addMirror("Y").make().extrude(self.body_width)   

Example from work in progress for the Molex connector
bilde

I have wrapped lot of other common stuff in classes too so when making new models one need only to concentrate on the parameters an the model itself when making a new.

The code is work in progress and I will use for my next PR, I can upload a preliminary version if of interest.

from kicad-3d-models-in-freecad.

antoniovazquezblanco avatar antoniovazquezblanco commented on May 18, 2024

@terjeio Nice models. I like the object oriented approach but first I will focus on learning how to script the footprints and in the future will take a look at 3D models ;)

from kicad-3d-models-in-freecad.

poeschlr avatar poeschlr commented on May 18, 2024

@terjeio your suggested extensions for cadquery might also be welcome by the cadquery project it self.

from kicad-3d-models-in-freecad.

antoniovazquezblanco avatar antoniovazquezblanco commented on May 18, 2024

Hi everyone, although I wanted to learn more about the 3D scripts you make guys I never found the time to do it. I am currently trying to help a little bit wih KiCad by organizing and improving the situation of the pending merges in the oficial repos.

I am here to ask for some models that could help me save time at work that I can later invest on helping with more librarian tasks. Can anybody try and script Connector_Harwin.pretty/Harwin_M20* that I am currently using?

I will try to review the models myself with the highest priority and will invest some more time solving more issues at the bug tracker ;).

Thanks!

from kicad-3d-models-in-freecad.

Misca1234 avatar Misca1234 commented on May 18, 2024

I wanted to learn more about the 3D scripts you make guys I never found the time to do it

For example, one place to start with is

https://github.com/easyw/kicad-3d-models-in-freecad/cadquery/FCAD_script_generator/molex/cq_models/conn_molex_picoflex_90814.py

in directory
https://github.com/easyw/kicad-3d-models-in-freecad/cadquery/FCAD_script_generator/mole

you then feed Freecad with "main" python scripts

...../FreeCAD.exe main_generator.py series=90814

Can anybody try and script Connector_Harwin.pretty/Harwin_M20* that I am currently using?

Allow me to try to fix them, give me a couple days

from kicad-3d-models-in-freecad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.