thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Create demoNewDesign test case #830

Closed 1fifoto closed 1 year ago

1fifoto commented 1 year ago

Base it on the current demoNewDesign.js execute file.

1fifoto commented 1 year ago

Merged into master, closing

grumpyinca commented 1 year ago

Concerns about current operation of the script generator

  1. Is it possible that // Page nn of mm comments can appear after the action as opposed to before ?

  2. In some cases, an extra semi-colon can appear in the translation. For example: setSymbolFlag('L_Solid', MAX, CONSTRAINED), can translate to store.dispatch( setSymbolFlag("L_Solid",MIN,CONSTRAINED); );

  3. In one case, a MAX gets translated to a MIN. For example:

                setSymbolFlag('L_Solid', MAX, CONSTRAINED),
                changeSymbolConstraint('L_Solid', MAX, 1.060),

    gets the very spooky translation to:

    store.dispatch( setSymbolFlag("L_Solid",MIN,CONSTRAINED); ); 
    store.dispatch( changeSymbolConstraint("L_Solid",MIN,1.06); ); 
grumpyinca commented 1 year ago

Ideas for improvement of script generator

  1. Include a comment, likely near the top (near "// This is a mapping of the ..."), that provides the RegEx syntax for "ExecutePanel.jsx:nnn " where nnn is any 3 digits. This will facilitate the mass replacement of all such strings with four blanks.

  2. Put four blanks in front of generated "design = store.getState();"

  3. Support for changeSystemControlsValue & Seek.

1fifoto commented 1 year ago

Update branch 830 for improvements 1, 2 and 3 in the previous comment, and merged into master