GstarCAD command

3D MESH command

Create a polygon mesh by defining an M × N grid and specifying the exact 2D or 3D coordinates of every vertex.

Command
3DMESH
Alias
—
Tool group
3D
Level
Advanced

What does 3DMESH do?

3DMESH creates a polygon mesh by defining a rectangular grid of vertices in the M and N directions. You specify the number of vertices in each direction and then define the position of every vertex using 2D or 3D coordinates.

The command provides precise control over the shape of the mesh and is particularly useful for creating irregular surfaces from known coordinate points. GstarCAD describes it as a traditional mesh creation method that is also well suited to scripted or programmed workflows.

How to use the command

  1. Type 3DMESH, then press Enter.
  2. Enter the number of vertices required in the M direction.
  3. Enter the number of vertices required in the N direction.
  4. Specify the location of every vertex when prompted.
  5. After the final vertex is specified, GstarCAD creates the polygon mesh.
Command: 3DMESH ↵
Enter size of mesh in M direction: 3 ↵
Enter size of mesh in N direction: 3 ↵
Specify location for vertex (0, 0): 0,0,0
Specify location for next vertex: 0,50,10
Specify location for next vertex: 0,100,0

Key 3DMESH settings

The shape and resolution of the mesh are determined by the M and N grid sizes and the coordinates assigned to each vertex.

M direction
Sets the number of vertices in one grid direction. The value must be between 2 and 256.
N direction
Sets the number of vertices in the second grid direction. The value must also be between 2 and 256.
Vertex coordinates
Defines the position of each mesh vertex using either 2D or 3D coordinates.
Mesh density
Increasing the number of M and N vertices creates more mesh faces and allows a more detailed surface shape.

Practical example: create a simple terrain surface

Suppose you have nine surveyed points arranged in a 3 × 3 grid, with different Z elevations. Run 3DMESH, enter 3 for both the M and N directions and then enter the X, Y and Z coordinates of all nine points.

GstarCAD connects the vertices to form a polygon mesh representing the changing elevations. The mesh remains open in the M and N directions, but it can later be closed using PEDIT when required.

Tip

Use 3DMESH when you need exact control over every vertex. For standard mesh primitives such as boxes, cylinders, spheres or toruses, the MESH command is usually faster.

All commands Updated 13 October 2026
Continue learning
View all commands

Ready to switch to GstarCAD?

Get personalized advice on licensing, migration, and deployment for your business.

Contact us Buy now

No obligation — reply within 24h

Your Cart

Subtotal

Price does not include local taxes or duties.

Proceed to Checkout

Cookie preferences

Choose which cookies you want to allow. Essential and payment cookies cannot be disabled as they are required for the site to function.

Essential

Required

Core functionality including authentication, shopping cart, and language preferences.

Payment

Required

Required for processing payments securely through Stripe and PayPal.

Analytics

Help us understand how visitors interact with our site to improve the experience.

Marketing

Used to deliver relevant advertisements and measure campaign performance.

Functional

Order attribution and traffic source tracking to help us understand how customers find our store.