Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

Showing posts with label normalize. Show all posts
Showing posts with label normalize. Show all posts

June 16, 2013

Normalizing spline points. (make equidistant)

In college I had the opportunity to learn 3dsMax to a reasonable level. It is great in many ways, and one modifier was particularly nice: the normalize spline modifier. Normalize spline places the curve points at evenly spaced distances. If you don't know why that is awesome, you'll probably have to see it to understand.

Prompted by a post on blender.stackexchange i've started writing a blender version of the modifier, I don't foresee it to be a full blown replica but time permitting it will at least produce a replica polyline (edge mesh) with BGL overlaying points so interaction can help a user decide what distances the points should occur at.

more later.

preview code:

Note: This only draws the verts using BGL at their current locations. A nice short bgl snippet. https://gist.github.com/zeffii/5796615
.
Using Sverchok and Scripted Node : https://gist.github.com/zeffii/782e84fbdc8e8f23f64b

June 03, 2013

Normalize and Quantive

A question on BA.org looking for a script that can scale an object to within the boundaries of -1 and 1 for all axis (called normalizing, maybe erroneously) and then placing further constraint on the geometry that it must fall within grid slices of 0.1 .. so xyz can only have values between the range (-1.0, -0.9 -0.8 ....0.8, 0.9, 1.0), i made the following scripts.

here is the development version:
here is everything chucked into one loop.

Alternative code