/// <summary> /// Creates and draws a plane that is defined with the given parameters. /// </summary> /// <param name="document">The active document</param> /// <param name="top_left">The top-left vertex coordinates of the plane</param> /// <param name="top_right">The top-right vertex coordinates of the plane</param> /// <param name="bottom_left">The bottom-left vertex coordinates of the plane</param> /// <param name="bottom_right">The bottom-right vertex coordinates of the plane</param> public void DrawPlane(Document document, XYZ top_left, XYZ top_right, XYZ bottom_left, XYZ bottom_right) { string plane_name = "Plane" + m_direct_plane_instance_count++; DirectPlane plane = new DirectPlane(document, plane_name, top_left, top_right, bottom_left, bottom_right, S_PLANE_COLOR, 50); m_direct_shape_list.Add(plane); }
private void Write(DirectPlane dp) { string content = $"{dp.Name}\n" + $" .lower-left\n" + $" .X = {dp.BottomLeft.X.ToString("##0.####")}\n" + $" .Y = {dp.BottomLeft.Y.ToString("##0.####")}\n" + $" .Z = {dp.BottomLeft.Z.ToString("##0.####")}\n" + $" .lower-right\n" + $" .X = {dp.BottomRight.X.ToString("##0.####")}\n" + $" .Y = {dp.BottomRight.Y.ToString("##0.####")}\n" + $" .Z = {dp.BottomRight.Z.ToString("##0.####")}\n" + $" .upper-left\n" + $" .X = {dp.TopLeft.X.ToString("##0.####")}\n" + $" .Y = {dp.TopLeft.Y.ToString("##0.####")}\n" + $" .Z = {dp.TopLeft.Z.ToString("##0.####")}\n" + $" .upper-right\n" + $" .X = {dp.TopRight.X.ToString("##0.####")}\n" + $" .Y = {dp.TopRight.Y.ToString("##0.####")}\n" + $" .Z = {dp.TopRight.Z.ToString("##0.####")}\n" + $" .normal\n" + $" .X = {dp.Normal.X.ToString( "##0.####" )}\n" + $" .Y = {dp.Normal.Y.ToString( "##0.####" )}\n" + $" .Z = {dp.Normal.Z.ToString( "##0.####" )}\n" + $" .area = {XYZUnitConversionData.FormatArea(dp.Area, FindSurfaceRevitPlugin.MeasurementUnit, "##0.####")}\n\n"; this.richTextBoxInspectResult.AppendText(content); }