← Back to team overview

kicad-developers team mailing list archive

Re: filename resolution in 3D models

 

On 1/12/2016 5:02 PM, Bernhard Stegmaier wrote:
> Hi,
> 
> 
>> On 12 Jan 2016, at 22:20, Cirilo Bernardo <cirilo.bernardo@xxxxxxxxx
>> <mailto:cirilo.bernardo@xxxxxxxxx>> wrote:
>>
>> Having a single reference point is extremely inflexible - how do you
>> handle user models? If a
>> package manager installs the files and you add to the directories then
>> your changes can be
>> overwritten later. If the directories are read-only then the user
>> can't add models. Some people
>> use ${KIPRJMOD} or other environment vars in the model names to work
>> around the current
>> limitations. Even if we had a scheme like fp-lib-table different users
>> will have to create
>> corresponding nicknames on different installations.
> 
> Is it really?
> 
> I didn’t exactly follow what you plan, but looking at fp-lib-table:
> Every user has his own fp-lib-table… either referencing the system
> libraries, maybe github libraries, or his own custom ones.
> A user can pick system-libraries he wants from system path and his own
> ones from some location he has write access and the system package
> manager won’t overwrite (his home folder I guess).
> How libraries are referenced in fp-lib-table is pretty much on behalf of
> the user.
> He can use pure absolute paths or some other base referenced via some
> environment variable (don’t know at the moment if it is limited to using
> ${KISYSMOD} or you can use an env variable that is defined).
> Using such a variable I can customise my various installations by just
> setting the local variable to the right path where my (local/private)
> models are.
> 
> So, for me this looks quite flexible?
> At least, it allows me to open *my* projects on different machines I
> work on with the same (my) library but maybe different filesystem layout.
> 
> My point is not about exchanging projects between different users on
> different machines.
> Of course, if I open a (foreign) project which references 3d-models
> other than those I have, they won’t be found.
> But I don’t see any reason why this should be better when using relative
> paths…
> When exchanging projects, as you said… either projects have to be
> completely self-contained or all parties have to use the same libraries
> (or, model directory structure).
> 
> 
> Regards,
> Bernhard

Bernhard has described perfectly described why fp-lib-table is far
superior to any path list look up table irregardless if the path is
absolute, relative, and/or expanded from an environment variable.  This
is exactly why it is designed this way.  I have three different
platforms that have the same library nicknames appropriately configure
for each platform.  The footprints in my projects are completely
portable between platforms.  The same cannot be said of my 3D models
unless I define $KISYS3DMOD.  The other problem with using paths is you
have now limited yourself to files on your system.  I can think of a lot
other places that 3D model byte streams might come from besides a file
residing on my system.  Using paths and files is very limited.

> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References