summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpravindalve2020-06-11 15:25:36 +0530
committerGitHub2020-06-11 15:25:36 +0530
commitb70d765b41d9de58cbe9411b8420a44a7e1f10e2 (patch)
treea044378da95236d8ff3296a1cc8bbcbef5db5cc7
parent41faed93d3fa5e4c1f2b28553fb59b110cc71e2c (diff)
parent46da6485a37cfdc8f7c9e8efd251222ef2d6811c (diff)
downloadChemical-PFD-b70d765b41d9de58cbe9411b8420a44a7e1f10e2.tar.gz
Chemical-PFD-b70d765b41d9de58cbe9411b8420a44a7e1f10e2.tar.bz2
Chemical-PFD-b70d765b41d9de58cbe9411b8420a44a7e1f10e2.zip
Merge pull request #17 from Sumit-Sahu/master
add class for svg item
-rw-r--r--src/main/python/shapes/line.py83
-rw-r--r--src/main/python/shapes/shapes.py398
-rw-r--r--src/main/resources/base/svg/Compressors/Centrifugal Compressor.svg26
3 files changed, 442 insertions, 65 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index 466e22b..516f34d 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -1,7 +1,7 @@
import math
-from PyQt5.QtGui import QPen, QPainterPath, QBrush, QPainterPathStroker, QPainter, QCursor
+from PyQt5.QtGui import QPen, QPainterPath, QBrush, QPainterPathStroker, QPainter, QCursor, QPolygonF
from PyQt5.QtWidgets import QGraphicsItem, QGraphicsPathItem, QGraphicsTextItem, QMenu, QGraphicsLineItem
-from PyQt5.QtCore import Qt, QPointF, QRectF
+from PyQt5.QtCore import Qt, QPointF, QRectF, QLineF
class Grabber(QGraphicsPathItem):
@@ -62,7 +62,7 @@ class Grabber(QGraphicsPathItem):
def paint(self, painter, option, widget):
"""paints the path of grabber only if it is selected
"""
- if self.isSelected() and not self.m_annotation_item.isSelected() :
+ if self.isSelected() and not self.m_annotation_item.isSelected():
# show parent line of grabber
self.m_annotation_item.setSelected(True)
painter.setBrush(self.brush)
@@ -78,7 +78,7 @@ class Grabber(QGraphicsPathItem):
"""Overrides shape method and set shape to segment on which grabber is located"""
index = self.m_index
startPoint = QPointF(self.parentItem().points[index])
- endPoint = QPointF(self.parentItem().points[index+1])
+ endPoint = QPointF(self.parentItem().points[index + 1])
startPoint = self.mapFromParent(startPoint)
endPoint = self.mapFromParent(endPoint)
path = QPainterPath(startPoint)
@@ -120,6 +120,7 @@ class Grabber(QGraphicsPathItem):
self.pen = QPen(Qt.white, -1, Qt.SolidLine)
self.brush = QBrush(Qt.transparent)
+
class LineLabel(QGraphicsTextItem):
def __init__(self, pos, parent=None):
super(LineLabel, self).__init__()
@@ -135,14 +136,18 @@ class LineLabel(QGraphicsTextItem):
self.setParentItem(parent)
self.line = QGraphicsLineItem()
self.line.setParentItem(self)
+ self.line.setPen(QPen(Qt.black, 2, Qt.SolidLine))
self.line.setFlag(QGraphicsItem.ItemStacksBehindParent)
self.resetPos()
def paint(self, painter, option, widget):
painter.save()
+ painter.setPen(QPen(Qt.black, 2, Qt.SolidLine))
painter.setBrush(QBrush(Qt.white))
+
painter.drawEllipse(self.boundingRect())
painter.restore()
+
super(LineLabel, self).paint(painter, option, widget)
def updateLabel(self):
@@ -309,6 +314,7 @@ class Line(QGraphicsPathItem):
"""
Extends QGraphicsPathItem to draw zig-zag line consisting of multiple points
"""
+
def __init__(self, startPoint, endPoint, **args):
QGraphicsItem.__init__(self, **args)
self.startPoint = startPoint
@@ -323,12 +329,18 @@ class Line(QGraphicsPathItem):
self.setFlag(QGraphicsItem.ItemSendsGeometryChanges, True)
self.setAcceptHoverEvents(True)
# store reference if line connect another line
- self.refLine = None # reference line
- self.refIndex = None # start index of segment to which it connects
+ self.refLine = None # reference line
+ self.refIndex = None # start index of segment to which it connects
self.commonPathsCenters = []
self.midLines = []
self.label = []
+ self.arrowFlag = True
+ def boundingRect(self):
+ rect = self.shape().boundingRect()
+ rect.adjust(-10,-10,10,10)
+ return rect
+
def advance(self, phase):
if not phase:
return
@@ -351,7 +363,7 @@ class Line(QGraphicsPathItem):
if item.refLine:
i = len(item.points) - 2
x1, y1 = item.points[i].x(), item.points[i].y()
- x2, y2 = item.points[i+1].x(), item.points[i+1].y()
+ x2, y2 = item.points[i + 1].x(), item.points[i + 1].y()
x, y = center.x(), center.y()
if x == x1 == x2 and not min(y1, y2) + 8 <= y < max(y1, y2) - 8:
continue
@@ -367,6 +379,7 @@ class Line(QGraphicsPathItem):
color = Qt.red if self.isSelected() else Qt.black
painter.setPen(QPen(color, 2, Qt.SolidLine))
path = QPainterPath(self.startPoint)
+ arrowHead = QPolygonF()
# iterating over all points of line
for i in range(len(self.points) - 1):
x1, y1 = self.points[i].x(), self.points[i].y()
@@ -396,6 +409,31 @@ class Line(QGraphicsPathItem):
path.arcTo(QRectF(x - 8, y - 8, 16, 16), 0, -180)
path.lineTo(point - QPointF(8, 0))
path.lineTo(self.points[i + 1])
+ if i == len(self.points) - 2 and self.arrowFlag:
+ arrow_size = 20.0
+ line = QLineF(self.points[i], self.points[i + 1])
+ if line.length() < 20:
+ continue
+ angle = math.acos(line.dx() / line.length())
+
+ if line.dy() >= 0:
+ angle = (math.pi * 2) - angle
+
+ arrow_p1 = line.p2() - QPointF(math.sin(angle + math.pi / 2.5) * arrow_size,
+ math.cos(angle + math.pi / 2.5) * arrow_size)
+
+ arrow_p2 = line.p2() - QPointF(math.sin(angle + math.pi - math.pi / 2.5) * arrow_size,
+ math.cos(angle + math.pi - math.pi / 2.5) * arrow_size)
+
+ arrowHead = QPolygonF()
+ arrowHead.append(line.p2())
+ arrowHead.append(arrow_p1)
+ arrowHead.append(arrow_p2)
+ # path.addPolygon(arrowHead)
+ painter.save()
+ painter.setBrush(Qt.black)
+ painter.drawPolygon(arrowHead)
+ painter.restore()
painter.drawPath(path)
@@ -453,9 +491,9 @@ class Line(QGraphicsPathItem):
start = self.startPoint
end = self.endPoint
sitem = self.startGripItem.mapRectToScene(self.startGripItem.m_annotation_item.boundingRect())
- eitem= self.endGripItem.mapRectToScene(self.endGripItem.m_annotation_item.boundingRect())
+ eitem = self.endGripItem.mapRectToScene(self.endGripItem.m_annotation_item.boundingRect())
if self.refLine:
- eitem = self.endGripItem.mapRectToScene(QRectF(0,0,0,0))
+ eitem = self.endGripItem.mapRectToScene(QRectF(0, 0, 0, 0))
if self.startGripItem.m_location in ["right"]:
if self.endGripItem.m_location in ["top"]:
@@ -463,7 +501,7 @@ class Line(QGraphicsPathItem):
if start.y() + offset < end.y():
self.points = [start, QPointF(end.x(), start.y()), end]
else:
- if start.x()+offset < eitem.left()-offset:
+ if start.x() + offset < eitem.left() - offset:
self.points = [start, ns, QPointF(ns.x(), pe.y()), pe, end]
else:
x = max(eitem.right() + offset, ns.x())
@@ -568,7 +606,7 @@ class Line(QGraphicsPathItem):
elif self.endGripItem.m_location in ["bottom"]:
if start.x() + offset < eitem.left():
if end.y() < sitem.top() - offset:
- self.points = [start, ns, QPointF(ns.x(),sitem.top()),
+ self.points = [start, ns, QPointF(ns.x(), sitem.top()),
QPointF(pe.x(), sitem.top()), end]
else:
y = max(sitem.bottom(), pe.y())
@@ -754,7 +792,7 @@ class Line(QGraphicsPathItem):
self.points[len(self.points) - 2] = QPointF(point.x(), self.endPoint.y())
else:
self.points[len(self.points) - 2] = QPointF(self.endPoint.x(), point.y())
-
+
if self.refLine:
self.endPoint = self.points[len(self.points) - 1]
@@ -830,7 +868,6 @@ class Line(QGraphicsPathItem):
self.endGripItem.line = None
if self.refLine:
if self in self.refLine.midLines: self.refLine.midLines.remove(self)
-
return super(Line, self).itemChange(change, value)
@@ -871,18 +908,18 @@ class Line(QGraphicsPathItem):
line.points[i].setX(point1.x())
if line.points[i].y() < min(point1.y(), point2.y()):
line.points[i].setY(min(point1.y(), point2.y()))
- line.points[i-1].setY(min(point1.y(), point2.y()))
+ line.points[i - 1].setY(min(point1.y(), point2.y()))
elif line.points[i].y() > max(point1.y(), point2.y()):
line.points[i].setY(max(point1.y(), point2.y()))
- line.points[i-1].setY(max(point1.y(), point2.y()))
+ line.points[i - 1].setY(max(point1.y(), point2.y()))
elif point1.y() == point2.y():
line.points[i].setY(point1.y())
if line.points[i].x() < min(point1.x(), point2.x()):
line.points[i].setX(min(point1.x(), point2.x()))
- line.points[i-1].setX(min(point1.x(), point2.x()))
+ line.points[i - 1].setX(min(point1.x(), point2.x()))
elif line.points[i].x() > max(point1.x(), point2.x()):
line.points[i].setX(max(point1.x(), point2.x()))
- line.points[i-1].setX(max(point1.x(), point2.x()))
+ line.points[i - 1].setX(max(point1.x(), point2.x()))
line.updatePath()
def removeFromCanvas(self):
@@ -920,9 +957,21 @@ class Line(QGraphicsPathItem):
"""
contextMenu = QMenu()
addLableAction = contextMenu.addAction("add Label")
+ if self.arrowFlag is True:
+ str = "Hide Arrow"
+ else:
+ str = "Add Arrow"
+ changeArrowFlag = contextMenu.addAction(str)
action = contextMenu.exec_(event.screenPos())
if action == addLableAction:
self.label.append(LineLabel(event.scenePos(), self))
+ if action == changeArrowFlag:
+ if str == "Hide Arrow":
+ self.arrowFlag =False
+ else:
+ self.arrowFlag =True
+ self.update()
+
def setPenStyle(self, style):
"""change current pen style for line"""
self.penStyle = style
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index b825653..e0263ab 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -2,7 +2,7 @@ from PyQt5 import QtCore, QtWidgets
from PyQt5.QtCore import (QEvent, QFile, QIODevice, QMimeData, QPointF, QRect,
QRectF, QSizeF, Qt)
from PyQt5.QtGui import (QBrush, QColor, QCursor, QDrag, QFont, QImage,
- QPainter, QPainterPath, QPen, QTransform, QTextCursor)
+ QPainter, QPainterPath, QPen, QTransform, QTextCursor, QPainterPathStroker)
from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer
from PyQt5.QtWidgets import (QGraphicsColorizeEffect, QGraphicsEllipseItem,
QGraphicsItem, QGraphicsPathItem,
@@ -32,7 +32,7 @@ class ItemLabel(QGraphicsTextItem):
def focusOutEvent(self, event):
super(ItemLabel, self).focusOutEvent(event)
self.setTextInteractionFlags(Qt.NoTextInteraction)
-
+
def __getstate__(self):
return {
"text": self.toPlainText(),
@@ -43,6 +43,7 @@ class ItemLabel(QGraphicsTextItem):
self.setPlainText(dict['text'])
self.setPos(*dict['pos'])
+
class GripItem(QGraphicsPathItem):
"""
Extends QGraphicsPathItem to create the structure of the Grabbable points for resizing shapes and connecting lines.
@@ -60,7 +61,6 @@ class GripItem(QGraphicsPathItem):
self.setAcceptHoverEvents(True)
self.setCursor(QCursor(Qt.PointingHandCursor))
-
def mouseReleaseEvent(self, event):
"""
Automatically deselects grip item on mouse release
@@ -196,13 +196,14 @@ class LineGripItem(GripItem):
"""Extends grip items for connecting lines , with hover events and mouse events
"""
circle = QPainterPath()
- circle.addEllipse(QRectF(-10, -10, 20, 20))
+ circle.addEllipse(QRectF(-5, -5, 10, 10))
- def __init__(self, annotation_item, index, location, parent=None):
- self.path = LineGripItem.circle
- super(LineGripItem, self).__init__(annotation_item, path=self.path, parent=parent)
+ def __init__(self, annotation_item, index, grip, parent=None):
+ path = LineGripItem.circle
+
+ super(LineGripItem, self).__init__(annotation_item, path=path, parent=parent)
self.m_index = index
- self.m_location = location
+ self.m_location = grip[2]
self.line = None
# stores current line which is in process
self.tempLine = None
@@ -210,14 +211,35 @@ class LineGripItem(GripItem):
self.previousHoveredItem = None
self.setFlag(QGraphicsItem.ItemIsSelectable, True)
self.setPen(QPen(QColor("black"), -1))
+ self.grip = grip
+
+ def shape(self):
+ qp = QPainterPathStroker()
+ qp.setWidth(8)
+ path = qp.createStroke(self.path())
+ return path
+
+ def paint(self, painter,option, widget):
+ painter.setPen(self.pen())
+ painter.drawPath(self.shape())
+ painter.setBrush(self.brush())
+ if len(self.grip) ==4:
+ painter.save()
+ pen =self.pen()
+ pen.setWidth(-1)
+ painter.setPen(pen)
+ painter.drawPath(self.path())
+ painter.restore()
+ else:
+ painter.drawPath(self.path())
def itemChange(self, change, value):
"""
Moves position of grip item on resize
"""
if change == QGraphicsItem.ItemSceneHasChanged and not self.scene():
- if self.line and self.line.scene():
- self.line.scene().removeItem(self.line)
+ if self.line and self.line.scene():
+ self.line.scene().removeItem(self.line)
return super(LineGripItem, self).itemChange(change, value)
def point(self, index):
@@ -235,9 +257,25 @@ class LineGripItem(GripItem):
][index]
def updatePosition(self):
- pos = self.point(self.m_index)
+ width = self.parentItem().boundingRect().width()
+ height = self.parentItem().boundingRect().height()
+ if len(self.grip) == 4:
+ rect_width = rect_height = 4
+ if self.grip[2] in ["left","right"]:
+ rect_height = (self.grip[3]*height)/100
+ else:
+ rect_width = (self.grip[3]*width)/100
+ path = QPainterPath()
+ path.addRect(QRectF(-rect_width / 2, -rect_height / 2, rect_width, rect_height))
+ self.setPath(path)
+
+ x = (self.grip[0] * width) / 100
+ y = (self.grip[1] * height) / 100
+ x -= width / 2
+ y -= height / 2
+ y = -y
self.setEnabled(False)
- self.setPos(pos)
+ self.setPos(QPointF(x, y))
self.setEnabled(True)
if self.line:
self.line.updateLine()
@@ -263,14 +301,14 @@ class LineGripItem(GripItem):
self.tempLine.updateLine(endPoint=endPoint)
item = self.scene().itemAt(mouseEvent.scenePos().x(), mouseEvent.scenePos().y(),
- self.parentItem().transform())
+ QTransform())
if self.previousHoveredItem and item != self.previousHoveredItem and \
item not in self.previousHoveredItem.lineGripItems:
self.previousHoveredItem.hideGripItem()
super().mouseMoveEvent(mouseEvent)
- if type(item) == NodeItem:
+ if isinstance(item, NodeItem):
self.previousHoveredItem = item
item.showGripItem()
@@ -325,6 +363,7 @@ class NodeItem(QGraphicsSvgItem):
"""
Extends PyQt5's QGraphicsSvgItem to create the basic structure of shapes with given unit operation type
"""
+
# set a common renderer for all svg
# renderer = QSvgRenderer(fileImporter(f'svg/ellipse.svg'))
@@ -335,8 +374,8 @@ class NodeItem(QGraphicsSvgItem):
self.m_renderer = QSvgRenderer(fileImporter(f'{unitOperationType}.svg'))
self.setSharedRenderer(self.m_renderer)
# set initial size of item
- self.width = 100
- self.height = 100
+ self.width = self.m_renderer.defaultSize().width()
+ self.height = self.m_renderer.defaultSize().height()
self.rect = QRectF(-self.width / 2, -self.height / 2, self.width, self.height)
# set graphical settings for this item
self.setFlags(QGraphicsSvgItem.ItemIsMovable |
@@ -365,7 +404,7 @@ class NodeItem(QGraphicsSvgItem):
if not self.m_renderer:
QGraphicsSvgItem.paint(self, painter, option, widget)
elif self.id:
- self.m_renderer.render(painter,self.id, self.boundingRect())
+ self.m_renderer.render(painter, self.id, self.boundingRect())
else:
self.m_renderer.render(painter, self.boundingRect())
if self.isSelected():
@@ -392,17 +431,6 @@ class NodeItem(QGraphicsSvgItem):
"""adds grip items
"""
if self.scene():
- # add grip items for connecting lines
- for i, (location) in enumerate(
- (
- "top",
- "left",
- "bottom",
- "right"
- )
- ):
- item = LineGripItem(self, i, location, parent=self)
- self.lineGripItems.append(item)
# add grip for resize it
for i, (direction) in enumerate(
(
@@ -414,6 +442,11 @@ class NodeItem(QGraphicsSvgItem):
):
item = SizeGripItem(self, i, direction, parent=self)
self.sizeGripItems.append(item)
+ # add grip items for connecting lines
+ for i in range(len(self.grips)):
+ grip = self.grips[i]
+ item = LineGripItem(self, i, grip, parent=self)
+ self.lineGripItems.append(item)
def updateLineGripItem(self, index_no_updates=None):
"""
@@ -507,11 +540,316 @@ class NodeItem(QGraphicsSvgItem):
"lineGripItems": [(hex(id(i)), i.m_index) for i in self.lineGripItems],
"label": self.label
}
-
+
def __setstate__(self, dict):
self.prepareGeometryChange()
self.width = dict['width']
self.height = dict['height']
self.rect = QRectF(-self.width / 2, -self.height / 2, self.width, self.height)
self.updateSizeGripItem()
- \ No newline at end of file
+
+
+class InflowLine(NodeItem):
+ def __init__(self):
+ super(InflowLine, self).__init__("svg/piping/Inflow Line")
+ self.grips = [
+ [100, 50, "right"]
+ ]
+
+
+class OutflowLine(NodeItem):
+ def __init__(self):
+ super(OutflowLine, self).__init__("svg/Piping/Outflow Line")
+ self.grips = [
+ [0, 50, "left"]
+ ]
+
+
+class DuplexPump(NodeItem):
+ def __init__(self):
+ super(DuplexPump, self).__init__("svg/Pumps/Duplex Pump")
+ self.grips = [
+ [100, 68.8031698, "right"],
+ [0, 88.1365808, "left"]
+ ]
+
+
+class PlungerPump(NodeItem):
+ def __init__(self):
+ super(PlungerPump, self).__init__("svg/Pumps/Plunger Pump")
+ self.grips = [
+ [87.0328592, 100, "top"],
+ [87.0328592, 0, "bottom"]
+ ]
+
+
+class ProportioningPump(NodeItem):
+ def __init__(self):
+ super(ProportioningPump, self).__init__("svg/Pumps/Proportioning Pump")
+ self.grips = [
+ [100, 83.0966226, "right"],
+ [0, 83.0966226, "left"]
+ ]
+
+
+class ReciprocatingPump(NodeItem):
+ def __init__(self):
+ super(ReciprocatingPump, self).__init__("svg/Pumps/Reciprocating Pump")
+ self.grips = [
+ [100, 78.3969475, "right"],
+ [0, 78.3969475, "left"]
+ ]
+
+
+class BlowingEgg(NodeItem):
+ def __init__(self):
+ super(BlowingEgg, self).__init__("svg/Pumps/Blowing Egg")
+ self.grips = [
+ [15.2887853, 56.4147177, "top"],
+ [84.7112147, 56.4147177, "top"]
+ ]
+
+
+class EjectorVaporService(NodeItem):
+ def __init__(self):
+ super(EjectorVaporService, self).__init__("svg/Pumps/Ejector(Vapor Service)")
+ self.grips = [
+ [18, 100, "top"],
+ [0, 50, "left"],
+ [100, 50, "right"]
+ ]
+
+
+class HandPumpWithDrum(NodeItem):
+ def __init__(self):
+ super(HandPumpWithDrum, self).__init__("svg/Pumps/Hand Pump with Drum")
+ self.grips = [
+ [92.8093483, 70.60413752309337, "right"],
+ [7.913824600849647, 70.60413752309337, "left"],
+ [4.136894788615162, 86.9886362, "left"]
+ ]
+
+
+class CentrifugalCompressor(NodeItem):
+ def __init__(self):
+ super(CentrifugalCompressor, self).__init__("svg/Compressors/Centrifugal Compressor")
+ self.grips = [
+ [41.316753407496, 89.824108247573, "top"],
+ [62.0517030576456, 79.183192150093, "top"],
+ [41.316753407496, 6.447877022097, "bottom"],
+ [62.0517030576456, 16.14847772052, "bottom"]
+ ]
+
+
+class EjectorCompressor(NodeItem):
+ def __init__(self):
+ super(EjectorCompressor, self).__init__("svg/Compressors/Ejector Compressor")
+ self.grips = [
+ [13.1018813062, 100, "top"],
+ [0, 50, "left"],
+ [100, 50, "right"]
+ ]
+
+
+class Fan(NodeItem):
+ def __init__(self):
+ super(Fan, self).__init__("svg/Compressors/Fan")
+ self.grips = [
+ [50, 79.92762310350343, "top"],
+ [0, 79.92762310350343, "left"],
+ [100, 79.92762310350343, "right"]
+ ]
+
+
+class PositiveDisplacementCompressor(NodeItem):
+ def __init__(self):
+ super(PositiveDisplacementCompressor, self).__init__("svg/Compressors/Positive Displacement Compressor")
+ self.grips = [
+ [50, 100, "top"],
+ [21.15509548928236, 30, "left"],
+ [79.57853462426666, 30, "right"]
+ ]
+
+
+class ReciprocatingCompressor(NodeItem):
+ def __init__(self):
+ super(ReciprocatingCompressor, self).__init__("svg/Compressors/Reciprocating Compressor")
+ self.grips = [
+ [22.85680252121469, 83, "left"],
+ [46.81088180183039, 83, "right"]
+ ]
+
+
+class Turbine(NodeItem):
+ def __init__(self):
+ super(Turbine, self).__init__("svg/Compressors/Turbine")
+ self.grips = [
+ [18.06209745144267, 79.11931909160472, "top"],
+ [45.2091373550176, 91.385325275219, "top"],
+ [18.06209745144267, 16.41537491819628, "bottom"],
+ [45.2091373550176, 4.5725942986116, "bottom"]
+ ]
+
+
+class OilGasOrPulverizedFuelFurnace(NodeItem):
+ def __init__(self):
+ super(OilGasOrPulverizedFuelFurnace, self).__init__("svg/Furnaces and Boilers/Oil Gas or Pulverized Fuel Furnace")
+ self.grips = [
+ [58.27673386073162,100,"top"],
+ [0,19.692723451106,"left"] ,
+ [17.2777337415748,33.3944873323144,"left",66.7889746646288],
+ [100,33.3944873323144,"right",66.7889746646288],
+ [57.9723659874,0,"bottom",81.389264491796]
+ ]
+
+
+class SolidFuelFurnace(NodeItem):
+ def __init__(self):
+ super(SolidFuelFurnace, self).__init__("svg/Furnaces and Boilers/Solid Fuel Furnace")
+ self.grips = [
+ [50,100,"top"],
+ [0,33.39352642259468,"left",66.78705284518936],
+ [100,33.39352642259468,"right",66.78705284518936],
+ [50,0,"bottom",100]
+ ]
+
+
+# class Exchanger(NodeItem):
+# def __init__(self):
+# super(Exchanger, self).__init__("svg/Heating or Cooling Arrangements/905Exchanger")
+# self.grips = [
+# [92.8093483, 70.60413752309337, "right"],
+# [7.913824600849647, 70.60413752309337, "left"],
+# [4.136894788615162, 86.9886362, "left"]
+# ]
+
+
+# class KettleReboiler(NodeItem):
+# def __init__(self):
+# super(KettleReboiler, self).__init__("svg/Heating or Cooling Arrangements/907Kettle Reboiler")
+# self.grips = [
+# [41.316753407496, 89.824108247573, "top"],
+# [62.0517030576456, 79.183192150093, "top"],
+# [41.316753407496, 6.447877022097, "bottom"],
+# [62.0517030576456, 16.14847772052, "bottom"]
+# ]
+
+
+class Exchanger(NodeItem):
+ def __init__(self):
+ super(Exchanger, self).__init__("svg/Heating or Cooling Arrangements/Exchanger")
+ self.grips = [
+ [100,31.74474612706027,"right"],
+ [100,62.70549343934227,"right"],
+ [33.68240920045628,100,"top"],
+ [33.68240920045628,0,"bottom"]
+ ]
+
+
+# class Fan(NodeItem):
+# def __init__(self):
+# super(Fan, self).__init__("svg/Compressors/Fan")
+# self.grips = [
+# [41.4323581, 100, "top"],
+# [61.1489583, 100, "top"]
+# ]
+
+
+class HeatExchanger(NodeItem):
+ def __init__(self):
+ super(HeatExchanger, self).__init__("svg/Heating or Cooling Arrangements/Heat Exchanger")
+ self.grips = [
+ [0,47.14356681569796,"left"],
+ [100,47.14356681569796,"right"],
+ [50.92839727035332,100,"top"],
+ [50.92839727035332,0,"bottom"]
+ ]
+
+
+class ImmersionCoil(NodeItem):
+ def __init__(self):
+ super(ImmersionCoil, self).__init__("svg/Heating or Cooling Arrangements/Immersion Coil")
+ self.grips = [
+ [44.56276981957,100,"top"],
+ [88.232463407718,100,"top"]
+ ]
+
+
+class HorizontalVessel(NodeItem):
+ def __init__(self):
+ super(HorizontalVessel, self).__init__("svg/Process Vessels/Horizontal Vessel")
+ self.grips = [
+ [50,100,"top",87.08554680344],
+ [0,50,"left"],
+ [100,50,"right"],
+ [50,0,"bottom",87.08554680344]
+ ]
+
+class PackedVessel(NodeItem):
+ def __init__(self):
+ super(PackedVessel, self).__init__("svg/Process Vessels/Packed Vessel")
+ self.grips = [
+ [50,100,"top"],
+ [0,50,"left",86.703566201060],
+ [100,50,"right",86.703566201060],
+ [50,0,"bottom"]
+ ]
+
+class TraysOrPlates(NodeItem):
+ def __init__(self):
+ super(TraysOrPlates, self).__init__("svg/Process Vessels/Trays or plates")
+ self.grips = [
+ ]
+
+class VerticalVessel(NodeItem):
+ def __init__(self):
+ super(VerticalVessel, self).__init__("svg/Process Vessels/Vertical Vessel")
+ self.grips = [
+ [50,100,"top"],
+ [0,50,"left",86.703566201060],
+ [100,50,"right",86.703566201060],
+ [50,0,"bottom"]
+ ]
+
+
+class Separators(NodeItem):
+ def __init__(self):
+ super(Separators, self).__init__("svg/Separators/Separators for Liquids, Decanter")
+ self.grips = [
+ [50,100,"top",100],
+ [0,50,"left",100],
+ [100,50,"right",100],
+ [50,0,"bottom",100]
+ ]
+
+class FixedRoofTank(NodeItem):
+ def __init__(self):
+ super(FixedRoofTank, self).__init__("svg/Storage Vessels Tanks/Fixed Roof Tank")
+ self.grips = [
+ [50,100,"top"],
+ [0,50,"left",100],
+ [100,50,"right",100],
+ [50,0,"bottom",100]
+ ]
+
+
+class FloatingRoofTank(NodeItem):
+ def __init__(self):
+ super(FloatingRoofTank, self).__init__("svg/Storage Vessels Tanks/Floating Roof Tank")
+ self.grips = [
+ [0,50,"left",100],
+ [100,50,"right",100],
+ [50,0,"bottom",100]
+ ]
+
+class SeparatorsForLiquidsDecanter(NodeItem):
+ def __init__(self):
+ super(SeparatorsForLiquidsDecanter, self).__init__("svg/Separators/Separators for Liquids, Decanter")
+ self.grips = [
+ [50,100,"top",100],
+ [0,50,"left",100],
+ [100,50,"right",100],
+ [50,0,"bottom",100]
+ ]
+
+
diff --git a/src/main/resources/base/svg/Compressors/Centrifugal Compressor.svg b/src/main/resources/base/svg/Compressors/Centrifugal Compressor.svg
index 15ae554..bc4a3eb 100644
--- a/src/main/resources/base/svg/Compressors/Centrifugal Compressor.svg
+++ b/src/main/resources/base/svg/Compressors/Centrifugal Compressor.svg
@@ -10,7 +10,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="Centrifugal Compressor.svg"
- inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
id="svg989"
version="1.1"
viewBox="0 0 39.831303 20.844073"
@@ -74,34 +74,24 @@
inkscape:groupmode="layer"
inkscape:label="Layer 1">
<g
- id="g1606">
+ id="g92">
<path
inkscape:connector-curvature="0"
id="path3798"
d="m 96.20808,137.99608 20.59969,5.19717 v 10.20535 l -20.59969,5.10268 z"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3800"
d="M 96.25532,145.63828 H 86.04997 v 5.10268 H 96.3498"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3802"
d="m 116.68966,148.22506 h 3.59077"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
- <path
- inkscape:connector-curvature="0"
- id="path3806"
- d="m 102.64232,137.9183 v 1.68714"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
- <path
- inkscape:connector-curvature="0"
- id="path3810"
- d="m 110.9019,137.90158 v 3.9215"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
- style="fill:#ffffff;stroke:url(#linearGradient4623);stroke-width:0.8;stroke-miterlimit:4;stroke-dasharray:none"
+ style="fill:#ffffff;stroke:url(#linearGradient4623);stroke-width:0.80000001;stroke-miterlimit:4;stroke-dasharray:none"
y="145.73911"
x="120.37206"
height="4.9609375"
@@ -111,9 +101,9 @@
id="text4627"
y="149.72087"
x="121.21709"
- style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ style="font-style:normal;font-weight:normal;font-size:4.23332977px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
xml:space="preserve"><tspan
- style="font-size:4.23333px;stroke-width:0.8;stroke-miterlimit:4;stroke-dasharray:none"
+ style="font-size:4.23332977px;stroke-width:0.80000001;stroke-miterlimit:4;stroke-dasharray:none"
y="149.72087"
x="121.21709"
id="tspan4625"