How to draw a model from lines

Hi all
I am new to three.js and did a some getting started tutorials and that worked just fine.
I am stuck with this problem. I would like to draw a solid body like this.


I have data about the edges. Like lines and circles and arcs but I cannot see how to build that model in three.js.
I tried with points but that does not work with the rounded edges. I tried with wireframe but it only shows the edges, not the faces.
Could someone give me a hint or example? Thank you.

Three.shapes could be used

https://threejs.org/docs/#api/en/extras/core/Shape

https://threejs.org/docs/?q=geomet#api/en/geometries/ShapeGeometry

https://threejs.org/examples/?q=shap#webgl_geometry_shapes

https://threejs.org/examples/?q=shap#webgl_geometry_extrude_shapes2

Thanks for your reply. I tried that in an example but it is not what I’m looking for.
I just realize that my example is a “bit” too simple. :slight_smile:
I would like to build the full model without extruding, as the model might not always be “symetrical”.

if you can convert your data to triangles then you can create the mesh using buffergeometry Three.js Custom BufferGeometry

with data about lines , arcs & circles ; shapes is the way to go , you can skip the extrusion part and have a flat shape , but shape only works in 2d space ,

so you wont be able to bend a shape

1 Like

You can create any geometry according to your wishes. Start with simple shapes. It takes some practice to create more complicated shapes.

You can find examples in the Collection of examples from discourse.threejs.org.

See

BeginnerExample step 2, step 5, step 6, step 12

RoundEdgedBoxFlat

CirclesOnCurve

TubeGeometryFrom2Dshape

Curved2Geometry

AnimatedConveyorBelt

and more.