def getPointArray(self, geomList):
        pointArrayInner = geomList[0]
        pointArray1Outer = geomList[1]

        innerStartPoint = pointArrayInner[0]
        innerEndPoint = pointArrayInner[1]
        innerBulge = pointArrayInner[2]
        outerStartPoint = pointArray1Outer[0]
        outerEndPoint = pointArray1Outer[1]
        outerBulge = pointArray1Outer[2]

        line0 = QgsGeometry.fromPolyline([innerStartPoint, outerStartPoint])
        line1 = QgsGeometry.fromPolyline([innerEndPoint, outerEndPoint])

        # for i in range(1, len(pointArray0)):

        if line0.intersects(line1):
            tempPoint = outerStartPoint
            outerStartPoint = outerEndPoint
            outerEndPoint = tempPoint
            outerBulge = -outerBulge

        polylineArea = PolylineArea()
        polylineArea.Add(PolylineAreaPoint(innerStartPoint, innerBulge))
        polylineArea.Add(PolylineAreaPoint(innerEndPoint))
        polylineArea.Add(PolylineAreaPoint(outerEndPoint, -outerBulge))
        polylineArea.Add(PolylineAreaPoint(outerStartPoint))
        return polylineArea
Пример #2
0
    def __init__(self, pointer1=None, pointer2=None):
        PolylineArea.__init__(self)
        if pointer1 != None:
            self.Add(PolylineAreaPoint(pointer1))
            self.Add(PolylineAreaPoint(pointer2))

        self.xData = dict()
        self.caption = ""
        self.type = "Line"
    def makePrimaryAreaOrSecondaryArea(self, geomList, areaType):
        pointArrayInner = geomList[0]
        pointArray1Outer = geomList[1]

        innerStartPoint = pointArrayInner[0]
        innerEndPoint = pointArrayInner[1]
        innerBulge = pointArrayInner[2]
        outerStartPoint = pointArray1Outer[0]
        outerEndPoint = pointArray1Outer[1]
        outerBulge = pointArray1Outer[2]

        line0 = QgsGeometry.fromPolyline([innerStartPoint, outerStartPoint])
        line1 = QgsGeometry.fromPolyline([innerEndPoint, outerEndPoint])

        # for i in range(1, len(pointArray0)):

        if line0.intersects(line1):
            tempPoint = Point3D(outerStartPoint.get_X(), outerStartPoint.get_Y())
            outerStartPoint = Point3D(outerEndPoint.get_X(), outerEndPoint.get_Y())
            outerEndPoint = Point3D(tempPoint.get_X(), tempPoint.get_Y())
            outerBulge = -outerBulge
        if areaType == ProtectionAreaType.Primary:
            polylineArea = PolylineArea()
            polylineArea.Add(PolylineAreaPoint(innerStartPoint, innerBulge))
            polylineArea.Add(PolylineAreaPoint(innerEndPoint))
            polylineArea.Add(PolylineAreaPoint(outerEndPoint, -outerBulge))
            polylineArea.Add(PolylineAreaPoint(outerStartPoint))
            return PrimaryObstacleArea(polylineArea)
        elif areaType == ProtectionAreaType.Secondary:
            if innerBulge == 0 and outerBulge == 0:
                return SecondaryObstacleArea(innerStartPoint, innerEndPoint, outerStartPoint, outerEndPoint, MathHelper.getBearing(innerStartPoint, innerEndPoint))
            elif innerBulge != 0 and outerBulge != 0:
                if round(innerBulge, 1) != round(outerBulge, 1):
                    return None
                innerCenterPoint = MathHelper.smethod_71(innerStartPoint, innerEndPoint, innerBulge)
                outerCenterPoint = MathHelper.smethod_71(outerStartPoint, outerEndPoint, outerBulge)

                innerRadius = MathHelper.calcDistance(innerCenterPoint, innerStartPoint);
                outerRadius = MathHelper.calcDistance(outerCenterPoint, outerStartPoint);

                bearing = (MathHelper.getBearing(innerCenterPoint, innerStartPoint) + MathHelper.getBearing(innerCenterPoint, innerEndPoint)) / 2
                innerMiddlePoint = MathHelper.distanceBearingPoint(innerCenterPoint, bearing, innerRadius)
                if round(MathHelper.smethod_60(innerStartPoint, innerMiddlePoint, innerEndPoint), 4) != round(outerBulge, 4):
                    bearing += 3.14159265358979
                    innerMiddlePoint = MathHelper.distanceBearingPoint(innerCenterPoint, bearing, innerRadius)

                bearing = (MathHelper.getBearing(outerCenterPoint, outerStartPoint) + MathHelper.getBearing(outerCenterPoint, outerEndPoint)) / 2
                outerMiddlePoint = MathHelper.distanceBearingPoint(outerCenterPoint, bearing, outerRadius)
                if round(MathHelper.smethod_60(outerStartPoint, outerMiddlePoint, outerEndPoint), 4) != round(outerBulge, 4):
                    bearing += 3.14159265358979
                    outerMiddlePoint = MathHelper.distanceBearingPoint(outerCenterPoint, bearing, outerRadius)
                return SecondaryObstacleArea(innerStartPoint, innerMiddlePoint, innerEndPoint, outerStartPoint, None, outerMiddlePoint, outerEndPoint, innerBulge, innerBulge)
            return None
Пример #4
0
 def TransformBy(self, polylineArea, angle_radian, centerPoint):
     resultPoilylineArea = PolylineArea()
     for polylineAreaPoint in polylineArea:
         point3d = polylineAreaPoint.Position
         bearing = MathHelper.smethod_4(MathHelper.getBearing(centerPoint, point3d) + angle_radian + Unit.ConvertDegToRad(180))
         resultPoilylineArea.Add(PolylineAreaPoint(MathHelper.distanceBearingPoint(centerPoint, bearing, MathHelper.calcDistance(point3d, centerPoint)), polylineAreaPoint.Bulge))
     return resultPoilylineArea
Пример #5
0
 def get_Length(self):
     # line = self.getQgsPolyline()
     # return line.length()
     polylineArea = PolylineArea()
     for polylinePoint in self:
         polylineArea.Add(PolylineAreaPoint(polylinePoint.point3d, polylinePoint.bulge))
     pointArray = polylineArea.method_14(4)
     count = len(pointArray)
     length = 0.0
     for i in range(1, count):
         length += MathHelper.calcDistance(pointArray[i-1], pointArray[i])
     return length
