Skip to content

Commit ced06a0

Browse files
committed
Update changelog, update readme, bump crate versions, update CLI help
1 parent 08cfbea commit ced06a0

File tree

8 files changed

+79
-25
lines changed

8 files changed

+79
-25
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Master
22

3+
- Lib: Fix a bug that caused the neighborhood search results to be incomplete
4+
- Lib: Update to `nalgebra` 0.27. with const generics and removed usage of `nalgebra` types that are deprecated
5+
- CLI: Add a command line option `--output-normals` to the `reconstruct` sub-command to write mesh normals to the output file. Note that currently the normals are only computed using an area weighted average of triangle normals.
6+
- CLI: Change the `convert` sub-command to allow both conversion of particle files and conversion of mesh formats. Instead of using the `--input` option you now have to either use the `--particles` or `--mesh` option to specify the input file depending on whether you want to convert a particle or mesh file. For particles `VTK, BGEO, PLY, XYZ, JSON -> VTK, PLY` is supported. For meshes only `VTK, PLY -> OBJ` is supported.
7+
- CLI: Add JSON files as supported particle input file
8+
- CLI: Change the command line option to specify a sequence of input files from `--input-sequence-pattern` to `--input-sequence`
9+
310
### Short-term goals
411
- Implement export of surface normals via the CLI
512

