I've created my 3D Viewer using apis of v7 Forge Autodesk Viewer. I am tying to show the edges of models but with below codes the edges is not showing up :
viewer.loadExtension('Autodesk.NPR');
var ext = await viewer.getExtension('Autodesk.NPR');
ext.setParameter("edges", true);
When I use : ext.setParameter("style", "cel") it works and even works for style: edging. I don't know what I am missing. And when I work with same model this extension works for 'style' but when I refresh the page the 'ext' object becomes null.
I tried Autodesk.NPR for v7 verison but didn't worked.
The
edgesparameter can't be used on its own, in other words, the edges can only be displayed as part of one of the NPR styles likeedging,cel,graphite, orpencil.You could add the following piece of code to your application (right after the viewer itself is initialized) to make sure that the NPR style is always activated automatically: