示例#1
0
        public void CalcPassList()
        {
            if (TechProcess.Tool.Thickness == null)
            {
                Acad.Alert("Не указана толщина инструмента");
                return;
            }
            var toolThickness = TechProcess.Tool.Thickness.Value;

            if (MaxCrestWidth == 0 || MaxCrestWidth > toolThickness)
            {
                MaxCrestWidth = toolThickness;
            }
            var periodAll   = BandWidth - toolThickness;
            var periodWidth = toolThickness + MaxCrestWidth;
            var count       = Math.Ceiling(periodAll / periodWidth);

            periodWidth = periodAll / count;
            var x     = (toolThickness - (periodWidth - toolThickness)) / 2;
            var shift = TechProcess.MachineType == MachineType.ScemaLogic ^ ProcessingAngle == 45? toolThickness : 0;

            PassList.Clear();
            PassList.Add(new Pass(shift, CuttingType.Roughing));
            for (int i = 1; i <= count; i++)
            {
                PassList.Add(new Pass(i * periodWidth + shift, CuttingType.Roughing));
                PassList.Add(new Pass(i * periodWidth + x + shift - toolThickness, CuttingType.Finishing));
            }
        }
示例#2
0
 /// <summary>
 /// Hybrid order type pass method
 /// </summary>
 /// <param name="Node">Leaf to start pass from</param>
 /// <param name="PassList">
 /// <para>Final list of tree leafs</para>
 /// <para>Should be null on method call</para>
 /// </param>
 /// <returns>List of tree leafs</returns>
 private List <BinaryTreeNode <T> > HybridOrderPass(BinaryTreeNode <T> Node, List <BinaryTreeNode <T> > PassList = null)
 {
     if (PassList == null)
     {
         PassList = new List <BinaryTreeNode <T> >();
     }
     if (Node != null)
     {
         HybridOrderPass(Node.Left, PassList);
         PassList.Add(Node);
         HybridOrderPass(Node.Right, PassList);
     }
     return(PassList);
 }
        /// <summary>
        ///		Clears all the internal lists.
        /// </summary>
        public void Clear()
        {
            lock (Pass.PassLock)
            {
                PassList graveyardList = Pass.GraveyardList;

                // Delete queue groups which are using passes which are to be
                // deleted, we won't need these any more and they clutter up
                // the list and can cause problems with future clones
                for (int i = 0; i < graveyardList.Count; i++)
                {
                    RemoveSolidPassEntry((Pass)graveyardList[i]);
                }

                // Now remove any dirty passes, these will have their hashes recalculated
                // by the parent queue after all groups have been processed
                // If we don't do this, the std::map will become inconsistent for new insterts
                PassList dirtyList = Pass.DirtyList;

                // Delete queue groups which are using passes which are to be
                // deleted, we won't need these any more and they clutter up
                // the list and can cause problems with future clones
                for (int i = 0; i < dirtyList.Count; i++)
                {
                    RemoveSolidPassEntry((Pass)dirtyList[i]);
                }

                // We do NOT clear the graveyard or the dirty list here, because
                // it needs to be acted on for all groups, the parent queue takes
                // care of this afterwards

                // We do not clear the unchanged solid pass maps, only the contents of each list
                // This is because we assume passes are reused a lot and it saves resorting
                ClearSolidPassMap(solidPasses);
                ClearSolidPassMap(solidPassesDiffuseSpecular);
                ClearSolidPassMap(solidPassesDecal);
                ClearSolidPassMap(solidPassesNoShadow);

                // Always empty the transparents list
                transparentPasses.Clear();
            }
        }
示例#4
0
        public void Post([FromBody] Passagier passagier)
        {
            PassList pass = new PassList();

            pass.AddPassagier(passagier);
        }
示例#5
0
        public Passagier GetByName(string vorname, string nachname)
        {
            PassList pass = new PassList();

            return(pass.GetPassagier(vorname, nachname));
        }
