Method SurfaceFit
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SurfaceFit()
Smooths the mesh into the header's surface, as AutoCAD's SurfaceFit (PEDIT Smooth surface): of SURFTYPE (5
quadratic, 6 cubic, 8 Bezier; cubic where the file gives none), SURFU and SURFV (6 where it gives none), as
SurfaceFit(DxfPolyMeshType, int, int) smooths it.
public void SurfaceFit()
Exceptions
- InvalidOperationException
Thrown when the mesh is erased, or its grid cannot be smoothed so.
SurfaceFit(DxfPolyMeshType, int, int)
Smooths the mesh into a surface, as AutoCAD's SurfaceFit: its grid made the frame of the surface (flag 16 of
each point's group 70, each keeping its handle), and the points of the surface added after them (flag 8), a grid of
surfU spans by surfV spread evenly from end to end of an open direction and
round a closed one, as AutoCAD's PEDIT makes it: an open mesh smoothed at 6 and 6 is given 7 rows of 7 points, 49, one
closed both ways 6 of 6; flag 4 of the mesh's group 70, its densities in groups 73 and 74 and the surface in 75. A quadratic
or cubic surface is the uniform B-spline on the grid of that degree each way (one less than the rows or points where
they are fewer), clamped to the edges of an open direction; a Bezier surface the Bernstein one of the whole grid, which
AutoCAD takes up to 11 by 11. A smoothed mesh is straightened first. The reader reads a smoothed mesh as the grid of its
first M by N points, its frame.
public void SurfaceFit(DxfPolyMeshType surfType, int surfU, int surfV)
Parameters
surfTypeDxfPolyMeshTypeThe surface: QuadSurfaceMesh, CubicSurfaceMesh or BezierSurfaceMesh.
surfUintThe spans of the surface along M, from 2 to 200.
surfVintThe spans of the surface along N, from 2 to 200.
Exceptions
- ArgumentOutOfRangeException
Thrown when the type is not a surface, or a density is outside 2 to 200.
- InvalidOperationException
Thrown when the mesh has fewer points than its sizes ask for, sizes below 2, a Bezier grid above 11 by 11, or is erased.