Simple OpenSCAD script:
import("test1.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test1.dxf'."
Preview again (F5): (no warning)
Change file name in script:
import("test2.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test2.dxf'."
Preview again (F5): (no warning)
Is this a feature or a bug?
-Trygon
--
View this message in context: http://forum.openscad.org/import-no-warning-on-failure-tp17487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
This is a bug, it causes pain to lots of people. I think the problem is
that we cache the result of a failed import. I think the fix is to not
cache anything if the import fails.
On 31 May 2016 at 11:28, Trygon db5765@outlook.com wrote:
Simple OpenSCAD script:
import("test1.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test1.dxf'."
Preview again (F5): (no warning)
Change file name in script:
import("test2.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test2.dxf'."
Preview again (F5): (no warning)
Is this a feature or a bug?
-Trygon
--
View this message in context:
http://forum.openscad.org/import-no-warning-on-failure-tp17487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Or cache the console strings with the geometry they correspond to and emit
them whenever the geometry is used from the cache. There are lots of
warnings that only emit once, not just import.
On 31 May 2016 at 16:32, doug moen doug@moens.org wrote:
This is a bug, it causes pain to lots of people. I think the problem is
that we cache the result of a failed import. I think the fix is to not
cache anything if the import fails.
On 31 May 2016 at 11:28, Trygon db5765@outlook.com wrote:
Simple OpenSCAD script:
import("test1.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test1.dxf'."
Preview again (F5): (no warning)
Change file name in script:
import("test2.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test2.dxf'."
Preview again (F5): (no warning)
Is this a feature or a bug?
-Trygon
--
View this message in context:
http://forum.openscad.org/import-no-warning-on-failure-tp17487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
The issue is more general, at least surface() is also affected
On May 31, 2016, at 11:32 AM, doug moen doug@moens.org wrote:
This is a bug, it causes pain to lots of people. I think the problem is that we cache the result of a failed import. I think the fix is to not cache anything if the import fails.
Failures can take significant time, so I think we should cache failures, but change the return value from just shapes to shapes + messages instead of messages being side effects to the console.
-Marius
What still puzzles me about this issue, is the following:
As before simple OpenSCAD script:
import("test1.dxf");
Preview (F5): "WARNING: Can't open DXF file 'C:\Program
Files\OpenSCAD\test1.dxf'."
Preview (F5): (no warning)
Now create file test1.dxf
Preview (F5): test1.dxf is displayed (no warning)
Delete file test1.dxf
Preview (F5): nothing displayed (no warning)
This behaviour may be obvious to those who understand the inner workings.
-Trygon
--
View this message in context: http://forum.openscad.org/import-no-warning-on-failure-tp17487p17555.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On Jun 3, 2016, at 17:10 PM, Trygon db5765@outlook.com wrote:
What still puzzles me about this issue, is the following:
[…]
We cache each import statement separately, including the last modification timestamp of the file.
If the file is not found, we thus cache that separately as an empty object (no timestamp).
..so your last refresh, after deleting the file, is hitting the earlier cached empty object.
-Marius