CADViewer in CSharpCAD of possible interest to JSCAD. #1125
briansturgill
started this conversation in
Show and tell
Replies: 1 comment 8 replies
-
Oh, if you just want to play around with it, the Python API is sufficiently ready... |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Basically, it is a pyvista-based viewer. It has an HTTP-POST protocol that allow you to send a mesh for viewing.
It works like this:
The first time a CSharpCAD/PyCSCAD program sends a mesh to view, it first sends a "clear" that clears out previous models.
For each call to "view" or "save", a mesh is sent.
View is designed to be easy to insert... for example
function....
...
return geom3
Can have view inserted like this:
return view(geom3)
The point is you get a series of meshes sent from your running program that you can browse and manipulate.
It makes debugging much easier than any CAD environment I've seen.
(Geom2's are first extruded very thinly, and sent as a 3D mesh.)
It would be easy to do this in JSCAD as it's just an http post... you can see the protocol here:
https://github.com/briansturgill/CSharpCAD/blob/main/CSharpCAD/src/misc/View.cs
You can find CADViewer here:
https://github.com/briansturgill/CSharpCAD/tree/main/CADViewer
I consider it a bit unpolished, but it is great as a proof of concept and I'm already finding it very handy for mesh debugging.
Beta Was this translation helpful? Give feedback.
All reactions