eryar@163.com

Abstract. A ruled surface is formed by moving a line connecting points of equal relative arc length or equal relative parametric value on two parametric curves from a start point to a terminate point on the curves. The paper focus on the ruled surface in opencascade.

Key words. OpenCascade, Ruled Surface, 直纹面

### 1.Introduction

《解析几何》中有关于直纹面Ruled Surface的定义：一曲面S称为直纹面，如果存在一族直线使得这一族中的每一条直线全在S上。并且S上的每个点都在这一族的某一条直线上。这样一族直线称为S的一族直母线。其参数方程为：

Autodesk 3DS Max中的直纹面，图片来自：

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/3DSMax/files/GUID-364FE529-431B-448A-850B-DD9BBECAC90B-htm.html

### 2.Ruled Surface Parametric Equation

Mobius Strip的参数方程为：

```const Standard_Real MOBIUS_RADIUS = 50.0;

void MobiusStrip(Standard_Real theU, Standard_Real theV, gp_Pnt& thePoint)
{
thePoint.SetX((MOBIUS_RADIUS + theU * Cos(0.5 * theV)) * Cos(theV));
thePoint.SetY((MOBIUS_RADIUS + theU * Cos(0.5 * theV)) * Sin(theV));
thePoint.SetZ(theU * Sin(0.5 * theV));
}

void TestMobiusStrip()
{
std::ofstream aTclFile(\"d:/mobius.tcl\");
aTclFile << \"pload ALL\" << std::endl;
aTclFile << \"vinit\" << std::endl;

Standard_Real aWidth = 10.0;
Standard_Integer aN = 0;

for (Standard_Real s = -aWidth; s < aWidth; s += 1.0)
{
aTclFile << \"polyline p\" << ++aN ;

for (Standard_Real t = 0.0; t < M_PI * 2.0; t += 0.01)
{
gp_Pnt aPoint;
MobiusStrip(s, t, aPoint);

aTclFile << \" \" << aPoint.X() << \" \" << aPoint.Y() << \" \" << aPoint.Z();
}

aTclFile << \"\\n vdisplay p\" << aN << std::endl;
}

for (Standard_Real t = 0.0; t < M_PI * 2.0; t += 0.2)
{
aTclFile << \"polyline p\" << ++aN;
gp_Pnt aPoint;

MobiusStrip(-aWidth, t, aPoint);
aTclFile << \" \" << aPoint.X() << \" \" << aPoint.Y() << \" \" << aPoint.Z();

MobiusStrip(aWidth, t, aPoint);
aTclFile << \" \" << aPoint.X() << \" \" << aPoint.Y() << \" \" << aPoint.Z();

aTclFile << \"\\n vdisplay p\" << aN << std::endl;
}
}

int main(int argc, char* argv[])
{
TestMobiusStrip();

return 0;
}```

source d:/mobius.tcl

### 3.Ruled Surface to B Spline Surface

l 确保两条曲线定义在相同的参数区间内；

l 确保两条曲线的次数相同。如果不同，则将次数低的曲线升阶；

l 确保两条曲线有相同的节点矢量。

#### 3.1 根据两条直线构造直纹面

```# Ruled surface between two lines.

vertex v1 0 0 0

vertex v2 0 8 8

vertex v3 8 0 8

vertex v4 8 8 0

edge e1 v1 v2

edge e2 v3 v4

pruled r1 e1 e2

vdisplay v1 v2 v3 v4 e1 e2 r1```

3.2 根据两个圆构造直纹面

```# Ruled surface between circle and ellipse.

circle c1 0 0 0 5

circle c2 0 0 10 4

mkedge e3 c1

mkedge e4 c2

pruled r2 e3 e4

vdisplay e3 e4 r2```

```# Ruled surface between circle and ellipse.

circle c1 0 0 0 5

circle c2 0 0 10 4

mkedge e3 c1

mkedge e4 c2

pruled r2 e3 e4

vdisplay e3 e4 r2

wait 2

trotate e4 0 0 0 0 0 1 30

pruled r2 e3 e4

vdisplay r2

wait 2

trotate e4 0 0 0 0 0 1 30

pruled r2 e3 e4

vdisplay r2

wait 2

trotate e4 0 0 0 0 0 1 30

pruled r2 e3 e4

vdisplay r2```

### 5.References

1. Weisstein Eric W. “Ruled Surface”. http://mathworld.wolfram.com/RuledSurface.html

3. The Initial Graphics Exchange Specification (IGES) Version 6.0

4. 赵罡, 穆国旺, 王拉柱. 非均匀有理B样条. 清华大学出版社. 2010

5. 丘维声. 解析几何. 北京大学出版社. 1996