Пример #6
0
    def getGeometry(self):
        pointList = []
        polygonsList = []
        width = self[0].startWidth
        if MathHelper.smethod_96(self[0].bulge):
            pt0 = MathHelper.distanceBearingPoint(self[0].point3d, MathHelper.getBearing(self[0].point3d, self[1].point3d) - Unit.ConvertDegToRad(90), width / 2.0,)
            pt1 = MathHelper.distanceBearingPoint(self[0].point3d, MathHelper.getBearing(self[0].point3d, self[1].point3d) + Unit.ConvertDegToRad(90), width / 2.0,)
            pt2 = MathHelper.distanceBearingPoint(self[1].point3d, MathHelper.getBearing(self[0].point3d, self[1].point3d) + Unit.ConvertDegToRad(90), width / 2.0,)
            pt3 = MathHelper.distanceBearingPoint(self[1].point3d, MathHelper.getBearing(self[0].point3d, self[1].point3d) - Unit.ConvertDegToRad(90), width / 2.0,)
            geom = QgsGeometry.fromPolygon([[pt0, pt1, pt2, pt3]])
            polygonsList.append(geom)
        else:
            polylineArea = PolylineArea()
            polylineArea.Add(PolylineAreaPoint(self[0].point3d, self[0].bulge))
            polylineArea.Add(PolylineAreaPoint(self[1].point3d))

            pointArray = polylineArea.method_14(4)
            pt0 = MathHelper.distanceBearingPoint(self[0].point3d, MathHelper.getBearing(self[0].point3d, pointArray[1]) - Unit.ConvertDegToRad(90), width / 2.0,)
            pt1 = MathHelper.distanceBearingPoint(self[0].point3d, MathHelper.getBearing(self[0].point3d, pointArray[1]) + Unit.ConvertDegToRad(90), width / 2.0,)
            pt2 = MathHelper.distanceBearingPoint(self[1].point3d, MathHelper.getBearing(pointArray[len(pointArray) - 2], self[1].point3d) + Unit.ConvertDegToRad(90), width / 2.0,)
            pt3 = MathHelper.distanceBearingPoint(self[1].point3d, MathHelper.getBearing(pointArray[len(pointArray) - 2], self[1].point3d) - Unit.ConvertDegToRad(90), width / 2.0,)
            polylineArea0 = PolylineArea()
            polylineArea0.Add(PolylineAreaPoint(pt0, self[0].bulge))
            polylineArea0.Add(PolylineAreaPoint(pt3))
            polylineArea1 = PolylineArea()
            polylineArea1.Add(PolylineAreaPoint(pt2, -self[0].bulge))
            polylineArea1.Add(PolylineAreaPoint(pt1))
            pointArrayResult = []
            for pt in polylineArea0.method_14(4):
                pointArrayResult.append(pt)
            for pt in polylineArea1.method_14(4):
                pointArrayResult.append(pt)
            geom = QgsGeometry.fromPolygon([pointArrayResult])
            polygonsList.append(geom)
        return polygonsList


        # for i in range(self.NumberOfVertices):
        #     polylinePoint = self[i]
        #
        #     if polylinePoint.startWidth != width:
        #         if len(pointList) > 1:
        #             geom = QgsGeometry.fromPolyline(pointList)
        #             polygon = geom.buffer(width / 2.0, 0, 2, 0, 0)
        #             polygonsList.append(polygon)
        #         width = polylinePoint.startWidth
        #         pointList = []
        #     pointList.append(polylinePoint.point3d)
        #     if not MathHelper.smethod_96(polylinePoint.bulge):
        #         if i != self.NumberOfVertices - 1:
        #             point3d = self[i + 1].point3d
        #         else:
        #             point3d = self[0].point3d
        #         MathHelper.getArc(polylinePoint.point3d, point3d, polylinePoint.bulge, 4, pointList)
        #
        # if len(pointList) > 1:
        #     geom = QgsGeometry.fromPolyline(pointList)
        #     polygon = geom.buffer(width / 2.0, 0, 2, 0, 0)
        #     polygonsList.append(polygon)
        return polygonsList
Пример #7
0
    def vmethod_0(self, polylineArea_0, bool_0, bool_1):
        point3dArray = self.area.method_14_closed(4)
        polylineArea0 = PolylineArea(point3dArray)
        polylineAreaList = []  #self.area]
        point3dCollection = []
        for i in range(4):
            matrix = Matrix3d.Displacement(
                self.ptBase.GetVectorTo(polylineArea_0[i].Position))
            polylinAreaNew = polylineArea0.TransformBy(matrix)
            polylineAreaList.append(polylinAreaNew)
            point3dCollection = []
            for point3d0 in self.bounds:
                point3d = point3d0.TransformBy(matrix)
                point3dCollection.append(point3d)
            point3dCollection.append(self.bounds[0].TransformBy(matrix))
            polylineAreaList.append(polylinAreaNew)
            polylineAreaList.append(PolylineArea(point3dCollection))

#         point3dCollection0 = MathHelper.smethod_190(point3dCollection)
#         polylinAreaNew = PolylineArea(point3dCollection0)
#         polylineAreaList.append(polylinAreaNew)

# #             break
        if bool_1:
            polylineAreaList.extend(self.method_3(polylineArea_0))
        if bool_0:
            polylineAreaList.extend(self.method_2(polylineArea_0))

#         polylineAreaList.append(polylineArea_0)
#
#         return polylineAreaList
        pointList = QgisHelper.convexFull(polylineAreaList)
        #         pointList = QgisHelper.UnionFromPolylineAreaList(polylineAreaList)
        polylineArea = PolylineArea()
        for point in pointList:
            polylineArea.Add(PolylineAreaPoint(point))
        return [polylineArea]
    def canvasPressEvent( self, e ):
        define._messageLabel.setText("")
        self.menuString = ""
        pointBackground = e.pos()
#         self.Point = QgisHelper.snapPoint(e.pos(), self.mSnapper, define._canvas)
        self.Point, self.pointID, self.layer= self.snapPoint(e.pos())
        self.selectedLayerFromSnapPoint = None


        if ( self.mRubberBand == None ):
            self.resultPolylineArea = PolylineArea()
            self.mRubberBand0.reset( QGis.Polygon )
