GithubHelp home page GithubHelp logo

Comments (7)

leozide avatar leozide commented on May 13, 2024

I've been meaning to do something about this for a while but was never high priority. Where did you see that names are case sensitive?

From http://www.ldraw.org/article/512 :

"While both upper and lower case letters are permitted in filenames, filenames are case-insensitive"

from leocad.

 avatar commented on May 13, 2024

Where did you see that names are case sensitive?

I detect this thing when tryed import in Blender (using "ImportLDraw" addon) .mpd/.ldr produced by LeoCAD.

ImportLDraw addon is case sensitive, so can't import such files:

  • LeoCAD output (UPPERCASED names of parts & models, but 0 FILE strings case-sensitive)
0 FILE Sabah FreeStyle promotional set #1779.mpd
1 16 0 0 0 1 0 0 0 1 0 0 0 1 HELICOPTER #1779-1.LDR
1 16 0 0 0 1 0 0 0 1 0 0 0 1 SEAPLANE #1779-1.LDR
1 4 0 -8 -260 1 0 0 0 1 0 0 0 1 3022.DAT
1 16 0 0 0 1 0 0 0 1 0 0 0 1 SNOWMOBILE #1779-1.LDR
1 226 0 -24 -210 1 0 0 0 1 0 0 0 1 3004.DAT
0 NOFILE
0 FILE Seaplane #1779-1.ldr
1 4 0 160 10 1 0 0 0 1 0 0 0 1 3022.DAT
1 1 -29.997921 200 -10.005785 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 1 30.001064 200 -10.004789 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 4 0.000002 160 -40.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.DAT
1 4 -0.000566 168 -9.996567 -1 0 -0.000053 0 1 0 0.000053 0 -1 3020.DAT
1 47 0.006355 136 -20.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.DAT
1 226 0 136 -60 1 0 0 0 1 0 0 0 1 3004.DAT
1 226 0 176 -10 1 0 0 0 1 0 0 0 1 3022.DAT
1 226 0 168 -10 1 0 0 0 1 0 0 0 1 4871.DAT
1 1 0 192 -10 1 0 0 0 1 0 0 0 1 3020.DAT
0 NOFILE
0 FILE Helicopter #1779-1.ldr
1 4 0 -264 10 1 0 0 0 1 0 0 0 1 3022.DAT
1 1 -9.998962 -296 29.994736 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 1 10.002106 -296 -50.00531 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 4 -0.001038 -232 -0.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.DAT
1 4 -0.00267 -264 -49.996567 0.000026 0 -1 0 1 0 1 0 0.000026 3020.DAT
1 47 0.005295 -288 -0.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.DAT
1 226 0 -288 -20 1 0 0 0 1 0 0 0 1 3004.DAT
1 226 0 -256 -10 1 0 0 0 1 0 0 0 1 3022.DAT
1 226 0 -256 -10 1 0 0 0 1 0 0 0 1 4871.DAT
1 1 0 -248 -10 1 0 0 0 1 0 0 0 1 3020.DAT
0 NOFILE
0 FILE Snowmobile #1779-1.ldr
1 1 -29.997921 -8 -10.005785 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 1 30.001068 -8 -10.004791 0.000026 0 1 0 1 0 -1 0 0.000026 3710.DAT
1 4 0.000002 -64 -40.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.DAT
1 4 -0.000568 -16 -9.996567 -1 0 -0.000053 0 1 0 0.000053 0 -1 3020.DAT
1 47 0.006355 -56 -20.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.DAT
1 226 0 -24 -10 1 0 0 0 1 0 0 0 1 3022.DAT
1 226 0 -24 -10 1 0 0 0 1 0 0 0 1 4871.DAT
1 1 0 -32 -10 0.000026 0 -1 0 1 0 1 0 0.000026 3020.DAT
0 NOFILE
  • ImportLDraw supported output (fully case-sensitive)
