Example #1
0
        private static MeshGeometry3D GetMeshGeometry(double radius, List <Point3D> points)
        {
            var builder = new HelixToolkit.Wpf.MeshBuilder();

            foreach (var p in points)
            {
                builder.AddSphere(p, radius);
            }

            return(builder.ToMesh());
        }
Example #2
0
        public static PanelHolderViewModel ToViewModel(this PanelHolder m, MachineElementViewModel parent = null)
        {
            var builder = new HelixToolkit.Wpf.MeshBuilder();

            builder.AddSphere(m.Position.ToPoint3D(), 10.0);

            //return new PanelHolderViewModel()
            return(new WorkablePanelViewModel()
            {
                PanelHolderId = m.Id,
                Name = m.Name,
                Corner = m.Corner,
                Position = m.Position.ToPoint3D(),
                Parent = parent,
                MeshGeometry = builder.ToMesh(),
                Material = HelixToolkit.Wpf.Materials.Blue
            });
        }