曲面:内插、控制点、放样、旋转
Last updated
// python_points_1 is a set of Points generated with
// a Python script found in Chapter 12, Section 10
surf = NurbsSurface.ByPoints(python_points_1);// python_points_1 is a set of Points generated with
// a Python script found in Chapter 12, Section 10
// create a surface of degree 2 with smooth segments
surf = NurbsSurface.ByPoints(python_points_1, 2, 2);// python_points_1 is a set of Points generated with
// a Python script found in Chapter 12, Section 10
// create a surface of degree 6
surf = NurbsSurface.ByPoints(python_points_1, 6, 6);// python_points_2, 3, and 4 are generated with
// Python scripts found in Chapter 12, Section 10
c1 = NurbsCurve.ByPoints(python_points_2);
c2 = NurbsCurve.ByPoints(python_points_3);
c3 = NurbsCurve.ByPoints(python_points_4);
loft = Surface.ByLoft([c1, c2, c3]);pts = {};
pts[0] = Point.ByCoordinates(4, 0, 0);
pts[1] = Point.ByCoordinates(3, 0, 1);
pts[2] = Point.ByCoordinates(4, 0, 2);
pts[3] = Point.ByCoordinates(4, 0, 3);
pts[4] = Point.ByCoordinates(4, 0, 4);
pts[5] = Point.ByCoordinates(5, 0, 5);
pts[6] = Point.ByCoordinates(4, 0, 6);
pts[7] = Point.ByCoordinates(4, 0, 7);
crv = NurbsCurve.ByPoints(pts);
axis_origin = Point.ByCoordinates(0, 0, 0);
axis = Vector.ByCoordinates(0, 0, 1);
surf = Surface.ByRevolve(crv, axis_origin, axis, 0,
360);