-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resistor_THT script can omit lead bends #406
Comments
@evanshultz |
About errors on values in scripts: bah, for each 3d I made, it was always, try / see result. When there is any error, you immediately get a strange or no 3d image. The resistor THTscript is a bit confuse because 'variations' were added, making lots a hard to follow 'if then else' Start with a resembling model eg
You will figure out immediately after that what values to adjust. Promess ;) |
you will find the color definitions in ../tools/shadersColors.py Select something else or add a new one. |
@evanshultz , do you get what you want ? |
with this:
The script is not modifiable for subtle changes like having the power R standing some distance above the board, stand-offs . wire shape specific, offsets specifics for verticals, .... I could do it (more modular and readable) provided you give some feedbacks |
@Franck78 green light from me! 😄 |
Hello Easy, I did not see a lot of movement on the KiCad 3D models. Barely one added a year ago. Anyway I wanted an apparently simple thing to do, put some colors on THT_Resistors. Change colors of some 'faces' to make them 'color coded'. I did not find anything simple like
Do you remember anything about that. Is there a way to say "Faces(25).Color = Something" in CQ? Thank you |
I am trying to model a Vishay/Dale CP0003 resistor (https://www.vishay.com/docs/30213/cp.pdf) using the following cq_parameters.py entry:
The resulting model has no lead bends nor lead stubs coming out of the body:
Is there some known and minor fix so that the leads come out properly but the model is still representative of this resistor?
I guess this is a limitation of the script, and different argument values will generate proper leads. If the arguments given are known to produce invalid results, it might be nice to alert the user at a minimum. Preventing model generation would be something else to consider, but certainly alert the user (especially since there isn't a preview for this script like the CP_Radial_THT script) as there's no quick and easy way to see there is a problem during model generation.
In addition, you may notice that the body color isn't very white. I found that other colors work well, and since the color looks more white in PCB design software I suppose this is an issue with FC or a misconfiguration of FC or my PC that is my fault. So I don't think there's anything to do about it, but I mention it just in case someone happens to have some ideas and takes the time to share them with me here.
In general, this script doesn't seem to have good error handling or input sanitation. While I was experimenting with various shapes to see what they look like, it wasn't always obvious what parameters were required for each shape (if zero is acceptable or not). It would be helpful to check the arguments based on the shape type and let the user know what's wrong. That all being said, a working generator that does it's thing nicely with a little trial and error is infinitely better than no generator at all!
The text was updated successfully, but these errors were encountered: