Add hole to sketch

Since convex faces aren't supported yet, this doesn't carry over to the
3D model correctly. In fact, it leads to weird visual artifacts and
breaks the exported 3MF model.

But that's fine for now. I'm going to work on fixing all of this now.
This commit is contained in:
Hanno Braun 2025-02-19 21:19:15 +01:00
parent bff0881de9
commit fed5b037f7

View File

@ -7,7 +7,23 @@ use crate::{
pub fn model() -> HandleAny {
let top = {
let sketch = Sketch::from([[-1., -1.], [1., -1.], [1., 1.], [-1., 1.]]);
let sketch = Sketch::from([
// outer boundary
[-1., -1.],
[1., -1.],
[1., 1.],
[-1., 1.],
// connection to inner boundary
[-1., -1.],
// inner boundary
[-0.5, -0.5],
[-0.5, 0.5],
[0.5, 0.5],
[0.5, -0.5],
// connection to outer boundary
[-0.5, -0.5],
// half-edge between last and first vertex is implicit, so we're done here
]);
let surface = Plane {
origin: Point::from([0., 0., 1.]),