# RULESURF Command [GstarCAD 2019](Help%20System/GSTARCAD/2019/Index.md) → [Commands](Help%20System/GSTARCAD/2019/Commands/(Commands).md) → [R](Help%20System/GSTARCAD/2019/Commands/R/(R).md) The RULESURF command is used to create surface meshes between two lines or two curves. ## Command Access: > **Ribbon:** 3D\> Mesh \> RULESURF **Menu:** Draw \> Modeling \> Meshes \> Ruled Mesh > **Command:** RULESURF ## Command Prompts: > UCS wireframe density: SURFTAB1\=100 > Select first defining curve: > Select second defining curve: ## Function Description: ![](Help%20System/GSTARCAD/2019/assets/GCAD_GCR/images/RULESURF-1.png) ![](Help%20System/GSTARCAD/2019/assets/GCAD_GCR/images/RULESURF-2.png) Uses could select two lines, arcs, splines, circles or polylines as two edges of meshes. If one selected edge is closed, another one should be closed too. The point could also be seemed as one edge. ![](Help%20System/GSTARCAD/2019/assets/GCAD_GCR/images/RULESURF-3.png) The MESHTYPE system variable could specify the mesh type. By default, it is specified to 0 to create polyface meshes or polygon meshes. For closed curves, it is no need to consider about the selected objects. If the selected surface is a circle, the RULESURF will be created from 0 degrees quadrant point, this quadrant point is determined by current X axis and current value of the SNAPANG system variable. If the selected surface is a closed polyline, the RULESURF will be created from the last vertex along the reverse direction of polyline. If users select one circle and one polyline to create a RULESURF, it may generate in random pattern and it is better to use a closed semi-circle to replace the circle. The RULESURF is constructed as 2×N polygon meshes. A half number of vertexes are equally distributed along one defined surface by the RULESURF system variable and another half are equally distributed along another surface. The number of division is specified by the SURFTAB1 system variable. The division number is the same for each surface. If the lengths of selected two curves are not the same, accordingly, the distance of two vertexes is not equal on the selected two surfaces. The N direction of mesh is the same as the direction of boundary surface. If the selected two curves are all closed or one closed and another is a point, the generated polyline meshes will be closed on the N direction, as well the value of N is equal to the SURFTAB1 value. If the selected two surfaces are all unclosed, the value of N is equal to the SURFTAB1 value plus 1, because there needs N\+1 mesh lines to divide the surface into N equal parts. The mesh vertex (0,0) is the vertex of the first selected curve and it is the nearest one to the point used to select the surface. Users could create polygon meshes by selecting objects on the same side. They could also create self-intersection polygon mesh by selecting objects in two opposite sides. ![](Help%20System/GSTARCAD/2019/assets/GCAD_GCR/images/RULESURF-4.png) Relative Glossary: **First defining curve:** Specify an object and the start point of new meshes. **Second defining curve:** Specify an object and the start point to sweep new meshes. ## Other versions with matching text [GstarCAD 2016](../../../2016/Commands/R/RULESURF%20Command.md) · [GstarCAD 2017](../../../2017/Commands/R/RULESURF%20Command.md) · [GstarCAD 2018](Help%20System/GSTARCAD/2018/Commands/R/RULESURF%20Command.md) · [GstarCAD 2020](Help%20System/GSTARCAD/2020/Commands/R/RULESURF%20Command.md) · [GstarCAD 2021](Help%20System/GSTARCAD/2021/Commands/R/RULESURF%20Command.md)