GithubHelp home page GithubHelp logo

hotwords123 / foxtrot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from formlabs/foxtrot

0.0 1.0 0.0 1.8 MB

A fast, experimental STEP file viewer

License: Apache License 2.0

Rust 98.85% Python 0.46% HTML 0.08% JavaScript 0.37% CSS 0.04% C++ 0.19% Shell 0.01%

foxtrot's Introduction

Foxtrot

Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD. It is an experimental project built from the ground up, including new libraries for parsing and triangulation.

This repository includes a simple native GUI:

Motherboard example
(demo model source)

In addition, the same code can run in a browser (click to see the demo):

Browser example
(demo model source)

For more background on the project, check out this writeup by one of the main authors.

Quick start

(Prerequisite: install Rust and Cargo, and clone this repository)

cargo run --release -- examples/cube_hole.step

WebAssembly demo

(Prerequisite: install wasm-pack and clone this repository)

cd wasm
wasm-pack build --target no-modules
python3 -m http.server --directory deploy # or the simple server of your choice

Then, open the local server's URL (typically 127.0.0.1:8000) and select a sample file from the list.

Subsystems

  • cdt: Constrained Delaunay triangulation (standalone)
  • express: Parser for EXPRESS schemas files and a matching code generation system
  • experiments: Experiments with trait systems (unused)
  • step: Auto-generated STEP file parser. This take a very long time to compile, so it is isolated into this crate.
  • triangulate: Converts a file loaded by step into a triangle mesh, using cdt as its core
  • nurbs: A handful of NURBS / B-spline algorithms used by triangulate
  • gui: GUI for rendering STEP files, using WebGPU
  • wasm: Scaffolding to run in the browser using WebAssembly

Code generation

step/src/ap214.rs is automatically generated from 10303-214e3-aim-long.exp, which is available via CVS here (check out the APs folder).

To regenerate, run

cargo run --release --example gen_exp -- path/to/APs/10303-214e3-aim-long.exp step/src/ap214.rs

License

© 2021 Formlabs

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Disclaimer

Foxtrot is a proof-of-concept demo, not an industrial-strength CAD kernel. It may not work for your models! Even in the screenshots above, there are a handful of surfaces that it fails to triangulate; look in the console for details.

This isn't an official Formlabs project (experimental or otherwise), it is just code that happens to be owned by Formlabs.

No one at Formlabs is paid to maintain this, so set your expectations for support accordingly.

References

STEP Integrated Definitions

foxtrot's People

Contributors

e-matteson avatar henryheffanformlabs avatar hotwords123 avatar mkeeter avatar zhangchaowei-formlabs avatar

Watchers

 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.