【文件属性】:
文件名称:structural-shapes:常见的结构形状
文件大小:5KB
文件格式:ZIP
更新时间:2021-03-08 11:11:14
Rust
关于
该软件包为各种不同的结构形状提供了实用程序。 当前,包括以下内容:
管子
箱形横梁
工字梁
棒
复合形状
用法
以下是一些用法的基本示例
fn main () {
let x = structural_shapes :: Rod{radius: 1.0 , center_of_gravity: ( 0.0 , 1.0 )};
println! ( "cross sectional area: {:?}" , x. area ());
println! ( "moment of inertia: {:?}" , x. moi_x ());
}
您还可以创建由多个基本体组成的复合形状:
fn main () {
let mut x = CompositeShape :: default ();
x. add (StructuralShap
【文件预览】:
structural-shapes-main
----.gitattributes(66B)
----Cargo.toml(587B)
----src()
--------lib.rs(10KB)
----.travis.yml(124B)
----LICENSE(1KB)
----README.md(1KB)
----tests()
--------all_tests.rs(2KB)
----.gitignore(35B)