Hi Elang,
For some generalities, here is a Word file. (If you do not have Word, it could be converted to PDF.)
https://home.csulb.edu/~pnguyen/cecs100/lecturenotes/Programming%20Development%20Cycles.docx
1. Analyze the problem. The computer (programmer) <user> must figure out the problem, then decide how to resolve the problem - choose a program.
2. Design the program...FlowChart...
etc.
Write out an overall description in "English" (or your) language, of how the interaction of the user is expected to take place.
So far you have talked about making rectangular boxes.
Three fields can be defined for Width and Length and Height.
What about thickness of the box walls?
The MoI Box command can make a Box with 6 surfaces.
The MoI Offset/ Inset command can make a box with thicknesses. A uniform thickness would be another entry field for the user.
The open top of the box must be defined and selected somehow.
I do not know how to automatically select the "Top" of the box. Maybe something in Extrude would help. Michael would know...
Define the fields desired.
Depth would depend on the amount of offset height...
Nesting boxes?
Lids?
Heart shaped boxes?
For Windows systems, Notepad++ editor can view current .js and .htm files, such as Box, Ringmaker, NutsAnd Bolts, etc.
(Do not rename .html, use .htm for extension.)
Also Notepad++ can modify existing (renamed) .js and .htm files.
I would set up a project file, (BoxMaker?), easy to find on the hard drive, or USB drive, or even microsoft OneDrive.
Copy promising files such as the three (times 2) files mentioned above, even rename them slightly, and edit them in Notepad++.
The .htm file has the list of fields. Part of the .js file tells MoI how and when to read and process the fields, and can ask the user to enter various values.
Response of geometry creation can be immediate, or there can be an Update button...
An .htm file can be run from Notepad++, for a simple view.
Work from a functioning script, making small modifications, and run in MoI, as a quick "debug." This will show the actual .htm in MoI screen...
Say change Box from interactive, to entry of fields...
- Brian
You could go the nodeeditor way as an alternative.
Max's excellent scripts tend to seem abbreviated and complex to myself...
The interactive Box scripts coding is pretty intimidating to myself.
The MoI API shows the Box Factories inputs, which is fairly simple...AND even has a 7 line .js script to draw a box. Just add the .htm interface to get the parameter values.
(20 units of width, length, and height...)
Example
//Draw a box
var factory = moi.command.createFactory( 'box' );
factory.setInput( 0, moi.vectorMath.createFrame() );
factory.setInput( 2, 20 );
factory.setInput( 3, 20 );
factory.setInput( 4, 20 );
factory.commit();