Exemplo n.º 1
0
Arquivo: Eco.cs Projeto: tsvilans/tas
        public override bool Evaluate()
        {
            Glulam g = GlulamParam.Value as Glulam;

            bool is_ok_x = false, is_ok_y = false;

            Glulam gdup = g.Duplicate();

            gdup.Data.LamHeight = (double)LHParam.Value;
            gdup.Data.LamWidth  = (double)LWParam.Value;

            bool res = gdup.InKLimitsComponent(out is_ok_x, out is_ok_y);

            if (res)
            {
                return(res);
            }
            else
            {
                if (!LHParam.Locked && !LWParam.Locked)
                {
                    //GlulamData gdata = GlulamData.FromCurveLimits(g.Centreline, g.GetAllPlanes());
                    GlulamData gdata = GlulamData.Default;
                    LHParam.Value = gdata.LamHeight;
                    LWParam.Value = gdata.LamWidth;
                    return(true);
                }
                else
                {
                    // TODO: Propose new relaxed curve
                    return(false);
                }
            }
        }
Exemplo n.º 2
0
 public void SetGlulam(Glulam glulam)
 {
     g = glulam.Duplicate();
 }