Start a new topic

Has anyone written a script that can calculate the enclosed volume of a convex hull?

Original Post by: chrisell Wed Dec 2 20:38:03 2015


Topic title says it all, really. Looking for a way to calculate the volume enclosed by a collection of polygons.


Original Post by: chrisell Mon Dec 7 14:34:18 2015


Ok. I'm not sure when PRESAGIS_OPENFLIGHT_API should be being set, but on my system, it's not in my environment variable list.

I think I know why.

I downloaded the documentation from the link here : http://www.presagis.com/support/dashboard/#/support/inc_s3_downloads/

... which just delivered a zip file that I unzipped into:


C:\Presagis\Openflight_API_13


I guess I need to do a full API install to get the variables and everything? I think I just needed the documentation because I'm working mostly in python inside Creator now, so I don't really need the whole API.

Original Post by: SteveThompson Mon Dec 7 14:52:28 2015


The environment variable PRESAGIS_OPENFLIGHT_API is set by the OpenFlight API installer just as PRESAGIS_CREATOR is set by the Creator installer.


Downloading the docs instead of doing an installation would certainly explain why the env var is not set for you. If all you really need is the docs no need to do a proper install. Just set PRESAGIS_OPENFLIGHT_API to C:\Presagis\Openflight_API_13, restart Creator and see if the context links in the OpenFlight Script Editor start working for you.

Original Post by: chrisell Mon Dec 7 14:57:09 2015


That didn't work I think because there's no HTML files.

I just did a full install and the environment variables got set as follows:

PRESAGIS_OPENFLIGHT_API --> C:\Presagis\Suite13\OpenFlight_API

PRESAGIS_OPENFLIGHT_API_5_0 --> C:\Presagis\Suite13\OpenFlight_API


That's where the API is installed and there is a 'docs' subfolder which has 'developerguide' and 'reference' folders in it.


Creator 13 and 14 still have those options greyed out though. :(

Original Post by: SteveThompson Mon Dec 7 15:02:32 2015


That didn’t work I think because there’s no HTML files.

Ah, that would make sense.I guess the "docs" package on the portal has only a subset of what you get with a full install.


Creator 13 and 14 still have those options greyed out though. :(


Is this file there?

$PRESAGIS_OPENFLIGHT_API/docs/reference/OpenFlight_API_Reference_Set.htm.

Original Post by: chrisell Mon Dec 7 15:14:24 2015


Yes - that file is present and correct:

C:\Presagis\Suite13\OpenFlight_API\docs\reference\OpenFlight_API_Reference_Set.htm


I can't remember - do windows env variables need a logoff/logon / reboot to stick?

Original Post by: chrisell Mon Dec 7 15:22:17 2015


To answer my own question, yes, windows needs to reboot. Looks like those menus are available now in the script editor. Thanks !

Original Post by: chrisell Mon Dec 14 15:59:52 2015


Hey - quick question. That script I posted works great if it's open in the script editor window, but if I just run it from the script menu without opening the editor, it doesn't give me any output. Any ideas why that might be?

Can anyone add a printout for the center of the mass to this function?
Login to post a comment