I tried all possible ways to import a 3D-model for a light pipe, but it’s not visible in the 3D viewer after importing. What can be wrong?
I can see the 3D model of the component in the preview when importing the file, but then it’s not visible when adjusting the scale and offsets for a footprint, or in the 3D viewer. I verified the model in FreeCad and other cad programs, and converted the STEP file to all accepted import formats like WRL and IGS, but still same issue. I playes with scale and offset numbers. I’m using KiCad 9.
It might be that the model is so far away from the origin that you can’t see it no matter how far you zoom out KiCad > Footprint Properties > 3D Models
In fact, I just downloaded the model and opened it in Solidworks . . .
The model worked in other CAD programs, perhaps they automatically put the 3D Model in the center?
Should the center be the default? Or some message or button to center? A lot of these models does not come with a footprint, so you often have to work with the offsets anyway to put it right, starting from the center.
KiCad has quite strict guidelines in the KiCad Library Convention. As a result, KiCad’s library grows slower then it would otherwise, but it also improves the quality / reliability of KiCad’s libraries. Some of it’s rules:
Sloppy in place multi-body modeling. A lot of users don’t seem to know that computers actually work on floating point numbers so working far away from origin is a bad thing. But seems to have been forgotten to tell to a lot of engineers.
I used to work for a small simulation software company for factory simulations. And we allowed users to make their own units (AU anyone, 14 959 787 070 000 mm is a bit much already really close to doubles max precision), then wed just conform them to mm. Well somebody made a support ticket saying “Simulating flight to mars makes geometry explode”. Well, yeah it would do that.
It seems like component evolution is so fast now and there are so many variants, so most of the components I use are not in the library. Except standard connectors like JST-PH and standard resistor packages.
I download models and footprints from manufacturer- or supplier websites, and they only seem to have one model for all CAD-programs, then they have some conversion functions built in.
So I found a lot of components that doesn’t meet this KiCad spec, but as you say, you can adjust them in FreeCad.
AI helped me create a Python script for that:
import FreeCAD as App
import FreeCADGui as Gui
doc = App.ActiveDocument
obj = Gui.Selection.getSelection()[0]
shape = obj.Shape
center = shape.BoundBox.Center
obj.Placement.Base = obj.Placement.Base - center
doc.recompute()
Perhaps you made a typo ? computers actually work with integers and approximate floating point numbers, hence the reason that floating point rounding errors have to be accounted for in software if the software engineer wants to know where their calculations lie.
LOL. No. Unfortunately we need to contend with the unspecific of human language.
computers actually work with integers and approximate floating point numbers
Floating point numbers are always approximate, the name for the numeric value that is not approximate is a real number.
So maybe i should have said:
A lot of users don’t seem to know that computers actually work floating point numbers (typically double) as opposed to real numbers and the implications of this.
Though certainly you can process with higher order primitives too. But it would be slow and you graphics card wouldn’t be able to do it. Programming would be just as easy though.
Anyway we are now removed from original topic. Just answering halachal. Although the other reason might be a sloppy import export chain which is typical if you don’t specify your code contractors that they cant just take the seemingly easiest way out.