mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
Prepping for stl and iges file import apis to be implemented
This commit is contained in:
parent
04a6e518ec
commit
a270e76692
1 changed files with 16 additions and 3 deletions
|
|
@ -101,10 +101,23 @@ export const ImportModelOperation: OperationDescriptor<ImportModelParams> = {
|
||||||
});
|
});
|
||||||
|
|
||||||
// //IGES import
|
// //IGES import
|
||||||
// FS.writeFile("newIgesObject", rawContent);
|
FS.writeFile("newIgesObject", rawContent);
|
||||||
// oci.readbrep()igesread("newIgesObject", "newIgesObject");
|
oci.igesread("newIgesObject", "newIgesObject");
|
||||||
// returnObject.created.push(occ.io.getShell("newIgesObject"));
|
returnObject.created.push(occ.io.getShell("newIgesObject"));
|
||||||
|
|
||||||
|
} else if (FileName.endsWith("STL") ){
|
||||||
|
|
||||||
|
throw new CadError({
|
||||||
|
kind: CadError.KIND.INVALID_INPUT,
|
||||||
|
code: 'STL is not supported yet'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
FS.writeFile("newSTLFile.stl", rawContent);
|
||||||
|
|
||||||
|
oci.readstl("mesh", "newSTLFile.stl");
|
||||||
|
oci.unifysamedom("cleanedSTL", "mesh")
|
||||||
|
returnObject.created.push(occ.io.getShell("cleanedSTL"));
|
||||||
} else {
|
} else {
|
||||||
throw new CadError({
|
throw new CadError({
|
||||||
kind: CadError.KIND.INVALID_INPUT,
|
kind: CadError.KIND.INVALID_INPUT,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue