private void btn_testTin_Click(object sender, EventArgs e) { _paramTin = FLabServices.createCalculMedium().GetParametresDuTinParDefaut(); // _paramTin.p11_initialisation_determinationFrontieres = enumModeDelimitationFrontiere.pointsProchesDuMbo; _paramTin.p11_initialisation_determinationFrontieres = enumModeDelimitationFrontiere.pointsProchesDuMbo; //_paramTin.p12_extensionSupplementaireMboEnM = 1000; _paramTin.p12_extensionSupplementaireMboEnM = 0; _paramTin.p13_modeCalculZParDefaut = enumModeCalculZ.alti_0; _paramTin.p14_altitudeParDefaut = -200; _paramTin.p15_nbrePointsSupplMultiples4 = 0; _paramTin.p16_initialisation_modeChoixDuPointCentral.p01_excentrationMinimum = 0; _paramTin.p21_enrichissement_modeChoixDuPointCentral.p01_excentrationMinimum = Convert.ToDouble(tb_precisionEnM.Text); // _topolFacettes = FLabServices.createCalculMedium().GetInitialisationTin(_dataPointsTests, _paramTin); FLabServices.createCalculMedium().AugmenteDetailsTinByRef(ref _topolFacettes, _paramTin); // bool v_visuSpatialTrace_vf = false; if (v_visuSpatialTrace_vf) { FVisualisationServices.createVisualisationSpatialTraceServices().GetVisuTopologieFacettes(_topolFacettes, false, false); FVisualisationServices.createVisualisationSpatialTraceServices().AfficheVisu(); } MessageBox.Show("Traitement terminé."); }
private void btn_pentesTin_visuST_Click(object sender, EventArgs e) { int p_nbreClasses = 7; FVisualisationServices.createVisualisationSpatialTraceServices().GetVisuPentesFacettes(_topolFacettes, p_nbreClasses); FServicesApplicatifs.createVisuSpatialTrace().AfficheVisu(); MessageBox.Show("Traitement terminé."); }
public void TestChangementReferentiel2D(IEnumerable <BeanPoint_internal> p_points, double[] p_vecteurDeDecalage) { Color v_couleurObjet; string v_label; //POINTS REF double[] v_coordCentroide = FServicesApplicatifs.createCalculServicesMedium_testDivers().GetCentroide(p_points); BeanPoint_internal v_centroide = new BeanPoint_internal(v_coordCentroide, 2154); // double[] p_coordPointX = new double[3]; p_coordPointX[0] = v_coordCentroide[0] + p_vecteurDeDecalage[0]; p_coordPointX[1] = v_coordCentroide[1] + p_vecteurDeDecalage[1]; p_coordPointX[2] = 0; BeanPoint_internal p_pointX = new BeanPoint_internal(p_coordPointX, 2154); //VISU POINTS REF v_couleurObjet = Color.FromArgb(255, 0, 0, 255); FVisualisationServices.createVisualisationSpatialTraceServices().GetVisuPoint2D(v_centroide, "Pt0", v_couleurObjet, 20); v_couleurObjet = Color.FromArgb(255, 0, 255, 0); FVisualisationServices.createVisualisationSpatialTraceServices().GetVisuPoint2D(p_pointX, "Pt1", v_couleurObjet, 20); //FIN VISU POINTS REF Dictionary <int, double[]> v_coordDansRef; v_coordDansRef = FServicesApplicatifs.createCalculServicesMedium_testDivers().GetCoordonneesDansNewReferentiel2D(p_points, v_coordCentroide, p_coordPointX, null); Dictionary <int, BeanPoint_internal> v_dicoPoints = p_points.ToDictionary(c => c.p00_id, c => c); //VISU COORD int param_arrondi = 2; v_couleurObjet = Color.FromArgb(255, 0, 0, 255); List <int> v_idPointsOrdonnes = v_coordDansRef.OrderBy(c => c.Value[1]).Select(c => c.Key).ToList(); foreach (int v_id in v_idPointsOrdonnes) { v_label = "Pt: " + v_id + " => " + Math.Round(v_coordDansRef[v_id][0], param_arrondi) + " / " + Math.Round(v_coordDansRef[v_id][1], param_arrondi); FVisualisationServices.createVisualisationSpatialTraceServices().GetVisuPoint2D(v_dicoPoints[v_id], v_label, v_couleurObjet, 10); } FVisualisationServices.createVisualisationSpatialTraceServices().AfficheVisu(); //FIN VISU COORD }
private void btn_testCH_Click(object sender, EventArgs e) { List <BeanPoint_internal> v_pointConvexHull; v_pointConvexHull = FLabServices.createCalculMedium().GetConvexHull2D(_dataPointsTests); // string v_message = "ConvexHull calculé"; v_message += " (" + v_pointConvexHull.Count + " pts sur " + _dataPointsTests.Count + ")."; v_message += ". Affichez dans SpatialTrace ?"; if (MessageBox.Show(v_message, "Calcul convexHull", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } string v_label = ""; Color v_couleurBase = Color.FromArgb(255, 0, 255, 255); FServicesApplicatifs.createVisuSpatialTrace().GetVisuPoints2D(_dataPointsTests, v_label, v_couleurBase, -1); v_label = "CH"; FServicesApplicatifs.createVisuSpatialTrace().GetVisuPoints2D(v_pointConvexHull, v_label, 10); SpatialTrace.Enable(); IGeometry v_ligneCh; for (int v_indexPt = 0; v_indexPt < v_pointConvexHull.Count - 1; v_indexPt++) { v_ligneCh = FLabServices.createUtilitaires().GetGeometryLine(v_pointConvexHull[v_indexPt].p10_coord, v_pointConvexHull[v_indexPt + 1].p10_coord, 2154, true); SpatialTrace.TraceGeometry(v_ligneCh, "CH arc: " + v_indexPt, "CH arc: " + v_indexPt); } v_ligneCh = FLabServices.createUtilitaires().GetGeometryLine(v_pointConvexHull[v_pointConvexHull.Count - 1].p10_coord, v_pointConvexHull[0].p10_coord, 2154, true); SpatialTrace.TraceGeometry(v_ligneCh, "CH arc: " + (v_pointConvexHull.Count - 1), "CH arc: " + (v_pointConvexHull.Count - 1)); SpatialTrace.Disable(); FVisualisationServices.createVisualisationSpatialTraceServices().AfficheVisu(); // MessageBox.Show("Traitement terminé."); }