Wireframe Model
#5
(05-19-2015, 03:47 PM)abenedik Wrote: 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:

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.

I've used CreateWireframe and added it to scene, but like you say I don't have as much control over options so might change it to WireframeVisual instead.

Thanks for help!
  


Messages In This Thread
Wireframe Model - by ZENUAV - 05-18-2015, 09:04 PM
RE: Wireframe Model - by abenedik - 05-18-2015, 10:07 PM
RE: Wireframe Model - by ZENUAV - 05-18-2015, 10:26 PM
RE: Wireframe Model - by abenedik - 05-19-2015, 03:47 PM
RE: Wireframe Model - by ZENUAV - 05-20-2015, 11:21 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)