diff --git a/package.json b/package.json index d78313556..80bd5158b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "snapmaker-luban", - "version": "4.13.1-beta.1.2", + "version": "4.13.1-beta.1.3", "description": "A web-based interface for Snapmaker 3-in-1 3D Printer", "homepage": "https://github.com/Snapmaker/Luban", "author": "Snapmaker Software Team", diff --git a/src/app/flux/editor/index.ts b/src/app/flux/editor/index.ts index 8d493002d..c6b220e6f 100644 --- a/src/app/flux/editor/index.ts +++ b/src/app/flux/editor/index.ts @@ -812,14 +812,20 @@ export const actions = { } else { const extname = path.extname(uploadName); const isScale = !includes(scaleExtname, extname); - - const newModelSize = sourceType !== SOURCE_TYPE.IMAGE3D - ? limitModelSizeByMachineSize(coordinateSize, sourceWidth, sourceHeight, isLimit, isScale) - : sizeModel(size, materials, sourceWidth, sourceHeight); - - width = newModelSize?.width; - height = newModelSize?.height; - scale = newModelSize?.scale; + const originalExtname = path.extname(originalName).toLowerCase(); + if (originalExtname !== '.dxf') { + const newModelSize = sourceType !== SOURCE_TYPE.IMAGE3D && sourceType !== SOURCE_TYPE.SVG + ? limitModelSizeByMachineSize(coordinateSize, sourceWidth, sourceHeight, isLimit, isScale) + : sizeModel(size, materials, sourceWidth, sourceHeight); + + width = newModelSize?.width; + height = newModelSize?.height; + scale = newModelSize?.scale; + } else { + width = sourceWidth; + height = sourceHeight; + scale = 1; + } } if (`${headType}-${sourceType}-${mode}` === 'cnc-raster-greyscale') {