Forum: Poser Python Scripting


Subject: Moving morphs between different figures

Cage opened this issue on Dec 20, 2006 · 1232 posts


Spanki posted Sun, 14 January 2007 at 11:34 PM

Cool.  I have some other projects that need attention, but let me transfer some interim things over to your new file and I'll post that in a bit.

I hadn't tested the new file yet, but earlier today I narrowed in on 'why' we're still getting misses in some cases and I'm not sure how to handle it yet.  As far as I can tell, it's due to a matter of precision in some of the floating point values.  In the particular case I'm looking at, there's a line with both vertices at the following Y position...

<br></br>

...note the difference in precision (at least that's what's being printed out by Python).  So in this case, the intersection test point went 'beyond' the polygon/plane/edge by 0.000000000000035046  <-- that tiny amount.

Now, in cases where the intersection point is somewhere inside the polygon, that tiny amount wouldn't make a difference, but because it lies exactly on one of the edges being checked, it matters - it's effectively the same as being 10,000.000 (pick any number) too far.

I'm still trying to figure out the best way to handle this case in a general way.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.