//Her tegner vi et wireframe private void DrawLines(WindowsForms canvas, Color color) { if (properties.displayLines) { foreach (var polyLine in polyLines) { //Loop through polyline for (int i = 0; i < polyLine.indexesInModel.Length - 1; i++) { //Draw line canvas.DrawLineAt(color, calc2DPoints[polyLine.indexesInModel[i]], calc2DPoints[polyLine.indexesInModel[i + 1]]); } } } if (properties.displayFaces) { foreach (var face in faces) { //Loop through polyline in face for (int i = 0; i < face.indexesInModel.Length - 1; i++) { //Draw line canvas.DrawLineAt(color, calc2DPoints[face.indexesInModel[i]], calc2DPoints[face.indexesInModel[i + 1]]); } //Draw last line canvas.DrawLineAt(color, calc2DPoints[face.indexesInModel[0]], calc2DPoints[face.indexesInModel[face.indexesInModel.Length - 1]]); } } }