# Wildmeshing tutorial¶

This is a jupyter notebook. The “real” notebook can be found here.

To use it just import it!

import wildmeshing as wm


We also import meshplot to visualize

import meshplot as mp


## Triangulation¶

The 2D meshing supports high order

V, F, nodes, F_nodes = wm.triangulate_svg("rocket.svg")

1/3 n sub paths: 18
2/3 n sub paths: 5
3/3 n sub paths: 12


Plot the resulting mesh

mp.plot(V, F, shading={"wireframe": True})


The resulting mesh with the high-order nodes:

p = mp.plot(V, F, return_plot=True, shading={"wireframe": True})
p


The previous mesh also outside triangles, to avoid this we enable the option cut_outside

V, F, nodes, F_nodes = wm.triangulate_svg("rocket.svg", cut_outside=True)

1/3 n sub paths: 18
2/3 n sub paths: 5
3/3 n sub paths: 12

p = mp.plot(V, F, return_plot=True, shading={"wireframe": True})
p


I we want to carve out the window we need to speficy a point inside

V, F, nodes, F_nodes = wm.triangulate_svg("rocket.svg", cut_outside=True, hole_pts=[[255, 165]])

1/3 n sub paths: 18
2/3 n sub paths: 5
3/3 n sub paths: 12

import numpy as np

p = mp.plot(V, F, return_plot=True, shading={"wireframe": True})

wm.tetrahedralize("small.stl", "out.msh")

True