Skip to content

Commit

Permalink
Merge pull request #7821 from Roy-043/Draft-fix-arcFromSpline
Browse files Browse the repository at this point in the history
Draft: fix arcFromSpline midpoint bug
  • Loading branch information
yorikvanhavre authored and donovaly committed Nov 21, 2022
1 parent 10902d7 commit eec4a59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Draft/draftgeoutils/arcs.py
Expand Up @@ -33,6 +33,7 @@
import DraftVecUtils

from draftgeoutils.general import geomType
from draftgeoutils.edges import findMidpoint

# Delay import of module until first use because it is heavy
Part = lz.LazyLoader("Part", globals(), "Part")
Expand Down Expand Up @@ -134,8 +135,7 @@ def arcFromSpline(edge):
else:
# circle
p1 = edge.Vertexes[0].Point
ml = edge.Length/2
p2 = edge.valueAt(ml)
p2 = findMidpoint(edge)
ray = p2.sub(p1)
ray.scale(0.5, 0.5, 0.5)
center = p1.add(ray)
Expand Down

0 comments on commit eec4a59

Please sign in to comment.