#             define._canvas.clearCache ()
            self.mRubberBand = QgsRubberBand( self.mCanvas, QGis.Polygon )
            self.mRubberBand0 = QgsRubberBand( self.mCanvas, QGis.Polygon )
            self.mRubberBand.setFillColor( self.mFillColor )
            self.mRubberBand.setBorderColor( self.mBorderColour )
            self.mRubberBand0.setFillColor( QColor(255, 255, 255, 100) )
            self.mRubberBand0.setBorderColor( QColor(0, 0, 0) )
        if ( e.button() == Qt.LeftButton ):
            if self.Point == None:
                self.mRubberBand.addPoint( self.toMapCoordinates( e.pos() ) )
                self.resultPolylineArea.Add(PolylineAreaPoint(self.toMapCoordinates( e.pos() )))
                if self.isPrimaryPolylineStarted:
                    self.primaryPolyline.Add(PolylineAreaPoint(self.toMapCoordinates( e.pos() )))
            else:
                self.mRubberBand.addPoint( self.Point )
                self.resultPolylineArea.Add(PolylineAreaPoint(self.Point))
                if self.isPrimaryPolylineStarted:
                    self.primaryPolyline.Add(PolylineAreaPoint(self.toMapCoordinates( e.pos() )))
        else:
            menu = None
            if self.areaType == ProtectionAreaType.Secondary and len(self.resultPolylineArea) == 0:
                menu = self.createContextMenu(self.areaType, True)
                menu.exec_( define._canvas.mapToGlobal(e.pos() ))
                return

            if ( self.mRubberBand.numberOfVertices() > 2 ):
                self.polygonGeom = self.mRubberBand.asGeometry()
            else:
                return
#                 QgsMapToolSelectUtils.setSelectFeatures( self.mCanvas, polygonGeom, e )
            menu = self.createContextMenu(self.areaType)
            menu.exec_( define._canvas.mapToGlobal(e.pos() ))

            if self.menuString == "Cancel" or self.menuString == "Arc":
                return
            elif self.menuString == "Undo":
                if ( self.mRubberBand.numberOfVertices() > 0 ):

                    self.mRubberBand = None
                    QgisHelper.ClearRubberBandInCanvas(define._canvas)
                    self.mRubberBand = QgsRubberBand( self.mCanvas, QGis.Polygon )
                    self.mRubberBand.setFillColor( self.mFillColor )
                    self.mRubberBand.setBorderColor( self.mBorderColour )
                    self.resultPolylineArea[self.resultPolylineArea.Count - 2].bulge = 0.0
                    self.resultPolylineArea.pop(self.resultPolylineArea.Count - 1)
                    if self.isPrimaryPolylineStarted and len(self.primaryPolyline) > 0:
                        self.primaryPolyline.pop(self.primaryPolyline.Count - 1)
                    for pt in self.resultPolylineArea.method_14():
                        self.mRubberBand.addPoint(pt)
                return
            elif self.menuString == "Enter":
                # if self.areaType == ProtectionAreaType.Secondary:
                #     if self.resultPolylineArea.Count != 4:
                #         define._messageLabel.setText("The count of point of Secondary Area must be 4.")
                #         return
                self.mRubberBand.reset( QGis.Polygon )
                self.mRubberBand0.reset( QGis.Polygon )
#             define._canvas.clearCache ()

                self.mRubberBand0 = QgsRubberBand( self.mCanvas, QGis.Polygon )

                self.mRubberBand0.setFillColor( QColor(255, 255, 255, 100) )
                self.mRubberBand0.setBorderColor( QColor(0, 0, 0) )
                for pt in self.resultPolylineArea.method_14():
                    self.mRubberBand0.addPoint(pt)
                # self.mRubberBand0.addGeometry(self.polygonGeom, None)
                n = self.mRubberBand0.numberOfVertices()
                self.mRubberBand0.show()
                self.mRubberBand = None
                area = None
                if self.areaType == ProtectionAreaType.Primary:
                    area = PrimaryObstacleArea(self.resultPolylineArea)
                elif self.areaType == ProtectionAreaType.Secondary:
                    if len(self.resultPolylineArea) == 4:
                        area = SecondaryObstacleArea(self.resultPolylineArea[0].Position, self.resultPolylineArea[1].Position, self.resultPolylineArea[3].Position, self.resultPolylineArea[2].Position, MathHelper.getBearing(self.resultPolylineArea[0].Position, self.resultPolylineArea[1].Position))

                    else:
                        if self.primaryPolyline.Count < 2:
                            define._messageLabel.setText("The PrimaryLine in Secondary Area must exist.")
                            return
                        if self.isPrimaryPolylineStarted:
                            define._messageLabel.setText("You must finish  the input of  PrimaryLine.")
                            return
                        area = SecondaryObstacleAreaWithManyPoints(self.resultPolylineArea, self.primaryPolyline)
                self.emit(SIGNAL("outputResult"), area, self.mRubberBand0)
            n = 0
Пример #9
0
 def set_EndPoint(self, point3d):
     self.Add(PolylineAreaPoint(point3d))
