← Back to team overview

kicad-developers team mailing list archive

filename resolution in 3D models

 

Hi folks,

 I'm looking for some comments/suggestions on how to deal with 3D model
filename resolution. My current 3D refactor branch behaves in much the
same way as the main branch except that I can specify many model
search paths. Issues with this scheme include:

1. how do we deal with multiple equivalent filenames

2. when the file's full path is not a superset of an existing search path
how do we ensure that the stored path is a valid path on MSWin/Linux/
OSX?

For (1) I'm thinking we can use a scheme similar to fp-lib-table where we
specify a 'nickname' for a base path and provide for an optional comment/
description. The chief issue I see with this scheme is that the kicad_pcb
file will have to contain the nickname within the model name and earlier
versions of kicad will not be able to process project files which have the
nickname in the model name. This may not be such a big problem as the
user can do a string replacement to transform the names, but if data is
being shared both ways between 2 different kicad versions then the model
naming can be a nuisance.

For (2) I was thinking of converting the path to a path relative to the
project
directory. So "/home/user/models/a3dmodel.wrl" or "c:\models\a3dmodel.wrl"
might become something like "../models/a3dmodel.wrl". The relative path
will not necessarily exist on another computer but at least we don't have
the complication of a MSWin vs UNIX file path root.

Any comments/suggestions?

- Cirilo

Follow ups