nmwsharp / nmwsharp/polyscope

How to register a structure in nested show()

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
242
Avg merge
11m
Merged PRs (30d)
1

Description

Hey there,

as I can read, there is the possibility to do a nested show. That means one can call the ps::show() function a second time. Now I don't seem to understand what I need to do in order to register strutures in the second show. As an example I currently have the following code

`

 def callback():
   

    if psim.Button("Show"):
    
      ps.show()
      ms = pymeshlab.MeshSet()
      ms.load_new_mesh(os.getcwd()+"/Experiment-78/Experiment-78+curvature.ply")
      vertices = ms.current_mesh().vertex_matrix()
      faces = ms.current_mesh().face_matrix()
      ps.set_invoke_user_callback_for_nested_show(True)
      ps.register_surface_mesh("first mesh", vertices, faces)

(This example is in python but the structure is sufficiently similar). Currently when I press the button the surface mesh is registered in the first show. What do I need to do in order to get it in the second show?

(I am happy about a solution in either C++ or python)

I hope you get what I mean

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the ps::show(), ps.set_invoke_user_callback_for_nested_show(), and ps.register_surface_mesh() entry points using the provided callback example. Confirm the required registration sequence for a nested show, then verify that pressing “Show” displays the surface mesh in the second show.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api, computer-graphics
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.