示例#6
0
        public List <Passagier> GetList()
        {
            PassList pass = new PassList();

            return(pass.GetPassagierliste());
        }
示例#7
0
        public Passagier GetById(int id)
        {
            PassList pass = new PassList();

            return(pass.GetPassagierById(id));
        }
示例#8
0
        public override void BuildProcessing(ICommandGenerator generator)
        {
            if (PassList?.Any() != true)
            {
                CalcPassList();
            }
            var tactileTechProcess = (TactileTechProcess)TechProcess;
            var thickness          = TechProcess.Tool.Thickness.Value;
            var contour            = tactileTechProcess.GetContour();
            var contourPoints      = contour.GetPolyPoints().ToArray();
            var basePoint          = ProcessingAngle == 45 ? contourPoints[3] : contourPoints[0];
            var ray = new Ray
            {
                BasePoint = basePoint,
                UnitDir   = Vector3d.XAxis.RotateBy(ProcessingAngle.ToRad(), Vector3d.ZAxis)
            };
            var passDir = ray.UnitDir.GetPerpendicularVector();

            if (ProcessingAngle >= 90)
            {
                passDir = passDir.Negate();
            }
            double offset = BandStart - BandSpacing - BandWidth;
            var    size   = (contourPoints[ProcessingAngle == 0 ? 1 : ProcessingAngle == 90 ? 3 : 2] - contourPoints[0]).Length;

            if (IsEdgeProcessing)
            {
                if (ProcessingAngle == 45 ^ TechProcess.MachineType == MachineType.Donatoni)
                {
                    Cutting(0.8 * thickness, CuttingFeed, -thickness);
                }

                if (offset > 0)
                {
                    var count = (int)Math.Ceiling(offset / (0.8 * thickness));
                    Algorithms.Range(-0.8 * thickness * count, -0.1, 0.8 * thickness).ForEach(p => Cutting(offset + PassList[0].Pos + p, CuttingFeed));
                }
            }
            do
            {
                foreach (var pass in PassList)
                {
                    Cutting(offset + pass.Pos, pass.CuttingType == CuttingType.Roughing ? CuttingFeed : FeedFinishing);
                }

                offset += BandWidth + BandSpacing;
            }while (offset < size);

            if (IsEdgeProcessing)
            {
                if (offset - BandSpacing < size)
                {
                    Algorithms.Range(offset - BandSpacing, size, 0.8 * thickness).ForEach(p => Cutting(p, CuttingFeed));
                }

                if (ProcessingAngle == 45 ^ TechProcess.MachineType == MachineType.ScemaLogic)
                {
                    Cutting(size - 0.8 * thickness, CuttingFeed, thickness);
                }
            }
            ray.Dispose();
            contour.Dispose();

            void Cutting(double pos, int feed, double s = 0)
            {
                if (pos < 0 || pos > size)
                {
                    return;
                }
                ray.BasePoint = basePoint + passDir * pos;
                var points = new Point3dCollection();

                ray.IntersectWith(contour, Intersect.ExtendThis, new Plane(), points, IntPtr.Zero, IntPtr.Zero);
                if (points.Count == 2)
                {
                    var vector     = (points[1] - points[0]).GetNormal() * tactileTechProcess.TactileTechProcessParams.Departure;
                    var startPoint = points[0] + passDir * s - vector - Vector3d.ZAxis * Depth;
                    var endPoint   = points[1] + passDir * s + vector - Vector3d.ZAxis * Depth;
                    if (generator.IsUpperTool)
                    {
                        generator.Move(startPoint.X, startPoint.Y, angleC: BuilderUtils.CalcToolAngle(ProcessingAngle.ToRad()));
                    }
                    generator.Cutting(startPoint, endPoint, feed, tactileTechProcess.TactileTechProcessParams.TransitionFeed);
                }
            }
        }
示例#9
0
 /// <summary>
 /// Сброс фокуса с кнопок на список паролей
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Drop_Focus(object sender, EventArgs e)
 {
     PassList.Focus();
 }