How do I disable the edges drawn on a CUBE_LIST marker?

asked 2021-09-24 10:53:42 -0500

updated 2022-03-25 17:56:45 -0500

lucasw gravatar image

I'm making wireframe boxes, and I'd like to move from a bunch of Marker::CUBE to a few Marker::CUBE_LIST. The problem I've got, though, is the appearance - it looks like the CUBE_LIST markers have a border drawn on them that stretches with the marker scale. I do not want this; I want it to look like a CUBE, but I cannot find any documentation anywhere that this is an option I can disable. The best I could find is this bug from 9 years ago where hershwg said they were leaving the borders on, but I can't find even a mention of this anywhere else online.

This is how it looks when I do it as a Marker::CUBE_LIST. Note the "cigarette ash" ends, where the border is stretched along the long axis of the cube, and then also because of the borders it's very obvious that the cubes are overlapping.

This is how it looks when I do it as a Marker::CUBE. Much cleaner appearance and it's not apparent that the corners overlap.

Even if I stopped short and "mitered" the corners so they touched but didn't overlap, the borders will make them look as individual members instead of as one unified box wireframe, and even still the stretched borders just look bad.

edit retag flag offensive close merge delete


Hi @saundecp. Just curious can't you use lines instead to create the cubes and play with the thickness?

osilva gravatar image osilva  ( 2021-09-27 08:48:57 -0500 )edit

@osilva - Several reasons! (1) the lines show as billboards, meaning they're always facing the camera, so they don't render as cleanly as the cubes do, (2) the rendering is messed up for us (having the same issue mentioned here) and (3) because the lines are always facing the camera it's not really possible to calculate the amount of "overlap" required to get clean corners, so the corners always look a little broken. In short, the LINE_LIST option does look acceptable, but it does not look good in my honest opinion. At least, not for making these kinds of wireframe shapes.

RoboticsChuck gravatar image RoboticsChuck  ( 2021-09-27 09:16:22 -0500 )edit

I reviewed the documentation and I couldn't find what else can you do with the Cubes. One suggestion is to look at the source code and modify for your application if you can't find other ways to do it:

osilva gravatar image osilva  ( 2021-09-27 09:23:29 -0500 )edit