ConstructiveGeometry.jl icon indicating copy to clipboard operation
ConstructiveGeometry.jl copied to clipboard

Save error

Open tpatgm opened this issue 2 years ago • 2 comments

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})

tpatgm avatar Mar 25 '22 09:03 tpatgm

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).

plut avatar Mar 25 '22 21:03 plut

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

tpatgm avatar Mar 28 '22 06:03 tpatgm