Standard parts library (parts.library, parts.insert, parts.resize): ISO 4762 socket head cap screws, ISO 4014/4017 hex bolts, ISO 4032 nuts, ISO 7089 washers, ISO 4026 set screws, ISO 8734 dowel pins and 6000/6200/600-series bearing envelopes, M3–M20, built in code from the standards' dimensions as their own components with cosmetic threads; inserted at a hole's rim they get a rigid joint that puts them on the hole's axis seated on its face; resize rebuilds in place. Circle joint origins are named after the cylindrical wall
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
b2d0452656
commit
f7c26d8dfe
4 files changed
+547
-2
No files matched your search
@@ -1065,6 +1065,15 @@ fn is_root(c: &u64) -> bool {
|
||||
*c == 0
|
||||
}
|
||||
|
||||
/// A standard part (fastener, pin, bearing) inserted as a component.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct StandardPart {
|
||||
pub family: String,
|
||||
pub size: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub length: Option<f64>,
|
||||
}
|
||||
|
||||
/// The document.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Document {
|
||||
@@ -1095,6 +1104,9 @@ pub struct Document {
|
||||
/// Plastic rules.
|
||||
#[serde(default, skip_serializing_if = "crate::plastic::PlasticSettings::is_empty")]
|
||||
pub plastic: crate::plastic::PlasticSettings,
|
||||
/// Components that are standard parts (by component id): what to rebuild them from.
|
||||
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
|
||||
pub parts: std::collections::BTreeMap<u64, StandardPart>,
|
||||
/// Configurations (rows of parameter values and suppressions).
|
||||
#[serde(default, skip_serializing_if = "crate::config::ConfigTable::is_empty")]
|
||||
pub configs: crate::config::ConfigTable,
|
||||
@@ -1182,6 +1194,7 @@ impl Document {
|
||||
sheet: Default::default(),
|
||||
plastic: Default::default(),
|
||||
configs: Default::default(),
|
||||
parts: Default::default(),
|
||||
body_components: Default::default(),
|
||||
materials: Default::default(),
|
||||
appearances: Default::default(),
|
||||
|
||||
Reference in new issue
Block a user