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

Fix/grid obj #142

Closed
wants to merge 0 commits into from
Closed

Fix/grid obj #142

wants to merge 0 commits into from

Conversation

PingHsunTsai
Copy link
Collaborator

@PingHsunTsai PingHsunTsai commented May 14, 2024

#149 #150

GridObject restructure?

  • setting GridObject in Viewer()

Comment on lines 37 to 38
self.grid: GridObject = self.viewer.scene.add(Frame.worldXY(), framesize=grid_size, show_frame=True, is_selected=False, is_locked=True, is_visible=True)
self.grid.init()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the grid is still added as an object in the scene. this should not be the case. the grid is part of the view itself...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomvanmele do you mean sth like VIewer(show_grid=True)?

Comment on lines 26 to 35
def set_window_unit(self) -> None:
if self.viewer.config.window.unit == "m":
grid_size = (10000, 10, 10000, 10)
elif self.viewer.config.window.unit == "cm":
grid_size = (100, 10, 100, 10)
elif self.viewer.config.window.unit == "mm":
grid_size = (10, 10, 10, 10)
else:
print("Invalid unit")
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would prefer to deal wit units in a separate PR because it should be related to compas.tolerance

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I will just focus on resole gridobject here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants