Update default cq stl quality

This commit is contained in:
Kurt Hutten
2021-06-27 05:52:37 +10:00
parent bae5ba9d20
commit e95d47cfdf
2 changed files with 7 additions and 3 deletions

View File

@@ -1,10 +1,12 @@
const { makeFile, runCommand } = require('../common/utils')
const { nanoid } = require('nanoid')
module.exports.runCQ = async ({ file, settings = {} } = {}) => {
module.exports.runCQ = async ({ file, settings: {
deflection = 0.3
} = {} } = {}) => {
const tempFile = await makeFile(file, '.py', nanoid)
const fullPath = `/tmp/${tempFile}/output.stl`
const command = `cq-cli/cq-cli --codec stl --infile /tmp/${tempFile}/main.py --outfile ${fullPath}`
const command = `cq-cli/cq-cli --codec stl --infile /tmp/${tempFile}/main.py --outfile ${fullPath} --outputopts "deflection:${deflection};angularDeflection:${deflection};"`
console.log('command', command)
try {