Skip to content

Commit

Permalink
fix: avoid warnings from cargo
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Jan 9, 2024
1 parent 4e3630b commit 3ef4687
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ publish = false

[dependencies]
cached = "*"
derive-new = {default-features = false}
derive_more = {default-features = false, features=["constructor", "add"]}
env_logger = {default-features = false, features=["humantime", "auto-color"]}
derive-new = {version="*", default-features = false}
derive_more = {version="*", default-features = false, features=["constructor", "add"]}
env_logger = {version="*", default-features = false, features=["humantime", "auto-color"]}
gcollections = "*"
grid = "*"
indexmap = {default-features = false}
indexmap = {version="*", default-features = false}
indicatif = {version = "*", optional=true}
intervallum = "*"
itertools = "*"
log = "*"
num = {default-features = false}
num = {version="*", default-features = false}
pest = "*"
pest_derive = "*"
petgraph = {default-features = false}
regex = {default-features = false}
petgraph = {version="*", default-features = false}
regex = {version="*", default-features = false}
rustworkx-core = "*"
strum = { version = "*", features = ["derive"] }

Expand Down
38 changes: 38 additions & 0 deletions src/bin/22.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ a custom interval class. I wanted sorting by lower edges and an easy way to get
the minimum bound. Intervallum for some reason doesn't have public access to
`::new()` or `::low()`. Ideally I also wanted to be able to shift an interval, too.
Plotting code for Blender:
```python
import bpy
import bmesh
from mathutils import Matrix
import numpy as np
TXT = """\
1,0,1~1,2,1
0,0,2~2,0,2
0,2,3~2,2,3
0,0,4~0,2,4
2,0,5~2,2,5
0,1,6~2,1,6
1,1,8~1,1,9"""
def add_object(bm, start, end):
scale = np.abs(start - end) + 1
matrix = Matrix.LocRotScale((start + end) / 2, None, scale)
bmesh.ops.create_cube(bm, size=1.0, matrix=matrix)
bm = bmesh.new()
for line in TXT.splitlines():
ax, ay, az, bx, by, bz = map(float, line.replace("~", ",").split(","))
add_object(bm, np.array((ax, ay, az)), np.array((bx, by, bz)))
me = bpy.data.meshes.new("Mesh")
bm.to_mesh(me)
bm.free()
obj = bpy.data.objects.new("Object", me)
bpy.context.collection.objects.link(obj)
```
*/

use core::fmt::{Debug, Formatter};
Expand Down

0 comments on commit 3ef4687

Please sign in to comment.