MoI discussion forum
MoI discussion forum

Full Version: Updates to the MoI API of David C Morrill

Show messages:  1-4  5-24  25-44  45-53

From: pressure (PEER)
26 May 2023   [#45]
The files above at https://moi3d.com/forum/index.php?webtag=MOI&msg=10857.36 have been updated

All factory inputs, properties, and methods have been updated due to extensive sleuthing done by MO and also a clever script devised by MO that automatically extracts the input properties of a factory. A version of MO's script that generates html is now with all the other files.

A bunch of factory examples added by MO.

dump() function in Hints section at top has been changed to avoid a bug that caused the previous version to fail on objects with an undefined property value.

geomObject properties and methods now up to date.

Big thanks to MO!

- Peer
From: MO (MO_TE)
31 Aug 2023   [#46]
This is some information about the "calculateCurveOrientations" method. How it works and its properties. (Quotes from Michael)
"
You can generate an orientation list in script using:
var orient_list = moi.geometryDatabase. calculateCurveOrientations( ObjectListWithCurves );

This generates a list of CurveOrientation objects, one for each curve. Each CurveOrientation object has 2 properties .flipped and .seam .

The .flipped property will be true if the Blend should flip the curve before generating a blend from it, and the .seam parameter has a number value for the location of the seam point to use on a closed curve. The number is a normalized parameter value, a value of 0.0 means the start point of the curve, a value of 1.0 means the end domain of the curve.
"
Thank you Michael for clarifying this.
From: pressure (PEER)
1 Sep 2023   [#47] In reply to [#46]
Thanks MO and Michael for this info! I've updated the .htm to include this https://moi3d.com/forum/index.php?webtag=MOI&msg=10857.36

- Peer
From: bemfarmer
12 Oct 2024   [#48]
A minor typo in the MoI_v5_API_Documentation.htm file:

Under the ViewPanel class: Note that "bottom" is shown twice, but the second "bottom" should be "back"

Methods
Name Result Arguments
getViewport Viewport
string viewportName
Return the Viewport object for corresponding to the specified viewportName. The legal values for viewportName are:

3d
top
bottom
front
****bottom****
right
left
Note that top and bottom refer to the same viewport. The same is true for front, back and right, left.
*************
I added the BlueFlask icon to the current v5Beta, ui.icons,
and added the API documentation to MoI AppData file under moi_ref directory,
and also modified ui.sidepane to add BlueFlask icon, and have the icon call the API documentation:
code:
<table>
    <tr>
        <td>
            <moi:CommandButton icon="icons/HistoryIcon.png" command="history"><moi:text textid="History"/></moi:CommandButton>
        </td>
        <td>
            <vcenter>
                <moi:CommandButton
                    icon="icons/API_Icon.png"
                    onbuttonclick="moi.filesystem.shellExecute( moi.filesystem.getAppDataDir() + 'moi_ref\\MoI_v5_API_Documentation.htm' );">
                        API ref
                </moi:CommandButton>
            </vcenter>
        </td>
    </tr>
</table>


- Brian
From: bemfarmer
12 Oct 2024   [#49]
Well, the edit function for the previous post quit working.
The code block does not like some symbols, and half of the code block disappeared.
Maybe just delete the "BlueFlask" portion of the post?

- Brian
From: Michael Gibson
12 Oct 2024   [#50] In reply to [#49]
Hi Brian, I reformatted the code block, is that ok now?

- Michael
From: bemfarmer
12 Oct 2024   [#51] In reply to [#50]
Thank you Michael.

Most of the code block is correct, but the two "table" code lines need to be removed.
(The lower "table" line is in the correct position, but the upper "table" line is many lines further up in the SidePane.htm code.)

I think that my mistake was failure to use the correct code block symbols initially, posting, and then trying to edit in the corrections. (?)

- Brian
From: pressure (PEER)
12 Oct 2024   [#52] In reply to [#48]
Hi Brian,

Thanks for pointing out the typo. It's been fixed and various new curve methods have been added. See post above for files

https://moi3d.com/forum/index.php?webtag=MOI&msg=10857.36

- Peer
From: bemfarmer
14 Oct 2024   [#53] In reply to [#52]
Thankyou Peer, for your work!

- Brian

Show messages:  1-4  5-24  25-44  45-53