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

Idea: 3d shapes API for solid body modeling #5279

Closed
jackparmer opened this issue Nov 15, 2020 · 1 comment
Closed

Idea: 3d shapes API for solid body modeling #5279

jackparmer opened this issue Nov 15, 2020 · 1 comment

Comments

@jackparmer
Copy link
Contributor

jackparmer commented Nov 15, 2020

In the Plotly.py Python library, to make a solid body such as this aircraft or this brain, your best bet is the Mesh 3d API.

image

The mesh3d trace type that @mikolalysenko originally wrote is awesome and has stood the test of time. It's the easiest Python, R, and Julia option for web-based 3d meshes. But it's also confusing to learn for simple shapes and there is no concept for "wall thickness" or completely solid volumes.

Playing with the single page app MakerCase for a personal project, I was imaging an extension of the 2d shapes API for 3d. The 3d shape primitives could include rectangle, cylinder, and sphere, for example. The 3d shapes API would mirror the 2d shapes API, but also include 3d parameters such as wall_thickness (ranging from 0 to infinity for solid volumes), diameter, omitted_sides (for rectangle and cylinder), surface_finish (metallic, matte, etc), and extrusions (a list of sub-objects for placing holes or other extrusions shapes through the 3d volume). Perhaps also an API for mating 3d shapes together (such as a ball and stick model).

This would allow computational researchers, educators, and hobbyists to get something on paper quickly without delving into the full details of mesh3d, but they could always have a backdoor to mesh3d for more realistic shapes and modeling.

A 3d shapes API could help open up Python, R, and Julia open-source to engineering fields that are currently still dominated by proprietary software such as ANSYS, MATLAB, and COMSOL. Here are a few examples:

  • 3d finite element analysis
  • 3d electromagnetic field modeling (eg RF, Wi-Fi, and cellular bands) in conjunction with 3d field plots
  • Very simple 3d CAD for extrusions and laser cutting such as MakerCase
  • 3d CFD (computational fluid dynamics) such as the AeroSandbox demo in conjunction with 3d streamline plots
  • 3d molecular ball-and-stick visualizations in conjunction mesh3d for wave function visualizations

ANSYS, MATLAB, SolidWorks, COMSOL, Autodesk etc are examples of fantastic software that currently dominate this field, but my sense is open-source and Python will inevitably start taking bites out of these market caps, as its done for other science and engineering fields over the past decade. The Python, R, and Julia computational backends are there, but the front-end 3d visualization is still not sufficiently easy, capable, or beautiful IMO.

Copying a wide range of potentially interested parties, as this could have a nice impact on scientific Python as a whole if done right: @archmoj @fperez @mikolalysenko @emmanuelle @maartenbreddels @mariobuikhuizen @philippjfr @alexcjohnson @empet @cpsievert @peterdsharpe @kig @moorepants @chriddyp @ViralBShah . Any thoughts, suggestions, feedback, random ideas, etc are very welcome. Apologies in advance for the spam if not interested in this! 😬

Other issues potentially related to 3d solid body modeling: #4485, #2221, #2352, #949

@jackparmer
Copy link
Contributor Author

jackparmer commented Feb 9, 2021

Instead of reinventing the wheel, putting all funding for this towards our new collaboration with Kitware and Dash VTK: https://github.com/plotly/dash-vtk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant