jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.66k stars 515 forks source link

Broken OpenSCAD conversion #263

Closed Jip-Hop closed 7 years ago

Jip-Hop commented 7 years ago

When converting a working OpenSCAD file like so: openjscad working_openscad.scad -o broken_jscad.jscad the output file won't work.

I get the following error: ReferenceError: getParameterDefinitionsCLI is not defined. Removing this block of code fixes this:

  var wrappedMain = main
  main = function(){
    var paramsDefinition = (typeof getParameterDefinitions !== 'undefined') ? getParameterDefinitions : undefined
    return wrappedMain(getParameterDefinitionsCLI(paramsDefinition, {}))
  }

OpenSCAD and OpenJSCAD files in zip, together with output STL files: conversion_test.zip.

kaosat-dev commented 7 years ago

Hi again @Jip-Hop ! Thanks for the detailed feedback ! Would you mind splitting this up into two issues though ? They are completely unrelated, and the I am almost done fixing the first one. The second one on the other hand is way more complicated to trace :(

kaosat-dev commented 7 years ago

Thanks @Jip-Hop !

kaosat-dev commented 7 years ago

Fixed in #264 , now works correctly in CLI and web, good catch @Jip-Hop !