[Solved] Bug #3262: normal vector returned by Face.normalAt(u,v) is not always a unit vector

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 8417
Joined: Thu Jan 05, 2017 9:03 pm

[Solved] Bug #3262: normal vector returned by Face.normalAt(u,v) is not always a unit vector

Postby Kunda1 » Sat Dec 09, 2017 12:07 pm

issue #3262: normal vector returned by Face.normalAt(u,v) is not always a unit vector
Description
In some case, the vector returned by method .normalAt(u,v) for faces is not a unit vector.
The solution would be to add a normalize operation vec::Normalize()
In TopoShapeFacePyImp.cpp, method TopoShapeFacePy::normalAt before returning the result.
Steps To Reproduce
A python test file and the associated brep solid is provided (in the ticket).
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 8417
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Solved] Bug #3262: normal vector returned by Face.normalAt(u,v) is not always a unit vector

Postby Kunda1 » Sat Dec 09, 2017 12:41 pm

Wow, that was swift!
Fixed in git commit 6a785f9 by @wmayer
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features