Skip to content

CAD not showing on cloud based solution #225

@shimwell

Description

@shimwell

In a recently created cloud run version of the workshop the .solids don't show up as 3d shapes in the jupyter notebook

Got some nice suggestions on how to fix this from @AGoose

The rendering failure of the solid objects is due to HTTPS/HTTP mixed content blocking. You can patch the rich display hook (for all of these solid types) to replace http with https (hacky, yes!) e.g.

_repr_html = type(my_shape.solid).repr_html
def repr_html(self):
return _repr_html(self).replace("http:", "https:")
type(my_shape.solid).repr_html = repr_html

You can also get Jupyter Lab/Notebook interactive STL viewers, e.g. https://github.com/K3D-tools/K3D-jupyter

However, it looks like there is a Jupyter Lab extension for CadQuery: https://github.com/bernhard-42/jupyter-cadquery

These particular examples are currently only JupyterLab 2.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions