* claim: #3324 * Sheet metal: refuse a flat pattern that no longer matches the body A feature that is not sheet metal can change a sheet body's material without its sheet model knowing: a mirror combined into it, an extrude joined onto it, a fillet or chamfer on a corner. The flat pattern, the DXF and the bend table then wrote the sheet as it was before, a part other than the one in the design, with no warning. The evaluator now notes, per sheet, the first such feature: one that changes the body's shape while its sheet model stays the same. That feature warns, and sheet.flat_pattern, sheet.export_dxf (also with per_body) and sheet.export_bend_table refuse with "not supported yet", naming it. A sheet metal feature, or machining the sheet keeps as cut-outs, rebuilds the body from the model: it clears the note and warns that the change is not kept. Moving the body, splitting its faces and cosmetic threads leave the flat pattern as it is. * Sheet metal: a modelled thread is refused in the flat pattern too Only a cosmetic thread leaves a sheet body's material as it is. A modelled thread cuts the thread profile into the hole, which the flat pattern does not have, and a later sheet metal feature dropped it without a word. It now marks the sheet like a fillet does: it warns, the flat pattern, DXF and bend table refuse naming it, and the feature that rebuilds the body says the thread is not kept.
This commit is contained in:
@@ -568,17 +568,22 @@ impl Body {
|
||||
/// operation made it) is not part of it: an operation that leaves a body as it is (a cut by
|
||||
/// a tool clear of it) gives the same body, with that operation's history.
|
||||
pub fn same(&self, other: &Body) -> bool {
|
||||
self.same_shape(other)
|
||||
&& self.color == other.color
|
||||
&& same_shared(&self.paint, &other.paint)
|
||||
&& same_shared(&self.splits, &other.splits)
|
||||
&& same_shared(&self.face_sources, &other.face_sources)
|
||||
&& self.regularization_protected == other.regularization_protected
|
||||
}
|
||||
|
||||
/// The very same shape (shared solid or mesh), whatever its colour, paint or face splits.
|
||||
pub fn same_shape(&self, other: &Body) -> bool {
|
||||
std::sync::Arc::ptr_eq(&self.solid, &other.solid)
|
||||
&& match (&self.mesh, &other.mesh) {
|
||||
(Some(a), Some(b)) => std::sync::Arc::ptr_eq(a, b),
|
||||
(None, None) => true,
|
||||
_ => false,
|
||||
}
|
||||
&& self.color == other.color
|
||||
&& same_shared(&self.paint, &other.paint)
|
||||
&& same_shared(&self.splits, &other.splits)
|
||||
&& same_shared(&self.face_sources, &other.face_sources)
|
||||
&& self.regularization_protected == other.regularization_protected
|
||||
}
|
||||
|
||||
pub(crate) fn new(solid: Solid) -> Result<Body> {
|
||||
|
||||
Reference in New Issue
Block a user