@@ -21,7 +28,7 @@ Otherwise this release contains just some small changes to command line paramete
2128
- Lib: Change AABB's `contains_point` method such that it now considers the AABB as "open" to its max value, i.e. it checks if the point is in the half-open set `[min, max[`
2229
- Lib: Implemented an own `profile!` macro that also works in multi-threaded code, i.e. with together with `rayon`
2330
- CLI: The CLI now also prints detailed profiling/timing output when running in parallel with domain decomposition thanks to the new `profile` macro
24-
- CLI: Add `--domain-min` and `--domain-max` flags to the `convert` subcommand that allows to filter out particles
31+
- CLI: Add `--domain-min` and `--domain-max` flags to the `convert` sub-command that allows to filter out particles
2532
- CLI: Remove the `--splash-detection-radius` flag as it did not work for a couple of releases
2633
- Lib: Update to [`vtkio`](https://github.com/elrnv/vtkio) 0.6.0
2734

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The result might look something like this (please excuse the lack of 3D renderin
3737
- [BGEO](#bgeo)
3838
- [PLY](#ply)
3939
- [XYZ](#xyz)
40+
- [JSON](#json)
4041
- [Output file formats](#output-file-formats)
4142
- [All command line options](#all-command-line-options)
4243
- [The `reconstruct` command](#the-reconstruct-command)
@@ -167,6 +168,16 @@ Files with the "`.ply`" extension are loaded using [`ply-rs`](https://crates.io/
167168

168169
Files with the "`.xyz`" extension are interpreted as raw bytes of `f32` values in native endianness of the system. Three consecutive `f32`s represent a (x,y,z) coordinate triplet of a fluid particle.
169170

171+
### JSON
172+
173+
Files with the "`.json`" extension are interpreted as serializations of a `Vec<[f32; 3]>` where each three component array represents a particle position. This corresponds to a JSON file with a structure like this for example:
174+
```json
175+
[
176+
[1.0, 2.0, 3.0],
177+
[1.0, 2.0, 3.0],
178+
]
179+
```
180+
170181
## Output file formats
171182

172183
Currently, only VTK files are supported for output.
@@ -175,7 +186,7 @@ Currently, only VTK files are supported for output.
175186

176187
### The `reconstruct` command
177188
```
178-
splashsurf-reconstruct 0.6.0
189+
splashsurf-reconstruct 0.7.0
179190
Reconstruct a surface from particle data
180191
181192
USAGE:
@@ -204,7 +215,7 @@ OPTIONS:
204215
-i, --input-file <input-file>
205216
Path to the input file where the particle positions are stored (supported formats: VTK, binary f32 XYZ, PLY,
206217
BGEO)
207-
-s, --input_sequence_pattern <input_sequence_pattern>
218+
-s, --input-sequence <input-sequence>
208219
Path to a sequence of particle files that should be processed, use `{}` in the filename to indicate a
209220
placeholder
210221
-n, --num-threads <num-threads>
@@ -243,6 +254,9 @@ OPTIONS:
243254
-o <output-file>
244255
Filename for writing the reconstructed surface to disk (default: "{original_filename}_surface.vtk")
245256
257+
--output-normals <output-normals>
258+
Whether to write vertex normals to the output file. Note that currently the normals are only computed using
259+
an area weighted average of triangle normals [default: off] [possible values: on, off]
246260
--output-octree <output-octree>
247261
Optional filename for writing the octree used to partition the particles to disk
248262
@@ -263,12 +277,16 @@ OPTIONS:
263277
```
264278

265279
### The `convert` subcommand
280+
281+
Allows conversion between particle file formats and between mesh file formats. For particles `VTK, BGEO, PLY, XYZ, JSON -> VTK, PLY`
282+
is supported. For meshes only `VTK, PLY -> OBJ` is supported.
283+
266284
```
267-
splashsurf-convert 0.6.0
268-
Convert between particle formats (supports the same input and output formats as the reconstruction)
285+
splashsurf-convert 0.7.0
286+
Convert particle or mesh files between different file formats
269287
270288
USAGE:
271-
splashsurf convert [FLAGS] [OPTIONS] -i <input-file> -o <output-file>
289+
splashsurf convert [FLAGS] [OPTIONS] -o <output-file>
272290
273291
FLAGS:
274292
-h, --help Prints help information
@@ -282,8 +300,13 @@ OPTIONS:
282300
--domain-min <domain-min> <domain-min> <domain-min>
283301
Lower corner of the domain of particles to keep, format: domain-min=x_min;y_min;z_min (requires domain-max
284302
to be specified)
285-
-i <input-file> Path to the input file with particles to read
286-
-o <output-file> Path to the output file
303+
--mesh <input-mesh>
304+
Path to the input file with a surface to read (supported formats: .vtk, .ply)
305+
--particles <input-particles>
306+
Path to the input file with particles to read (supported formats: .vtk, .bgeo, .ply, .xyz, .json)
307+
308+
-o <output-file>
309+
Path to the output file (supported formats for particles: .vtk, for meshes: .obj)
287310
```
288311

289312
# License

splashsurf/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "splashsurf"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Fabian Löschner <[email protected]>"]
55
license = "MIT"
66
description = "Command-line tool for surface reconstruction of SPH particle data"
@@ -13,7 +13,7 @@ homepage = "https://github.com/w1th0utnam3/splashsurf"
1313
repository = "https://github.com/w1th0utnam3/splashsurf"
1414

1515
[dependencies]
16-
splashsurf_lib = { path = "../splashsurf_lib", version = "0.6", features = ["vtk_extras", "profiling"] }
16+
splashsurf_lib = { path = "../splashsurf_lib", version = "0.7", features = ["vtk_extras", "profiling"] }
1717
structopt = "0.3"
1818
log = "0.4"
1919
fern = "0.6"

splashsurf/README.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![On crates.io](https://img.shields.io/crates/v/splashsurf)](https://crates.io/crates/splashsurf)
33
[![On docs.rs](https://docs.rs/splashsurf_lib/badge.svg)](https://docs.rs/splashsurf_lib)
44
[![License: MIT](https://img.shields.io/crates/l/splashsurf)](https://github.com/w1th0utnam3/splashsurf/blob/master/LICENSE)
5+
[![Dependency status](https://deps.rs/repo/github/w1th0utnam3/splashsurf/status.svg)](https://deps.rs/repo/github/w1th0utnam3/splashsurf)
56
![Build and test GitHub Actions workflow](https://github.com/w1th0utnam3/splashsurf/workflows/Build%20and%20test/badge.svg)
67

78
Surface reconstruction library and CLI for particle data from SPH simulations, written in Rust.
@@ -11,7 +12,7 @@ Surface reconstruction library and CLI for particle data from SPH simulations, w
1112
</p>
1213

1314
`splashsurf` is a tool to reconstruct surfaces meshes from SPH particle data.
14-
The first image shows the visualization of a set of particles of an SPH fluid simulation from [SPlisHSPlasH](https://github.com/InteractiveComputerGraphics/SPlisHSPlasH).
15+
The first image shows the visualization of a set of particles from an SPH fluid simulation from [SPlisHSPlasH](https://github.com/InteractiveComputerGraphics/SPlisHSPlasH).
1516
The particle radius is `0.025`. As the rendering of a fluid should not look like a ball pit, a surface mesh has to be
1617
reconstructed from this particle data. The next image shows a reconstructed surface mesh of the fluid produced by `splashsurf`
1718
with a "smoothing length" of `2.2` times the particles radius and a cell size of `1.1` times the particle radius. The
@@ -36,6 +37,7 @@ The result might look something like this (please excuse the lack of 3D renderin
3637
- [BGEO](#bgeo)
3738
- [PLY](#ply)
3839
- [XYZ](#xyz)
40+
- [JSON](#json)
3941
- [Output file formats](#output-file-formats)
4042
- [All command line options](#all-command-line-options)
4143
- [The `reconstruct` command](#the-reconstruct-command)
@@ -166,6 +168,16 @@ Files with the "`.ply`" extension are loaded using [`ply-rs`](https://crates.io/
166168

167169
Files with the "`.xyz`" extension are interpreted as raw bytes of `f32` values in native endianness of the system. Three consecutive `f32`s represent a (x,y,z) coordinate triplet of a fluid particle.
168170

171+
### JSON
172+
173+
Files with the "`.json`" extension are interpreted as serializations of a `Vec<[f32; 3]>` where each three component array represents a particle position. This corresponds to a JSON file with a structure like this for example:
174+
```json
175+
[
176+
[1.0, 2.0, 3.0],
177+
[1.0, 2.0, 3.0],
178+
]
179+
```
180+
169181
## Output file formats
170182

171183
Currently, only VTK files are supported for output.
@@ -174,7 +186,7 @@ Currently, only VTK files are supported for output.
174186

175187
### The `reconstruct` command
176188
```
177-
splashsurf-reconstruct 0.6.0
189+
splashsurf-reconstruct 0.7.0
178190
Reconstruct a surface from particle data
179191
180192
USAGE:
@@ -203,7 +215,7 @@ OPTIONS:
203215
-i, --input-file <input-file>
204216
Path to the input file where the particle positions are stored (supported formats: VTK, binary f32 XYZ, PLY,
205217
BGEO)
206-
-s, --input_sequence_pattern <input_sequence_pattern>
218+
-s, --input-sequence <input-sequence>
207219
Path to a sequence of particle files that should be processed, use `{}` in the filename to indicate a
208220
placeholder
209221
-n, --num-threads <num-threads>
@@ -242,6 +254,9 @@ OPTIONS:
242254
-o <output-file>
243255
Filename for writing the reconstructed surface to disk (default: "{original_filename}_surface.vtk")
244256
257+
--output-normals <output-normals>
258+
Whether to write vertex normals to the output file. Note that currently the normals are only computed using
259+
an area weighted average of triangle normals [default: off] [possible values: on, off]
245260
--output-octree <output-octree>
246261
Optional filename for writing the octree used to partition the particles to disk
247262
@@ -262,12 +277,16 @@ OPTIONS:
262277
```
263278

264279
### The `convert` subcommand
280+
281+
Allows conversion between particle file formats and between mesh file formats. For particles `VTK, BGEO, PLY, XYZ, JSON -> VTK, PLY`
282+
is supported. For meshes only `VTK, PLY -> OBJ` is supported.
283+
265284
```
266-
splashsurf-convert 0.6.0
267-
Convert between particle formats (supports the same input and output formats as the reconstruction)
285+
splashsurf-convert 0.7.0
286+
Convert particle or mesh files between different file formats
268287
269288
USAGE:
270-
splashsurf convert [FLAGS] [OPTIONS] -i <input-file> -o <output-file>
289+
splashsurf convert [FLAGS] [OPTIONS] -o <output-file>
271290
272291
FLAGS:
273292
-h, --help Prints help information
@@ -281,8 +300,13 @@ OPTIONS:
281300
--domain-min <domain-min> <domain-min> <domain-min>
282301
Lower corner of the domain of particles to keep, format: domain-min=x_min;y_min;z_min (requires domain-max
283302
to be specified)
284-
-i <input-file> Path to the input file with particles to read
285-
-o <output-file> Path to the output file
303+
--mesh <input-mesh>
304+
Path to the input file with a surface to read (supported formats: .vtk, .ply)
305+
--particles <input-particles>
306+
Path to the input file with particles to read (supported formats: .vtk, .bgeo, .ply, .xyz, .json)
307+
308+
-o <output-file>
309+
Path to the output file (supported formats for particles: .vtk, for meshes: .obj)
286310
```
287311

288312
# License

splashsurf/src/convert.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ use structopt::StructOpt;
1313
/// Command line arguments for the `convert` subcommand
1414
#[derive(Clone, Debug, StructOpt)]
1515
pub struct ConvertSubcommandArgs {
16-
/// Path to the input file with particles to read
16+
/// Path to the input file with particles to read (supported formats: .vtk, .bgeo, .ply, .xyz, .json)
1717
#[structopt(
1818
long = "--particles",
1919
parse(from_os_str),
2020
conflicts_with = "input_mesh"
2121
)]
2222
input_particles: Option<PathBuf>,
23-
/// Path to the input file with a surface to read
23+
/// Path to the input file with a surface to read (supported formats: .vtk, .ply)
2424
#[structopt(
2525
long = "--mesh",
2626
parse(from_os_str),
2727
conflicts_with = "input_particles"
2828
)]
2929
input_mesh: Option<PathBuf>,
30-
/// Path to the output file
30+
/// Path to the output file (supported formats for particles: .vtk, for meshes: .obj)
3131
#[structopt(short = "-o", parse(from_os_str))]
3232
output_file: PathBuf,
3333
/// Whether to overwrite existing files without asking

splashsurf/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct CommandlineArgs {
4141
enum Subcommand {
4242
/// Reconstruct a surface from particle data
4343
Reconstruct(reconstruction::ReconstructSubcommandArgs),
44-
/// Convert between particle formats (supports the same input and output formats as the reconstruction)
44+
/// Convert particle or mesh files between different file formats
4545
Convert(convert::ConvertSubcommandArgs),
4646
}
4747

splashsurf_lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "splashsurf_lib"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
authors = ["Fabian Löschner <[email protected]>"]
55
license = "MIT"
66
description = "Library for surface reconstruction of SPH particle data"

0 commit comments

Comments
 (0)