[Bf-python] How to get inside faces from inside verts?

joe joeedh at gmail.com
Thu May 21 01:33:20 CEST 2009


If applying rot/scale works, then it means your script isn't properly
taking the object matrix into account.  To calculate the final
transformed position of a vertex, you have to multiply it with the
object's matrix, like so:

final_vert_co = object.matrix * vert.co

Joe

On Wed, May 20, 2009 at 4:44 PM,  <lynx.abraxas at freenet.de> wrote:
> Hello!
>
>
> On 20/05/09 14:30:19, joe wrote:
>> Try triangulating the fractalized sphere.
>>
>> So you want to find faces attached to verts, right?  The solution is
>> to iterate over every face in the mesh, and check if any of the face's
>> vertices are inside the set of inside vertices.
>
> Thanks Joe for Your quick answer.e
>
> I  implemented that (I hope; see http://homepages.uni-regensburg.de/~grr06742/blender/ell_ori01.blend.bz2) but I figured out I only
> get one vert reported to be inside for any ellipsoid (even for  those  not  in
> contact with the icospher).
>
> To  get  the  verts  coordinates  to  range above [-1:1] I have to also "apply
> rot/scale to ob".
> Why's that? Is Blender showing verts at positions different than those  I  get
> from the mesh in a script?
>
> I  would be very greatful if someone could point out why I miss inside points.
> I'm running out of ideas what I could have done wrong in my script/.blend
>
> Best regards
> Lynx
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



More information about the Bf-python mailing list