Coder Social home page Coder Social logo

fwcd / mini-cad Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 1.0 1.13 MB

Parametric 3D modeller with a Swift-inspired DSL for macOS and iOS (WWDC 2023 submission)

License: GNU General Public License v3.0

Swift 100.00%
3d cad playground slicer swift constructive-solid-geometry parametric-modelling dsl swift-student-challenge

mini-cad's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vvhh2002

mini-cad's Issues

Investigate how to make built-ins more type-safe

Currently, our built-ins are defined in a rather weakly typed way. It would be cool if we could somehow abstract over this (e.g. structures with Codable arguments and use a custom decoder to deserialize [Value] or similar).

Add CI

We could e.g. automatically run the test suite in CI.

Store save state

Our current 'save' always saves as a new file. It would be nice to differentiate between 'save' and 'save as' by memorizing the file path to the opened file.

Add proper `Mesh` type

Instead of generating Cuboids, we should generate actual meshes and then use CSG algorithms to e.g. compute unions, intersections etc.

Display errors inline

Now that we have the line it would be cool if we could display parse errors inline, similar e.g. to Xcode.

Investigate whether we can make the preview scene interactive

This could get pretty tricky after we have #3 and #5, since we'd need to track the 'origin' of each triangle throughout the CSG transformations (#22 would probably come in handy too).

But it would still be very cool if the user could e.g. drag/scale/rotate the objects in real-time in the preview as the code updates automatically (and perhaps snap it to the grid (optionally?)).

Note that this might also require inverting the entire tranformation stack. E.g. if the cube dragged by the user is inside a

Translate(...) {
  Rotate(...) {
    ...
  }
}

we'd have to compute how the original position/scales would have to be modified.

Add prefix, postfix and ternary operators

Another thing for the wishlist. Ternaries might be tricky to parse, we'll have to see how well that plays with our precedence climbing parser.

  • Prefix operators
  • Postfix operators (only calls and trailing blocks currently)
  • Ternary operator

Implement slicer

Depends on

Implement a slicer that generates gcode from meshes (and ideally even visualizes it).

Show tips/instructions

We should provide some instructional tips in the UI, e.g.

  • briefly explain the UI
  • provide useful tips, like using Option+Scroll for zooming

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.