def btnEvaluate_Click(self):

        # self.complexObstacleArea.ObstacleArea = None
        #
        # ObstacleTable.MocMultiplier = self.parametersPanel.mocSpinBox.value()
        # self.obstaclesModel = TurnProtectionAndObstacleAssessmentObstacles(self.complexObstacleArea, self.parametersPanel.pnlPrimaryMoc.Value, self.parametersPanel.pnlAltitude.Value, self.manualPolygon )

        FlightPlanBaseDlg.btnEvaluate_Click(self)
        self.ui.btnLocate.setEnabled(True)
    def btnEvaluate_Click(self):
        point3dCollection = None
        point3dCollection1 = None
        polylineArea = None
        polylineArea1 = None
        polylineArea2 = None
        primaryObstacleArea = None
        #         if (self.parametersPanel.cmbSelectionMode.currentText() == "Manual" and not self.pnlSelectionMode.method_0()):
        #             return;
        result, point3dCollection, point3dCollection1, polylineArea, polylineArea1, polylineArea2 = self.method_34(
        )
        if (not result):
            return
        point3d = self.parametersPanel.pnlDer.Point3d
        num = MathHelper.getBearing(self.parametersPanel.pnlRwyStart.Point3d,
                                    point3d)
        percent = float(self.parametersPanel.txtMoc.text())
        percent1 = float(self.parametersPanel.txtPdg.text())

        ObstacleTable.MocMultiplier = self.parametersPanel.mocSpinBox.value()
        self.obstaclesModel = DepartureOmnidirectionalObstacles(
            point3d, num,
            Altitude(float(self.parametersPanel.txtTurningAltitude.text()),
                     AltitudeUnits.FT), percent, percent1,
            self.parametersPanel.chbCatH.isChecked(), point3dCollection,
            point3dCollection1, polylineArea1, polylineArea2,
            self.manualPolygon)

        #
        return FlightPlanBaseDlg.btnEvaluate_Click(self)
    def btnEvaluate_Click(self):
        if not self.method_27():
            return

        holdingTemplate = HoldingTemplate(
            self.parametersPanel.pnlNavAid.Point3d,
            float(self.parametersPanel.txtTrack.Value),
            self.parametersPanel.txtIas.Value,
            self.parametersPanel.txtAltitude.Value,
            Speed(float(self.parametersPanel.pnlWind.speedBox.text())),
            float(self.parametersPanel.txtIsa.Value),
            float(self.parametersPanel.txtTime.Value),
            self.parametersPanel.cmbOrientation.SelectedItem)
        polylineArea = self.method_35()
        polylineAreaTemp = holdingTemplate.vmethod_0(
            polylineArea, self.parametersPanel.chbIntercept.Checked,
            self.parametersPanel.chbSectors12.Checked)
        polylineArea1 = polylineAreaTemp[0]
        altitude_0 = self.parametersPanel.txtAltitude.Value
        altitude_1 = self.parametersPanel.txtMoc.Value

        if (self.parametersPanel.cmbUsedFor.SelectedIndex != 0):
            hOSE = HoldingOverheadSecondaryEvaluator(
                polylineArea1, altitude_0, altitude_1,
                Distance(2.5, DistanceUnits.NM))
            self.obstaclesModel = HoldingOverHeadObstacles(
                False, "second", None, altitude_0, hOSE.inner, hOSE.outer,
                hOSE.poly, altitude_1, Distance(2.5, DistanceUnits.NM))

        elif (not self.parametersPanel.chbCatH.isChecked()):
            hOBE = HoldingOverheadBufferEvaluator(polylineArea1, altitude_0,
                                                  altitude_1)
            self.obstaclesModel = HoldingOverHeadObstacles(
                self.parametersPanel.chbCatH.Checked, "buffer", hOBE.areas,
                altitude_0)
        else:
            hOSE = HoldingOverheadSecondaryEvaluator(
                polylineArea1, altitude_0, altitude_1,
                Distance(2, DistanceUnits.NM))
            self.obstaclesModel = HoldingOverHeadObstacles(
                True, "second", None, altitude_0, hOSE.inner, hOSE.outer,
                hOSE.poly, altitude_1, Distance(2, DistanceUnits.NM))
        return FlightPlanBaseDlg.btnEvaluate_Click(self)
 def btnEvaluate_Click(self):
     polylines = self.method_36(False)
     #         polylines[0].Dispose();
     #         polylines.RemoveAt(0);
     count = len(polylines)
     num = 0.1 * count
     altitudeMoc = Altitude(float(self.parametersPanel.txtMoc.text()),
                            AltitudeUnits.M)
     metres = altitudeMoc.Metres
     holdingRnpAreas = []
     for i in range(count):
         if (i > 0):
             metres = num * altitudeMoc.Metres
             num = num - 0.1
         point3dCollection = polylines[i].method_14_closed(6)
         polylineArea0 = PolylineArea(point3dCollection)
         holdingRnpAreas.append(
             HoldingRnpArea(polylineArea0, Altitude(metres)))
     self.surfaceList = holdingRnpAreas
     return FlightPlanBaseDlg.btnEvaluate_Click(self)
 def btnEvaluate_Click(self):
     return FlightPlanBaseDlg.btnEvaluate_Click(self)
    def btnEvaluate_Click(self):
        self.complexObstacleArea = ComplexObstacleArea()
        num = None;
        num1 = None;
        num2 = None;
        num3 = None;
        line = None;
