PDA

View Full Version : Measure volume plugin for x64?



Exception
12-28-2008, 01:13 PM
I have this simple plugin called areavol.p that returns volume and area info on the selected polygons. Since moving to 64 bit I have sorely missed this teeny feature I use a lot.
Does anyone know a script or plugin for 64 bit that can do this?

dpont
12-28-2008, 02:51 PM
You could try to contact Ernie Wright the author,
he is often present in the Lightwave yahoo group,
I know that Marvin Landis has also a page
about this plugin.
http://amber.rc.arizona.edu/lw/areavol.html

Denis.

Exception
12-29-2008, 05:56 AM
I emailed him... but I do not expect a response.
How hard is it to compile a X64 version if you have the source code (that is downloadable from that site)?

RollerJesus
12-29-2008, 12:20 PM
Hey Exception.

I don't have 64 bit Lightwave installed on my machine to test it but it works like charm on LW 9.3 32-bit and it built fine under the 64 bit environment so I'm assuming it will work.

Please let me know if you have any issues and I can take another look when I get home this evening.

`Patrick

ps... Thanks for the radiosity guide; my renders look much better these days thanks to you!

EDIT: This attachment is good for LW 9.X 32 bit version.

Exception
12-29-2008, 01:03 PM
I don't have 64 bit Lightwave installed on my machine to test it but it works like charm on LW 9.3 32-bit and it built fine under the 64 bit environment so I'm assuming it will work.

Please let me know if you have any issues and I can take another look when I get home this evening.

Thanks for the effort, Patrick, looks promising!
Issue here is that I can't add the plugin. LW reports zero plugins present. This usually happens when you try to add a 32 bit plugin to 64 bit lightwave...

Any clue?

RollerJesus
12-29-2008, 01:27 PM
Any clue?

Yeah, I'm making this all up as I go along... ;)

I didn't fully configure my 32 bit machine to build for 64 bit so it built it to run as a 32 bit app on a 64 bit machine.

Give this one a shot.

Also, note that the zip in my previous post will run on 32 bit version of LW 9.X as most of the effort involved bringing the plugin up from the LW 6 SDK.

Exception
12-31-2008, 04:54 AM
Give this one a shot.


Thanks!
Unfortunately, it's still saying 'cannot load external plugin'...

Let me ask Mike to have a look...

Lightwolf
12-31-2008, 05:04 AM
Let me ask Mike to have a look...

And here he is ;)

@RollerJesus: Would you like to mail me your project and the source? I'd have a look, compile a 64-bit version and also add it to my to do list for OSX UB ports.
I could also just dig out the settings that I think are most important for a 64-bit port if you'd prefer that.

michael(dot)wolf(at)db-w(dot)com would be my mail address.

Cheers,
Mike

Lightwolf
12-31-2008, 05:06 AM
D'oh, the source code is actually on Marvin Landis page as well...

Cheers,
Mike

Exception
12-31-2008, 05:17 AM
Thanks Mike!

Lightwolf
12-31-2008, 05:43 AM
Here you go,

I've also included the new source code (the plugin was initially written for the LW 5.6 SDK).

Cheers,
Mike

Edit: Updated with the fix suggested by Sensei.

RollerJesus
12-31-2008, 08:24 AM
Thanks Mike!

What did you do to bring this section of the source up to compliance with the new SDK?

if (( polygon->numPnts < 3 ) || ( polygon->flags & PPDF_CURVE ) ||
( polygon->flags & PPDF_DETAIL )) return EDERR_NONE;

if ( selection && !( polygon->flags & PPDF_SELECT ))
return EDERR_NONE;

Lightwolf
12-31-2008, 08:46 AM
Thanks Mike!

What did you do to bring this section of the source up to compliance with the new SDK?



if ( polygon->numPnts < 3 ) return EDERR_NONE;

if (!( polygon->flags & LWPOLTYPE_FACE )) return EDERR_NONE;

if ( selection && !( polygon->flags & EDDF_SELECT )) return EDERR_NONE;

Which also means that it will only measure polygons (with at least three points, as the previous version did).

Cheers,
Mike

RollerJesus
12-31-2008, 08:57 AM
I appreciate it, just getting to know the SDK...

Thanks again!

`Patrick

Sensei
12-31-2008, 09:07 AM
if (!( polygon->flags & LWPOLTYPE_FACE )) return EDERR_NONE;


Mike! This should be:


if ( polygon->type != LWPOLTYPE_FACE ) return EDERR_NONE;

Lightwolf
12-31-2008, 09:35 AM
Mike! This should be:


if ( polygon->type != LWPOLTYPE_FACE ) return EDERR_NONE;

You're correct. Serves me right for not having written anything for Modeler in ages.

Edit: I've update the original archive further up in this thread.

Cheers,
Mike

Exception
01-02-2009, 10:47 AM
Edit: I've update the original archive further up in this thread.

Cheers,
Mike

Works like a charm, Mike!
A thousand thanks!

Nige
01-22-2014, 03:21 PM
A very old thread, I know...

I'm trying to find an easy way of getting the volume of a polygon model. Areavol is now well out of date, and won't work on new LW/Mac setups.

Can anyone out there update the plugin, or point me in a different direction??

Riff_Masteroff
01-22-2014, 07:11 PM
By the way: Note that Volume or Area or Angle or Distance is also currently incorporated in LWCAD (x64 or x32). Those can be found in LWCAD under "dimensions".

However, a Sphere from any four selected points is not 'in' LW, its plugins or lscripts, x64 or x32. And, yes, it once was a plugin.
Also note that a Circle from any three selected points can be found in LW plugins or LWCAD.

There is a problem in that programs may become less functional as they are 'upgraded' in time.