Skip to content

unixpickle/path2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path2d

This is a project to parse SVG paths and create model2d curves from them.

Example

Create a model2d.Solid from a path:

curves, err := ParseSVGPath(`
    M 10 315
    L 110 215
    A 30 50 0 0 1 162.55 162.45
    L 172.55 152.45
    A 30 50 -45 0 1 215.1 109.9
    L 315 10
    h 100 z
`)
if err != nil {
    // handle error.
}
mesh := model2d.NewMesh()
for _, curve := range curves {
    mesh.AddMesh(model2d.CurveMesh(curve, 10000))
}
solid := mesh.Solid()

About

Parse and render SVG paths

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages