fixed display of Draft offset ghost in OCC mode
This commit is contained in:
parent
827bb1a3e3
commit
bb854f65b7
|
@ -2114,7 +2114,8 @@ class Offset(Modifier):
|
|||
v2 = fcgeo.getTangent(self.shape.Edges[dist[1]],point)
|
||||
a = -fcvec.angle(v1,v2)
|
||||
self.dvec = fcvec.rotate(d,a,plane.axis)
|
||||
self.ghost.update(fcgeo.offsetWire(self.shape,self.dvec,occ=self.ui.occOffset.isChecked()))
|
||||
occmode = self.ui.occOffset.isChecked()
|
||||
self.ghost.update(fcgeo.offsetWire(self.shape,self.dvec,occ=occmode),forceclosed=occmode)
|
||||
elif self.mode == "Circle":
|
||||
self.dvec = point.sub(self.center).Length
|
||||
self.ghost.setRadius(self.dvec)
|
||||
|
|
|
@ -505,16 +505,16 @@ class wireTracker(Tracker):
|
|||
self.update(wire)
|
||||
Tracker.__init__(self,children=[self.coords,self.line])
|
||||
|
||||
def update(self,wire):
|
||||
def update(self,wire,forceclosed=False):
|
||||
if wire:
|
||||
if self.closed:
|
||||
if self.closed or forceclosed:
|
||||
self.line.numVertices.setValue(len(wire.Vertexes)+1)
|
||||
else:
|
||||
self.line.numVertices.setValue(len(wire.Vertexes))
|
||||
for i in range(len(wire.Vertexes)):
|
||||
p=wire.Vertexes[i].Point
|
||||
self.coords.point.set1Value(i,[p.x,p.y,p.z])
|
||||
if self.closed:
|
||||
if self.closed or forceclosed:
|
||||
t = len(wire.Vertexes)
|
||||
p = wire.Vertexes[0].Point
|
||||
self.coords.point.set1Value(t,[p.x,p.y,p.z])
|
||||
|
|
Loading…
Reference in New Issue
Block a user