-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset for Face and Wire #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Let's do a few things to finish this up:
- Format the code with
cargo +nightly fmt
- Fix the compilation error
- Add a usage of this feature, either in a new example or add it to an existing example if it makes sense
I need to figure out a couple of things, so this is still a draft. Stay tuned! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the binding code looks good! I know I was sitting with you when you created the example file, but I think we should add a bit more to it to demonstrate what's going on:
Here's an example of a chevron shape with acute and obtuse angles:
let solid_1 = Workplane::xy()
.translated(DVec3::new(32.0 * i as f64, 0.0, 0.0))
.sketch()
.move_to(0.0, 10.0)
.line_to(5.0, 5.0)
.line_to(5.0, -5.0)
.line_to(0.0, 0.0)
.line_to(-5.0, -5.0)
.line_to(-5.0, 5.0)
.close()
.offset(1.0, join_type) // offset a wire
.to_face()
.extrude(DVec3::new(0.0, 0.0, 8.0))
.into_shape();
I think if we add that shape along with positive and negative offsets, it will more readily demonstrate what the feature does.
While testing this I also had crashes with positive offsets for the Tangent
join type and I'm not sure why.
It's nice to demonstrate that you can offset a face or a wire, but ultimately they result in the same exact shape so the visuals don't really show you what's happening so much.
Uh-oh I'm getting the segfaults too... |
@mkovaxx that particular join type just might not be supported yet, I'd have to look at the code to be sure. Or rather, not all cases of using it are supported. |
Makes sense! Shall we mark this ready for review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Closes #144.