Пример #10
0
 def set_StartPoint(self, point3d):
     self.clear()
     self.Add(PolylineAreaPoint(point3d))
 def __init__(self, point3d_0, double_0, speed_0, altitude_0, speed_1,
              double_1, double_2, orientationType_0):
     '''
     Constructor
     '''
     #         double num;
     #         double num1;
     #         double num2;
     #         double num3;
     #         double num4;
     #         Point3d point3d;
     #         Point3d point3d1;
     #         Point3d point3d2;
     #         Point3d point3d3;
     #         Point3d point3d4;
     #         Point3d point3d5;
     #         Point3d point3d6;
     #         Point3d point3d7;
     #         Point3d point3d8;
     #         Point3d point3d9;
     #         Point3d point3d10;
     #         Point3d point3d11;
     #         Point3d point3d12;
     #         Point3d point3d13;
     #         Point3d point3d14;
     #         Point3d point3d15;
     #         Point3d point3d16;
     #         Point3d point3d17;
     #         Point3d point3d18;
     #         Point3d point3d19;
     #         Point3d point3d20;
     #         Point3d point3d21;
     #         Point3d point3d22;
     #         Point3d point3d23;
     #         Point3d point3d24;
     #         Point3d point3d25;
     #         Point3d point3d26;
     #         Point3d point3d27;
     #         Point3d point3d28;
     #         Point3d point3d29;
     #         Point3d point3d30;
     #         Point3d point3d31;
     #         Point3d point3d32;
     #         Point3d point3d33;
     #         Point3d point3d34;
     #         Point3d point3d35;
     point3d_0 = point3d_0.smethod_167(0)
     self.ptBase = point3d_0
     self.trackDeg = MathHelper.smethod_3(double_0)
     self.trackRad = MathHelper.smethod_4(Unit.ConvertDegToRad(double_0))
     self.orientation = orientationType_0
     self.tas = Speed.smethod_0(speed_0, double_1, altitude_0)
     self.R = min([943.27 / self.tas.KilometresPerHour, 3])
     self.radius = Distance(
         Unit.ConvertKMToMeters(self.tas.KilometresPerHour /
                                (62.8318530717959 * self.R)))
     metresPerSecond = self.tas.MetresPerSecond
     metres = self.radius.Metres
     kilometresPerHour = speed_1.KilometresPerHour
     metresPerSecond1 = speed_1.MetresPerSecond
     r = 45 * metresPerSecond1 / self.R
     double2 = double_2 * 60
     self.ds = Distance(metresPerSecond * double2)
     self.wd = Distance(
         math.sqrt(self.ds.Metres * self.ds.Metres + 4 * metres * metres))
     num5 = 5 * metresPerSecond
     num6 = 11 * metresPerSecond
     num7 = (double2 - 5) * metresPerSecond
     num8 = (double2 - 5) * metresPerSecond
     num9 = (double2 + 21) * metresPerSecond
     num10 = (double2 + 21) * metresPerSecond
     num11 = 5 * metresPerSecond1
     num12 = 11 * metresPerSecond1
     num13 = num12 + r
     num14 = num12 + 2 * r
     num15 = num12 + 3 * r
     num16 = num12 + 4 * r
     num17 = num11 + 5 * r
     num18 = num11 + 6 * r
     num19 = (double2 + 6) * metresPerSecond1 + 4 * r
     num20 = (double2 + 6) * metresPerSecond1 + 4 * r
     num21 = num19 + 14 * metresPerSecond1
     num22 = num19 + 14 * metresPerSecond1
     num23 = num21 + r
     num24 = num21 + 2 * r
     num25 = num21 + 2 * r
     num26 = num21 + 3 * r
     num27 = num19 + 4 * r
     num28 = num21 + 4 * r
     r1 = 2 * metres + (double2 + 15) * metresPerSecond + (
         double2 + 26 + 195 / self.R) * metresPerSecond1
     num29 = 11 * metresPerSecond * math.cos(Unit.ConvertDegToRad(
         20)) + metres * (1 + math.sin(Unit.ConvertDegToRad(20))) + (
             double2 + 15) * metresPerSecond * math.tan(
                 Unit.ConvertDegToRad(5)) + (
                     double2 + 26 + 125 / self.R) * metresPerSecond1
     self.ias = speed_0
     self.wind = speed_1
     self.isa = double_1
     self.altitude = altitude_0
     self.time = double_2
     num30 = 1 if (orientationType_0 == OrientationType.Right) else -1
     turnDirection = TurnDirection.Right if (
         orientationType_0 == OrientationType.Right) else TurnDirection.Left
     turnDirection1 = TurnDirection.Left if (
         orientationType_0
         == OrientationType.Right) else TurnDirection.Right
     point3d36 = MathHelper.distanceBearingPoint(point3d_0, 0, 0)
     point3d37 = MathHelper.distanceBearingPoint(
         point3d36, Unit.ConvertDegToRad(double_0), num5)
     point3d38 = MathHelper.distanceBearingPoint(
         point3d36, Unit.ConvertDegToRad(double_0), num6)
     point3d39 = MathHelper.distanceBearingPoint(
         point3d38, Unit.ConvertDegToRad(double_0 + num30 * 90), metres)
     point3d40 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * -45), metres)
     point3d41 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0), metres)
     point3d42 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * 45), metres)
     point3d43 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * 90), metres)
     point3d39 = MathHelper.distanceBearingPoint(
         point3d37, Unit.ConvertDegToRad(double_0 + num30 * 90), metres)
     MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * 90), metres)
     point3d44 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * 135), metres)
     point3d45 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + 180), metres)
     point3d46 = MathHelper.distanceBearingPoint(
         point3d43, Unit.ConvertDegToRad(double_0 + 180 - num30 * 5), num7)
     point3d47 = MathHelper.distanceBearingPoint(
         point3d43, Unit.ConvertDegToRad(double_0 + 180 - num30 * 5), num9)
     point3d48 = MathHelper.distanceBearingPoint(
         point3d43, Unit.ConvertDegToRad(double_0 + 180 + num30 * 5), num8)
     point3d49 = MathHelper.distanceBearingPoint(
         point3d43, Unit.ConvertDegToRad(double_0 + 180 + num30 * 5), num10)
     point3d39 = MathHelper.distanceBearingPoint(
         point3d47, Unit.ConvertDegToRad(double_0 - num30 * 90), metres)
     point3d50 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + 180 - num30 * 45),
         metres)
     point3d51 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + 180), metres)
     MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + num30 * 90), metres)
     point3d39 = MathHelper.distanceBearingPoint(
         point3d49, Unit.ConvertDegToRad(double_0 - num30 * 90), metres)
     point3d52 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + 180), metres)
     point3d53 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 + 180 + num30 * 45),
         metres)
     point3d54 = MathHelper.distanceBearingPoint(
         point3d39, Unit.ConvertDegToRad(double_0 - num30 * 90), metres)
     point3d55 = MathHelper.distanceBearingPoint(
         point3d48, Unit.ConvertDegToRad(double_0 - num30 * 90), metres * 2)
     point3d, num = MathHelper.smethod_193(point3d38, num12, point3d40,
                                           num13, point3d41, num14, False)
     point3d1, num1 = MathHelper.smethod_193(point3d41, num14, point3d42,
                                             num15, point3d43, num16, False)
     point3d2, num2 = MathHelper.smethod_193(point3d43, num16, point3d44,
                                             num17, point3d45, num18, False)
     point3d3, num3 = MathHelper.smethod_193(point3d47, num21, point3d50,
                                             num23, point3d51, num24, False)
     point3d4, num4 = MathHelper.smethod_193(point3d52, num25, point3d53,
                                             num26, point3d54, num28, False)
     point3d56 = MathHelper.distanceBearingPoint(
         point3d4, Unit.ConvertDegToRad(double_0 - num30 * 90), num4)
     point3d57 = MathHelper.distanceBearingPoint(
         point3d56, Unit.ConvertDegToRad(double_0 + num30 * 90), num29)
     point3d58 = MathHelper.distanceBearingPoint(
         point3d3, Unit.ConvertDegToRad(double_0 + 180), num3)
     point3d58 = MathHelper.getIntersectionPoint(
         point3d_0,
         MathHelper.distanceBearingPoint(
             point3d_0, Unit.ConvertDegToRad(double_0 + 180), 100),
         point3d58,
         MathHelper.distanceBearingPoint(
             point3d58, Unit.ConvertDegToRad(double_0 + 90), 100))
     point3d59 = MathHelper.distanceBearingPoint(
         point3d4, Unit.ConvertDegToRad(double_0 + 180), num4)
     point3d59 = MathHelper.getIntersectionPoint(
         point3d_0,
         MathHelper.distanceBearingPoint(
             point3d_0, Unit.ConvertDegToRad(double_0 + 180), 100),
         point3d59,
         MathHelper.distanceBearingPoint(
             point3d59, Unit.ConvertDegToRad(double_0 + 90), 100))
     point3d5 = MathHelper.distanceBearingPoint(
         point3d58, Unit.ConvertDegToRad(double_0),
         r1) if (MathHelper.calcDistance(point3d_0, point3d58) >=
                 MathHelper.calcDistance(point3d_0, point3d59)
                 ) else MathHelper.distanceBearingPoint(
                     point3d59, Unit.ConvertDegToRad(double_0), r1)
     self.ptE = MathHelper.getIntersectionPoint(
         point3d5,
         MathHelper.distanceBearingPoint(
             point3d5, Unit.ConvertDegToRad(double_0 + 90), 100), point3d57,
         MathHelper.distanceBearingPoint(point3d57,
                                         Unit.ConvertDegToRad(double_0),
                                         100))
     self.nominal = PolylineArea()
     point3d56 = MathHelper.distanceBearingPoint(
         point3d_0, Unit.ConvertDegToRad(double_0 + num30 * 90), 2 * metres)
     point3d58 = MathHelper.distanceBearingPoint(
         point3d56, Unit.ConvertDegToRad(double_0 + 180), self.ds.Metres)
     point3d59 = MathHelper.distanceBearingPoint(
         point3d58, Unit.ConvertDegToRad(double_0 - num30 * 90), 2 * metres)
     self.nominal.Add(
         PolylineAreaPoint(
             point3d_0,
             MathHelper.smethod_59(Unit.ConvertDegToRad(double_0),
                                   point3d_0, point3d56)))
     self.nominal.method_1(point3d56)
     self.nominal.Add(
         PolylineAreaPoint(
             point3d58,
             MathHelper.smethod_59(Unit.ConvertDegToRad(double_0 + 180),
                                   point3d58, point3d59)))
     self.nominal.method_1(point3d59)
     self.nominal.method_1(point3d_0)
     self.wd = Distance(MathHelper.calcDistance(point3d_0, point3d58))
     self.area = PolylineArea()
     point3dCollection = []
     point3dCollection.append(
         MathHelper.distanceBearingPoint(point3d,
                                         Unit.ConvertDegToRad(double_0),
                                         num))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(point3d1,
                                         Unit.ConvertDegToRad(double_0),
                                         num1))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(
             point3d3, Unit.ConvertDegToRad(double_0 + num30 * 90), num3))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(
             point3d3, Unit.ConvertDegToRad(double_0 + 180), num3))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(
             point3d4, Unit.ConvertDegToRad(double_0 + 180), num4))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(
             point3d4, Unit.ConvertDegToRad(double_0 - num30 * 90), num4))
     point3dCollection.append(
         MathHelper.distanceBearingPoint(point3d55,
                                         Unit.ConvertDegToRad(double_0),
                                         num27))
     point3d7, point3d8 = MathHelper.smethod_91(point3d3, num3, point3d4,
                                                num4, turnDirection)
     point3d9, point3d10 = MathHelper.smethod_91(point3d4, num4, point3d55,
                                                 num27, turnDirection)
     point3d11, point3d12 = MathHelper.smethod_91(point3d4, num4, point3d,
                                                  num, turnDirection)
     point3d13, point3d14 = MathHelper.smethod_91(point3d4, num4, point3d1,
                                                  num1, turnDirection)
     point3d15, point3d16 = MathHelper.smethod_91(point3d4, num4, point3d3,
                                                  num3, turnDirection)
     point3d17, point3d18 = MathHelper.smethod_91(point3d55, num27, point3d,
                                                  num, turnDirection)
     point3d19, point3d20 = MathHelper.smethod_91(point3d55, num27,
                                                  point3d1, num1,
                                                  turnDirection)
     point3d21, point3d22 = MathHelper.smethod_91(point3d55, num27,
                                                  point3d3, num3,
                                                  turnDirection)
     point3d23, point3d6 = MathHelper.smethod_91(point3d, num, point3d1,
                                                 num1, turnDirection)
     point3d24, point3d25 = MathHelper.smethod_91(point3d1, num1, point3d46,
                                                  num19, turnDirection)
     point3d26, point3d27 = MathHelper.smethod_91(point3d46, num19,
                                                  point3d3, num3,
                                                  turnDirection)
     point3d28, point3d29 = MathHelper.smethod_91(point3d43, num16,
                                                  point3d48, num20,
                                                  turnDirection1)
     point3d30, point3d31 = MathHelper.smethod_91(point3d48, num20,
                                                  point3d49, num22,
                                                  turnDirection1)
     if (num4 >= MathHelper.calcDistance(point3d4, point3d55) + num27):
         self.area.method_1(point3d7)
         self.area.method_3(
             point3d8,
             MathHelper.smethod_57(turnDirection, point3d8, point3d9,
                                   point3d4))
         self.area.method_1(point3d9)
         if (num27 <= MathHelper.calcDistance(point3d55, point3d1) + num1):
             flag = False
             if (num27 < MathHelper.calcDistance(point3d55, point3d) + num):
                 point3d39 = MathHelper.distanceBearingPoint(
                     point3d18,
                     MathHelper.getBearing(point3d17, point3d18) +
                     1.5707963267949 * num30, 100)
                 flag = MathHelper.smethod_119(
                     point3d23, point3d18,
                     point3d39) if (turnDirection != TurnDirection.Right
                                    ) else MathHelper.smethod_115(
                                        point3d23, point3d18, point3d39)
             if (flag):
                 self.area.Add(
                     PolylineAreaPoint(
                         point3d10,
                         MathHelper.smethod_57(turnDirection, point3d10,
                                               point3d17, point3d55)))
                 self.area.method_1(point3d17)
                 self.area.method_3(
                     point3d18,
                     MathHelper.smethod_57(turnDirection, point3d18,
                                           point3d23, point3d))
                 self.area.method_3(
                     point3d23,
                     MathHelper.smethod_57(turnDirection, point3d23,
                                           point3d24, point3d1))
                 self.area.method_1(point3d24)
             else:
                 self.area.Add(
                     PolylineAreaPoint(
                         point3d10,
                         MathHelper.smethod_57(turnDirection, point3d10,
                                               point3d19, point3d55)))
                 self.area.method_1(point3d19)
                 self.area.Add(
                     PolylineAreaPoint(
                         point3d20,
                         MathHelper.smethod_57(turnDirection, point3d20,
                                               point3d24, point3d1)))
                 self.area.method_1(point3d24)
             self.area.method_3(
                 point3d25,
                 MathHelper.smethod_57(turnDirection, point3d25, point3d26,
                                       point3d46))
             self.area.method_1(point3d26)
             self.area.method_3(
                 point3d27,
                 MathHelper.smethod_57(turnDirection, point3d27, point3d7,
                                       point3d3))
             self.area.method_1(point3d7)
         else:
             self.area.method_3(
                 point3d10,
                 MathHelper.smethod_57(turnDirection, point3d10, point3d21,
                                       point3d55))
             self.area.method_1(point3d21)
             self.area.method_3(
                 point3d22,
                 MathHelper.smethod_57(turnDirection, point3d22, point3d7,
                                       point3d3))
             self.area.method_1(point3d7)
     elif (num4 <= MathHelper.calcDistance(point3d4, point3d1) + num1):
         flag1 = False
         if (num4 < MathHelper.calcDistance(point3d4, point3d) + num):
             point3d39 = MathHelper.distanceBearingPoint(
                 point3d12,
                 MathHelper.getBearing(point3d11, point3d12) +
                 1.5707963267949 * num30, 100)
             flag1 = MathHelper.smethod_119(
                 point3d23, point3d12,
                 point3d39) if (turnDirection != TurnDirection.Right
                                ) else MathHelper.smethod_115(
                                    point3d23, point3d12, point3d39)
         if (flag1):
             self.area.method_1(point3d7)
             self.area.method_3(
                 point3d8,
                 MathHelper.smethod_57(turnDirection, point3d8, point3d11,
                                       point3d4))
             self.area.method_1(point3d11)
             self.area.method_3(
                 point3d12,
                 MathHelper.smethod_57(turnDirection, point3d12, point3d23,
                                       point3d))
             self.area.method_3(
                 point3d23,
                 MathHelper.smethod_57(turnDirection, point3d23, point3d24,
                                       point3d1))
             self.area.method_1(point3d24)
         else:
             self.area.method_1(point3d7)
             self.area.method_3(
                 point3d8,
                 MathHelper.smethod_57(turnDirection, point3d8, point3d13,
                                       point3d4))
             self.area.method_1(point3d13)
             self.area.method_3(
                 point3d14,
                 MathHelper.smethod_57(turnDirection, point3d14, point3d24,
                                       point3d1))
             self.area.method_1(point3d24)
         self.area.method_3(
             point3d25,
             MathHelper.smethod_57(turnDirection, point3d25, point3d26,
                                   point3d46))
         self.area.method_1(point3d26)
         self.area.method_3(
             point3d27,
             MathHelper.smethod_57(turnDirection, point3d27, point3d7,
                                   point3d3))
         self.area.method_1(point3d7)
     else:
         self.area.method_1(point3d7)
         self.area.method_3(
             point3d8,
             MathHelper.smethod_57(turnDirection, point3d8, point3d15,
                                   point3d4))
         self.area.method_1(point3d15)
         self.area.method_3(
             point3d16,
             MathHelper.smethod_57(turnDirection, point3d16, point3d7,
                                   point3d3))
         self.area.method_1(point3d7)
     self.outboundLineTop = PolylineArea()
     self.outboundLineTop.method_1(point3d24)
     self.outboundLineTop.method_3(
         point3d25,
         MathHelper.smethod_57(turnDirection, point3d25, point3d26,
                               point3d46))
     #         PolylineArea polylineArea = self.outboundLineTop;
     point3dArray = [point3d26, point3d27]
     self.outboundLineTop.method_7(point3dArray)
     self.outboundLineBottom = PolylineArea()
     self.outboundLineBottom.method_1(point3d28)
     self.outboundLineBottom.method_3(
         point3d29,
         MathHelper.smethod_57(turnDirection1, point3d29, point3d30,
                               point3d48))
     #         PolylineArea polylineArea1 = self.outboundLineBottom;
     point3dArray = [point3d30, point3d31]
     self.outboundLineBottom.method_7(point3dArray)
     self.spiral = PolylineArea()
     if (MathHelper.calcDistance(point3d, point3d_0) <= num):
         point3d32_39 = []
         MathHelper.smethod_34(
             point3d_0,
             MathHelper.distanceBearingPoint(point3d_0,
                                             Unit.ConvertDegToRad(double_0),
                                             100), point3d, num,
             point3d32_39)
         point3d32 = point3d32_39[0]
         point3d39 = point3d32_39[1]
         point3d33 = MathHelper.distanceBearingPoint(
             point3d, MathHelper.getBearing(point3d, point3d38), num)
         self.spiral.Add(
             PolylineAreaPoint(
                 point3d32,
                 MathHelper.smethod_57(turnDirection, point3d32, point3d33,
                                       point3d)))
     else:
         point3d32, point3d33 = MathHelper.smethod_91(
             point3d_0, 0, point3d, num, turnDirection)
         self.spiral.method_1(point3d32)
     point3d34, point3d35 = MathHelper.smethod_91(point3d, num, point3d1,
                                                  num1, turnDirection)
     self.spiral.Add(
         PolylineAreaPoint(
             point3d33,
             MathHelper.smethod_57(turnDirection, point3d33, point3d34,
                                   point3d)))
     point3d33 = point3d34
     point3d34, point3d35 = MathHelper.smethod_91(point3d1, num1, point3d2,
                                                  num2, turnDirection)
     self.spiral.Add(
         PolylineAreaPoint(
             point3d33,
             MathHelper.smethod_57(turnDirection, point3d33, point3d34,
                                   point3d1)))
     point3d33 = point3d34
     point3d39 = MathHelper.distanceBearingPoint(
         point3d2, Unit.ConvertDegToRad(double_0 + 180), num2)
     self.spiral.Add(
         PolylineAreaPoint(
             point3d33,
             MathHelper.smethod_57(turnDirection, point3d33, point3d39,
                                   point3d2)))
     self.spiral.method_1(point3d39)
     self.method_0(point3dCollection)
     self.method_1(
         MathHelper.distanceBearingPoint(point3d1,
                                         Unit.ConvertDegToRad(double_0),
                                         num1),
         MathHelper.distanceBearingPoint(
             point3d2, Unit.ConvertDegToRad(double_0 + num30 * 90), num2),
         MathHelper.distanceBearingPoint(
             point3d2, Unit.ConvertDegToRad(double_0 + 180), num2))
     point3d56 = MathHelper.distanceBearingPoint(
         point3d_0, Unit.ConvertDegToRad(double_0 + 180), 1000)
     point3d39 = MathHelper.getIntersectionPoint(point3d_0, point3d56,
                                                 point3d7, point3d8)
     point3d6_58 = []
     MathHelper.smethod_34(point3d_0, point3d56, point3d3, num3,
                           point3d6_58)
     point3d6 = point3d6_58[0]
     point3d58 = point3d6_58[1]
     point3d6_59 = []
     MathHelper.smethod_34(point3d_0, point3d56, point3d4, num4,
                           point3d6_59)
     point3d6 = point3d6_59[0]
     point3d59 = point3d6_59[1]
     if (orientationType_0 == OrientationType.Right):
         if (not MathHelper.smethod_119(point3d39, point3d3, point3d7) or
                 not MathHelper.smethod_115(point3d39, point3d4, point3d8)):
             self.ptC = point3d58 if (MathHelper.calcDistance(
                 point3d_0, point3d58) > MathHelper.calcDistance(
                     point3d_0, point3d59)) else point3d59
         else:
             self.ptC = point3d39
     elif (not MathHelper.smethod_115(point3d39, point3d3, point3d7)
           or not MathHelper.smethod_119(point3d39, point3d4, point3d8)):
         self.ptC = point3d58 if (
             MathHelper.calcDistance(point3d_0, point3d58) >
             MathHelper.calcDistance(point3d_0, point3d59)) else point3d59
     else:
         self.ptC = point3d39
     num31 = MathHelper.calcDistance(self.ptC, point3d43)
     point3d60 = MathHelper.distanceBearingPoint(
         self.ptC,
         MathHelper.getBearing(self.ptC, point3d43) +
         math.asin(num16 / num31) * num30,
         math.sqrt(num31 * num31 - num16 * num16))
     point3d6_58 = []
     MathHelper.smethod_34(self.ptC, point3d60, point3d1, num1, point3d6_58)
     point3d6 = point3d6_58[0]
     point3d58 = point3d6_58[1]
     point3d6_59 = []
     MathHelper.smethod_34(self.ptC, point3d60, point3d2, num2, point3d6_59)
     point3d6 = point3d6_59[0]
     point3d59 = point3d6_59[1]
     self.ptR = point3d58 if (
         MathHelper.calcDistance(self.ptC, point3d58) >
         MathHelper.calcDistance(self.ptC, point3d59)) else point3d59
