Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. OpenSCAD version 2019.01-RC2 Import fails without error when using relative path
  2.  
  3. translate([0,0,50]) import ("PRINT3D/FILE.stl"); // this one is displayed
  4. translate([0,0,-50]) import ("FILE.stl");
  5.  
  6. I'm trying to import a stl file, which is located at /home/ben/Documents/PRINT3D/FILE.stl, the file NOTFOUND.stl don't exist.
  7.  
  8.  
  9.  
  10. when i start a new file by starting new instance of openscad, then select "new" without saving the file,
  11.  
  12. i type the following code
  13.  
  14. import ("PRINT3D/NOTFOUND1.stl");
  15. translate([-50,0,50]) import ("Documents/PRINT3D/FILE.stl"); // this one is displayed
  16. translate([0,0,50]) import ("PRINT3D/FILE.stl");
  17. import ("PRINT3D/NOTFOUND2.stl");
  18. translate([0,0,-50]) import ("FILE.stl");
  19. import ("NOTFOUND3.stl");
  20.  
  21.  
  22. Compiling design (CSG Tree generation)...
  23. DEPRECATED: Imported file (Documents/PRINT3D/FILE.stl) found in document root instead of relative to the importing module. This behavior is deprecated
  24. Compiling design (CSG Products generation)...
  25. WARNING: Can't open import file '/home/PRINT3D/NOTFOUND1.stl', import() at line 1
  26. WARNING: Can't open import file '/home/PRINT3D/FILE.stl', import() at line 3
  27. WARNING: Can't open import file '/home/PRINT3D/NOTFOUND2.stl', import() at line 4
  28. WARNING: Can't open import file '/home/FILE.stl', import() at line 5
  29. WARNING: Can't open import file '/home/NOTFOUND3.stl', import() at line 6
  30. Geometries in cache: 6
  31.  
  32.  
  33. when i start a new file by starting new instance of openscad, then select "open recent file" (recent file in /home/ben/Documents/PRINT3D/ ), then select file, new , without saving the file,
  34.  
  35.  
  36. import ("PRINT3D/NOTFOUND1.stl");
  37. translate([-50,0,50]) import ("Documents/PRINT3D/FILE.stl");
  38. translate([0,0,50]) import ("PRINT3D/FILE.stl"); // this one is displayed
  39. import ("PRINT3D/NOTFOUND2.stl");
  40. translate([0,0,-50]) import ("FILE.stl");
  41. import ("NOTFOUND3.stl");
  42.  
  43.  
  44.  
  45. Compiling design (CSG Tree generation)...
  46. DEPRECATED: Imported file (Documents/PRINT3D/FILE.stl) found in document root instead of relative to the importing module. This behavior is deprecated
  47. Compiling design (CSG Products generation)...
  48. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/NOTFOUND1.stl', import() at line 1
  49. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/NOTFOUND2.stl', import() at line 4
  50. WARNING: Can't open import file '/home/ben/Documents/FILE.stl', import() at line 5
  51. WARNING: Can't open import file '/home/ben/Documents/NOTFOUND3.stl', import() at line 6
  52. Geometries in cache: 5
  53.  
  54.  
  55.  
  56.  
  57. i save the project under /home/ben/Documents/PRINT3D/test.scad , then press F5
  58.  
  59.  
  60. import ("PRINT3D/NOTFOUND1.stl");
  61. translate([-50,0,50]) import ("Documents/PRINT3D/FILE.stl");
  62. translate([0,0,50]) import ("PRINT3D/FILE.stl");
  63. import ("PRINT3D/NOTFOUND2.stl");
  64. translate([0,0,-50]) import ("FILE.stl"); // this one is displayed
  65. import ("NOTFOUND3.stl");
  66.  
  67. Compiling design (CSG Products generation)...
  68. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/PRINT3D/NOTFOUND1.stl', import() at line 1
  69. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/Documents/PRINT3D/FILE.stl', import() at line 2
  70. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/PRINT3D/FILE.stl', import() at line 3
  71. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/PRINT3D/NOTFOUND2.stl', import() at line 4
  72. WARNING: Can't open import file '/home/ben/Documents/PRINT3D/NOTFOUND3.stl', import() at line 6
  73. Geometries in cache: 10
  74.  
  75.  
  76. then i press F5
  77.  
  78. Parsing design (AST generation)...
  79. Compiling design (CSG Tree generation)...
  80. Compiling design (CSG Products generation)...
  81. Geometries in cache: 10
  82. Geometry cache size in bytes: 2047616
  83. CGAL Polyhedrons in cache: 0
  84. CGAL cache size in bytes: 0
  85. Compiling design (CSG Products normalization)...
  86. Normalized CSG tree has 6 elements
  87. Compile and preview finished.
  88. Total rendering time: 0 hours, 0 minutes, 0 seconds
  89.  
  90. and there is no more warning about file not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement