toxicblend 0.0.4

Client/Server application for Blender. WIP
toxicblend-0.0.4 is not a library.
Visit the last successful build: toxicblend-0.0.22

Crates.io Workflow Workflow dependency status

toxicblend.rs

Work in progress.
This will be a rust port of my, now defunct (thanks bitbucket), scala based project toxicblend

Blender addon installation

Follow instructions in install_as_blender_addon.md

Rust requirement

Requires #![feature(hash_drain_filter)] and #![feature(map_first_last)] i.e. rust +nightly

Run local server

The blender addon is based on a client-server model using grpc and tonic. The blender addon is the client, and it only connects to localhost. The server binds to localhost as well; so it should not be reachable from any other computer (not tested though), run it with this command:

cargo +nightly run --bin server --release

Run blender

If the grpc server (for any unimaginable reason) would crash, blender will hang waiting for response. This can easily be fixed if you run blender from the console. A ctrl - C will fix it.

Addon commands:

These operations all operate in blender edit mode:

2d_outline

Will convert a flat mesh object into an outline. Right now the data must be in a plane crossing origin (one axis need to be zero)

from

from

Centerline

Takes the output of the 2d_outline command and calculates the 3D centerline.

This operation only works on non-intersecting loops with islands of loops of edges inside. E.g. letters.

If you only need the 2D centerline, you can simply scale the added dimension to zero.

Keyboard command: s z 0 for setting Z to zero.

from

Simplify

Works similarly to the built-in simplify command, but instead of a distance it takes a percentage. This percentage is applied to the largest dimension of the AABB and that value is used as the Ramer–Douglas–Peucker distance. Works on 3D linestrings/polylines.

This percentage change makes it possible to simplify tiny objects without having to scale them up, simplify and then scale them down again.

Voronoi

Runs the voronoi sweepline algorithm on the input 2D points and lines.

Knife intersect

Runs on a single flat mesh object and tests for self-intersections. If an intersection is found, the intersecting edges will be split at that point.

Select end vertices

Selects all vertexes that only connects to one other vertex. Useful for identifying dangling vertices.

Select intersection vertices

Selects all vertexes that connects to three or more other vertices. Useful for selecting intersections.

Debug object

Checks a mesh for anomalies, double edges etc. Will print results to the console.

Todo

  • Improve the addon installation process, maybe get rid of the site-package files by putting them inside the plugin itself.
  • Document the rest of the operations.
  • Add command line options to the server, setting bind address and port. Possibly feature gated for security reasons.
  • Port the rest of the operations.