public static CustomAttributeEditorBrace CreateCustomAttributEditorBrace(Brace model)
 {
     var brace = new CustomAttributeEditorBrace();
     brace.Type = "Brace";
     //TODO: assign the model data to the editor
     brace.Id = model.Id;
     brace.Location = model.Location;
     return brace;
 }
        public BraceVisual3D(Material material, 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 + "_brace" + p.Children.Count.ToString("00") + "." + p.Parent.Parent.patient.Id; ;

                if (model == null) model = new Brace();
                model.Id = Id;
                model.Location = (IsOuterBrace ? Smile.OUTERBRACE : Smile.INNERBRACE);

                //sample(material);
                //BindingOperations.SetBinding(this, TransformProperty, new Binding("TargetTransform") { Source = this });
                //BindingOperations.SetBinding(this.Manipulator,CombinedManipulator.TargetTransformProperty,new Binding("TargetTransform") { Source = this });

            }
        }