Thank you!
that was quick!

On Sat, Mar 19, 2016 at 12:46 AM, Campbell Barton <[email protected]>
wrote:

> Useful functionality to have, something we already supported for KD-Trees:
>
> Committed BVHTree.find_nearest_range(), [0], see API doc [1] and
> example script [2].
>
> [0]:
> https://developer.blender.org/rB26f2fe9528250d8935ded4957da34b5bcc58cf00
> [1]:
> https://www.blender.org/api/blender_python_api_2_77_0/mathutils.bvhtree.html#mathutils.bvhtree.BVHTree.find_nearest_range
> [2]: https://developer.blender.org/P340
>
> On Fri, Mar 18, 2016 at 12:20 PM, Jacob Merrill
> <[email protected]> wrote:
> > would it be possible to add a command to get all faces that intersect a
> > sphere to mathutils bvhtree?
> >
> > this would expose additional functionality to python based tools.
> >
> > from this command, a user could also then get all vertices involved in
> the
> > faces returned by the sphere radius command, and then iterate against the
> > small list to get all vertices in a radius,
> >
> > example code
> >
> > FaceList = mathutils.bvhtree.sphereCheck(point,radius)
> >
> > vertices =[]
> > for Face in FaceList:
> >    faceV = [Face.v1,Face.v2,Face.v3]
> >    if Face.v4:
> >        faceV.append(Face.v4)
> >
> >    vertices.append(faceV)
> >
> > VinR = []
> > for Vert in vecticies:
> >     if (Vert.XYZ-point).magnitude<radius:
> >         VinR.append(Vert)
> >
> >
> > #VinR = verts in radius#
> > _______________________________________________
> > Bf-committers mailing list
> > [email protected]
> > http://lists.blender.org/mailman/listinfo/bf-committers
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> [email protected]
> http://lists.blender.org/mailman/listinfo/bf-committers
>
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to