0 FILE Sabah FreeStyle promotional set #1779.ldr
1 16 0 0 0 1 0 0 0 1 0 0 0 1 Helicopter #1779-1.ldr
1 16 0 0 0 1 0 0 0 1 0 0 0 1 Seaplane #1779-1.ldr
1 4 0 -8 -260 1 0 0 0 1 0 0 0 1 3022.dat
1 16 0 0 0 1 0 0 0 1 0 0 0 1 Snowmobile #1779-1.ldr
1 226 0 -24 -210 1 0 0 0 1 0 0 0 1 3004.dat
0 NOFILE
0 FILE Seaplane #1779-1.ldr
1 4 0 160 10 1 0 0 0 1 0 0 0 1 3022.dat
1 1 -29.997921 200 -10.005785 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 1 30.001064 200 -10.004789 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 4 0.000002 160 -40.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.dat
1 4 -0.000566 168 -9.996567 -1 0 -0.000053 0 1 0 0.000053 0 -1 3020.dat
1 47 0.006355 136 -20.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.dat
1 226 0 136 -60 1 0 0 0 1 0 0 0 1 3004.dat
1 226 0 176 -10 1 0 0 0 1 0 0 0 1 3022.dat
1 226 0 168 -10 1 0 0 0 1 0 0 0 1 4871.dat
1 1 0 192 -10 1 0 0 0 1 0 0 0 1 3020.dat
0 NOFILE
0 FILE Helicopter #1779-1.ldr
1 4 0 -264 10 1 0 0 0 1 0 0 0 1 3022.dat
1 1 -9.998962 -296 29.994736 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 1 10.002106 -296 -50.00531 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 4 -0.001038 -232 -0.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.dat
1 4 -0.00267 -264 -49.996567 0.000026 0 -1 0 1 0 1 0 0.000026 3020.dat
1 47 0.005295 -288 -0.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.dat
1 226 0 -288 -20 1 0 0 0 1 0 0 0 1 3004.dat
1 226 0 -256 -10 1 0 0 0 1 0 0 0 1 3022.dat
1 226 0 -256 -10 1 0 0 0 1 0 0 0 1 4871.dat
1 1 0 -248 -10 1 0 0 0 1 0 0 0 1 3020.dat
0 NOFILE
0 FILE Snowmobile #1779-1.ldr
1 1 -29.997921 -8 -10.005785 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 1 30.001068 -8 -10.004791 0.000026 0 1 0 1 0 -1 0 0.000026 3710.dat
1 4 0.000002 -64 -40.003151 0.000026 0 1 0 1 0 -1 0 0.000026 3021.dat
1 4 -0.000568 -16 -9.996567 -1 0 -0.000053 0 1 0 0.000053 0 -1 3020.dat
1 47 0.006355 -56 -20.010002 -1 0 0.000053 0 1 0 -0.000053 0 -1 3039.dat
1 226 0 -24 -10 1 0 0 0 1 0 0 0 1 3022.dat
1 226 0 -24 -10 1 0 0 0 1 0 0 0 1 4871.dat
1 1 0 -32 -10 0.000026 0 -1 0 1 0 1 0 0.000026 3020.dat
0 NOFILE

Inside LDraw library all names of .dat files inside ../ldraw/parts/ folder include only lowercase letters, but inside all ../ldraw/models/Note*.txt files there is mix of lower- & uppercase parts names (*.DAT mixed with .dat)

According all above I created two issues:

  • for LeoCAD - keep case sensitive names of parts & models inside saved files (optional);
  • for ImportLDraw - add option to ignore case sensitive naming of parts & models inside imported files (critical).

from leocad.

 avatar commented on May 13, 2024

From http://www.ldraw.org/article/512

File Name

Filenames must not be longer than 25 characters (including the extension) and must only contain the following characters: a-z, A-Z, 0-9, _, and - (to avoid confusion with English grammar, comma is not a permitted character). While both upper and lower case letters are permitted in filenames, filenames are case-insensitive. Currently, all official parts are issued with upper-case only names.

Extension

All files in the LDraw Parts Library are required to carry the .DAT extension.

According this (space) not allowed in names of models (LeoCAD now allow "spaces" and non-latin letters, so this is issue and must be fixed)

For the parts naming .DAT look like correct (this is issue only for ImportLDraw).

from leocad.

leozide avatar leozide commented on May 13, 2024

According this (space) not allowed in names of models (LeoCAD now allow "spaces" and non-latin letters, so this is issue and must be fixed)

That's for file names in the library, not model names in MPDs or model file names.

from leocad.

 avatar commented on May 13, 2024

model names in MPDs or model file names.

Partly, yes. I just tested ImportLDraw for import exported from LeoCAD single-model '.ldr' and its work well (there is some viewpoint issue, but its not related to naming)

But when try import in Blender multi-parts '.mpd', exported from LeoCAD, ImportLDraw read submodels...

0 FILE Sabah FreeStyle promotional set #1779.mpd
1 16 0 0 0 1 0 0 0 1 0 0 0 1 HELICOPTER #1779-1.LDR

... and expect that there is 0 FILE HELICOPTER #1779.LDR, but in exported from LeoCAD '.mpd' this entry case-sensitive

0 FILE Helicopter #1779-1.ldr

So, need test '.mpd' files produced by LeoCAD in other CAD's that support LDraw.

If this is issue only for ImportLDraw, then as workaround need allow ImportLDraw ignore case-sensitive naming on multi-parts documents import.

P.S.: As for me, it would be much better add restriction that inside '.mpd' format all letters must be ONLY UPPERCASED + not allow use "spaces" in submodels naming - use only A-Z, 0-9, _, -, . and (if needed) ,.

If need add "space" in submodels we must use _, because use of "space" in CSV-like documents ('.dat', '.ldr', '.mpd', etc.) is bad thing, especially for parsing those files.

from leocad.

 avatar commented on May 13, 2024

@leozide, I tested latest version from OBS for case size fix that you made few days ago.

It still has issue in output files

If LDraw part has filename 2635c23.dat, then now in output file it writed as 2635C23.dat.

So, for now (comparing to 17.07 release) LeoCAD use same case size in part extensions text, but in name before extension text it still use UPPERCASE for all leters.

from leocad.

leozide avatar leozide commented on May 13, 2024

That change fixed a different bug.

from leocad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.