-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Request: bare show_object() without relying on external editor #627
Comments
What is the advantage of doing: from cadquery.vis import show vs. from ocp_vscode import show ? Is it that |
I do not have VSCode and have no intention of using it. It would be nice to be able to use build123d straight from Vim without any extra dependencies.
from cadquery import *
from cadquery.vis import show
show(Workplane().box(1,1,1)) |
I would gladly do it myself, however i would really appreciate some guiding. If you point me out to what sort of changes need to be done with the I tried to wrap my head around what changes has been made in https://github.com/jdegenstein/jmwright-CQ-Editor vs. original https://github.com/CadQuery/CQ-editor however formatting changes there do not help with comprehension. Also not sure what should I replace the stuff imported from .occ_impl with. |
Meanwhile following code works (but requires to have CadQuery installed): from build123d import *
from cadquery.vis import show_object
with BuildPart() as box_builder:
Box(1, 1, 1)
show_object(box_builder.part.wrapped) |
There is a section in the docs on inter-working with CadQuery here: https://build123d.readthedocs.io/en/latest/tips.html#build123d-cadquery-integration. As both tools share the OCP layer (the Python wrapper of the OpenCascade - OCCT - library) the There are four viewers listed in the docs here: https://build123d.readthedocs.io/en/latest/external.html#editors-viewers There are others like blendquery (https://github.com/uki-dev/blendquery) which aren't listed (I'm not sure build123d support is complete with blendquery and will be happy to add it to the docs) so there are no shortage of viewer solutions. If one wants to use vim (I've used vi/vim for almost four decades now) this can be done by simply using ocp_vscode as the viewer and editing the code with another tool - when As the viewer can be a lot of work (both in development and support) I'm not in a position to take on this challenge but I'd be happy to have another viewer option for users. As an illustration, bernhard (ocp_vscode) is currently working on a native C++ implementation of the tessellation step which should result in a significant performance improvement. To handle build123d more natively, there are only a couple things to consider:
I appreciate your trying to improve the experience of users by having a built-in viewer. Unfortunately, there is currently a quite steep learning curve for new users. |
Would be nice to have functionality similar to CadQuery/cadquery#1366
To be able to call
build123d.vis.show_object()
that will pop up VTK viewport without relying on any external software.The text was updated successfully, but these errors were encountered: