Arch: Fixed remaining bugs in Pipes
This commit is contained in:
parent
9fbd71af45
commit
75ec90e519
|
@ -294,6 +294,25 @@ class _ViewProviderEquipment(ArchComponent.ViewProviderComponent):
|
|||
import Arch_rc
|
||||
return ":/icons/Arch_Equipment_Tree.svg"
|
||||
|
||||
def attach(self, vobj):
|
||||
from pivy import coin
|
||||
sep = coin.SoSeparator()
|
||||
self.coords = coin.SoCoordinate3()
|
||||
sep.addChild(self.coords)
|
||||
symbol = coin.SoMarkerSet()
|
||||
symbol.markerIndex = coin.SoMarkerSet.CIRCLE_FILLED_5_5
|
||||
sep.addChild(symbol)
|
||||
rn = vobj.RootNode
|
||||
rn.addChild(sep)
|
||||
|
||||
def updateData(self, obj, prop):
|
||||
if prop == "SnapPoints":
|
||||
if obj.SnapPoints:
|
||||
self.coords.point.setNum(len(obj.SnapPoints))
|
||||
self.coords.point.setValues([[p.x,p.y,p.z] for p in obj.SnapPoints])
|
||||
else:
|
||||
self.coords.point.deleteValues(0)
|
||||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Arch_Equipment',_CommandEquipment())
|
||||
|
|
|
@ -378,7 +378,7 @@ class _ArchPipeConnector(ArchComponent.Component):
|
|||
vp = DraftGeomUtils.getNormal(p)
|
||||
rot = FreeCAD.Rotation(vp,pair[2])
|
||||
p.rotate(p.CenterOfMass,rot.Axis,math.degrees(rot.Angle))
|
||||
t2 = p.extrude((point.add(pair[2].negative())).multiply(2))
|
||||
t2 = p.extrude(pair[2].negative().multiply(2))
|
||||
# create a cut plane
|
||||
cp = Part.makePolygon([point,point.add(pair[0]),point.add(normal),point])
|
||||
cp = Part.Face(cp)
|
||||
|
|
|
@ -808,7 +808,7 @@ class Snapper:
|
|||
elif hasattr(obj,"SnapPoints"):
|
||||
for p in obj.SnapPoints:
|
||||
p2 = obj.Placement.multVec(p)
|
||||
snaps.append([p2,'spacial',p2])
|
||||
snaps.append([p2,'special',p2])
|
||||
|
||||
return snaps
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user