Пример #12
0
    def method_36_Construct(self, bool_0):
        polylines = []
        point3d5 = self.parametersPanel.pnlWaypoint.Point3d
        value = float(self.parametersPanel.txtTrack.Value)
        value1 = float(self.parametersPanel.txtRnpValue.text())
        speed = Speed(float(self.parametersPanel.txtIas.text()))
        altitude = Altitude(float(self.parametersPanel.txtAltitude.text()),
                            AltitudeUnits.FT)
        num1 = float(self.parametersPanel.txtIsa.text())
        value2 = float(self.parametersPanel.txtTime.text())
        speed1 = Speed(float(self.parametersPanel.pnlWind.speedBox.text()))
        num = 15 if (altitude.Feet >= 24500) else 23
        speed2 = Speed.smethod_0(speed, num1, altitude)
        metresPerSecond = value2 * 60 * speed2.MetresPerSecond
        num2 = math.pow(speed2.Knots + speed1.Knots, 2) / (
            34313 * math.tan(Unit.ConvertDegToRad(num))) * 1852
        num3 = value1 * 1852
        num4 = num2 * (1 - math.sin(Unit.ConvertDegToRad(20))) / (
            2 * math.cos(Unit.ConvertDegToRad(20)))
        num5 = value1 * 1852 + 3704
        if (num5 < 9260):
            num5 = 9260
        point3d4 = MathHelper.distanceBearingPoint(
            point3d5, Unit.ConvertDegToRad(value + 90), num2 /
            2) if (self.parametersPanel.cmbOrientation.currentText() !=
                   OrientationType.Left) else MathHelper.distanceBearingPoint(
                       point3d5, Unit.ConvertDegToRad(value - 90), num2 / 2)
        point3d6 = MathHelper.distanceBearingPoint(point3d4,
                                                   Unit.ConvertDegToRad(value),
                                                   num4)
        point3d7 = MathHelper.distanceBearingPoint(
            point3d4, Unit.ConvertDegToRad(value + 180), metresPerSecond)
        num6 = num2 / 2 + 1.414 * num3
        num7 = num2 / 2 + num3
        point3d8 = MathHelper.distanceBearingPoint(point3d6,
                                                   Unit.ConvertDegToRad(value),
                                                   num6)
        point3d9 = MathHelper.distanceBearingPoint(
            point3d6,
            Unit.ConvertDegToRad(value + 90) - math.acos(num7 / num6), num6)
        point3d10 = MathHelper.distanceBearingPoint(
            point3d7,
            Unit.ConvertDegToRad(value + 90) + math.acos(num7 / num6), num6)
        point3d11 = MathHelper.distanceBearingPoint(
            point3d7, Unit.ConvertDegToRad(value + 180), num6)
        point3d12 = MathHelper.distanceBearingPoint(
            point3d7,
            Unit.ConvertDegToRad(value - 90) - math.acos(num7 / num6), num6)
        point3d13 = MathHelper.distanceBearingPoint(
            point3d6,
            Unit.ConvertDegToRad(value - 90) + math.acos(num7 / num6), num6)
        point3d = MathHelper.getIntersectionPoint(
            point3d9,
            MathHelper.distanceBearingPoint(
                point3d9,
                MathHelper.getBearing(point3d6, point3d9) -
                Unit.ConvertDegToRad(90), 100), point3d8,
            MathHelper.distanceBearingPoint(point3d8,
                                            Unit.ConvertDegToRad(value + 90),
                                            100))
        point3d1 = MathHelper.getIntersectionPoint(
            point3d10,
            MathHelper.distanceBearingPoint(
                point3d10,
                MathHelper.getBearing(point3d7, point3d10) +
                Unit.ConvertDegToRad(90), 100), point3d11,
            MathHelper.distanceBearingPoint(point3d11,
                                            Unit.ConvertDegToRad(value + 90),
                                            100))
        point3d2 = MathHelper.getIntersectionPoint(
            point3d12,
            MathHelper.distanceBearingPoint(
                point3d12,
                MathHelper.getBearing(point3d7, point3d12) -
                Unit.ConvertDegToRad(90), 100), point3d11,
            MathHelper.distanceBearingPoint(point3d11,
                                            Unit.ConvertDegToRad(value - 90),
                                            100))
        point3d3 = MathHelper.getIntersectionPoint(
            point3d13,
            MathHelper.distanceBearingPoint(
                point3d13,
                MathHelper.getBearing(point3d6, point3d13) +
                Unit.ConvertDegToRad(90), 100), point3d8,
            MathHelper.distanceBearingPoint(point3d8,
                                            Unit.ConvertDegToRad(value - 90),
                                            100))
        polylines1 = []
        polylineArea = None
        if (bool_0):
            num8 = num2 / 2
            point3d14 = MathHelper.distanceBearingPoint(
                point3d4, Unit.ConvertDegToRad(value + 90), num8)
            point3d15 = MathHelper.distanceBearingPoint(
                point3d7, Unit.ConvertDegToRad(value + 90), num8)
            point3d16 = MathHelper.distanceBearingPoint(
                point3d7, Unit.ConvertDegToRad(value - 90), num8)
            point3d17 = MathHelper.distanceBearingPoint(
                point3d4, Unit.ConvertDegToRad(value - 90), num8)
            point3dArray = [point3d14, point3d15, point3d16, point3d17]
            polylineArea = PolylineArea(point3dArray)
            polylineArea.method_19(
                1, -1
            )  #MathHelper.smethod_57(TurnDirection.Right, point3d15, point3d16, point3d7))
            polylineArea.method_19(
                3, -1
            )  #MathHelper.smethod_57(TurnDirection.Right, point3d17, point3d14, point3d4))
            polylines1.append(polylineArea)
        point3dArray1 = [point3d9, point3d10, point3d12, point3d13]
        polylineArea1 = PolylineArea(point3dArray1)
        #         for point3d0 in point3dArray1:
        #             polyline1.Add(point3d0)
        polylineArea1.method_19(
            1,
            MathHelper.smethod_57(TurnDirection.Right, point3d10, point3d12,
                                  point3d7))
        polylineArea1.method_19(
            3,
            MathHelper.smethod_57(TurnDirection.Right, point3d13, point3d9,
                                  point3d6))
        #         polylineArea1.set_closed(True)
        #         polyline1.SetDatabaseDefaults();
        polylines1.append(polylineArea1)

        polylineAreaLineList = [
            PolylineArea(
                [polylineArea1[0].Position, polylineArea1[1].Position]),
            PolylineArea(
                [polylineArea1[2].Position, polylineArea1[3].Position])
        ]
        polylineAreaArc0 = PolylineArea()
        polylineAreaArc0.Add(polylineArea1[1])
        polylineAreaArc0.Add(PolylineAreaPoint(polylineArea1[2].Position))
        polylineAreaArc1 = PolylineArea()
        polylineAreaArc1.Add(polylineArea1[3])
        polylineAreaArc1.Add(PolylineAreaPoint(polylineArea1[0].Position))
        polylineAreaArcList = [polylineAreaArc0, polylineAreaArc1]
        num9 = num5 / 5
        polylineAreaArcListResult = []
        polylineAreaLineListResult = []
        for i in range(1, 6):
            polylineAreaL0 = polylineAreaLineList[0].getOffsetCurveNo(
                num9 * i, 4)
            polylineAreaLineListResult.append(polylineAreaL0)

            polylineAreaA0 = polylineAreaArcList[0].getOffsetCurveNo(
                num9 * i, 4)
            polylineAreaT = PolylineArea()
            polylineAreaT.Add(
                PolylineAreaPoint(
                    polylineAreaA0[0].Position,
                    MathHelper.smethod_60(
                        polylineAreaA0[0].Position,
                        polylineAreaA0[int(len(polylineAreaA0) / 2)].Position,
                        polylineAreaA0[len(polylineAreaA0) - 1].Position)))
            polylineAreaT.Add(
                PolylineAreaPoint(polylineAreaA0[len(polylineAreaA0) -
                                                 1].Position))
            polylineAreaArcListResult.append(polylineAreaT)

            polylineAreaL1 = polylineAreaLineList[1].getOffsetCurveNo(
                num9 * i, 4)
            polylineAreaLineListResult.append(polylineAreaL1)

            polylineAreaA1 = polylineAreaArcList[1].getOffsetCurveNo(
                num9 * i, 4)
            polylineAreaT = PolylineArea()
            polylineAreaT.Add(
                PolylineAreaPoint(
                    polylineAreaA1[0].Position,
                    MathHelper.smethod_60(
                        polylineAreaA1[0].Position,
                        polylineAreaA1[int(len(polylineAreaA1) / 2)].Position,
                        polylineAreaA1[len(polylineAreaA1) - 1].Position)))
            polylineAreaT.Add(
                PolylineAreaPoint(polylineAreaA1[len(polylineAreaA1) -
                                                 1].Position))
            polylineAreaArcListResult.append(polylineAreaT)

            polylineAreaLineListResult.append(
                PolylineArea([
                    polylineAreaL0[len(polylineAreaL0) - 1].Position,
                    polylineAreaA0[0].Position
                ]))
            polylineAreaLineListResult.append(
                PolylineArea([
                    polylineAreaA0[len(polylineAreaA0) - 1].Position,
                    polylineAreaL1[0].Position
                ]))
            polylineAreaLineListResult.append(
                PolylineArea([
                    polylineAreaL1[len(polylineAreaL1) - 1].Position,
                    polylineAreaA1[0].Position
                ]))
            polylineAreaLineListResult.append(
                PolylineArea([
                    polylineAreaA1[len(polylineAreaA1) - 1].Position,
                    polylineAreaL0[0].Position
                ]))

        return polylineAreaLineListResult, polylineAreaArcListResult, polylineArea