Пример #1
0
 def method_30(self, point3d_0, double_0, double_1, speed_0, double_2, orientationType_0):
     double0 = 45 / double_0 * speed_0.MetresPerSecond;
     num = 90 / double_0 * speed_0.MetresPerSecond;
     double01 = 135 / double_0 * speed_0.MetresPerSecond;
     num1 = 180 / double_0 * speed_0.MetresPerSecond;
     double02 = 225 / double_0 * speed_0.MetresPerSecond;
     num2 = 270 / double_0 * speed_0.MetresPerSecond;
     num3 = 1;
     if (orientationType_0 == OrientationType.Left):
         num3 = -1;
     point3d = MathHelper.distanceBearingPoint(point3d_0, num3 * 1.5707963267949 + double_2, double_1);
     point3d_1 = point3d;
     point3d1 = MathHelper.distanceBearingPoint(point3d, -1 * num3 * 0.785398163397448 + double_2, double_1 + double0);
     point3d2 = MathHelper.distanceBearingPoint(point3d, double_2, double_1 + num);
     point3d3 = MathHelper.distanceBearingPoint(point3d, num3 * 0.785398163397448 + double_2, double_1 + double01);
     point3d4 = MathHelper.distanceBearingPoint(point3d, num3 * 1.5707963267949 + double_2, double_1 + num1);
     point3d5 = MathHelper.distanceBearingPoint(point3d, num3 * 2.35619449019234 + double_2, double_1 + double02);
     point3d6 = MathHelper.distanceBearingPoint(point3d, num3 * 3.14159265358979 + double_2, double_1 + num2);
     point3d0 = [point3d_0, point3d2, point3d4, point3d6];
     polyline = AcadHelper.smethod_126(point3d0);
     polyline.SetBulgeAt(0, MathHelper.smethod_60(point3d_0, point3d1, point3d2));
     polyline.SetBulgeAt(1, MathHelper.smethod_60(point3d2, point3d3, point3d4));
     polyline.SetBulgeAt(2, MathHelper.smethod_60(point3d4, point3d5, point3d6));
     return (polyline, point3d_1);
Пример #2
0
    def btnConstruct2_Click(self):
        qgsLayerTreeView = define._mLayerTreeView
        groupName = self.surfaceType2
        layerTreeModel = qgsLayerTreeView.layerTreeModel()
        layerTreeGroup = layerTreeModel.rootGroup()
        rowCount = layerTreeModel.rowCount()
        groupExisting = False
        if rowCount > 0:
            for i in range(rowCount):
                qgsLayerTreeNode = layerTreeModel.index2node(
                    layerTreeModel.index(i, 0))
                if qgsLayerTreeNode.nodeType() == 0:
                    qgsLayerTreeNode._class_ = QgsLayerTreeGroup
                    if isinstance(qgsLayerTreeNode, QgsLayerTreeGroup
                                  ) and qgsLayerTreeNode.name() == groupName:
                        groupExisting = True

        if groupExisting:
            if len(self.resultLayerList2) > 0:
                QgisHelper.removeFromCanvas(define._canvas,
                                            self.resultLayerList2)
                self.resultLayerList2 = []
            else:
                QMessageBox.warning(
                    self, "Warning", "Please remove \"" + self.surfaceType2 +
                    "\" layer group from LayerTreeView.")
                return
        num = None
        num1 = None
        line = None
        polyline = None
        point3d = None
        point3d1 = None
        point3d2 = None
        point3d3 = None
        point3d4 = None
        point3d5 = None
        point3d6 = None
        point3d7 = None
        point3d8 = None
        ficorResult = None
        point = []
        value = None
        resultPolylineAreaList = []
        # if (!AcadHelper.Ready)
        # {
        #     return;
        # }
        # if (!self.method_27(true))
        # {
        #     return;
        # }
        # string constructionLayer = base.ConstructionLayer;
        point3d9 = self.parametersPanel.pnlTrackingPosition.Point3d
        point3d10 = self.parametersPanel.pnlIntersectingPosition.Point3d
        value1 = float(self.parametersPanel.txtTrackingRadialTrack.Value)
        value2 = float(self.parametersPanel.txtIntersectingRadialTrack.Value)
        num2 = Unit.ConvertDegToRad(value1)
        num3 = Unit.ConvertDegToRad(value2)
        if (self.parametersPanel.cmbTrackingType.currentIndex() != 0):
            num = Unit.ConvertDegToRad(2.4) if (
                self.parametersPanel.cmbTrackingType.currentIndex() != 1
            ) else Unit.ConvertDegToRad(6.9)
        else:
            num = Unit.ConvertDegToRad(5.2)
        num1 = Unit.ConvertDegToRad(6.2) if (
            self.parametersPanel.cmbIntersectingType.currentIndex() != 0
        ) else Unit.ConvertDegToRad(4.5)
        num4 = num2 + num
        point3d11 = MathHelper.distanceBearingPoint(point3d9, num4, 100)
        num5 = num2 - num
        point3d12 = MathHelper.distanceBearingPoint(point3d9, num5, 100)
        point3d13 = MathHelper.distanceBearingPoint(point3d9, num2, 100)

        point3d = MathHelper.getIntersectionPoint(
            point3d9, point3d13, point3d10,
            MathHelper.distanceBearingPoint(point3d10, num3, 100))
        if (self.parametersPanel.cmbIntersectingType.currentIndex() >= 2):
            metres = Distance(
                float(self.parametersPanel.txtIntersectingDistance.text()),
                DistanceUnits.NM).Metres
            if (self.parametersPanel.chb0dmeAtThr.isChecked()):
                value = Distance(
                    float(self.parametersPanel.txtDmeOffset.text()))
                metres = metres + value.Metres
            num6 = 460 + metres * 0.0125
            num7 = metres + num6
            num8 = metres - num6
            if (MathHelper.smethod_102(point3d9, point3d10)):
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num4, num8)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num8)
                point3d16 = MathHelper.distanceBearingPoint(
                    point3d9, num5, num8)
                point3d17 = MathHelper.distanceBearingPoint(
                    point3d9, num5, num7)
                point3d18 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num7)
                point3d19 = MathHelper.distanceBearingPoint(
                    point3d9, num4, num7)
                point = [point3d14, point3d16, point3d17, point3d19]
                polyline = AcadHelper.smethod_126(point)
                polyline.SetBulgeAt(
                    0, MathHelper.smethod_60(point3d14, point3d15, point3d16))
                polyline.SetBulgeAt(
                    2, MathHelper.smethod_60(point3d17, point3d18, point3d19))
                polyline.set_Closed(True)
                resultPolylineAreaList.append(polyline)
                # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num8)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num7)
                resultPolylineAreaList.append(
                    PolylineArea([point3d14, point3d15]))
                # line = new Line(point3d14, point3d15);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num4, metres)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, metres)
                point3d16 = MathHelper.distanceBearingPoint(
                    point3d9, num5, metres)
                point = [point3d14, point3d16]
                polyline = AcadHelper.smethod_126(point)
                polyline.SetBulgeAt(
                    0, MathHelper.smethod_60(point3d14, point3d15, point3d16))
                resultPolylineAreaList.append(polyline)
                # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
            else:
                ficorResult1 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, num8, FicorInput.C)
                ficorResult2 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, metres, FicorInput.C)
                ficorResult3 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, num7, FicorInput.C)
                if (ficorResult1.Status != FicorStatus.TWO
                        and ficorResult2.Status != FicorStatus.TWO):
                    if (ficorResult3.Status == FicorStatus.TWO):
                        ficorResult = FicorResult(None, FicorStatus.TWO)
                    else:
                        ficorResult = FicorResult(None, ficorResult2.Status)
                else:
                    ficorResult = FicorResult(None, FicorStatus.TWO)
                if (ficorResult.Status != FicorStatus.NID):
                    ficorInput = FicorInput.F
                    num9 = 1
                    if (ficorResult.Status == FicorStatus.TWO):
                        QMessageBox.warning(
                            self, "Infomation",
                            Messages.TWO_POSSIBLE_FIX_POSITIONS)
                        ficorInput = FicorInput.L
                        num9 = 2
                    num10 = 0
                    while (num10 < num9):
                        ficorResult4 = self.method_37(point3d10, num4,
                                                      point3d9, point3d11,
                                                      num8, ficorInput)
                        ficorResult5 = self.method_37(point3d10, num2,
                                                      point3d9, point3d13,
                                                      num8, ficorInput)
                        ficorResult6 = self.method_37(point3d10, num5,
                                                      point3d9, point3d12,
                                                      num8, ficorInput)
                        ficorResult7 = self.method_37(point3d10, num4,
                                                      point3d9, point3d11,
                                                      metres, ficorInput)
                        ficorResult8 = self.method_37(point3d10, num2,
                                                      point3d9, point3d13,
                                                      metres, ficorInput)
                        ficorResult9 = self.method_37(point3d10, num5,
                                                      point3d9, point3d12,
                                                      metres, ficorInput)
                        ficorResult10 = self.method_37(point3d10, num4,
                                                       point3d9, point3d11,
                                                       num7, ficorInput)
                        ficorResult11 = self.method_37(point3d10, num2,
                                                       point3d9, point3d13,
                                                       num7, ficorInput)
                        ficorResult12 = self.method_37(point3d10, num5,
                                                       point3d9, point3d12,
                                                       num7, ficorInput)
                        if (ficorResult4.Status == FicorStatus.NID
                                or ficorResult5.Status == FicorStatus.NID
                                or ficorResult6.Status == FicorStatus.NID
                                or ficorResult7.Status == FicorStatus.NID
                                or ficorResult9.Status == FicorStatus.NID
                                or ficorResult10.Status == FicorStatus.NID
                                or ficorResult11.Status == FicorStatus.NID
                                or ficorResult12.Status == FicorStatus.NID
                                or ficorResult8.Status == FicorStatus.NID):
                            eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY = Messages.ERR_FAILED_TO_CONSTRUCT_THE_FIX_AUTOMATICALLY
                            value = Distance(
                                float(self.parametersPanel.
                                      txtIntersectingDistance.text()),
                                DistanceUnits.NM)
                            str000 = str(round(value.Metres, 4)) + "m"
                            value = str(round(Distance(num6).Metres, 4)) + "m"
                            QMessageBox.warning(
                                self, "Error",
                                eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY %
                                (str000, value))
                            #                     ErrorMessageBox.smethod_0(self, string.Format(eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY, str, value.method_0(":m")));
                            return
                        elif (MathHelper.calcDistance(point3d9,
                                                      ficorResult8.Point)
                              < MathHelper.calcDistance(
                                  ficorResult5.Point, ficorResult8.Point)):
                            QMessageBox.warning(
                                self, "Error", Messages.
                                ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE)
                            #                     ErrorMessageBox.smethod_0(self, Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE);
                            return
                        else:
                            point = [
                                ficorResult4.Point, ficorResult6.Point,
                                ficorResult12.Point, ficorResult10.Point
                            ]
                            polyline = AcadHelper.smethod_126(point)
                            polyline.SetBulgeAt(
                                0,
                                MathHelper.smethod_60(ficorResult4.Point,
                                                      ficorResult5.Point,
                                                      ficorResult6.Point))
                            polyline.SetBulgeAt(
                                2,
                                MathHelper.smethod_60(ficorResult12.Point,
                                                      ficorResult11.Point,
                                                      ficorResult10.Point))
                            polyline.set_Closed(True)
                            resultPolylineAreaList.append(polyline)
                            # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                            resultPolylineAreaList.append(
                                PolylineArea(
                                    [ficorResult5.Point, ficorResult11.Point]))
                            # line = new Line(ficorResult5.Point, ficorResult11.Point);
                            # AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                            point = [ficorResult7.Point, ficorResult9.Point]
                            polyline = AcadHelper.smethod_126(point)
                            polyline.SetBulgeAt(
                                0,
                                MathHelper.smethod_60(ficorResult7.Point,
                                                      ficorResult8.Point,
                                                      ficorResult9.Point))
                            resultPolylineAreaList.append(polyline)
                            # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                            if (ficorResult.Status == FicorStatus.TWO):
                                ficorInput = FicorInput.S
                            num10 += 1
                else:
                    QMessageBox.warning(
                        self, "Error", Messages.
                        ERR_RADIAL_TRACK_DME_DISTANCE_DO_NOT_INTERSECT)
                    #             ErrorMessageBox.smethod_0(self, Messages.ERR_RADIAL_TRACK_DME_DISTANCE_DO_NOT_INTERSECT);
                    return
        elif (point3d == None):
            QMessageBox.warning(self, "Error",
                                Messages.ERR_RADIALS_TRACKS_ARE_PARALLEL)
            #     ErrorMessageBox.smethod_0(self, Messages.ERR_RADIALS_TRACKS_ARE_PARALLEL);
            return
        elif (MathHelper.smethod_99(MathHelper.getBearing(point3d9, point3d),
                                    num2, 0.001)):
            point3d20 = MathHelper.distanceBearingPoint(
                point3d10, num3 + num1, 100)
            point3d21 = MathHelper.distanceBearingPoint(
                point3d10, num3 - num1, 100)
            point3d1 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d20)
            point3d2 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d21)
            point3d3 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d21)
            point3d4 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d20)
            point3d5 = MathHelper.getIntersectionPoint(point3d9, point3d,
                                                       point3d10, point3d20)
            point3d6 = MathHelper.getIntersectionPoint(point3d9, point3d,
                                                       point3d10, point3d21)
            point3d7 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d)
            point3d8 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d)
            if (MathHelper.calcDistance(point3d9, point3d) <
                    MathHelper.calcDistance(point3d5, point3d)
                    or MathHelper.calcDistance(point3d10, point3d) <
                    MathHelper.calcDistance(point3d5, point3d)
                    or MathHelper.calcDistance(point3d9, point3d) <
                    MathHelper.calcDistance(point3d8, point3d)
                    or MathHelper.calcDistance(point3d10, point3d) <
                    MathHelper.calcDistance(point3d8, point3d)):
                QMessageBox.warning(
                    self, "Error",
                    Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE)
                #         ErrorMessageBox.smethod_0(self, Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE);
                return
            else:
                resultPolylineAreaList.append(
                    PolylineArea([point3d5, point3d6]))
                #         line = new Line(point3d5, point3d6);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPolylineAreaList.append(
                    PolylineArea([point3d7, point3d8]))
                #         line = new Line(point3d7, point3d8);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                point = [point3d1, point3d2, point3d3, point3d4]
                polyline = AcadHelper.smethod_126(point)
                polyline.set_Closed(True)
                resultPolylineAreaList.append(polyline)
        #         AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
        else:
            QMessageBox.warning(self, "Error",
                                Messages.ERR_RADIALS_TRACKS_DO_NOT_INTERSECT)
            #     ErrorMessageBox.smethod_0(self, Messages.ERR_RADIALS_TRACKS_DO_NOT_INTERSECT);
            return

        mapUnits = define._canvas.mapUnits()
        constructionLayer = AcadHelper.createVectorLayer(
            SurfaceTypes.FixConstruction, QGis.Line)

        for polylinrArea0 in resultPolylineAreaList:
            AcadHelper.setGeometryAndAttributesInLayer(constructionLayer,
                                                       polylinrArea0)
        QgisHelper.appendToCanvas(define._canvas, [constructionLayer],
                                  SurfaceTypes.FixConstruction, True)
        self.resultLayerList2 = [constructionLayer]
        QgisHelper.zoomToLayers(self.resultLayerList2)