#         if (!AcadHelper.Ready)
#         {
#             return;
#         }
#         if (!self.method_27(true))
#         {
#             return;
#         }
        constructionLayer = None;
        nominalTrackLayer = None;
        mapUnits = define._canvas.mapUnits()

        point3d = self.parametersPanel.pnlNavAid.Point3d;
        metres = Altitude(float(self.parametersPanel.txtStartAltitude.text())).Metres;
        metres1 = Altitude(float(self.parametersPanel.txtPrimaryMOC.text())).Metres;
        percent = float(self.parametersPanel.txtAltitudeChange.text());
        num4 = Unit.ConvertDegToRad(float(self.parametersPanel.txtTrackRadial.Value));
        metres2 = Distance(float(self.parametersPanel.txtDistStart.text()), DistanceUnits.NM).Metres;
        metres3 = Distance(float(self.parametersPanel.txtDistFinish.text()), DistanceUnits.NM).Metres;

        # if define._mapCrs == None:
        #     if mapUnits == QGis.Meters:
        #         nominalTrackLayer = QgsVectorLayer("linestring?crs=EPSG:32633", "NominalTrack", "memory")
        #     else:
        #         nominalTrackLayer = QgsVectorLayer("linestring?crs=EPSG:4326", "NominalTrack", "memory")
        # else:
        #     nominalTrackLayer = QgsVectorLayer("linestring?crs=%s"%define._mapCrs.authid (), "NominalTrack", "memory")
        # nominalTrackLayer.startEditing()
        # polyline = QgsGeometry.fromPolyline([MathHelper.distanceBearingPoint(point3d, num4, metres2), MathHelper.distanceBearingPoint(point3d, num4, metres3)])
        # feature = QgsFeature()
        # feature.setGeometry(polyline)
        # nominalTrackLayer.addFeature(feature)
        # nominalTrackLayer.commitChanges()


        if (self.parametersPanel.cmbNavAidType.SelectedIndex != 0):
            num = Unit.ConvertDegToRad(6.2);
            num1 = Unit.ConvertDegToRad(6.9);
            num2 = Unit.ConvertDegToRad(10.3);
        else:
            num = Unit.ConvertDegToRad(4.5);
            num1 = Unit.ConvertDegToRad(5.2);
            num2 = Unit.ConvertDegToRad(7.8);
        if (self.parametersPanel.cmbNavAidType.SelectedIndex != 0):
            num3 = 2315 if(self.parametersPanel.cmbToleranceType.currentIndex() != 2 or not self.parametersPanel.chbOverhead.isChecked()) else 4630;
        else:
            num3 = 1900 if(self.parametersPanel.cmbToleranceType.currentIndex() != 2 or not self.parametersPanel.chbOverhead.isChecked()) else 3704;
        num5 = num4 + num;
        num6 = num4 - num;
        num7 = num4 + num1;
        num8 = num4 - num1;
        num9 = num4 + num2;
        num10 = num4 - num2;
        num11 = num4 + Unit.ConvertDegToRad(90);
        num12 = num4 - Unit.ConvertDegToRad(90);
        num13 = metres2 / math.cos(num);
        num14 = metres2 / math.cos(num1);
        num15 = metres2 / math.cos(num2);
        num16 = metres3 / math.cos(num);
        num17 = metres3 / math.cos(num1);
        num18 = metres3 / math.cos(num2);
        point3d1 = MathHelper.distanceBearingPoint(point3d, num4, metres2);
        point3d2 = MathHelper.distanceBearingPoint(point3d, num4, metres3);
        point3d3 = MathHelper.distanceBearingPoint(point3d, num12, num3);
        point3d4 = MathHelper.distanceBearingPoint(point3d, num11, num3);
        point3d5 = MathHelper.distanceBearingPoint(point3d4, num9, num15);
        point3d6 = MathHelper.distanceBearingPoint(point3d3, num10, num15);
        num19 = MathHelper.calcDistance(point3d1, point3d5) / 2;
        point3d7 = MathHelper.distanceBearingPoint(point3d1, num12, num19);
        point3d8 = MathHelper.distanceBearingPoint(point3d1, num11, num19);
        point3d9 = MathHelper.distanceBearingPoint(point3d3, num10, num18);
        point3d10 = MathHelper.distanceBearingPoint(point3d4, num9, num18);
        num20 = MathHelper.calcDistance(point3d2, point3d10) / 2;
        point3d11 = MathHelper.distanceBearingPoint(point3d2, num12, num20);
        point3d12 = MathHelper.distanceBearingPoint(point3d2, num11, num20);

        resultPoint3dArrayList = []


        if (self.parametersPanel.cmbToleranceType.currentIndex() == 0):
            resultPoint3dArrayList.append([point3d1, point3d2])
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num5, num16), MathHelper.distanceBearingPoint(point3d, num5, num13)])
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num5, num13), MathHelper.distanceBearingPoint(point3d, num6, num13)]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num6, num13), MathHelper.distanceBearingPoint(point3d, num6, num16)]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num6, num16), MathHelper.distanceBearingPoint(point3d, num5, num16)]);

            polylineArea0 = PolylineArea([MathHelper.distanceBearingPoint(point3d, num5, num16), MathHelper.distanceBearingPoint(point3d, num5, num13), MathHelper.distanceBearingPoint(point3d, num6, num13), MathHelper.distanceBearingPoint(point3d, num6, num16), MathHelper.distanceBearingPoint(point3d, num6, num16), MathHelper.distanceBearingPoint(point3d, num5, num16)])
            self.complexObstacleArea.Add(PrimaryObstacleArea(polylineArea0))
        elif (self.parametersPanel.cmbToleranceType.currentIndex() == 1):
            resultPoint3dArrayList.append([point3d1, point3d2]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num7, num17), MathHelper.distanceBearingPoint(point3d, num7, num14)]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num7, num14), MathHelper.distanceBearingPoint(point3d, num8, num14)]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num8, num14), MathHelper.distanceBearingPoint(point3d, num8, num17)]);
            resultPoint3dArrayList.append([MathHelper.distanceBearingPoint(point3d, num8, num17), MathHelper.distanceBearingPoint(point3d, num7, num17)]);
            polylineArea0 = PolylineArea([MathHelper.distanceBearingPoint(point3d, num7, num17), MathHelper.distanceBearingPoint(point3d, num7, num14), MathHelper.distanceBearingPoint(point3d, num8, num14), MathHelper.distanceBearingPoint(point3d, num8, num17), MathHelper.distanceBearingPoint(point3d, num8, num17), MathHelper.distanceBearingPoint(point3d, num7, num17)])
            self.complexObstacleArea.Add(PrimaryObstacleArea(polylineArea0))
        elif (self.parametersPanel.cmbToleranceType.currentIndex() == 2):
            if (self.parametersPanel.cmbConstructionType.currentText() != ConstructionType.Construct2D):
                num21 = metres - metres1;
                num22 = percent / 100;
                num23 = num21 + (metres3 - metres2) * num22;
                num24 = metres + (metres3 - metres2) * num22;
                point3d5 = point3d5.smethod_167(metres);
                point3d6 = point3d6.smethod_167(metres);
                point3d9 = point3d9.smethod_167(num24);
                point3d10 = point3d10.smethod_167(num24);
                point3d8 = point3d8.smethod_167(num21);
                point3d12 = point3d12.smethod_167(num23);
                point3d7 = point3d7.smethod_167(num21);
                point3d11 = point3d11.smethod_167(num23);
                point3d1 = point3d1.smethod_167(metres);
                point3d2 = point3d2.smethod_167(num24);
                # resultPoint3dArrayList.append([point3d8, point3d5, point3d10, point3d12]);
                resultPoint3dArrayList.append([point3d8, point3d12, point3d11, point3d7]);
                resultPoint3dArrayList.append([point3d7, point3d11, point3d9, point3d6]);

                self.complexObstacleArea.Add(PrimaryObstacleArea(PolylineArea([point3d8, point3d12, point3d11, point3d7, point3d8])))
                self.complexObstacleArea.Add(SecondaryObstacleArea(point3d8, point3d12, point3d5, point3d10, MathHelper.getBearing(point3d8, point3d12)))
                self.complexObstacleArea.Add(SecondaryObstacleArea(point3d7, point3d11, point3d6, point3d9, MathHelper.getBearing(point3d7, point3d11)))
            else:
                resultPoint3dArrayList.append([point3d1, point3d2]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d6, point3d5]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d5, point3d10]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d10, point3d9]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d9, point3d6]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d7, point3d11]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
                resultPoint3dArrayList.append([point3d8, point3d12]);
