question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello, I’ve tried to resize the 3D view in your new viewer that you presented here #42 , but I don’t know how to do it. I tried to change the size width like that : show(shapes, cad_width = 1000) But it doesn’t do anything, I’ve also tried it with regular jupyter-cadquery and it doesn’t do anything either. Am I doing it wrong ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
bernhard-42commented, May 13, 2021

@Jojain There is a new version available, see https://github.com/bernhard-42/jupyter-cadquery/issues/42#issue-877159979

Notable features / fixes:

  • jcv.cmd has now the logic to create a juypter kernelspec jcv which is expected by the viewer. It now should work under windows.
  • The installation of pywin32 is mandatory on windows. It didn’t work with pip, however, conda install pywin32 solves the issue
  • The parameters cad_width and height of the show function now resize the cad view
  • jcv.cmd comes with parameters for cad_width (-w) and height (-h). Note, if you add specific width and height, you need to set_defaults in your python code to the same values, since the client defaults will always win.
  • There is an initial dark mode. Need to tweak the CSS for some elements (e.g. scroll bars a black on dark grey), but it already works: jcv -d
  • show now takes more than one object
  • show_object now shows all objects incrementally
  • Jupyter-CadQuery viewer now has a logo 😃

I should have added quite some of the stuff from your feedback. Maybe you can give it a try whether it now works better?

If it does, I will soon make a release candidate out it to get out of the “pip install from git” woods …

0reactions
Jojaincommented, May 17, 2021

I tried it and it’s all good, resizing from command line or overriding the settings with the show function works !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resize a custom view programmatically? - Stack Overflow
For what it's worth, let's say you wanted to resize the view in device independent ... View view = inflater.inflate(R.layout.active_slide, this); view.
Read more >
Using SwiftUI's frame modifier to resize and align views
SwiftUI's built-in frame modifier can both be used to assign a static width or height to a given view, or to apply “constraints-like”...
Read more >
Window: resize event - Web APIs | MDN
The resize event fires when the document view (window) has been resized. This event is not cancelable and does not bubble.
Read more >
resize of ui.view, Methods Webix Docs - Documentation
Webix Documentation: Methods of ui.view. This page contains resize documentation to help in learning the library.
Read more >
Dynamically resize Container View … | Apple Developer Forums
I have control-dragged from the Container View to a second View Controller ("EmbeddedViewController"), creating an Embed Segue.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found