-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Curve Curvature" node outputs wrong values for FreeCAD curves #3804
Comments
Other implementations give correct result? |
Yes, others are fine. Just FreeCAD is doing this and only for curves. |
I see. FreeCAD's Nurbs API does not have explicit methods for 2nd derivative; so the curvature is evaluated numerically, hence there is precision loss. I can try to add some kind of "precision" parameter to the node, so the user could somehow try to control this loss of precision... |
Sounds great! I'm surprised that FreeCAD lacks such basic feature. I just found that OCC has it and even 3rd derivative: Did you ever considered implementing PythonOCC? I know it's a huge thing but it's the whole OCC. |
I just found curvatureAt() and centerOfCurvatureAt() methods at this page (scroll to the bottom): https://wiki.freecadweb.org/TopoShape_API Could those two be of any use? |
Hm, I'll look into it. |
Your idea about adding a "precision" parameter on the existing algorithm looks really promising. I'm not much into math so I don't know if some hybrid approach will be possible, e.g. deriving torsion from curvatureAt() somehow. Thanks |
@portnov I tested adding the curvatureAt() method to ...utils/curve/freecad.py and the node now outputs correct results. While we can use curvatureAt() for the curvature/radius and center, there is still the problem with the torsion node and FreeCAD does not have an explicit API for it. So can you please consider implementing your first idea - adding a precision parameter to the original implementation of second and third derivatives? Thanks |
It appears that the problem was that I used |
introduce explicit tangent_delta parameter. Add "tangent_delta" to "curve curvature" node. refs #3804
I created a simple test case using 1m arc (converted to NURBS).
Curvature node outputs 1.0 when Native and Geomdl are used, but when FreeCAD is used the values are not 1.0.
Here's the test file I'm using:
FreeCAD_NURBS_Curve_WrongCurvature.zip
The text was updated successfully, but these errors were encountered: