Is there a way to render a single part in wireframe rather than all the parts in the View?

I’m trying to display a part in the Hoops scene in wireframe (it’s a sphere and I would like to see the mesh’s lines from its UV parametrization) but don’t want to affect the other parts in the scene.

Thank you

1 Like

Hello @francois.sunatori

First off welcome, to the forum! We’re glad you’re here. :slight_smile:

To answer your question, currently it’s not possible to change the view for only one part. The wireframe if applied would affect the entire model. You can see this reflected in our docs here: Draw Modes — HOOPS Communicator 2023 SP2 U2 Documentation

Please let me know if you have any other questions.

Hi @francois.sunatori ,

You could apply a wireframe effect by getting the face count for a specific node then iterating through the faces to set their visibility to false:

hwv.model.getFaceCount(nodeid).then((faceCount) => {
        let i=0;
        while(i<faceCount) {

Here’s some sample code to demonstrate this:

Please let me know if you have additional questions or if I’ve misunderstood your question!

Hi again, I just wanted to follow up in case you, or another reader, is interested in viewing the wireframe of the underlying mesh (which can be useful for model formats like STL).

While not one of the Draw Modes currently provided in the HOOPS Communicator SDK, it is possible to create this effect by getting the mesh data from the model and inserting a new mesh with lines and no faces drawn. More info on meshes in Communicator can be found here: Meshes — HOOPS Communicator 2023 SP2 U2 Documentation

Sample code that demonstrates this can be found here:

1 Like