Define user inputs needed:
1. Height, default 2cm OD.
2. Width, default 4cm OD.
3. Depth, default 3cm OD.
4. WallThickness, default 0.2cm.
5. BottomThickness, default 0.2cm.
6. Lid Thickness.
Build list (drop down list) of box types:
1. Rectangular
2. Circular
3. Elliptical
4. HeartShape
5. Polygonal sides.
6. Tapered (Will need extra code for removal of Top face, and less code for bottom.)
7. ?
Define categories of boxes:
1. Bottom
2. Lid which nests over bottom.
Select a sample script to act as a partial template .js and .htm.
Some good choices:
_ChainMaker script.
_EggOvoid3 script
_Power Cone Spiral
_ChainMaker has an Update button, so many dimensions can be entered, before the geometry is recalculated.
_EggOvoid2 has a Build type menu. Geometry is updated each time a dimension is changed. There are also sliders. (Another version has a presets menu.)
_EggOvoid2 is my initial pick for a script template.
Copy _EggOvoid2 .js and .htm to the BoxMaker directory, and load into Notepad++.
In Notepad++, copy ALL, (or desired portions), of _EggOvoid2.js, to the new _BoxMaker.js copy in Notepad++. Also copy desired portions of _EggOvoid2.htm, to the new _BoxMaker.htm file in Notepad++.
(Alternatively, an extra copy of the two template files can be renamed to _BoxMaker, and loaded into Notepad++)
Two view panels can be opened in Notepad++, for side by side views, and copying between two .htm files.
<<<<<<
(As an afterthought, most of Max's scripts utilize a lot of the .js code in the .htm file, do to old speed constraints. It is no longer necessary to put a bunch of the .js code in the .htm file. (Some of MoI's scripts do have a bit of .js code in the .htm file, for programming convenience and "ability".)>>>>>>
Edit the .htm file, and also the .js file.
Initially make the changes gradual, and minor and non-destructive.
The evolving _Boxmaker.js and _Boxmaker.htm files can be copied to the commands folder of MoI AppDate folder, and run in MoI, and so show progressive improvements, or script failure.
Keep lots of copies of evolving scripts, so as not to lose those versions which still function. If the script Zonks-Out when run, make corrections, or else revert to a former partially working copy.
It is hard to edit a variable in .htm file, and conform the other occurrences in .htm or .js.
After selecting text to find, or change, using Ctrl+h in Notepad++is very helpful.
An unfinished draft .htm attached.
Double click in file manager to see menu display.
(Windows 11, see in file manager window???)
My few years old computer is not compatible with Windows 11. Due to the lack of some security feature, and ?.
My 1 or 2 year old Dell computer has Windows 11 on it, currently at work..
- Brian
Alpha1 version is slightly improved, but still needs modifications. (I had uploaded a slightly older version, by mistake.)
p.s. I am an amateur programmer, so others have more skill, and better work habits, and better naming conventions...
(I may do a little more work the next evening...)
|