[Bf-committers] Mesh surface and volume calculation

Ton Roosendaal ton at blender.org
Sat Nov 13 14:23:35 CET 2004


Hi,

I think this can be evaluated together with other additions we can make  
for a little bit more "CAD" support (like angle/length drawing). It can  
also print surface per face I guess.
How you provide it now in the UI isn't very nice though... :)

Let's make a list of statistics people find useful on (Mesh) editing,  
and devise a good method to show all of that in the UI. This could be  
part of a new statistic Panel, either in the Editing buttons and/or as  
floating panel in 3d window (also to replace the prints in the top  
header, that's just a bit cumbersome there).

Look forward to design proposals... :)

-Ton-


On 13 Nov, 2004, at 12:38, Franz Münz wrote:

>> I think this sounds interesting (although during a release is a
>> difficult time to post - as I've discovered - I've been told to come
>> back in 2 weeks ;-).  Maybe you could provide a website explaining the
>> algorithm you are using mathematically?
>
> I know the next release is closing in. My post was just a basic  
> request for
> feedback and if more work in this direction from my side would be
> worthwhile. It's also about getting involved a little bit with blender  
> ^^
> because i really WANT to contribute something in the future :)
>
> The argorithms are VERY simple. For the volume read this:
>
> http://www.gamedev.net/community/forums/topic.asp?topic_id=279606
> (see last post; provided by z3r0_d in blender.org forum)
>
> The surface is calculated for each triangle by:
> S = 0.5*x*y*sin(z)
> where a,b are the length of two side of the triangle and sin(c) the  
> angle
> created by those sides. I am using:
>
>           a * b
> cos(z) = -------
>          |a|*|b|
>
> where a,b are the vectors spanning the angle.
>
>>     1. How does the code work with subdivision meshes?
>
> not at all at the moment, but that's something i thought about for the
> future.
>
>>     2. How does it handle volume calculations for "open" meshes (ones
>> which have no clearly defined "inside" and "outside")?  Does it detect
>> that they are open and refuse to proceed, or is there some arbitrary
>> closure condition applied?
>
> "open" meshes obviously have no volume but they can still be  
> calculated.
> because an open mesh lacks some faces a closed mesh would have and the
> calculation is done by including the origin (0, 0, 0) the result  
> depends on
> the distance to the origin.
> a "solution" for this would be the calulation of the "center" of a  
> mesh and
> then using this as a new origin. this way "lost" faces wont have too  
> much
> impact on calculation.
>
> of course the surface is still correct for such meshes.
>
> regards
> Franz
>
> --  
> NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
> GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list