package com.fdkankan.dxf.generate.model;

import com.fdkankan.dxf.generate.Vector3;
import com.fdkankan.dxf.generate.model.base.BaseDxfEntity;
import com.fdkankan.dxf.generate.util.DxfLineBuilder;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 圆
 *
 * @author YTZJJ
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DxfCircle extends BaseDxfEntity {

	/**
	 * 圆心位置
	 */
	private Vector3 center;
	/**
	 * 半径
	 */
	private double radius;

	@Override
	public String getEntityName() {
		return "CIRCLE";
	}

	@Override
	public String getEntityClassName() {
		return "AcDbCircle";
	}

	@Override
	protected String getChildDxfStr() {
		return DxfLineBuilder.build().append(10, center.getX()).append(20, center.getY()).append(30, center.getZ()).append(40, radius).toString();
	}
}
