plut / ConstructiveGeometry.jl

Algorithms and syntax for building CSG objects within Julia.
MIT License
50 stars 2 forks source link

Save error #28

Open tpatgm opened 2 years ago

tpatgm commented 2 years ago

Hello, I'm new user of ConstrcutiveGeometry. WhanI run the sphre_cube example, there is the following error with save. What am I doing wrong. Thank you for your support Thierry

julia> save("sphere_cube.png", u) Errors encountered while save File{DataFormat{:PNG}, String}("sphere_cube.png"). All errors:

MethodError: no method matching save(::File{DataFormat{:PNG}, String}, ::ConstructiveGeometry.ConstructedSolid{:union, Vector{ConstructiveGeometry.AbstractGeometry{3}}, 3})

plut commented 2 years ago

The actual plotting is done by CairoMakie, so this is how it should be done:

using ConstructiveGeometry, FileIO, CairoMakie
save("/tmp/a.png", sphere(10))

(I guess I could add an error message when no Makie backend is loaded, but currently I don't know how to detect this).

tpatgm commented 2 years ago

Thank you for your answer, here is the error message for save (using julia 1.7 on windows 10) image