How to use the @jscad/core/code-evaluation/rebuildSolids.rebuildSolids function in @jscad/core

To help you get started, we’ve selected a few @jscad/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscad / OpenJSCAD.org / packages / web / src / jscad / processor.js View on Github external
this.builder = rebuildSolidsInWorker(script, fullurl, parameters, (err, objects) => {
        if (err && that.opts.useSync) {
          this.builder = rebuildSolids(script, fullurl, parameters, callback, options)
        } else (callback(undefined, objects))
      }, options)
    } else if (this.opts.useSync) {
github jscad / OpenJSCAD.org / packages / cli / generateOutputData.js View on Github external
//only add this wrapper if not already present & we are not in command-line mode
    if(typeof wrappedMain === 'undefined' && typeof getParameterValuesFromParameters !== 'undefined'){
      const wrappedMain = main
      main = function(){
        var paramsDefinition = (typeof getParameterDefinitions !== 'undefined') ? getParameterDefinitions : undefined
        return wrappedMain(getParameterValuesFromParameters(paramsDefinition, ${JSON.stringify(params)}))
      }
    }
    `
    source = (inputFormat === 'jscad' || inputFormat === 'js') ? `${source}
    ${mainFunction}` : source

    if (outputFormat === 'jscad' || outputFormat === 'js') {
      resolve(source)
    } else {
      rebuildSolids(source, inputPath, params, callback, {implicitGlobals, globals, includeResolver: resolveIncludesFs})
    }
  })
    .then(function (objects) {