#                 AcadHelper.smethod_18(transaction, blockTableRecord, line, constructionLayer);
#                 num21 = metres - metres1;
#                 num22 = percent / 100;
#                 num23 = num21 + (metres3 - metres2) * num22;
#                 num24 = metres + (metres3 - metres2) * num22;
#                 point3d5 = point3d5.smethod_167(0);
#                 point3d6 = point3d6.smethod_167(0);
#                 point3d9 = point3d9.smethod_167(0);
#                 point3d10 = point3d10.smethod_167(0);
#                 point3d8 = point3d8.smethod_167(0);
#                 point3d12 = point3d12.smethod_167(0);
#                 point3d7 = point3d7.smethod_167(0);
#                 point3d11 = point3d11.smethod_167(0);
#                 point3d1 = point3d1.smethod_167(0);
#                 point3d2 = point3d2.smethod_167(0);
                # resultPoint3dArrayList.append([point3d8, point3d5, point3d10, point3d12]);
                # resultPoint3dArrayList.append([point3d8, point3d12, point3d11, point3d7]);
                # resultPoint3dArrayList.append([point3d7, point3d11, point3d9, point3d6]);

                self.complexObstacleArea.Add(PrimaryObstacleArea(PolylineArea([point3d8, point3d12, point3d11, point3d7, point3d8])))
                self.complexObstacleArea.Add(SecondaryObstacleArea(point3d8, point3d12, point3d5, point3d10, MathHelper.getBearing(point3d8, point3d12)))
                self.complexObstacleArea.Add(SecondaryObstacleArea(point3d7, point3d11, point3d6, point3d9, MathHelper.getBearing(point3d7, point3d11)))

        ObstacleTable.MocMultiplier = self.parametersPanel.mocSpinBox.value()
        self.obstaclesModel = RadialObstacles(self.complexObstacleArea, Altitude(float(self.parametersPanel.txtPrimaryMOC.text())), self.manualPolygon );

        return FlightPlanBaseDlg.btnEvaluate_Click(self)