Yes, you can use foreach_set, which sets a whole batch of things at once from an array. The array needs to go in the same order as the points.
For radii, you just need:
For the coordinates, try:
# Reshape into an n x 3 array of vectors
coords = self.positions.reshape(len(coords)//3, 3)
# Add ...
Nearly every modifier has a "Vertex group" field, in which you can limit the action to vertices belonging to that vertex group only (or the opposite, using the double arrow icon).
As the vertex are weighted to the vertex group, the effect can be fine tuned for smooth transitions.
In my example I used a limited Lattice modifier.
Locate and select an edge-loop in your jacket-mesh which follows the path of your zip.
ShiftD duplicate it, and P separate it to a new object.
Convert it to a curve.
I found I could set the spline-type to Bezier and decimate it to 0.1 without losing visible detail.
Place the origin of your curve at its bottom control-point, and move the zip-array to the ...
Besides the problems mentioned in the comments, there is something wrong with the spiral. The softbody simulation is very slow for some reason. The recreation of the softbody physics didn't help so I recreated the curve itself. (created a spiral with the Extra Curves add-on, set Bevel > Depth in the settings, rotated, and scaled it a bit). This fixed it.
Here is what I do for such shape.
Use a Bezier curve, in this example called "path to follow" for the general curving shape.
Use a different Bezier curve, in this example called "bevel shape" for the shape you have drawn in red.
Use a third Bezier curve, in this example called "taper" to control how the bevel tapers from one ...
This code can turn Vertex Position into Vertex Colors,that all I Know.I'm a fresh.
from mathutils import Color, Vector
my_object = bpy.context.active_object.data
vert_list = my_object.vertices
color_map_collection = my_object.vertex_colors
if len(color_map_collection) == 0:
color_map = color_map_collection['Col']
The only way to approximate this object with high fidelity is that you use the twist option of the simple deform modifier and put it to 720 degrees, in the section of the simple deform modifier, then from that point, you can recreate the double flute. If you are using 3DSMax, there is a twist modifier as well.
Don't forget to flip normal and then extrude ...
Crazy cloth pressure solution
I'm pretty weak at physics, so posting this before someone comes up with a boring solution of simply goal vertex group having weight proportional to distance from the beginning of the curve...
Convert the curve to mesh.
Select starting vertices (in my case a few embedded inside the block) and add them to vertex group PIN.
Sadly this can't be done with curve's builtin bevel function yet, Mirror modifier on bezier curves acts on the generated mesh level, not directly on bezier data unfortunately.
You'll have to fake it with modifier equivalents.
Remove any native bevels you bezier curve has
Add a Mirror modifier with merge enabled
Add a Solidify modifier, set the desired ...
Apply the rotation of both the curve and the domino
In Edit mode, rotate the mesh of your domino to align it with the global orientation
Put the domino at the same point as the curve's origin
In the Array modifier, choose only one Offset axis
Find the right Deform Axis in the Curve modifier
I cannot see how to remove the post, but I've found the answer to my question - I needed to go into the 'item' in edit mode and reduce the mean radius back to 1 after the transforms had been applied in object mode.
It depends on your topology, but if think ahead, to include the width of your kerb in the road-plane, (and the style suits you), you can take an approach like this:
I Inset your road, and invert the selection to select the rim
ShiftD duplicate the rim, and P separate it to a new object.
You may have to make a few adjustments to the cross-cuts in the rim, ...
I would enable Add Curve: Extra Objects in preferences, so that I could add a spiral. Instead of trying to wrap a Bezier curve around the pole, I would add an Archemedian spiral and set its parameters to match the pole. Here's an example:
and the parameters that produced the spiral:
This would work nicely if you have a material that makes the tube look ...
It's not the Shrink Wrap modifier but the curve guide that you've created that causes the problems.
Curves have normals and can be tilted with Ctrl+T in Edit mode. In Edit mode, you also can activate the [X] Normals overlay. Just lower the number for the length to 0.005 else you will get a mess with the default value:
Normals of the curve guide
Now you can ...