compas
compas copied to clipboard
adding increase mesh subdivision along a stripe
adding a function to increase the subdivision of a compas mesh along&within a certain stripe.
As a temporary solution, you may wish to consider compas_singular's strip densification functionality for quad-like meshes. I have also found it applicable for extending compas_skeleton:
from compas_singular.datastructures.mesh_quad_pseudo_coarse.mesh_quad_pseudo_coarse import CoarsePseudoQuadMesh from compas.datastructures import mesh_flip_cycles
coarse_mesh = CoarsePseudoQuadMesh.from_vertices_and_faces(mesh.to_vertices_and_faces()) coarse_mesh.collect_strips() coarse_mesh.set_strip_density_target(strip_key, density_target) coarse_mesh.densification() mesh = coarse_mesh.get_quad_mesh() mesh_flip_cycles(mesh) #ensures ccw orientation