ZWCAD Flex makes it easy to turn 2D shapes into 3D models using a wide range of drawing and modeling tools. This guide introduces how to create 2D fills, 3D meshes, surfaces, and solid forms. Whether you're working on simple geometry or more complex structures, the steps below will help you get started with 3D design in ZWCAD Flex.
Use the SOLID command to create filled triangles or quadrilaterals in 2D. The shape depends on the order you click the points.
The following figure shows the specified point order for creating solid filled triangles, quadrilaterals, and irregular shapes.
Use the 3DFACE command to create 3D faces in space.
You can change the position (X, Y, Z) of the points in the Properties palette.
Execute the 3D command to create 3D mesh shapes.
A 3D mesh is a 3D object made of connected points forming a wireframe. ZWCAD Flex includes ready-made mesh types like box, wedge, pyramid, and more.
· Box mesh (AI_BOX)
Set the length, width, height, and rotation angle of the box to draw the box mesh.
· Wedge mesh (AI_WEDGE)
Set the length, width, height, and rotation angle of the wedge to draw the wedge mesh.
· Pyramid mesh (AI_PYRAMID)
Set the four base points and either the top point (vertex), ridge, or four top points to shape the pyramid.
· Cone mesh (AI_CONE)
Set the bottom and top radius (or diameter), and how many segments divide the base (default is 16).
· Cylinder mesh (AI_CYLINDER)
Set the base center, radius (or diameter), height, and number of segments around the sides (default is 16).
· Sphere mesh (AI_SPHERE)
Set the center, radius (or diameter), and number of vertical and horizontal sections (like longitude and latitude lines). Default is 16 for each.
· Dish mesh (AI_DISH) and Dome mesh (AI_DOME)
Set the center, radius (diameter), number of dish divisions, and number of top-to-bottom divisions.
Dish divisions are to cut it vertically (perpendicular to the XY plane), the default is 16. Top-to-bottom divisions slice it horizontally (parallel to the XY plane) and evenly, the default is 8.
· Torus mesh (AI_TORUS)
Specify the center, the torus radius (diameter), the tube radius (diameter), the number of divisions around the body and around the ring. The default is 16 for both.
Use the 3DMESH command to freely draw a polygon mesh. Use the PFACE or 3DFACE commands to create polyface mesh.
Polygon Mesh
Mesh Direction
To create a polygon mesh using the 3DMESH command, you define how many points it has in two directions:
· M direction (secondary axis)
· N direction (initial axis)
For example, in the following figure, M = 4 and N = 3.
Mesh Vertices
If you set M points across and N points down, you'll get a mesh with M x N points. Each point is numbered in a form of (1,1), (1,2), (1,3),..., (1, M),..., (M, 1),..., (M, N).
For example, and the points in a 3 * 4 mesh will be numbered in this way.
Polyface Mesh
PFACE Command
Execute the PFACE command to create a polyface mesh:
1. Enter all the points you want to use. They will be numbered (1, 2, 3, etc.).
2. Pick which points to connect for each face by entering their numbers.
As shown in the figure, if you set 8 points, you can create faces like
· Face 1: points 1, 2, 3, 4
· Face 2: points 3, 4, 5, 6
· Face 3: points 5, 6, 7, 8
Execute the REVSURF command to spin an object around an axis to create a revolved mesh.
· You can revolve shapes like lines, circles, arcs, ellipses, etc.
· The axis you revolve around can be a line or an open polyline. If you used a polyline, only start and end points of it will be used.
Mesh Density
The mesh density is controlled by two settings:
· The SURFTAB1 sets how many lines go around the object (like slicing a pie).
· The SURFTAB2 sets how many mesh lines go up and down the shape (like dividing its height).
If you're revolving a smooth shape like a line or arc, the mesh is evenly divided. If you're using a polyline, the vertical lines will only appear at the ends of each segments.
In the image below, you can see that different objects (an arc, a polyline, and a line) were revolved. Both SURFTAB1 and SURFTAB2 are set to 6, so the mesh is split to 6 parts in each direction.
· For the arc and line, the (vertical) divisions are evenly spaced
· For the polyline, vertical lines only appear at the ends of each segment, so the surface looks more stepped.
The higher the mesh density, the smoother the mesh surface. The following figure shows how different mesh numbers in revolution direction and contour direction changes the shape.
Revolution Direction
The direction your object revolves depends on two things:
· The revolution angle (positive or negative)
· The direction of the axis (from the point you click to the far end)
If the angle is positive, the rotation follows the righ-hand rule:
· Point your right thumb along the axis direction — the way your fingers curl shows the direction the object will revolve.
In the following figure, a line is used as a revolution axis. Point your right thumb towards the left (the direction of revolution axis), and the direction your fingers curl shows the direction the object will revolve.
Use the TABSURF command to create a 3D mesh by extruding a shape along a path (like dragging a 2D shape through space).
· You can extrude shapes like lines, arcs, circles, elliptical arcs, ellipses, polygons, polylines, or splines.
· The path must be a line or open polyline, and only its start and end points matter.
Mesh Density
The mesh density is controlled by how many lines are used in two directions:
· The number of lines along the path is always 2
· The number of lines across the shape (contour direction) is set using the system variable SURFTAB1.
In the following figure, SURFTAB1 is set to 6, so each shape (line, arc, polyline) is divided into 6 sections across its width as it follows the path.
Extrusion Direction
The extrusion direction depends on where you click on the path. The mesh is always extruded from the point you pick toward the other end of the line.
In the following figure, the extrusion direction depends on what points you choose.
The RULESURF command creates a mesh surface between two shapes — like stretching a surface from one shape to another.
You can use shapes like lines, arcs, circles, elliptical arcs, ellipses, polygons, polylines, and splines.
If the first shape is closed, the second object must also be a closed. The number of mesh lines around the shape is controlled by SURFTAB1.
· When a circle is selected, the grid lines start at 0°.
· When a polygon is selected, the grid lines start from vertices.
· When a rectangle is selected, the grid lines start from the first corner of rectangle.
· When a closed polyline is selected, the grid lines start from the start point of the polyline.
If you're using open shapes, the direction of the grid lines depend on the point you click first. The point closest to where you click becomes the starting point for mesh lines. The mesh then connects the points from both shapes in order, one by one.
As shown in the figure, clicking on different parts of the shapes creates different meshes.
Use the EDGEESURF command to select four connected edges to create a mesh.
You can use lines, arcs, splines, elliptical arcs, splines, and open polylines.
The first edge selected determines the M direction of mesh, and the edge connected to the first edge is the N direction of mesh.
· SURFTAB1 sets number of meshes in M direction (horizontal)
· SURFTAB2 sets number of meshes in N direction (vertical)
The EXTRUDE command allows you to extrude 2D or 3D objects to create solids or surfaces.
· If the shape is open, it creates a surface.
· If the shape is closed, it can create either a solid or a surface.
You can extrude planar 3D faces, polylines, polygons, 3D polylines, circles, arcs, ellipses, elliptical arcs, splines, and regions.
Create Mode
When you extrude a closed shape, you can set to creation mode.
· Solid mode creates 3D solids.
· Surface mode creates 3D surfaces.
Extrusion Settings
Extrusion settings include:
· Extrusion height
- positive value: pulls the shape up
- negative value: pushes the shape down
· Extrusion direction: start point to end point
· Extrusion path:defines extrusion direction and distance
· Taper angle: tilts the sides inward or outward
The REVOLVE command spins a 2D or 3D shape to create solids or surfaces.
· If the shape is open, it creates a surface
· If the shape is closed, you can create either a solid or a surface
You can revolve lines, polylines, 3D polylines, polygons, circles, arcs, ellipses, elliptical arcs, splines, and regions.
Create Mode
When you revolve a closed shape, you can set to creation mode.
· Solid mode creates 3D solids.
· Surface mode creates 3D surfaces.
Revolution Axis
You can define the revolution axis in the following ways:
· Choose the start and end points to define the axis.
· Use an existing object like a line, a polyline, or a spline (the direction is from the start to the end)
· Use a preset axis like the X, Y, or Z axis (it will rotate in the positive direction of that axis)
The revolving direction follows the right-hand rule:
Point your right thumb along the axis direction — the way your fingers curl shows the direction the object will revolve.
The SWEEP command allows you to move a shape along a path to create solids or surfaces.
· If the shape is open, it creates a surface.
· If the shape is closed, it can create a solid or a surface.
You can sweep lines, polylines, 3D polylines, circles, arcs, ellipses, elliptical arcs, splines, and regions.
Create Mode
When you sweep a closed shape, you can set the creation mode.
· Solid mode creates 3D solids.
· Surface mode creates 3D surfaces.
Sweep Settings
You can set the alignment, base point, scaling ratio, and twist angle of the sweep.
· If the path intersects the shape, it sweeps directly from that spot.If the path doesn't touch the shape, you can choose to align it vertically with the path so it starts in the right position.
The following figure illustrates two ways of sweeping: vertical alignment and non vertical alignment.
· The base point controls how the shape lines up with the path during a sweep.
- If the path touches the shape, it sweeps from that point
- If the path doesn't touch, you can pick a base point on the shape to align it with the path
- If you don't set one, the center of the shape will be used by default
The following figure shows the difference between setting a sweep base point and not.
· Set a scale factor to make the shape grow or shrink as it moves along the path:
- If the scale factor is greater than 1, the shape gets bigger along the way
- If the scale factor is less than 1, the shape shrinks toward the end of the path.
The following figure shows when the scale factor is greater than 1 and less than 1.
· Set the twist angle to make the shape rotate as it moves along the path
- The shape will slowly turn from the start to the end of the path, reaching the full twist angle at the end.
The following figure shows how different twist angles create different amounts of rotation in the final 3D shape.
The LOFT command creates a solid or surface by connecting two or more cross-sections.
· If the cross-sections are open, it creates a surface.
· If the cross-sections are closed, it can create a solid or a surface.
You can loft lines, polylines, 3D polylines, circles, arcs, ellipses, elliptical arcs, splines, and regions.
Create Mode
When selecting closed objects for lofting, you can set the creation mode.
· Solid mode creates 3D solids.
· Surface mode creates 3D surfaces.
Loft Settings
You can specify the guide curve, path, and surface style for the loft.
· A guide curve starts at the first cross-section and ends at the last. You can use 2D splines, arcs, 2D polylines (only one line segment), 3D polylines, elliptical arcs, and lines.
As shown in the figure, the two circles are used as cross sections. The shape of the created surface is different in the two cases of depending on the presence of a guide curve.
· A path must start at the first cross section and end at the last. You can use splines, circles, arcs, ellipses, elliptical arcs, lines, and 2D polylines.
As shown in the figure below, the two circles are used as cross sections. The shape of the created surface is different in the two cases depending on the presence of a path.
· A surface style can determine how the surface connects the cross-sections:
- Ruled: Creates straight connections between each cross-section, with sharp edges
- Smooth fit: Makes the surface curved and flowing, with sharp edges
- Normal point: Gives control for how the surface tilts or curves, can set to match start, end, or all cross sections.
The following figure shows the difference among the different styles (ruled, smooth fit, set the surface normal)
Thickness adds depth to 2D shapes by stretching them up or down along the Z axis, making them appear like 3D objects.
In the following figure, thickness is added to parallel 2D objects to create the appearance of 3D solids in space.
You can apply thickness to lines, polylines, circles, arcs, and single line text using SHX font. A positive value pushes the shape upward, and a negative value pulls it down.
You can set thickness properties for objects the following ways:
· Use the PROPERTIES command to set the thickness of selected 2D object in the Properties palette.
· Use the CHANGE command to change the thickness of 2D objects in current drawing.
· Use the CHPROP command to change the thickness of 2D objects in current drawing.
· Use the ELEV command to set the thickness of newly created 2D objects.
· Use the THICKNESS system variable to set the thickness of newly created 2D objects.