Check for text STL when linking (#1197)
* Check for text STL when linking * Use memcmp in STL import when checking for ASCII format * Add message box for unsupported STL file type. Co-authored-by: ruevs <dpr@ruevs.com>
This commit is contained in:
parent
859df9f43d
commit
61cc28f8b2
@ -130,6 +130,13 @@ bool LinkStl(const Platform::Path &filename, EntityList *el, SMesh *m, SShell *s
|
|||||||
char str[80] = {};
|
char str[80] = {};
|
||||||
f.read(str, 80);
|
f.read(str, 80);
|
||||||
|
|
||||||
|
if(0==memcmp("solid", str, 5)) {
|
||||||
|
// just returning false will trigger the warning that linked file is not present
|
||||||
|
// best solution is to add an importer for text STL.
|
||||||
|
Message(_("Text-formated STL files are not currently supported"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
uint32_t color;
|
uint32_t color;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user