修复:因为支持多行文字导致的单行文字坐标错误

pull/2165/MERGE
ChenX 1 year ago
parent 05e187cf54
commit 9a07b86306

@ -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}`);

Loading…
Cancel
Save