The 3D Mesh Generator is a C++ project that converts 2D meshes or other models into 3D meshes. This tool reads 2D mesh data, extrudes it along the z-axis, and exports the resulting 3D mesh in a standard file format like OBJ.
- 2D to 3D Conversion: Easily convert 2D mesh data into 3D meshes.
- Customizable Height: Specify the height for the extrusion to create the 3D mesh.
- OBJ Export: Export the generated 3D mesh to an OBJ file for use in various 3D applications.
- C++11 or later
- CMake 3.10 or later
-
Clone the repository:
git clone <https://github.com/sergyDwhiz/3DMeshGen.git> cd MeshGen
-
Create a build directory and navigate into it:
mkdir build cd build
-
Run CMake to configure the project:
cmake ..
-
Build the project:
make
- Prepare your 2D mesh data in
data/input_mesh.txt
in the following format:v x1 y1 v x2 y2 ... f v1 v2 v3 ...
v 0.0 0.0 v 1.0 0.0 v 1.0 1.0 v 0.0 1.0 f 1 2 3 f 1 3 4
you can load a file containing a 2D Mesh
-
Run the executable:
./3DMeshGen
-
The generated 3D mesh will be saved to
data/output_mesh.obj
. -
Visualize the output
python3 visualize_mesh.py
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE
file for details.
- Inspired by various 3D modeling tools and libraries.