func (s *Spline) FormatString(f format.Formatter) string {
	s.Format(f)
	return f.Output()
}
FormatString outputs data using given formatter.
package entity
import (
	"github.com/yofu/dxf/format"
)
type Spline struct {
	*entity
	Normal    []float64    
	Flag      int          
	Degree    int          
	Knots     []float64    
	Controls  [][]float64  
	Fits      [][]float64  
	Tolerance []float64    
}
func (l *Spline) IsEntity() bool {
	return true
}
func NewSpline() *Spline {
	l := &Spline{
		entity:    NewEntity(SPLINE),
		Normal:    []float64{0.0, 0.0, 1.0},
		Flag:      1064,
		Degree:    3,
		Knots:     nil,
		Controls:  nil,
		Fits:      nil,
		Tolerance: []float64{0.000000001, 0.0000000001, 0.0000000001},
	}
	return l
}
func (s *Spline) Format(f format.Formatter) {
	s.entity.Format(f)
	f.WriteString(100, "AcDbSpline")
	for i := 0; i < 3; i++ {
		f.WriteFloat(210+i*10, s.Normal[i])
	}
	f.WriteInt(70, s.Flag)
	f.WriteInt(71, s.Degree)
	f.WriteInt(72, len(s.Knots))
	f.WriteInt(73, len(s.Controls))
	f.WriteInt(74, len(s.Fits))
	for i := 0; i < 3; i++ {
		f.WriteFloat(42+i, s.Tolerance[i])
	}
	for _, k := range s.Knots {
		f.WriteFloat(40, k)
	}
	for _, c := range s.Controls {
		for i := 0; i < 3; i++ {
			f.WriteFloat((i+1)*10, c[i])
		}
	}
	for _, ft := range s.Fits {
		for i := 0; i < 3; i++ {
			f.WriteFloat((i+1)*10+1, ft[i])
		}
	}
}
func (s *Spline) String() string {
	f := format.NewASCII()
	return s.FormatString(f)
}