Skip to content

Commit

Permalink
Merge pull request #130 from autotwin/book
Browse files Browse the repository at this point in the history
book
  • Loading branch information
mrbuche authored Oct 11, 2024
2 parents fd1620d + 34f7a32 commit 4bc9ac3
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
run: cargo install --path .
- name: mdbook
run: cargo install mdbook mdbook-cmdrun mdbook-katex
- name: svgbob
run: cargo install --locked mdbook-svgbob
- name: rust
run: cargo build --release
- name: maturin
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ itertools = {version = "=0.13.0"}
ndarray = {version = "=0.15"}
ndarray-npy = {version = "=0.8"}
pyo3 = {version = "=0.22", features = ["extension-module"], optional = true}
svgbobdoc = { version = "=0.3.0", features = ["enable"] }

[features]
profile = []
Expand Down
2 changes: 2 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ edition = "2021"

[preprocessor.katex]
after = ["links"]

[preprocessor.svgbob]
1 change: 1 addition & 0 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Spheres](examples/spheres/README.md)
- [Spheres - continued](examples/spheres_cont/README.md)
- [Smoothing](examples/smoothing/README.md)
- [Temporary](examples/temporary.md)

# Reference Guide

Expand Down
21 changes: 21 additions & 0 deletions book/examples/temporary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Temporary

Should move extra details from Rust API documentation to book somewhere about scaling/translation/numbering since most people will not be reading the Rust API documentation.

"The voxel data can be scaled and translated (in that order)."

$$
x \mapsto s_x x + t_x\qquad y \mapsto s_y y + t_y\qquad z \mapsto s_z z + t_z
$$

```bob
8 7
*-------*
5 /| 6 /|
z *-+-----* |
^ y | |4 | |3
| ^ | *-----|-*
|/ |/ |/
+-----> x *-------*
1 2
```
2 changes: 1 addition & 1 deletion src/abaqus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ use std::io::Error;

/// The Abaqus trait for finite elements.
pub trait Abaqus {
/// Writes the finite element data to a new Abaqus input file.
/// Writes the finite elements data to a new Abaqus input file.
fn write_inp(&self, file_path: &str) -> Result<(), Error>;
}
20 changes: 0 additions & 20 deletions src/voxel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,7 @@ impl Voxels {
pub fn get_data(&self) -> &VoxelData {
&self.data
}
#[doc = svgbobdoc::transform!(
/// Converts the voxels type into a finite elements type, consuming the voxels type.
///
/// The voxel data can be scaled and translated (in that order).
///
/// ```math
/// x \mapsto s_x x + t_x\qquad y \mapsto s_y y + t_y\qquad z \mapsto s_z z + t_z
/// ```
///
/// ```svgbob
/// 8 7
/// *-------*
/// 5 /| 6 /|
/// z *-+-----* |
/// ^ y | |4 | |3
/// | ^ | *-----|-*
/// |/ |/ |/
/// +-----> x *-------*
/// 1 2
/// ```
)]
pub fn into_finite_elements(
self,
remove: Option<Vec<u8>>,
Expand Down

0 comments on commit 4bc9ac3

Please sign in to comment.