0001287: Bug in draft snapping
This commit is contained in:
parent
7f3430857a
commit
7249ee4bad
|
@ -623,8 +623,11 @@ class Snapper:
|
||||||
dv = DraftVecUtils.scaleTo(dv,shape.Curve.Radius)
|
dv = DraftVecUtils.scaleTo(dv,shape.Curve.Radius)
|
||||||
np = (shape.Curve.Center).add(dv)
|
np = (shape.Curve.Center).add(dv)
|
||||||
elif DraftGeomUtils.geomType(shape) == "BSplineCurve":
|
elif DraftGeomUtils.geomType(shape) == "BSplineCurve":
|
||||||
|
try:
|
||||||
pr = shape.Curve.parameter(last)
|
pr = shape.Curve.parameter(last)
|
||||||
np = shape.Curve.value(pr)
|
np = shape.Curve.value(pr)
|
||||||
|
except:
|
||||||
|
return snaps
|
||||||
else:
|
else:
|
||||||
return snaps
|
return snaps
|
||||||
snaps.append([np,'perpendicular',np])
|
snaps.append([np,'perpendicular',np])
|
||||||
|
@ -637,7 +640,7 @@ class Snapper:
|
||||||
if constrain:
|
if constrain:
|
||||||
if isinstance(shape,Part.Edge):
|
if isinstance(shape,Part.Edge):
|
||||||
if last:
|
if last:
|
||||||
if DraftGeomUtils(shape) == "Line":
|
if DraftGeomUtils.geomType(shape) == "Line":
|
||||||
if self.constraintAxis:
|
if self.constraintAxis:
|
||||||
tmpEdge = Part.Line(last,last.add(self.constraintAxis)).toShape()
|
tmpEdge = Part.Line(last,last.add(self.constraintAxis)).toShape()
|
||||||
# get the intersection points
|
# get the intersection points
|
||||||
|
|
Loading…
Reference in New Issue
Block a user