From 0f65994668c52e998e3a0bb093d617214a11f365 Mon Sep 17 00:00:00 2001 From: kopackiw <26244440+kopackiw@users.noreply.github.com> Date: Mon, 7 Nov 2022 23:48:25 +0100 Subject: [PATCH] remove the "--model" option from CLI examples in docs --- README.md | 6 +++--- fj.toml | 6 +++--- models/cuboid/README.md | 2 +- models/spacer/README.md | 2 +- models/star/README.md | 2 +- models/test/README.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 89f2a20b7..85f9d841e 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Models are Rust libraries that depend on the [`fj`](https://crates.io/crates/fj) To view a model, run: ``` sh -fj-app --model my-model +fj-app my-model ``` This will usually compile and load the model in the `my-model/` directory. If there is a configuration file (`fj.toml`) available, it might define a default path to load models from that is different from the current working directory. This is the case [in the Fornjot repository](fj.toml). @@ -122,7 +122,7 @@ Toggle model rendering by pressing `1`. Toggle mesh rendering by pressing `2`. T To export a model to a file, run: ``` sh -fj-app --model my-model --export my-model.3mf +fj-app my-model --export my-model.3mf ``` The file type is chosen based on the file extension. Both 3MF and STL are supported. @@ -132,7 +132,7 @@ The file type is chosen based on the file extension. Both 3MF and STL are suppor Models can define parameters that can be overridden. This can be done using the `--parameters` argument: ``` sh -fj-app --model my-model --parameters "width=3.0,height=5.0" +fj-app my-model --parameters "width=3.0,height=5.0" ``` diff --git a/fj.toml b/fj.toml index a7b7a4a93..0b01ae435 100644 --- a/fj.toml +++ b/fj.toml @@ -1,9 +1,9 @@ -# The default path that models are loaded from. If the `--model` argument is a +# The default path that models are loaded from. If the `model` argument is a # relative path, it is assumed to be relative to `default_path`. default_path = "models" -# The default models that is loaded, if none is specified. If this is a relative -# path, it should be relative to `default_path`. +# The default models that is loaded, if none is specified in a CLI. +# If this is a relative path, it should be relative to `default_path`. default_model = "test" # Indicate whether to invert the zoom direction. Can be used to override the diff --git a/models/cuboid/README.md b/models/cuboid/README.md index 7706cf36a..00be43e16 100644 --- a/models/cuboid/README.md +++ b/models/cuboid/README.md @@ -4,7 +4,7 @@ A model of a simple cuboid that demonstrates sweeping a 3D shape from a primitiv To display this model, run the following from the repository root (model parameters are optional): ``` sh -cargo run -- --model cuboid --parameters x=3.0,y=2.0,z=1.0 +cargo run -- cuboid --parameters x=3.0,y=2.0,z=1.0 ``` ![Screenshot of the cuboid model](cuboid.png) diff --git a/models/spacer/README.md b/models/spacer/README.md index a2db3fe0e..0a9a4ff44 100644 --- a/models/spacer/README.md +++ b/models/spacer/README.md @@ -4,7 +4,7 @@ A simple spacer model that demonstrates the circle primitive, the difference ope To display this model, run the following from the repository root (model parameters are optional): ``` sh -cargo run -- --model spacer --parameters outer=1.0,inner=0.5,height=1.0 +cargo run -- spacer --parameters outer=1.0,inner=0.5,height=1.0 ``` ![Screenshot of the spacer model](spacer.png) diff --git a/models/star/README.md b/models/star/README.md index e822baa5a..27762a401 100644 --- a/models/star/README.md +++ b/models/star/README.md @@ -4,7 +4,7 @@ A model of a star that demonstrates sweeping a sketch to create a 3D shape, conc To display this model, run the following from the repository root (model parameters are optional): ``` sh -cargo run -- --model star --parameters num_points=5,r1=1.0,r2=2.0,h=1.0 +cargo run -- star --parameters num_points=5,r1=1.0,r2=2.0,h=1.0 ``` ![Screenshot of the star model](star.png) diff --git a/models/test/README.md b/models/test/README.md index 34fcca406..a109afc31 100644 --- a/models/test/README.md +++ b/models/test/README.md @@ -4,7 +4,7 @@ A model that tries to use all of Fornjot's features, to serve as a testing groun To display this model, run the following from the repository root: ``` sh -cargo run -- --model test +cargo run -- test ``` ![Screenshot of the test model](test.png)