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

how to change default left-right view in replay mode. #98

Open
jbernalr opened this issue Sep 1, 2023 · 2 comments
Open

how to change default left-right view in replay mode. #98

jbernalr opened this issue Sep 1, 2023 · 2 comments

Comments

@jbernalr
Copy link

jbernalr commented Sep 1, 2023

Im enjoying Jupyter-cadquery a lot, in particular I like the replay mode, inlined in the Jupyter notebook.
when im not in a large display, I would like to change the default layout of the window showing the multi select box and the figure itself. Not left-right, but first showing the replay list then the figure.
I tried changing the "anchor" parameter of show. This seems to have only an effect using the separate cadquery
im sure im missing obvious. could you point me please to it?

below a minimal example

@jbernalr
Copy link
Author

jbernalr commented Sep 1, 2023

import cadquery as cq
from jupyter_cadquery import show, set_defaults, open_viewer
from jupyter_cadquery.replay import enable_replay, disable_replay, reset_replay, get_context, replay, Replay, _CTX
from jupyter_cadquery.cad_objects import to_assembly


set_defaults(
    cad_width=640, 
    height=480, 
)
l = 100.0  # Length of the block (red x axis)
m = 100.0  # Height of the block (green y axis)
n = 100.0  # Thickness of the block (blue z axis)


# base cube
result = cq.Workplane("XY").box(l, m, n)

use_replay = True

if use_replay:
    enable_replay(False, False)
    reset_replay()
    show_object = replay
else:
    disable_replay()
    show_object = show(
        box,
        viewer="CadQuery",
        anchor="split-bottom",
        cad_width=340,
        tree_width=150,
        height=480,
        theme="light",
        pinning=False
    )

show_object(result)
Screenshot 2023-09-01 at 10 28 54

@bernhard-42
Copy link
Owner

This is not supported.
Is there a reason why you do not use the sidebar?

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

No branches or pull requests

2 participants