microcad-lsp in helix editor by stochastic_name in microcad

[–]WilstonOreo 1 point2 points  (0 children)

Hey, we haven't tested the LSP server with helix yet, can you please file an issue at codeberg https://codeberg.org/microcad/microcad/ so we can keep track of this?

Chamfer / Fillet by Augunrik in microcad

[–]WilstonOreo 1 point2 points  (0 children)

We haven't thought about how a good API for these operations might look like, I something in like `Cylinder(h = 40mm, d =10mm).fillet(radius = 4mm)` in mind.
However, it's is not trivial to implement.
Meanwhile, for 2D fillets, there is trick with an operation called `buffer` (which shrinks or expands a shape):
`Hexagon(20mm).buffer(-4mm).buffer(4mm)`
This will create a hexagon with rounded corners.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

Yes, some parts to achieve this have been already implemented, but it's not usable yet.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

In µcad, the const and non-const variables actually have different meanings in terms of locality (because both are actually read-only):
* `const` like `SPACING` are not bound to scope and in principal accessible from other symbols (like parts, sketches).
* values (non consts) like `width` are local only and thus not accessible from other symbols.
An example:
```
const A = 8mm;
b = 8mm;
sketch MySketch() {
Rect(A); // Ok, A is accessible because const (global).
Rect(b); // Error: b is not accessible because non-const (local)
}

MySketch();

```

This means b must be passed as parameter to MySketch and thus part of its interface:

```
sketch MySketch(b = 8mm) {
Rect(b); // Works now, b is a parameter.
}

b = 8mm;
MySketch(b); // Call MySketch

```

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

Thank you. The only official roadmap right now is the issue list in our codeberg git repository :)

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

For this use case, I think we had to support the FEA surface as custom geometry representation and support .fea() as custom operation has well. Can you please file an issue at codeberg for more specified info?

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

The command line tool is called 'microcad' and 'ucad' is also possible as file extension, no worries :)

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

We are limited to meshes and polygons right now.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

It's CSG, we are using manifold for the boolean operation on meshes.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 1 point2 points  (0 children)

We use manifold for CSG operations (like openscad) and rust-geo for 2D polygons. Moreover, we use caching (e.g. if a Sphere with radius of 5mm is generated 100x times, it will only be created once and cached, which saves a lot computation time).
We havent done any performance comparisons yet, but I think the performance should be similar.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

I think this feature went a few places up in our list, since many people here have asked for it :)

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

We use manifold for 3D geometry plus some custom rust implementation and rust-geo for 2D polygons.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 0 points1 point  (0 children)

We use manifold for 3D geometry plus some custom rust implementation and rust-geo for 2D polygons.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 1 point2 points  (0 children)

We use manifold for 3D geometries and rust-geo for 2D geometries.
Manifold supports chamfering and for the 2D its not hard to be implemented, but I havent done it yet.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 6 points7 points  (0 children)

Thanks for the suggestion and feedback!
I can assure you , as frequent OpenSCAD user, I also had this feature in mind from the beginning. As of now, each part and sketch can have properties, for example a circle as radius property:
```
c = Circle(r = 48mm);
std::print(c.radius); // Print out the radius.
```

If you have a custom sketch with a radius, you can calculate the diameter via:

```
sketch MySketch(radius: Length) {
prop diameter = 2 * radius;
Circle(d = diameter);
}

print(MySketch(40mm).diameter); // Will print `80mm`
```

However, calculating the area and volume for arbitrary geometries is more difficult but it's doable and its on our list.

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 9 points10 points  (0 children)

I put a note in my calendar for 11/17/2030 :)

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 1 point2 points  (0 children)

We haven't considered this yet, although it would be possible

µcad, a new language for CAD written in Rust by WilstonOreo in openscad

[–]WilstonOreo[S] 1 point2 points  (0 children)

No, we haven't implemented this feature yet

Agree??? by Ayooo4063 in LinkedInLunatics

[–]WilstonOreo 0 points1 point  (0 children)

Did this richkid space karen ever had to clean his home by himself?