05-19-2015, 03:47 PM
Now I see where was the problem:
You have changed the WireframeModel reference from the object defined in XAML to another object created in code (mGeometry). This did not change the WireframeModel defined in XAML - it still remained empty.
To fix your code you have two options:
1)
Set OriginalModel property on WireframeVisual3D to your new Model3d:
Note that the content of WireframeVisual3D that is defined in XAML is also set to OriginalModel property.
2)
Update the WireframeModel and call RecreateWireframeModel method:
It is also possible to use the Ab3d.Models.WireframeFactory.CreateWireframe method and add that directly to your scene.
Though I would recommend using the WireframeVisual3D because it gives you more options on how to show wireframe.
You have changed the WireframeModel reference from the object defined in XAML to another object created in code (mGeometry). This did not change the WireframeModel defined in XAML - it still remained empty.
To fix your code you have two options:
1)
Set OriginalModel property on WireframeVisual3D to your new Model3d:
Code:
WireframeVisual.OriginalModel = mGeometry;Note that the content of WireframeVisual3D that is defined in XAML is also set to OriginalModel property.
2)
Update the WireframeModel and call RecreateWireframeModel method:
Code:
WireframeModel.Geometry = mGeometry.Geometry;
WireframeModel.Material = mGeometry.Material;
WireframeVisual3D.RecreateWireframeModel();It is also possible to use the Ab3d.Models.WireframeFactory.CreateWireframe method and add that directly to your scene.
Though I would recommend using the WireframeVisual3D because it gives you more options on how to show wireframe.
Andrej Benedik

