change discretize value to fix issues

Discretize of 0.0001 is okay for inches, but for metric <1microns would be quite small, this fixes some issues when generating paths for curves that look inward.
I found following post in the forum: https://forum.freecadweb.org/viewtopic.php?f=15&t=42755
I have experienced similar issues with other curves in my object.
This commit is contained in:
sundtek
2021-12-19 19:23:09 +08:00
committed by GitHub
parent ee95ccc13a
commit 0eead0d3c6

View File

@@ -33,6 +33,7 @@ import json
import math
import area
from FreeCAD import Units
from PySide import QtCore
# lazily loaded modules
@@ -104,7 +105,13 @@ def sceneClean():
def discretize(edge, flipDirection=False):
pts = edge.discretize(Deflection=0.0001)
val=Units.Quantity("1mm").getUserPreferred()
if len(val)==3 and val[2]=='mm':
deflection=0.002
else:
deflection=0.0001
pts = edge.discretize(Deflection=deflection)
if flipDirection:
pts.reverse()