private void button2_Click_1(object sender, EventArgs e) { if (cadStuff != null && cadStuff.cadConnection() == true) { List <MWCadNameSpace.VTex> vertices = cadStuff.getPlineEnityCoords(); if (vertices.Count > 0) { MWCadNameSpace.SurveyBoundary boundary = new MWCadNameSpace.SurveyBoundary(vertices); MWCadNameSpace.pnt3d pickedPnt = cadStuff.getPickPoint(vertices[0].getPnt3d()); boundary.translateSegmentList(pickedPnt); //cadStuff.drawPline(boundary.getTranslatedCorrectedSegmentVertices()); Autodesk.AutoCAD.Interop.Common.AcadLWPolyline aPline = cadStuff.drawPline(boundary.getTranslatedCorrectedSegmentVertices()); cadStuff.setPlineBuldges(aPline, boundary.getTranslatedCorrectedSegmentVertices()); Grid1.Rows.Clear(); populateGrid1(boundary); Grid2.Rows.Clear(); populateGrid2(boundary); Grid3.Rows.Clear(); populateGrid3(boundary); } } else { MessageBox.Show("Connection Error"); } }
private void button5_Click(object sender, EventArgs e) { MWCadNameSpace.pnt3d origin = new MWCadNameSpace.pnt3d(); MWCadNameSpace.pnt3d pickPnt = null; try { pickPnt = cadStuff.getPickPoint(origin); } catch { MessageBox.Show("Cad Connection Error"); return; } List <MWCadNameSpace.VTex> vertices = new List <MWCadNameSpace.VTex>(); MWCadNameSpace.pnt3d lastEntPnt = null; for (int i = 0; i < deconstructedCallList.Count; ++i) { MWCadNameSpace.pnt3d startPnt = pickPnt; if (i > 0) { startPnt = lastEntPnt; } MWCadNameSpace.Segment aSegment = deconstructedCallList[i].extractAsSegment(startPnt); if (deconstructedCallList[i].getCurveLeftRight().Value == "Right" || deconstructedCallList[i].getCurveLeftRight().Value == "Left") { aSegment.setBuldgeFromRadius(deconstructedCallList[i].getRadius(), deconstructedCallList[i].getCurveLeftRight()); } vertices.Add(aSegment.getGStart()); lastEntPnt = aSegment.getGEnd().getPnt3d(); if (i == deconstructedCallList.Count - 1) { vertices.Add(aSegment.getGEnd()); } } Autodesk.AutoCAD.Interop.Common.AcadLWPolyline thePline = cadStuff.drawPline(vertices); cadStuff.setPlineBuldges(thePline, vertices); }