Skip to content

Commit

Permalink
book stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuche committed Oct 21, 2024
1 parent d854bfb commit bc89800
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
29 changes: 0 additions & 29 deletions book/cli/mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,3 @@
automesh mesh --help
<!-- cmdrun automesh mesh --help -->
```

## Example

Mesh a Numpy segmentation file into an Abaqus input file:

```sh
automesh mesh --input single.npy --output single.inp
```

The terminal output:

<!-- cmdrun wget https://github.com/autotwin/automesh/raw/main/tests/input/single.npy -O ../../target/single_for_cli.npy -->
<!-- cmdrun automesh mesh --input ../../target/single_for_cli.npy --output ../../target/single_from_cli.inp -q -->
<!-- cmdrun grep version ../../target/single_from_cli.inp | cut -d ' ' -f 2 > ../../target/version.txt -->

<pre><code class="language-sh hljs bash"><font color="#EC00FF"> <b>automesh {{#include ../../target/version.txt}}</b></font>
<font color="#58C7E2"><b>Reading</b></font> single.npy
<font color="#54E484"><b>Done</b></font> 141.917µs
<font color="#58C7E2"><b>Meshing</b></font> single.inp
<font color="#54E484"><b>Done</b></font> 155.628µs
<font color="#58C7E2"><b>Writing</b></font> single.inp
<font color="#54E484"><b>Done</b></font> 150.88µs
</code></pre>

The resulting Abaqus input file:

```sh
{{#include ../../target/single_from_cli.inp}}
```
3 changes: 1 addition & 2 deletions book/introduction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Introduction

`automesh` is an automatic mesh generation tool that converts a segmentation
into a hexahedral finite element mesh.
`automesh` can automatically convert a segmentation into a hexahedral finite element mesh.

## Segmentation

Expand Down
9 changes: 3 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ macro_rules! about {
@@ @@ @@ {}
@@@@@@@@@@@@ @@@
@@@@@@@@@@@ @@@@ \x1b[1;4mNotes:\x1b[0m
@@@@@@@@@@ @@@@@ @ - Input/output file types are inferred.
@@@@@@@@@@@@@@@@ - Scaling is applied before translation.",
@@@@@@@@@@ @@@@@ @ - Input/output file types are inferred
@@@@@@@@@@@@@@@@ - Scaling is applied before translation",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_AUTHORS").split(":").collect::<Vec<&str>>()[0],
env!("CARGO_PKG_AUTHORS").split(":").collect::<Vec<&str>>()[1]
Expand All @@ -26,7 +26,7 @@ macro_rules! about {
}

#[derive(Parser)]
#[command(about = about!(), arg_required_else_help = true, long_about = None, version)]
#[command(about = about!(), arg_required_else_help = true, version)]
struct Args {
#[command(subcommand)]
command: Option<Commands>,
Expand All @@ -35,7 +35,6 @@ struct Args {
#[derive(Subcommand)]
enum Commands {
/// Converts between segmentation input file types
#[command(long_about = about!())]
Convert {
/// Name of the original NumPy (.npy) or SPN (.spn) input file.
#[arg(long, short, value_name = "FILE")]
Expand Down Expand Up @@ -63,7 +62,6 @@ enum Commands {
},

/// Creates a finite element mesh from a segmentation
#[command(long_about = about!())]
Mesh {
/// Name of the NumPy (.npy) or SPN (.spn) input file.
#[arg(long, short, value_name = "FILE")]
Expand Down Expand Up @@ -138,7 +136,6 @@ enum Commands {
},

/// Applies smoothing to an existing mesh file
#[command(long_about = about!())]
Smooth {
/// Name of the Abaqus (.inp) input file.
#[arg(long, short, value_name = "FILE")]
Expand Down

0 comments on commit bc89800

Please sign in to comment.