Coder Social home page Coder Social logo

3dprinterexport's Introduction

3DPrinterExport

A simple tool to visualize structures from Eclipse and export them as stl files

updated 10/28/22 The purpose of this code is to visualize structures from Eclipse and export them as STL files for use in 3D printing. Similar projects can export Eclipse structures in STL format (e.g., https://github.com/esimiele/Varian-Code-Samples/tree/master/Eclipse%20Scripting%20API/projects/Export3D), but these previous works do not provide the functionality to view a 3D rendering of the structure prior to export. While Eclipse provides the functionality to view a 3D rendering of the structure, the lighting in Eclipse is ambient, which doesn't show the individual facets of the object that will be present in the final print. You could also simply export the object in stl format and open it in a 3D rendering program such as paint3D (slow!!) or 3D viewer, which are pre-installed on all windows 10 computers. However, this tool cuts out that additional step. While this tool has limited functionality and is relatively simple, it was a fun project that provided a nice introduction to WPF 3D applications. This is a nice resource for anyone interested in 3D rendering applications. In addition, it also provides a nice example of multithreading where a new window will open displaying the export progress and then close once completed. Of course, there are other more powerful libraries that can be used for 3D rendering (e.g., DirectX and OpenGL), but that wasn't the purpose of this tool.

How to run:

  • From Eclipse:

  • open the structure set or plan in External beam planning

  • launch launch3DPrinterExport.cs from the /bin directory of the code

  • the patient, structure set, and structure fields should be automatically populated

  • Outside Eclipse:

  • launch 3DPrinterExport.exe

  • If the computer does not have a local install of Aria, you will get a warning message. Ignore this and hit ok (it just says it couldn't connect to Aria)

  • If the computer does have a local install of Aria, enter the patient MRN and hit the open patient button

  • Select the structure set and structure you want to render

Viewport controls:

  • pan --> left mouse click and drag
  • rotate --> right mouse click and drag
  • zoom --> mouse scroll

The help button also explains all of the above. Once a structure has been selected from the drop-down, it will automatically be rendered in the viewport. Changing to another structure in the dropdown will clear the viewport and render the selected structure. For testing and review, you can choose to open an existing stl file (ASCII format only!). The code will construct the 3D mesh and render the structure.

Example stl files are provided. The first is a bolus from a leg treatment plan and the second is an HRCTV from a tandem and ovoid treatment with the tandem subtracted (used for another project). I recommend downloading the code, building the exe, running the program within visual studio (to make troubleshooting easier), and loading one of the example stl files to make sure the code is working.

Open to suggestions if anyone is interested in contributing. If so, please open an issue or pull request on this page. Thanks!

3dprinterexport's People

Contributors

esimiele avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.