Пример #3
0
    def btnConstruct_Click(self):
        qgsLayerTreeView = define._mLayerTreeView
        groupName = self.surfaceType1
        layerTreeModel = qgsLayerTreeView.layerTreeModel()
        layerTreeGroup = layerTreeModel.rootGroup()
        rowCount = layerTreeModel.rowCount()
        groupExisting = False
        if rowCount > 0:
            for i in range(rowCount):
                qgsLayerTreeNode = layerTreeModel.index2node(
                    layerTreeModel.index(i, 0))
                if qgsLayerTreeNode.nodeType() == 0:
                    qgsLayerTreeNode._class_ = QgsLayerTreeGroup
                    if isinstance(qgsLayerTreeNode, QgsLayerTreeGroup
                                  ) and qgsLayerTreeNode.name() == groupName:
                        groupExisting = True

        if groupExisting:
            if len(self.resultLayerList1) > 0:
                QgisHelper.removeFromCanvas(define._canvas,
                                            self.resultLayerList1)
                self.resultLayerList1 = []
            else:
                QMessageBox.warning(
                    self, "Warning", "Please remove \"" + self.surfaceType1 +
                    "\" layer group from LayerTreeView.")
                return

        num = None
        num1 = None
        num2 = None
        num3 = None
        point3d = None
        resultPolylineAreaList = []
        # if (!AcadHelper.Ready)
        # {
        #     return;
        # }
        # if (!self.method_27(true))
        # {
        #     return;
        # }
        # string constructionLayer = base.ConstructionLayer;
        point3d1 = self.parametersPanel.pnlNavAid.Point3d
        value = float(self.parametersPanel.txtTrackRadial.Value)
        metres = Altitude(float(self.parametersPanel.txtAltitude.text()),
                          AltitudeUnits.FT).Metres
        z = metres - point3d1.get_Z()
        if (self.parametersPanel.cmbNavAidType.currentIndex() != 0):
            num = 450 - value + 90
            num1 = 15
            num2 = 25
            num3 = z * 0.839099631
        else:
            num = 450 - value + 90
            num1 = 5
            num2 = 15
            num3 = z * 1.191753593
        num4 = Unit.ConvertDegToRad(num1)
        num5 = Unit.ConvertDegToRad(360 - num1)
        num6 = Unit.ConvertDegToRad(180 - num2)
        num7 = Unit.ConvertDegToRad(180 + num2)
        num8 = 0
        num9 = Unit.ConvertDegToRad(180)
        point3d2 = MathHelper.distanceBearingPoint(point3d1, num4, num3)
        point3d3 = MathHelper.distanceBearingPoint(point3d1, num5, num3)
        point3d = MathHelper.smethod_68(
            point3d2, MathHelper.distanceBearingPoint(point3d1, num8, num3),
            point3d3)
        if (point3d == None):
            QMessageBox.warning(self, "Error",
                                Messages.ERR_FAILED_TO_CALCULATE_CENTER_POINT)
            return
        #     throw new Exception(Messages.ERR_FAILED_TO_CALCULATE_CENTER_POINT);
        num10 = MathHelper.smethod_55(
            point3d2, point3d3, MathHelper.calcDistance(point3d2, point3d))
        point3d2 = MathHelper.distanceBearingPoint(point3d1, num6, num3)
        point3d3 = MathHelper.distanceBearingPoint(point3d1, num7, num3)
        point3d = MathHelper.smethod_68(
            point3d2, MathHelper.distanceBearingPoint(point3d1, num9, num3),
            point3d3)
        if (point3d == None):
            QMessageBox.warning(self, "Error",
                                Messages.ERR_FAILED_TO_CALCULATE_CENTER_POINT)
        #     throw new Exception(Messages.ERR_FAILED_TO_CALCULATE_CENTER_POINT);
        num11 = MathHelper.smethod_55(
            point3d2, point3d3, MathHelper.calcDistance(point3d2, point3d))
        matrix3d = Matrix3d.Rotation(Unit.ConvertDegToRad(num),
                                     Vector3d(0, 0, 1), point3d1)
        point3d2 = MathHelper.distanceBearingPoint(point3d1, num8, num3)
        point3d3 = MathHelper.distanceBearingPoint(point3d1, num9, num3)
        line = PolylineArea([point3d2, point3d3])
        resultPolylineAreaList.append(
            self.TransformBy(line, Unit.ConvertDegToRad(value),
                             self.parametersPanel.pnlNavAid.Point3d)
        )  #.TransformBy(matrix3d))
        point3d2 = MathHelper.distanceBearingPoint(point3d1, num6, num3)
        point3d3 = MathHelper.distanceBearingPoint(point3d1, num4, num3)
        point3d4 = MathHelper.distanceBearingPoint(point3d1, num5, num3)
        point3d5 = MathHelper.distanceBearingPoint(point3d1, num7, num3)
        point3dArray = [point3d2, point3d3, point3d4, point3d5, point3d2]
        polyline = AcadHelper.smethod_126(point3dArray)
        if self.parametersPanel.cmbNavAidType.currentIndex() == 0:
            num10 = 0.0436609429083
            num11 = 0.131652497586
        else:
            num10 = 0.131652497586
            num11 = 0.221694662642
        polyline.SetBulgeAt(1, num10)
        polyline.SetBulgeAt(3, num11)
        # polyline.set_Elevation(point3d1.get_Z());
        resultPolylineAreaList.append(
            self.TransformBy(polyline, Unit.ConvertDegToRad(value),
                             self.parametersPanel.pnlNavAid.Point3d)
        )  #polyline.TransformBy(matrix3d))
        # polyline.TransformBy(matrix3d);
        # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
        # transaction.Commit();
        # AcadHelper.smethod_5();
        mapUnits = define._canvas.mapUnits()
        constructionLayer = AcadHelper.createVectorLayer(
            SurfaceTypes.OverheadTolerance, QGis.Line)
        for polylinrArea0 in resultPolylineAreaList:
            AcadHelper.setGeometryAndAttributesInLayer(constructionLayer,
                                                       polylinrArea0)
        QgisHelper.appendToCanvas(define._canvas, [constructionLayer],
                                  SurfaceTypes.OverheadTolerance, True)
        self.resultLayerList1 = [constructionLayer]
        QgisHelper.zoomToLayers(self.resultLayerList1)
