The script source code is at one level up
Grey LEDs have never looked quite right, but Red, Green, Amber, Blue and Clear has never been too many options for individual files
The ancestor and the compiled models are from a relatively early version of the code on the old Sourceforge repository
On a recent project, I used pushbutton switches which have built-in LEDs. Yep, there are several color options. The vendor helpfully provides STEP models for the switches, one for each color.
No doubt the materials on those will look just awful with the new 3Dviewer. I hadn’t touched that code for so long, I doubt that I made improvements to the material appearances. The models are eyecandy only so I don’t care much about their monstrous size. Those VRML tools may be worth maintaining if only for the eyecandy. One good thing about those tools is that you can simply change the material appearance definitions to something sensible and then regenerate all 6000+ models in less than 20s.
I just couldn’t miss your idea and this opportunity and I just created a script using my only know script language C/C++ to generate this!
I created an open source project (GPL3) and generated 1000 1/4w axial resistors wrl files! … more to come latter… project is here:
The model files are distributed under a modified MIT license, but if you need any special license just for you I can think about it!
The Film Resistors zip file is here:
The zip file is 898Kb and contains already a .png screenshot of 347Kb.
Each wrl file resistor is just 550 bytes length!
The wrl files are based on a recursive include directive of VRML format that will include the seed models and adapt as need.
I created the original models (my first creation) using FreeCAD (file included) the only thing was that the STEP file generated by FreeCAD was not OK
Then the WRL files were generated with StepUp by @maui
I appreciate if someone with knowledge in this area with FreeCAD can have a look and see if you can generate a proper STEP file because mine was broken. (May I will need to make some adjusts in the design? look for suggestions… )
Also, I appreciate if anyone could review my design (sizes) and resistor values if they are OK.
There are some things to know about this WRL files:
Every time you use a model, it will be cached by the cache mechanism of the 3DViewer. The cache size per model is 888Kbytes (Maybe @cbernardo one of this days will implement a faster compress system for the cached files ) . I think that will be OK if you just use a subset of values on a real case life scenario…
Looking for your ideas and comments,.
Other models / variants you would like to see?
Just plain sick.
Two years from now you guys will be working on getting the solder meniscus implemented.
I had that idea long time ago! … but its not the time yet… may in two years yeah… “we will never know”!
I thought about it years ago then decided the model will be way too large and we’d need a compute cluster to push data to shared memory to be rendered. The task isn’t difficult for round thru-holes with round pins/wires, but when you consider slotted PTH or flattened leads for THT, then the numerous fillets for SMD pins we quickly enter the territory of eyecandy absurdity. Even round holes with round pins may not have a fillet visible outside the hole. For the sake of making the job easy, you can simply generate an appropriately shaped blob for each pad (as if it were pad with no hole + solder only) and ignore the fact that it doesn’t quite look right where the solder joins the pin.
I’d guess a pyramid/cone coming up from the pad (custom shaped pads? - get out! ) would do for eye-candiness.
Height of that contraption could be derived from paste mask layer setback vs pad size and some arbitrary value in a settings file.
very nice rendering and models!
I fixed at least the main body of your resistor (I used a closed sketch to revolve… an open sketch is creating a shell not a filled solid)
resistor.FCStd (17.4 KB)
resistor.step (33.7 KB)
release 2 full fixed (with the sketch for sweeping fully constrained)
resistor-ok.FCStd (24.8 KB)
resistor2.step (37.1 KB)
Sorry I am not used to CAD terminology. Closed Sketch? Sweeping fully constrained?
The issue I had with generated STEP was that the metal wires appear cut/splited. and yeah I think I had an issue with the body too.
I will have a look on the file latter, thanks!
This means that there is a full outline. (Think about the edge cuts layer. There it is also necessary that there are graphical elements all the way around. With all endpoints of this elements touching the next one.)
Fully constraint means there is no degree of freedom for any element of the sketch. (In freecad the lines turn green. Also in the left sidebar you can see that there are 0 degrees of freedom.)
With sweeping i guess he meant that your sketch had one degree of freedom left. (I would guess you could move the whole sketch in one direction. But i have not looked at your files.)
Closed Sketch = closed path when creating a sketch for revolving
always it is good to have fully constrained sketches, which means no grade of freedom for your sketch
FreeCAD forum is very useful to shorten the learning process
https://forum.freecadweb.org/viewtopic.php?t=11382[quote=“Rene_Poschl, post:74, topic:5049”]
With sweeping i guess he meant that your sketch had one degree of freedom left. (I would guess you could move the whole sketch in one direction
there were non coincident points… very close but non coincident
Wouldn’t a simple solid cylinder resistor look almost as good and be a much smaller model.
Not all resistors have the fat end caps
@davidsrsb You’re talking with people here that create matching colored rings on a 3D model for eye-candy and even contemplate(d) solder meniscus visualization… so, no.
But the leads are not bent over (clinched) on the underside of the board!
Plus you need the leads to be cut at an angle like they would be if you clipped them with side-cutters. Otherwise what’s the point of any of this?