|
|
|
@ -220,17 +220,17 @@ export function Conver2DxfEntity(e: Entity, dxf: DxfWriter, blkName?: string)
|
|
|
|
|
let mtx = MakeMatrix4FromNormal(e.Normal);
|
|
|
|
|
let mtxInv = new Matrix4().getInverse(mtx);
|
|
|
|
|
|
|
|
|
|
let strs = e.TextString.split("\n").reverse();
|
|
|
|
|
if (strs.length > 1)//多行文本
|
|
|
|
|
{
|
|
|
|
|
option.extrusion = e.Normal;
|
|
|
|
|
let textOpt = option as TextOptions;
|
|
|
|
|
option.extrusion = e.Normal;
|
|
|
|
|
let textOpt = option as TextOptions;
|
|
|
|
|
|
|
|
|
|
let x = new Vector3().setFromMatrixColumn(e.OCSNoClone, 0);
|
|
|
|
|
x.applyMatrix4(mtxInv);
|
|
|
|
|
let x = new Vector3().setFromMatrixColumn(e.OCSNoClone, 0);
|
|
|
|
|
x.applyMatrix4(mtxInv);
|
|
|
|
|
|
|
|
|
|
textOpt.rotation = MathUtils.RAD2DEG * (angle(x) + e.TextRotation);
|
|
|
|
|
textOpt.rotation = MathUtils.RAD2DEG * (angle(x) + e.TextRotation);
|
|
|
|
|
|
|
|
|
|
let strs = e.TextString.split("\n").reverse();
|
|
|
|
|
if (strs.length > 1)//多行文本
|
|
|
|
|
{
|
|
|
|
|
let y = x.setFromMatrixColumn(e.OCSNoClone, 1).multiplyScalar(e.Height * 1.9);
|
|
|
|
|
let p = e.Position;
|
|
|
|
|
let block = dxf.addBlock(blkName ?? `text_${e.Id.Index}`);
|
|
|
|
|