public void DataPoint(ref Point3d Point, Bentley.Interop.MicroStationDGN.View View) { Element column = null, foundation = null, foundation_rebars = null, column_longitudinal_rebars = null, column_stirrups = null; stirrupData = read_Data(); switch (stf.Type) { case TYPE.TYPE1: { StirrupData1 data = (StirrupData1)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.B, data.H, 1500, 1500, 1500, 400, 50, stf.Type, data.M, data.N); column_stirrups = StirrupUtil.create_column_stirrups(data.B, data.H, 1500, 400, stf.Type, data.M, data.N); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE2: { StirrupData2 data = (StirrupData2)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.B, data.H, 1500, 1500, 1500, 400, 50, stf.Type); column_stirrups = StirrupUtil.create_column_stirrups(data.B, data.H, 1500, 400, stf.Type); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE3: { StirrupData3 data = (StirrupData3)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.B, data.H, 1500, data.B1, data.H1, 1500, 1500, 400, 50, stf.Type); column_stirrups = StirrupUtil.create_column_stirrups(data.B, data.H, data.B1, data.H1, 1500, 400, stf.Type); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE4: { StirrupData4 data = (StirrupData4)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.B, data.H, 1500, 1500, 1500, 400, 50, stf.Type); column_stirrups = StirrupUtil.create_column_stirrups(data.B, data.H, 1500, 400, stf.Type); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE5: { StirrupData5 data = (StirrupData5)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.B, data.H, 1500, 1500, 1500, 400, 50, stf.Type, data.M, data.N); column_stirrups = StirrupUtil.create_column_stirrups(data.B, data.H, 1500, 400, stf.Type, data.M, data.N); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE6: { StirrupData6 data = (StirrupData6)stirrupData; column = RCUtil.create_column(data.D, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.D, 1500, 1500, 1500, 400, 50, stf.Type); column_stirrups = StirrupUtil.create_column_stirrups(data.D, 1500, 400, stf.Type); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } case TYPE.TYPE7: { StirrupData7 data = (StirrupData7)stirrupData; column = RCUtil.create_column(data.D, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); column_longitudinal_rebars = LongitudinalBarUtil.create_column_longitudinal_rebars(data.D, 1500, 1500, 1500, 400, 50, stf.Type); column_stirrups = StirrupUtil.create_column_stirrups(data.D, 1500, 400, stf.Type); foundation_rebars = FootingSlabBarUtil.create_foundation_rebars(1500, 1500, 400); break; } } TFPartRef tfpart_ref = TFPartUtil.create_tfpart_ref("Ceiling", "Metal"); TFPartUtil.add_part_to_element(ref column, tfpart_ref); TFPartUtil.add_part_to_element(ref foundation, tfpart_ref); TFPartUtil.add_part_to_element(ref column_longitudinal_rebars, tfpart_ref); TFPartUtil.add_part_to_element(ref column_stirrups, tfpart_ref); TFPartUtil.add_part_to_element(ref foundation_rebars, tfpart_ref); column.Move(ref Point); foundation.Move(ref Point); column_longitudinal_rebars.Move(ref Point); column_stirrups.Move(ref Point); foundation_rebars.Move(ref Point); List <Element> elements = new List <Element>(); elements.Add(column); elements.Add(foundation); elements.Add(column_longitudinal_rebars); elements.Add(column_stirrups); elements.Add(foundation_rebars); draw_Elements(elements.ToArray(), "diji"); }
public void Dynamics(ref Point3d Point, Bentley.Interop.MicroStationDGN.View View, MsdDrawingMode DrawMode) { Element column = null, foundation = null; stirrupData = read_Data(); switch (stf.Type) { case TYPE.TYPE1: { StirrupData1 data = (StirrupData1)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE2: { StirrupData2 data = (StirrupData2)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE3: { StirrupData3 data = (StirrupData3)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE4: { StirrupData4 data = (StirrupData4)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE5: { StirrupData5 data = (StirrupData5)stirrupData; column = RCUtil.create_column(data.B, data.H, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE6: { StirrupData6 data = (StirrupData6)stirrupData; column = RCUtil.create_column(data.D, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } case TYPE.TYPE7: { StirrupData7 data = (StirrupData7)stirrupData; column = RCUtil.create_column(data.D, 1500, 400); foundation = RCUtil.create_foundation(1500, 1500, 400); break; } } //动态移动的时候不显示配筋,只有点击的时候才画配筋 column.Move(ref Point); foundation.Move(ref Point); //必须redraw,否侧元素不显示 column.Redraw(DrawMode); foundation.Redraw(DrawMode); }