public TeethRootVisual3D(Color color, TeethVisual3D p)
        {
            if (p != null)
            {
                this.parent = p;
                gc = this.parent.gc;
                tc = this.parent.tc;
                bc = this.parent.bc;
                wc = this.parent.wc;

                Id = p.Id + "_rootth" + tc.Children.Count.ToString("00") + "." + p.Parent.Parent.patient.Id;
                
                if (model == null) model = new Teeth();
                model.Id = Id;
                model.Length = 0.0;

                sample(color);

                //Adding Teeth Label
                //TextVisual3D text = new TextVisual3D();
                //text.Text = Id.ToString();
                //this.Children.Add(text);
                
                //showHideBoundingBox();
            }

        }
        public static CustomAttributeEditorTeeth CreateCustomAttributEditorTeeth(Teeth model)
        {
            var teeth = new CustomAttributeEditorTeeth();
            teeth.Type = "Teeth";
            //TODO: assign the model data to the editor
            teeth.Id = model.Id;

            String tn = model.Id;
            Match mt = Regex.Match(tn, @"teeth\d\d");
            if (mt.Value == "") { mt = Regex.Match(tn, @"teeth\d"); tn = mt.Value.Substring("teeth".Length, 1); }
            else { tn = mt.Value.Substring("teeth".Length, 2); }
            //tn = tn.Substring("teeth".Length, 2);
            int itn = 0;
            int.TryParse(tn, out itn);
            teeth.TeethNumber = itn;

            teeth.Length = model.Length;

            return teeth;
        }
예제 #3
0
        public TeethVisual3D(Color color, GumVisual3D p)
        {
            if (p != null)
            {
                this.parent = p;
                gc = this.parent.gc;
                tc = this.parent.tc;
                bc = this.parent.bc;
                wc = this.parent.wc;

                Id = p.Id + "_teeth" + tc.Children.Count.ToString("00") + "." + p.Parent.patient.Id;
                
                if (model == null) model = new Teeth();
                model.Id = Id;
                model.Length = 0.0;

                sample(color);

                //addTeethRoot();
                //showHideBoundingBox();
            }

        }