Пример #4
0
    def btnConstruct_Click(self):
        num = None
        num1 = None
        line = None
        polyline = None
        point3d = None
        point3d1 = None
        point3d2 = None
        point3d3 = None
        point3d4 = None
        point3d5 = None
        point3d6 = None
        point3d7 = None
        point3d8 = None
        ficorResult = None
        point = []
        value = None
        resultPolylineAreaList = []
        # if (!AcadHelper.Ready)
        # {
        #     return;
        # }
        # if (!self.method_27(true))
        # {
        #     return;
        # }
        # string constructionLayer = base.ConstructionLayer;
        point3d9 = self.parametersPanel.pnlTrackingPosition.Point3d
        point3d10 = self.parametersPanel.pnlIntersectingPosition.Point3d
        value1 = float(self.parametersPanel.txtTrackingRadialTrack.text())
        value2 = float(self.parametersPanel.txtIntersectingRadialTrack.text())
        num2 = Unit.ConvertDegToRad(value1)
        num3 = Unit.ConvertDegToRad(value2)
        if (self.parametersPanel.cmbTrackingType.currentIndex() != 0):
            num = Unit.ConvertDegToRad(2.4) if (
                self.parametersPanel.cmbTrackingType.currentIndex() != 1
            ) else Unit.ConvertDegToRad(6.9)
        else:
            num = Unit.ConvertDegToRad(5.2)
        num1 = Unit.ConvertDegToRad(6.2) if (
            self.parametersPanel.cmbIntersectingType.currentIndex() != 0
        ) else Unit.ConvertDegToRad(4.5)
        num4 = num2 + num
        point3d11 = MathHelper.distanceBearingPoint(point3d9, num4, 100)
        num5 = num2 - num
        point3d12 = MathHelper.distanceBearingPoint(point3d9, num5, 100)
        point3d13 = MathHelper.distanceBearingPoint(point3d9, num2, 100)

        point3d = MathHelper.getIntersectionPoint(
            point3d9, point3d13, point3d10,
            MathHelper.distanceBearingPoint(point3d10, num3, 100))
        if (self.parametersPanel.cmbIntersectingType.currentIndex() >= 2):
            metres = Distance(
                float(self.parametersPanel.txtIntersectingDistance.text()),
                DistanceUnits.NM).Metres
            if (self.parametersPanel.chb0dmeAtThr.isChecked()):
                value = Distance(
                    float(self.parametersPanel.txtDmeOffset.text()))
                metres = metres + value.Metres
            num6 = 460 + metres * 0.0125
            num7 = metres + num6
            num8 = metres - num6
            if (MathHelper.smethod_102(point3d9, point3d10)):
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num4, num8)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num8)
                point3d16 = MathHelper.distanceBearingPoint(
                    point3d9, num5, num8)
                point3d17 = MathHelper.distanceBearingPoint(
                    point3d9, num5, num7)
                point3d18 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num7)
                point3d19 = MathHelper.distanceBearingPoint(
                    point3d9, num4, num7)
                point = [point3d14, point3d16, point3d17, point3d19]
                polyline = AcadHelper.smethod_126(point)
                polyline.SetBulgeAt(
                    0, MathHelper.smethod_60(point3d14, point3d15, point3d16))
                polyline.SetBulgeAt(
                    2, MathHelper.smethod_60(point3d17, point3d18, point3d19))
                polyline.set_Closed(True)
                resultPolylineAreaList.append(polyline)
                # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num8)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, num7)
                resultPolylineAreaList.append(
                    PolylineArea([point3d14, point3d15]))
                # line = new Line(point3d14, point3d15);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                point3d14 = MathHelper.distanceBearingPoint(
                    point3d9, num4, metres)
                point3d15 = MathHelper.distanceBearingPoint(
                    point3d9, num2, metres)
                point3d16 = MathHelper.distanceBearingPoint(
                    point3d9, num5, metres)
                point = [point3d14, point3d16]
                polyline = AcadHelper.smethod_126(point)
                polyline.SetBulgeAt(
                    0, MathHelper.smethod_60(point3d14, point3d15, point3d16))
                resultPolylineAreaList.append(polyline)
                # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
            else:
                ficorResult1 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, num8, FicorInput.C)
                ficorResult2 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, metres, FicorInput.C)
                ficorResult3 = self.method_37(point3d10, num2, point3d9,
                                              point3d13, num7, FicorInput.C)
                if (ficorResult1.Status != FicorStatus.TWO
                        and ficorResult2.Status != FicorStatus.TWO):
                    if (ficorResult3.Status == FicorStatus.TWO):
                        ficorResult = FicorResult(None, FicorStatus.TWO)
                    else:
                        ficorResult = FicorResult(None, ficorResult2.Status)
                else:
                    ficorResult = FicorResult(None, FicorStatus.TWO)
                if (ficorResult.Status != FicorStatus.NID):
                    ficorInput = FicorInput.F
                    num9 = 1
                    if (ficorResult.Status == FicorStatus.TWO):
                        QMessageBox.warning(
                            self, "Infomation",
                            Messages.TWO_POSSIBLE_FIX_POSITIONS)
                        ficorInput = FicorInput.L
                        num9 = 2
                    num10 = 0
                    while (num10 < num9):
                        ficorResult4 = self.method_37(point3d10, num4,
                                                      point3d9, point3d11,
                                                      num8, ficorInput)
                        ficorResult5 = self.method_37(point3d10, num2,
                                                      point3d9, point3d13,
                                                      num8, ficorInput)
                        ficorResult6 = self.method_37(point3d10, num5,
                                                      point3d9, point3d12,
                                                      num8, ficorInput)
                        ficorResult7 = self.method_37(point3d10, num4,
                                                      point3d9, point3d11,
                                                      metres, ficorInput)
                        ficorResult8 = self.method_37(point3d10, num2,
                                                      point3d9, point3d13,
                                                      metres, ficorInput)
                        ficorResult9 = self.method_37(point3d10, num5,
                                                      point3d9, point3d12,
                                                      metres, ficorInput)
                        ficorResult10 = self.method_37(point3d10, num4,
                                                       point3d9, point3d11,
                                                       num7, ficorInput)
                        ficorResult11 = self.method_37(point3d10, num2,
                                                       point3d9, point3d13,
                                                       num7, ficorInput)
                        ficorResult12 = self.method_37(point3d10, num5,
                                                       point3d9, point3d12,
                                                       num7, ficorInput)
                        if (ficorResult4.Status == FicorStatus.NID
                                or ficorResult5.Status == FicorStatus.NID
                                or ficorResult6.Status == FicorStatus.NID
                                or ficorResult7.Status == FicorStatus.NID
                                or ficorResult9.Status == FicorStatus.NID
                                or ficorResult10.Status == FicorStatus.NID
                                or ficorResult11.Status == FicorStatus.NID
                                or ficorResult12.Status == FicorStatus.NID
                                or ficorResult8.Status == FicorStatus.NID):
                            eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY = Messages.ERR_FAILED_TO_CONSTRUCT_THE_FIX_AUTOMATICALLY
                            value = Distance(
                                float(self.parametersPanel.
                                      txtIntersectingDistance.text()),
                                DistanceUnits.NM)
                            str000 = str(round(value.Metres, 4)) + "m"
                            value = str(round(Distance(num6).Metres, 4)) + "m"
                            QMessageBox.warning(
                                self, "Error",
                                eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY %
                                (str000, value))
                            #                     ErrorMessageBox.smethod_0(self, string.Format(eRRFAILEDTOCONSTRUCTTHEFIXAUTOMATICALLY, str, value.method_0(":m")));
                            return
                        elif (MathHelper.calcDistance(point3d9,
                                                      ficorResult8.Point)
                              < MathHelper.calcDistance(
                                  ficorResult5.Point, ficorResult8.Point)):
                            QMessageBox.warning(
                                self, "Error", Messages.
                                ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE)
                            #                     ErrorMessageBox.smethod_0(self, Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE);
                            return
                        else:
                            point = [
                                ficorResult4.Point, ficorResult6.Point,
                                ficorResult12.Point, ficorResult10.Point
                            ]
                            polyline = AcadHelper.smethod_126(point)
                            polyline.SetBulgeAt(
                                0,
                                MathHelper.smethod_60(ficorResult4.Point,
                                                      ficorResult5.Point,
                                                      ficorResult6.Point))
                            polyline.SetBulgeAt(
                                2,
                                MathHelper.smethod_60(ficorResult12.Point,
                                                      ficorResult11.Point,
                                                      ficorResult10.Point))
                            polyline.set_Closed(True)
                            resultPolylineAreaList.append(polyline)
                            # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                            resultPolylineAreaList.append(
                                PolylineArea(
                                    [ficorResult5.Point, ficorResult11.Point]))
                            # line = new Line(ficorResult5.Point, ficorResult11.Point);
                            # AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                            point = [ficorResult7.Point, ficorResult9.Point]
                            polyline = AcadHelper.smethod_126(point)
                            polyline.SetBulgeAt(
                                0,
                                MathHelper.smethod_60(ficorResult7.Point,
                                                      ficorResult8.Point,
                                                      ficorResult9.Point))
                            resultPolylineAreaList.append(polyline)
                            # AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
                            if (ficorResult.Status == FicorStatus.TWO):
                                ficorInput = FicorInput.S
                            num10 += 1
                else:
                    QMessageBox.warning(
                        self, "Error", Messages.
                        ERR_RADIAL_TRACK_DME_DISTANCE_DO_NOT_INTERSECT)
                    #             ErrorMessageBox.smethod_0(self, Messages.ERR_RADIAL_TRACK_DME_DISTANCE_DO_NOT_INTERSECT);
                    return
        elif (point3d == None):
            QMessageBox.warning(self, "Error",
                                Messages.ERR_RADIALS_TRACKS_ARE_PARALLEL)
            #     ErrorMessageBox.smethod_0(self, Messages.ERR_RADIALS_TRACKS_ARE_PARALLEL);
            return
        elif (MathHelper.smethod_99(MathHelper.getBearing(point3d9, point3d),
                                    num2, 0.001)):
            point3d20 = MathHelper.distanceBearingPoint(
                point3d10, num3 + num1, 100)
            point3d21 = MathHelper.distanceBearingPoint(
                point3d10, num3 - num1, 100)
            point3d1 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d20)
            point3d2 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d21)
            point3d3 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d21)
            point3d4 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d20)
            point3d5 = MathHelper.getIntersectionPoint(point3d9, point3d,
                                                       point3d10, point3d20)
            point3d6 = MathHelper.getIntersectionPoint(point3d9, point3d,
                                                       point3d10, point3d21)
            point3d7 = MathHelper.getIntersectionPoint(point3d9, point3d11,
                                                       point3d10, point3d)
            point3d8 = MathHelper.getIntersectionPoint(point3d9, point3d12,
                                                       point3d10, point3d)
            if (MathHelper.calcDistance(point3d9, point3d) <
                    MathHelper.calcDistance(point3d5, point3d)
                    or MathHelper.calcDistance(point3d10, point3d) <
                    MathHelper.calcDistance(point3d5, point3d)
                    or MathHelper.calcDistance(point3d9, point3d) <
                    MathHelper.calcDistance(point3d8, point3d)
                    or MathHelper.calcDistance(point3d10, point3d) <
                    MathHelper.calcDistance(point3d8, point3d)):
                QMessageBox.warning(
                    self, "Error",
                    Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE)
                #         ErrorMessageBox.smethod_0(self, Messages.ERR_FIX_TOO_CLOSE_USE_OVERHEAD_TOLERANCE);
                return
            else:
                resultPolylineAreaList.append(
                    PolylineArea([point3d5, point3d6]))
                #         line = new Line(point3d5, point3d6);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPolylineAreaList.append(
                    PolylineArea([point3d7, point3d8]))
                #         line = new Line(point3d7, point3d8);
                #         AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                point = [point3d1, point3d2, point3d3, point3d4]
                polyline = AcadHelper.smethod_126(point)
                polyline.set_Closed(True)
                resultPolylineAreaList.append(polyline)
        #         AcadHelper.smethod_18(transaction, blockTableRecord, polyline, constructionLayer);
        else:
            QMessageBox.warning(self, "Error",
                                Messages.ERR_RADIALS_TRACKS_DO_NOT_INTERSECT)
            #     ErrorMessageBox.smethod_0(self, Messages.ERR_RADIALS_TRACKS_DO_NOT_INTERSECT);
            return

        mapUnits = define._canvas.mapUnits()
        constructionLayer = None
        if define._mapCrs == None:
            if mapUnits == QGis.Meters:
                constructionLayer = QgsVectorLayer("linestring?crs=EPSG:32633",
                                                   self.surfaceType, "memory")
            else:
                constructionLayer = QgsVectorLayer("linestring?crs=EPSG:4326",
                                                   self.surfaceType, "memory")
        else:
            constructionLayer = QgsVectorLayer(
                "linestring?crs=%s" % define._mapCrs.authid(),
                self.surfaceType, "memory")
        shpPath = ""
        if define.obstaclePath != None:
            shpPath = define.obstaclePath
        elif define.xmlPath != None:
            shpPath = define.xmlPath
        else:
            shpPath = define.appPath
        er = QgsVectorFileWriter.writeAsVectorFormat(
            constructionLayer, shpPath + "/" +
            QString(self.surfaceType).replace(" ", "") + ".shp", "utf-8",
            constructionLayer.crs())
        constructionLayer = QgsVectorLayer(
            shpPath + "/" + QString(self.surfaceType).replace(" ", "") +
            ".shp", self.surfaceType, "ogr")

        constructionLayer.startEditing()

        for polylinrArea0 in resultPolylineAreaList:
            feature = QgsFeature()
            feature.setGeometry(
                QgsGeometry.fromPolyline(polylinrArea0.method_14()))
            pr = constructionLayer.dataProvider()
            pr.addFeatures([feature])
            # constructionLayer.addFeature(feature)
        constructionLayer.commitChanges()
        QgisHelper.appendToCanvas(define._canvas, [constructionLayer],
                                  self.surfaceType, True)
        QgisHelper.zoomToLayers([constructionLayer])