/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { SpiralPart part1 = new SpiralPart(); Position pos; PlatformSpecs spcs = new PlatformSpecs(); double angle = 0; DA.GetData(0, ref part1); DA.GetData(1, ref angle); //获得前一个部件的属性,然后分配给这个部件 pos = part1.EndPst; var partDim = part1.SpiralDimension; spcs.InnerR = partDim.InnerR; spcs.Width = partDim.Width; spcs.RotateAngle = angle; spcs.Direction = partDim.Direction; PlatFormPart platform = new PlatFormPart(pos, spcs); DA.SetData(0, platform); DA.SetData(1, platform.EndPst); }
/// <summary> /// 平台端构造函数,主要使用起点参数和平台规格参数 /// </summary> /// <param name="strPst">起点参数,主要包含起点和角度</param> /// <param name="platFormSpecs">平台规格参数,主要包含内半径、宽度、旋转角度</param> public PlatFormPart(Position strPst, PlatformSpecs platFormSpecs) : base(strPst, platFormSpecs) { SetEndPst(); }
protected StairBase(Position strPst, PlatformSpecs platDim) { StartPst = strPst; PlatformDimesion = platDim; }