Esempio n. 1
0
        public MeshManager(SlabProperties properties, Polyline ouline)
        {
            _properties        = properties;
            _outline           = ouline;
            _globalOrientation = -ToRadians(90 - _properties.Algorythim.GlobalOrientationAngle);

            if (!properties.Algorythim.OnlyCimbrament)
            {
                CastList = Task.Factory.StartNew(() => InitializeCastMesh());
            }

            if (properties.Algorythim.SelectedStartLp != null)
            {
                StartLpList = Task.Factory.StartNew(() => InitializeStartLpMesh());
            }

            LpList    = Task.Factory.StartNew(() => InitializeLpMesh());
            EndLpList = Task.Factory.StartNew(() => InitializeEndLpMesh());

            if (properties.Algorythim.Options.UseLds)
            {
                LdsList = Task.Factory.StartNew(() => InitializeLdsMesh());
            }

            HeadList = Task.Factory.StartNew(() => InitializeHeadMesh());
        }
Esempio n. 2
0
        public static void FindBetterLpCombination(SlabProperties properties, Part[] firstList, Part[] secondList, double distance, out Part firstPart, out Part secondPart)
        {
            firstPart  = null;
            secondPart = null;
            var distanceToInterference = distance - properties.Algorythim.Options.OutlineDistance;
            var delta = double.MaxValue;

            foreach (var part1 in firstList)
            {
                var tmpDelta = distanceToInterference - part1.Width;
                if (tmpDelta >= 0 && tmpDelta < delta)
                {
                    delta     = tmpDelta;
                    firstPart = part1;
                }

                foreach (var part2 in secondList)
                {
                    tmpDelta = distanceToInterference - (part1.Width + properties.Algorythim.Options.DistanceBetweenLp + part2.Width);
                    if (tmpDelta >= 0 && tmpDelta < delta)
                    {
                        delta      = tmpDelta;
                        firstPart  = part1;
                        secondPart = part2;
                    }
                }
            }
        }
Esempio n. 3
0
        private void FindBetterLpCombination(SlabProperties properties, double dist, out Part firstLp, out Part secondLp)
        {
            var secondUsageType = properties.Algorythim.Options.UseEndLp ? UsageType.EndLp : UsageType.Lp;
            var firstList       = _partRepository.GetByModulaton(properties.Algorythim.SelectedModulation).WhereType(UsageType.Lp);
            var secondList      = _partRepository.GetByModulaton(properties.Algorythim.SelectedModulation).WhereType(secondUsageType);

            SlabAlgorythim.FindBetterLpCombination(properties, firstList.ToArray(), secondList.ToArray(), dist, out firstLp, out secondLp);
        }
Esempio n. 4
0
 public SlabBuilder(IPartRepository repo, SlabProperties properties)
 {
     _partRepository = repo;
     _properties     = properties;
     _acad           = new AutoCadManager();
     _environment    = new AcEnvironment(properties.Parts.SelectedOutline)
     {
         GirdersLayer  = properties.Parts.SelectedGirdersLayer,
         CollumnsLayer = properties.Parts.SelectedColumnsLayer,
         EmptiesLayer  = properties.Parts.SelectedEmptiesLayer,
     };
 }
Esempio n. 5
0
 public SlabAlgorythim(SlabProperties prop)
 {
     Properties = prop;
 }