-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can sverchok create custom vertex connectors like grasshopper from an existing mesh? #2362
Comments
hopefully i'm interpreting the question accurately,. you want to feed sverchok an arbitrary edge-based mesh, as shown in your screenshot, and ask sverchok to generate these 'connectors' with holes of a certain diameter. For 3d printing and reconstructing a model with sticks of some kind? we don't yet have a node that spits out the geometry of such connectors. (that's not to say that it isn't possible) |
there are a few ways to approach this:
|
SkinMesher nodethis is a little more involved, because you must supply both the vertices and the edges |
"""
in verts v
in edges s
in radius s d=0.3 n=2
out overts v
out ofaces s
out oedges s
"""
from mathutils import Vector
from collections import defaultdict
for obj in zip(verts, edges):
overts.append([])
ofaces.append([])
oedges.append([])
new_verts = overts[-1]
new_faces = ofaces[-1]
new_edges = oedges[-1]
vert_list, edge_list = obj
connection_dict = defaultdict(set)
for edge in edge_list:
sx = sorted(list(edge))
connection_dict[sx[0]].add(sx[1])
connection_dict[sx[1]].add(sx[0])
for idx1, idx_set in connection_dict.items():
# gather vertex prime
vec1 = Vector(vert_list[idx1])
new_verts.append(vert_list[idx1])
start_idx = len(new_verts) - 1
# gather vertex radials
for offset, idx2 in enumerate(idx_set):
vec2 = Vector(vert_list[idx2])
rate = radius / (vec1-vec2).length
new_vtx = vec1.lerp(vec2, rate)[:]
new_verts.append(new_vtx)
new_edges.append([start_idx, start_idx + offset + 1]) |
Thanks for the info zeffii! I'm new to nodes and sverchok so it may take a few attempts before I work thru this, but based on what you are showing me it should work for my purposes. |
This can work too. |
maybe try of this 2.79 |
Blendersushi posted something similar. |
Problem statement
Can sverchok create custom vertex connectors like grasshopper from an existing mesh?
Please describe your problem here.
I am trying to create custom connectors which would describe the verticies in low poly meshes that I have designed in blender. They would connect to linear material which would correspond to the edges of the mesh. I know of similar work being done with Grasshopper, which led me to sverchok. Does sverchok have this capability. I've attached a sample mesh, as well as examples of the grasshopper generated connectors.
Expected result
What did you expect to see as a result of those steps?
Actual result
What did you actually get?
Sverchok version
This is especially important for installation-related issues. Please specify how do you install Sverchok: from sverchok-master.zip from github, or from release zip file, or from cloned git repo.
The text was updated successfully, but these errors were encountered: