I don’t exactly what you mean by turning a line into a volume?
Do you want to have like a small cylinder?
You can extrude your line perpendicularly to it to create a rectangle face and the create a revolution with this face around your initial line.
If you prefer a rectangle, you can extrude the rectangle face in a perpendicular direction.
I think by volume I meant a surface yes, apologies.
Basically I would like to be able to, from an arbitrary Voronoi diagram like this, give thickness to the lines to treat them as a surface of their own.
I would assume that this line extrusion is the way to go then. How would it treat the tri-junctions?
a voronoi diagram is nothing more than a mesh, in your case a 2D mesh, you could go thought its connectivity and create each time the line and extrude it as fred mentioned.
could I ask the application/idea behind this? I find quite strange to go from mesh to CAD generally is the opposit, i am curious about.
can not remember if you can extrude edges in geom but if yes, it is quite simple to do in it and if not it takes a little bit of more steps but also faisable. (clearly using a script, not by gui)
I would like to mesh all the grains (cells) as subdomains of a 2D mesh.
The specificity is that the grain boundaries (the edges) would need to be 2D not 1D cause I would like to give them different properties.
from the image itself it is paraview,(or paravis or other flavors of it) and as it is from 21, it is for sure a mesh what they use.
for what you are trying to do you have 2 options:
doing it in cad as you are suggesting, i personally think that it will be easier in geom as the scripting is way simpler to do.
doing it in mesh directly, you can create the cells directly.
i have way less knowledge in coding something like this in mesh but in geom it can be done for sure.
in any of the two options the first part is the same.
you go into the corresponding workbench, geom or shaper or mesh. create one face, the simplest you could, and then go to file/dump script (or dump python i can not remember right now) and open and modify that script to create everything.
this could be also coupled with a little bit of image recognition to go from image to resulting data automatically.
create a plane that is as large in ounding box as your nodes
use that plane use partition of the compound of all the edges
go to mesh, select the resulting compound create mesh
5b. select as 2D algorithm polygon by face (or something like that)
5c. go to 1D wire discretisation, → number of elements per edge-> 1
then compute
you will get what you are looking for
also if i might give you another tip: import your photo in inkscape trace it MANUALLY! (this will take like 2 minuts) and then remove the image save it as svg which is a text file, and with some grep commands (linux) you could get so easily the nodes and connectivity
here you have a script doing what I said, I needed to go back and forth some times (erase some items so it might be a little bit dirty…) example.py (3,5 KB)