def assignSvgCoordinatesForRingDevice(self): centerX = 11977.075 centerY = 4814.0 radius = 2645.4143 if self.numberInSection == 0: angle = self.section.startAngle + self.section.getAngleBetweenDevices() else: angle = self.section.startAngle + (self.numberInSection+1) * self.section.getAngleBetweenDevices() self.svgCoordinateX, self.svgCoordinateY = ArcDrawingTools.polarToCartesian(centerX, centerY, radius, angle)
def drawColourfulSection(self, parentNode): path = ArcDrawingTools.describeArcClockwise(self.centerX, self.centerY, self.radius-130, self.startAngle, self.endAngle) sectionElement = etree.SubElement(parentNode, "path") sectionElement.attrib["id"] = self.shortName + "colourfulSection" sectionElement.attrib["d"] = path sectionElement.attrib["fill"] = "white" sectionElement.attrib["fill-opacity"] = "0.0" sectionElement.attrib["stroke"] = self.colour sectionElement.attrib["stroke-width"] = "20"
def drawColourfulSection(self, parentNode): path = ArcDrawingTools.describeArcClockwise(self.centerX, self.centerY, self.radius - 130, self.startAngle, self.endAngle) sectionElement = etree.SubElement(parentNode, "path") sectionElement.attrib["id"] = self.shortName + "colourfulSection" sectionElement.attrib["d"] = path sectionElement.attrib["fill"] = "white" sectionElement.attrib["fill-opacity"] = "0.0" sectionElement.attrib["stroke"] = self.colour sectionElement.attrib["stroke-width"] = "20"
def assignSvgCoordinatesForRingDevice(self): centerX = 11977.075 centerY = 4814.0 radius = 2645.4143 if self.numberInSection == 0: angle = self.section.startAngle + self.section.getAngleBetweenDevices( ) else: angle = self.section.startAngle + ( self.numberInSection + 1) * self.section.getAngleBetweenDevices() self.svgCoordinateX, self.svgCoordinateY = ArcDrawingTools.polarToCartesian( centerX, centerY, radius, angle)