Stl Color

Mar 21, 2013 at 11:09 AM
Hi,

Thankx for your library !!! So great.

I add a Property Color on StLReader and FileModelVisual3D to set the color of the stl imported File.

and do this on the code : this.Materials.Add(MaterialHelper.CreateMaterial(Brush));
where Brush is my property

Do you think you could add this feature on a next release ?

Thankz

Cedre
Coordinator
Apr 15, 2013 at 10:24 AM
Edited Apr 15, 2013 at 10:25 AM
I added a DefaultMaterial property, which should be more general than a color. I hope this is ok!
Apr 15, 2013 at 11:08 AM
Hi,

Perfect!


It will be include in the next release or is it in the source code now?


Thanks so much.
Apr 15, 2013 at 11:10 AM
Ok

i just see your commit of today!!


Thanks
May 23, 2013 at 9:25 AM
Hi thanks


It's ok fot stl reader but you not include the defaultMatertial Property to FileModelVisual3D


so we can't do this :
            <ht:FileModelVisual3D x:Name="Vehicle"  DefaultMaterial="{ht:Material Blue}" />


Could you add it in a next release please ?

Thanks

Cedre
Coordinator
Jun 7, 2013 at 9:39 AM
done! I also added DefaultMaterial properties to the .off, .obj and .lwo loaders.
Jun 7, 2013 at 9:57 AM
Perfect!!


Really Thanks
Jun 7, 2013 at 10:06 AM
I added SourceChanged on DependencyProperty DefaultMaterial for works with datatemplate3D
    /// <summary>
    /// The default material property.
    /// </summary>
    public static readonly DependencyProperty DefaultMaterialProperty =
        DependencyProperty.Register(
            "DefaultMaterial", typeof(Material), typeof(FileModelVisual3D), new PropertyMetadata(null, SourceChanged));