# Meshing basic geometries

Is it easy to create basic geometries (say cuboids, cylinders, spheres etc.) with tritetmesh?

## Question information

Language:
English Edit question
Status:
Solved
For:
TriTetMesh Edit question
Assignee:
No assignee Edit question
Solved by:
Harish Narayanan
Solved:
Last query:
 Revision history for this message Johan Hake (johan-hake) said on 2009-12-15: #1

I would say yes. (maybe not spheres?)

However, you need to provide all input nodes manually. You also need to provide the Piecewise Linear Complex (PLC) in 3D which tells tritetmesh how the surface is connected.

I can add some demos for a general cuboid and cylinder. You should be able to get something useful out of the tetmesh demo though.

Johan

 Revision history for this message Harish Narayanan (hnarayanan) said on 2009-12-16: #2

I will be interested in seeing a general cuboid/cylinder. I didn't understand what was going on in the tetmesh demo.

 Revision history for this message Johan Hake (johan-hake) said on 2009-12-16: #3

Ok I have added a small Cylinder demo.

You have to recompile it as I also added a small utility function for adding of facets.

Johan

 Revision history for this message Harish Narayanan (hnarayanan) said on 2009-12-16: #4

Thanks, I recompiled it and tested the demo. It gives me a nice cylinder. I will go through the code and see how to create other basic geometries.

 Revision history for this message Johan Hake (johan-hake) said on 2009-12-16: #5

Good!

Notice that there are a companion function to rectangular_collar which is triangular_collar. Instead of binding two rings of vertices together using rectangles, that function split the rectangle into two triangles. So the latter function will yield you two lists of vertices which should be added as facets to the editor in for example a for loop.

Johan

 Revision history for this message Harish Narayanan (hnarayanan) said on 2009-12-16: #6

I have no idea what those sentences mean, but I will find out!