kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22530
Re: filename resolution in 3D models
-
To:
Cirilo Bernardo <cirilo.bernardo@xxxxxxxxx>, KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Mário Luzeiro <mrluzeiro@xxxxx>
-
Date:
Tue, 12 Jan 2016 13:15:44 +0000
-
Accept-language:
en-GB, en-US
-
Authentication-results:
spf=none (sender IP is ) smtp.mailfrom=mrluzeiro@xxxxx;
-
In-reply-to:
<CAHBNN+O54bQe=MSC1jsU6mXtTr4wuSbPy2s7zzqnnV2kTARO8w@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
Thread-index:
AQHRTNVnwZOAbsoZPUypMnHwaRdFmp73274Q
-
Thread-topic:
[Kicad-developers] filename resolution in 3D models
"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?"
I dont know about this issues with paths, but, if the user stores an "windows" path, then.. it should store it as is and it will only work on windows systems.
For relative paths, can we store a flag that it is relative? or as you suggest, add always the ../ ? then.. open it as relative everywhere
For 1) we should go use some kind of priorities.. local project folder should be the first.
Mario
________________________________________
From: Kicad-developers [kicad-developers-bounces+mrluzeiro=ua.pt@xxxxxxxxxxxxxxxxxxx] on behalf of Cirilo Bernardo [cirilo.bernardo@xxxxxxxxx]
Sent: 12 January 2016 01:05
To: KiCad Developers
Subject: [Kicad-developers] 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
References