Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewer Index+ show wrong text when use text input in edge and face mode with connect more than 1 object #4705

Open
satabol opened this issue Oct 12, 2022 · 1 comment · May be fixed by #5000
Labels

Comments

@satabol
Copy link
Collaborator

satabol commented Oct 12, 2022

Viz->Viewer Index+ has a 'text' input. When I connect text in vertices mode, then all look good:

image
I use mode "Draw Object Index" and all objects Id are equal. Good.

But when I use that trick in edge mode and face mode then result is wrong:

Edge mode (objects id and text are wrong):
image

Face mode (objects id and text are wrong):
image

@satabol
Copy link
Collaborator Author

satabol commented Oct 12, 2022

I think something wrong here:

display_topology = lambda: None
display_topology.vert_data = []
display_topology.edge_data = []
display_topology.face_data = []
display_topology.text_data = fixed_text
concat_vert = display_topology.vert_data.append
concat_edge = display_topology.edge_data.append
concat_face = display_topology.face_data.append
for obj_index, final_verts in enumerate(geom.verts):
# can't display vert idx and text simultaneously - ...
if self.display_vert_index:
for idx, vpos in enumerate(final_verts):
chars = prefix_if_needed(obj_index, idx)
concat_vert((chars, vpos))
if self.display_edge_index and obj_index < len(geom.edges):
for edge_index, (idx1, idx2) in enumerate(geom.edges[obj_index]):
loc = final_verts[idx1].lerp(final_verts[idx2], 0.5)
chars = prefix_if_needed(obj_index, edge_index)
concat_edge((chars, loc))
if self.display_face_index and obj_index < len(geom.faces):
for face_index, f in enumerate(geom.faces[obj_index]):
poly_verts = [final_verts[idx] for idx in f]
median = calc_median(poly_verts)
chars = prefix_if_needed(obj_index, face_index)
concat_face((chars, median))
return display_topology

Result of function returned in display_topology.text_data but this property do not changed after

for obj_index, final_verts in enumerate(geom.verts):

IMHO before

return display_topology

need some code to change display_topology.text_data

satabol added a commit that referenced this issue Oct 23, 2022
update several control descriptions on nodes (not code).

some issues (update later):
Analyzers/Distance - #4705
Analyzers/Distance Line Line - #4706
Analyzers/Calculate Normals - cannot replay some examples (no input edge socket)
Analyzers/Circle Intersection - #4708
Analyzers/Insolation - later
Analyzers/Deformation - later
Analyzers/Select Mesh Elements - Skip mode "Normal Pointing Outside". Later
satabol added a commit that referenced this issue Oct 23, 2022
update several control descriptions on nodes (not code).

some issues (update later):
Analyzers/Distance - #4705
Analyzers/Distance Line Line - #4706
Analyzers/Calculate Normals - cannot replay some examples (no input edge socket)
Analyzers/Circle Intersection - #4708
Analyzers/Insolation - later
Analyzers/Deformation - later
Analyzers/Select Mesh Elements - Skip mode "Normal Pointing Outside". Later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants