TECHNOLOGY

Fornjot – The sphere wants yet every other CAD program

Blog | Matrix | Discussions | Contribution Book

About

Fornjot is an early-stage project to get a subsequent-expertise Code-CAD utility. Because the field wants yet every other CAD program.

Screenshot of Fornjot

For an introduction of what the project aims to attain, please compare out the internet internet page.

Sponsors

Fornjot is supported by @webtrax-oz, @lthiery, @Yatekii, @martindederer, @nullstyle, @ahdinosaur, @jessebraham, @Kethku, @sanxiyn, @seigel, and my diversified awesome sponsors. Thanks!

Please think supporting me too, to again get Fornjot sustainable long-period of time.

Express

Fornjot is below active pattern, nonetheless easy experimental. Efforts are within the intervening time centered on offering a staunch assign of long-established CAD aspects.

Whenever you would possibly well perhaps very effectively be attracted to Fornjot and are interested by to use it, you have to easy fully request to bustle into limitation pretty considerable straight. Except you would possibly well perhaps very effectively be sharp to make a contribution to its pattern, it would possibly well perhaps perhaps maybe be better to again for a year or ten, to let it dilapidated. For more info on present barriers and enhancements that is also implemented within the shut to future, compare out the beginning points.

To learn what the direction is longer-period of time, consult with the characteristic wishlist.

Parts

Code-CAD in Rust

Models are outlined as Rust code. To be sure instant assemble events, they are compiled individually, and loaded into a host utility as a scamper-in.

) -> fj::Form {
let outer = args
.get(“outer”)
.unwrap_or(&”1.0″.to_owned())
.parse()
.unwrap();
let interior = args
.get(“interior”)
.unwrap_or(&”0.5″.to_owned())
.parse()
.unwrap();
let top = args
.get(“top”)
.unwrap_or(&”1.0″.to_owned())
.parse()
.unwrap();

let outer_edge = fj::Circle::from_radius(outer);
let inner_edge = fj::Circle::from_radius(interior);

let footprint = fj::Difference2d::from_objects(outer_edge.into(), inner_edge.into());

let spacer = fj::Sweep::from_shape_and_length(footprint.into(), top);

spacer.into()
}”>

use std:: collections:: HashMap;

#[no_mangle]
pub extern "C" fn model(args: &HashMap<String, String>) -> fj::Form {
    let outer = args
        .get("outer")
        .unwrap_or(&"1.0".to_owned())
        .parse()
        .unwrap();
    let interior = args
        .get("interior")
        .unwrap_or(&"0.5".to_owned())
        .parse()
        .unwrap();
    let top = args
        .get("top")
        .unwrap_or(&"1.0".to_owned())
        .parse()
        .unwrap();

    let outer_edge = fj:: Circle:: from_radius(outer);
    let inner_edge = fj:: Circle:: from_radius(interior);

    let footprint = fj:: Difference2d:: from_objects(outer_edge.into(), inner_edge.into());

    let spacer = fj:: Sweep:: from_shape_and_length(footprint.into(), top);

    spacer.into()
}

That is the code for the spacer model. As that you would possibly well glimpse, there would possibly well be easy some work to enact, to get the job of defining models more convenient.

Total modeling aspects

At this point, Fornjot helps long-established 2D shapes (sketches fabricated from lines segments, circles, dinky combos between them), sweeping these 2D shapes along a straight path to get a 3D shape, and some very incomplete enhance for positive staunch geometry (CSG).

The short- to mid-period of time priority is to provide staunch CSG enhance, more flexible sketches, and more flexible sweeps (along a circle or helix). Long-period of time, the design is to withhold including more superior CAD modeling aspects, to enhance even advanced models and workflows.

Helps the necessary desktop platforms

As of this writing, Fornjot runs on Linux, Windows, and macOS. The project is essentially developed on Linux, so the diversified platforms will doubtless be self-discipline to bugs. In tell so that you can again out, typically checking out on Windows and macOS, and reporting bugs, is a comely technique to enact so.

Immediate- to mid-period of time, the design is to add enhance for the win platform, so Fornjot can bustle in browsers. Long-period of time, the design is to additionally enhance the necessary cell platforms.

Export to 3MF

Exporting models to the 3D Manufacturing Layout (3MF), which is ragged in 3D printing, is supported.

Utilization

Defining models

Models rely on the fj library, which they use to account for the geometry. Furthermore, they must easy be built as a dynamic library. Staunch use the examples within the models/ record as a template.

Viewing models

To assemble and glimpse a model, bustle it from the host utility.

# Bring collectively/glimpse the spacer model
cargo bustle -- -m spacer

This invocation expects that the model exists within the models/spacer record, with a kit title of spacer.

Rotate the model by pressing the left mouse button while shifting the mouse. Cross the model by pressing the apt mouse button while shifting the mouse. Zoom with the mouse wheel.

Toggle model rendering by pressing 1. Toggle mesh rendering by pressing 2.

To this point, the host utility is no longer published on crates.io, and the full job is no longer in actual fact optimized for being ragged outside of this repository. Contributions to enhance that situations are very welcome.

Exporting models

To export a model to a 3MF file, bustle:

cargo bustle -- -m spacer --export spacer.3mf

Model parameters

Some models have parameters that is also overridden. Shall we embrace, to override the interior and outer radii of the spacer model:

cargo bustle -- -m spacer --parameters outer=8.0 --parameters interior=5.0

Neighborhood

Whenever you would possibly well perhaps very effectively be attracted to Fornjot, please think joining the neighborhood. We would handle to have you!

Questions, Solutions, Discussions

The next venues are simplest-suited for questions, feedback, or long-established discussions:

Bugs, Characteristic Requests

Whenever you chanced on a bug or have a particular characteristic request, please use points on GitHub:

Truly feel free to appear today points and add your narrate there, within the event you get out about one which goes. However within the event you would possibly well perhaps very effectively be unsure or invent no longer have the time for that, invent no longer let that dwell you. We would somewhat have reproduction points than no longer hear a pair of bug the least bit.

Obtain Interested

Whenever you would possibly well perhaps very effectively be attracted to helping out, ethical fork one amongst the GitHub repositories and post a pull request:

Whenever you invent no longer know what to work on, compare out the comely first points. To get a top level conception over present priorities, procedure shut a get out about at the beginning milestones.

In tell for you some more guidance, compare out the contribution info, or ethical ask! Ogle the Neighborhood half above, for how to get in contact.

License

This project is beginning supply, licensed below the terms of the Zero Clause BSD License (0BSD, for short). This mainly technique that you would possibly well enact anything with it, with out any restrictions, nonetheless you can not retain the authors accountable for complications.

Ogle LICENSE.md for corpulent principal aspects.

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button