(SOLVED) Can you set (increase) the calculation accuracy of freecad?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- thomas-neemann
- Veteran
- Posts: 11904
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
(SOLVED) Can you set (increase) the calculation accuracy of freecad?
in this example i would expect an intersection to be found. does anyone have a solution?
Last edited by thomas-neemann on Mon Sep 26, 2022 9:33 pm, edited 1 time in total.
-
- Posts: 79
- Joined: Tue Jan 21, 2020 1:11 pm
Re: Can you set (increase) the calculation accuracy of freecad?
There are no intersection.
Use Snap Angle or draw extra line from center of circle.
Use Snap Angle or draw extra line from center of circle.
- thomas-neemann
- Veteran
- Posts: 11904
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Can you set (increase) the calculation accuracy of freecad?
Thanks for the tip, that works, I just showed a simple example here. but it should also work something like this
Re: Can you set (increase) the calculation accuracy of freecad?
The problem is caused by the BoundBox check inside the findIntersection function:
https://github.com/FreeCAD/FreeCAD/blob ... #L107-L113
Quite recently a tolerance has been added, but this is not enough here. The BoundBox of the circle is not as accurate as you would want (or expect) it to be, it is namely based on the polygonal representation of the circle in the 3D view:
We need to rethink this portion of the code.
But for now: make the circle smoother:
Angular Deflection = 1.00 °
Deviation = 0.10
The intersection is then found even if the Draft "Internal precision level" preference is set to 8.
The spiral example most likely fails for a different reason as the BoundBoxes of the objects seem to clearly overlap. Please post that file.
https://github.com/FreeCAD/FreeCAD/blob ... #L107-L113
Quite recently a tolerance has been added, but this is not enough here. The BoundBox of the circle is not as accurate as you would want (or expect) it to be, it is namely based on the polygonal representation of the circle in the 3D view:
Code: Select all
BoundBox (-29.9027, -29.9757, 0, 30, 29.9757, 0)
But for now: make the circle smoother:
Angular Deflection = 1.00 °
Deviation = 0.10
The intersection is then found even if the Draft "Internal precision level" preference is set to 8.
The spiral example most likely fails for a different reason as the BoundBoxes of the objects seem to clearly overlap. Please post that file.
- thomas-neemann
- Veteran
- Posts: 11904
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Can you set (increase) the calculation accuracy of freecad?
thanks for the info, will test it, here is the file
edit
it works, thank you very much
Re: Can you set (increase) the calculation accuracy of freecad?
The start26sep.FCStd file is perhaps wrong? There is no line connected to the spiral.
- thomas-neemann
- Veteran
- Posts: 11904
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Can you set (increase) the calculation accuracy of freecad?
yeah that's what it's all about. I'm currently making a video with your information. here is the file
Re: Can you set (increase) the calculation accuracy of freecad?
Just for clarity and to avoid misunderstandings: this isn't caused by any intersection calculation inaccuracy.Roy_043 wrote: ↑Mon Sep 26, 2022 8:26 pm The problem is caused by the BoundBox check inside the findIntersection function:
https://github.com/FreeCAD/FreeCAD/blob ... #L107-L113
FreeCAD does not even try to calculate it because it thinks as the bounding boxes don't overlap the entities can't intersect.
Cheers,
Markus
Markus
- thomas-neemann
- Veteran
- Posts: 11904
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact: