pub struct PcbComponentBody {Show 31 fields
pub common: PcbPrimitiveCommon,
pub outline: Vec<CoordPoint>,
pub v7_layer: String,
pub name: String,
pub kind: i32,
pub sub_poly_index: i32,
pub union_index: i32,
pub arc_resolution: Coord,
pub is_shape_based: bool,
pub standoff_height: Coord,
pub overall_height: Coord,
pub body_projection: i32,
pub body_color_3d: i32,
pub body_opacity_3d: f64,
pub unique_id: String,
pub texture: String,
pub texture_center: CoordPoint,
pub texture_size: CoordPoint,
pub texture_rotation: f64,
pub model_id: String,
pub model_checksum: i32,
pub model_embed: bool,
pub model_2d_location: CoordPoint,
pub model_2d_rotation: f64,
pub model_3d_rot_x: f64,
pub model_3d_rot_y: f64,
pub model_3d_rot_z: f64,
pub model_3d_dz: Coord,
pub model_snap_count: i32,
pub model_type: i32,
pub step_model: Option<String>,
}Expand description
PCB Component Body primitive (3D model reference).
Fields§
§common: PcbPrimitiveCommonCommon primitive fields.
outline: Vec<CoordPoint>Outline vertices.
v7_layer: StringV7 layer name.
name: StringBody name.
kind: i32Kind.
sub_poly_index: i32Sub-polygon index.
union_index: i32Union index.
arc_resolution: CoordArc resolution.
is_shape_based: boolWhether shape-based.
standoff_height: CoordStand-off height.
overall_height: CoordOverall height.
body_projection: i32Body projection type.
body_color_3d: i323D body color (COLORREF).
body_opacity_3d: f643D body opacity (0.0 - 1.0).
unique_id: StringUnique identifier for the component body.
texture: StringTexture name.
texture_center: CoordPointTexture center.
texture_size: CoordPointTexture size.
texture_rotation: f64Texture rotation.
model_id: StringModel ID (links to STEP model).
model_checksum: i32Model checksum.
model_embed: boolWhether model is embedded.
model_2d_location: CoordPoint2D model location.
model_2d_rotation: f642D model rotation.
model_3d_rot_x: f643D model rotation X.
model_3d_rot_y: f643D model rotation Y.
model_3d_rot_z: f643D model rotation Z.
model_3d_dz: Coord3D model Z offset.
model_snap_count: i32Model snap count.
model_type: i32Model type.
step_model: Option<String>STEP model data (if loaded).
Implementations§
Source§impl PcbComponentBody
impl PcbComponentBody
Sourcepub fn calculate_bounds(&self) -> CoordRect
pub fn calculate_bounds(&self) -> CoordRect
Calculate the bounding rectangle.
Trait Implementations§
Source§impl Clone for PcbComponentBody
impl Clone for PcbComponentBody
Source§fn clone(&self) -> PcbComponentBody
fn clone(&self) -> PcbComponentBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PcbComponentBody
impl Debug for PcbComponentBody
Source§impl Default for PcbComponentBody
impl Default for PcbComponentBody
Source§fn default() -> PcbComponentBody
fn default() -> PcbComponentBody
Returns the “default value” for a type. Read more
Source§impl DumpTree for PcbComponentBody
impl DumpTree for PcbComponentBody
Source§fn dump(&self, tree: &mut TreeBuilder)
fn dump(&self, tree: &mut TreeBuilder)
Dump this item to the tree builder.
Source§fn dump_to_string(&self) -> String
fn dump_to_string(&self) -> String
Convenience method to dump to a string.
Source§fn dump_to_string_with_options(&self, options: DumpOptions) -> String
fn dump_to_string_with_options(&self, options: DumpOptions) -> String
Convenience method to dump to a string with options.
Source§impl FromBinary for PcbComponentBody
impl FromBinary for PcbComponentBody
Auto Trait Implementations§
impl Freeze for PcbComponentBody
impl RefUnwindSafe for PcbComponentBody
impl Send for PcbComponentBody
impl Sync for PcbComponentBody
impl Unpin for PcbComponentBody
impl UnwindSafe for PcbComponentBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more