I know you know it
but
- there is NO support for texture in STEP AP214 format
- Tom is asking to create 3D models with texture to be displayed in KiCAD
and
With StepUp it could be possible to export the WRL model of the STEP model with a Texture wrl file assigned to i.e. a specific Material…
Moreover now KiCAD has cloned the way that StepUp is substituting WRL models to STEP when doing the STEP Export conversion, so using a WRL would help both in 3D viewer Appearance and Mechanical designing
The easiest (and without the need to change the pcbnew format) mode would be to manage a Material as an external WRL texture reference
StepUp could assign an external wrl file to a specific face when exporting the WRL model generated from a STEP model.
Then with a little code changes, this feature could be available
Shape {
appearance Appearance {texture DEF TEXTURE-01 ImageTexture {
url "./freecad-doc.png"
}
}
}
Shape {
appearance Appearance {material DEF PIN-01 Material {
ambientIntensity 0.271
diffuseColor 0.824 0.820 0.781
specularColor 0.328 0.258 0.172
emissiveColor 0.0 0.0 0.0
shininess 0.70
transparency 0.0
}
}
}
Shape { geometry IndexedFaceSet
{ creaseAngle 0.50 coordIndex [0,1,2,-1,0,2,3,-1]
coord Coordinate { point [3.937 3.937 3.937,3.937 3.937 0,0 3.937 0,0 3.937 3.937]
}}
appearance Appearance{
texture USE TEXTURE-01
}}
instead of
Shape { geometry IndexedFaceSet
{ creaseAngle 0.50 coordIndex [0,1,2,-1,0,2,3,-1]
coord Coordinate { point [3.937 3.937 3.937,3.937 3.937 0,0 3.937 0,0 3.937 3.937]
}}
appearance Appearance{
material USE RED-BODY
}}
In FreeCAD it is easy to assign a specific color to a Face/Plane, then it would be very easy to add a Texture to a Plane/Face when exporting a STEP model to WRL, for the use in KiCAD.
No need to add Dialog in KiCAD … simply the feature to support external linked WRL texture/files