Joint dialog: say why picks on one component make no joint (#1367)
The Joint and As-built Joint dialogs explain why picks make no joint and offer Create Components from Bodies when every pick is on one component; joint.create and joint.as_built suggest component.from_bodies. Labels in all catalogs. Fixes #1239.
This commit is contained in:
1 parent
6fbb1c5d91
commit
4674f0a61c
14 files changed
+174
-10
No files matched your search
@@ -318,8 +318,14 @@ fn add_joint(s: &mut Session, j: Joint, p: &Value) -> Result<Value> {
|
||||
if s.doc.assembly.joints.len() >= 10_000 {
|
||||
return Err(EngineError::Other("too many joints".into()));
|
||||
}
|
||||
// Several parts as bodies of one component (a multi-body STEP import, #1239): say how to
|
||||
// get two components.
|
||||
if j.a.occurrence == j.b.occurrence {
|
||||
return Err(bad("joint.create", "a joint needs two different occurrences"));
|
||||
return Err(bad(
|
||||
"joint.create",
|
||||
"a joint needs two different occurrences: both origins are on one component; give each part a component of its own first \
|
||||
(component.from_bodies)",
|
||||
));
|
||||
}
|
||||
let id = j.id;
|
||||
let name = j.name.clone();
|
||||
|
||||
Reference in new issue
Block a user