jjennings955 / openmesh-python-subdivide

Openmesh python bindings with loop subdivision hackishly (and possibly very inefficiently) exposed.
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Loop subdivision #1

Open sunyifan2017 opened 4 years ago

sunyifan2017 commented 4 years ago

Hello, it is a fantastic work.

I wanna use Loop subdivision, I wonder is there any available code in your project to operate Loop subdivision? (Cause the description does not mention this part.)

Thank you.

jjennings955 commented 4 years ago

You should be able to just do.

import openmesh as om
V = some_vertices
F = some_faces
num_subdivision_steps = 1
update_points = True
mesh = om.TriMesh(V, F)
mesh.subdivide(num_subdivision_steps, update_points)

Sorry for the late response. I wasn't expecting anyone to use this :)

I should note that I implemented this as a quick hack, so make sure you carefully test it if it's going to be used for something important.