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

Line/Point inside solid not always visible in ghosted mode #187

Open
chenkasirer opened this issue Jul 4, 2024 · 0 comments
Open

Line/Point inside solid not always visible in ghosted mode #187

chenkasirer opened this issue Jul 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chenkasirer
Copy link
Member

chenkasirer commented Jul 4, 2024

Line/Point inside solid not visible in ghosted mode unless viewed from specific angles.

viewer_line

To Reproduce

Steps to reproduce the behavior:

from compas.geometry import Line
from compas.geometry import Point
from compas.geometry import Box
from compas_viewer.viewer import Viewer


def create_viewer():
    # draw inflated centerlines
    viewer = Viewer()
    viewer.renderer.camera.far = 1000000.0
    viewer.renderer.camera.position = [1000.0, 1000.0, 1000.0]
    viewer.renderer.camera.pandelta = 5.0
    viewer.renderer.rendermode = "ghosted"
    viewer.config.renderer.gridsize = (10000, 10000, 10000, 10000)  # size, num, size, num
    return viewer

viewer = create_viewer()
box = Box.from_width_height_depth(1000, 100, 100)
origin = Point(0, 0, 0)
line = Line([0, 0, 0], [-1000, 0, 0])
viewer.scene.add(box)
viewer.scene.add(origin)
viewer.scene.add(line, show_lines=True)

viewer.show()

Expected behavior

To see the entire length of the line through the solid.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python version 3.11.8
@tomvanmele tomvanmele added the enhancement New feature or request label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants