Ejemplo n.º 1
0
        public string CopyDisplaying()
        {
            Pat.BeginModifications();
            var ss     = Pat.StructureSets.First(e => e.Id == SSId);
            var d_copy = ss.AddStructure("CONTROL", Displaying.Id + "cp");

            d_copy.SegmentVolume = ss.Structures.First(e => e.Id == Displaying.Id);
            Sts.Add(new RepStructure(d_copy.Id, d_copy.Color, Helpers.SolveMeshReference(d_copy.MeshGeometry)));
            Logger += $"Copied {d_copy.Id} with success";
            return(d_copy.Id);
        }
Ejemplo n.º 2
0
        public string MoveDisplaying(double x, double y, double z)
        {
            Pat.BeginModifications();
            var       mmchange = new VVector(x, y, z);
            var       ss       = Pat.StructureSets.First(e => e.Id == SSId);
            var       wantMove = ss.Structures.First(e => e.Id == Displaying.Id);
            Structure dCopy    = null;

            if (ss.Structures.Any(e => e.Id == Displaying.Id + "mv"))
            {
                dCopy = ss.Structures.Single(e => e.Id == Displaying.Id + "mv");
            }
            else
            {
                dCopy = ss.AddStructure("CONTROL", Displaying.Id + "mv");
            }
            dCopy.SegmentVolume = new SegShift(mmchange, ss, wantMove).MoveStructure();
            Logger += "Moved with success";
            Sts.Add(new RepStructure(dCopy.Id, dCopy.Color, Helpers.SolveMeshReference(dCopy.MeshGeometry)));
            return(dCopy.Id);
        }