From 9a07b86306e4b2005310d08a25921b094df4bbd0 Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 11 Apr 2023 16:49:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E5=9B=A0=E4=B8=BA=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A4=9A=E8=A1=8C=E6=96=87=E5=AD=97=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E5=8D=95=E8=A1=8C=E6=96=87=E5=AD=97=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/ACAD/Entity2DxfEntity.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Add-on/ACAD/Entity2DxfEntity.ts b/src/Add-on/ACAD/Entity2DxfEntity.ts index b32771353..110ea276e 100644 --- a/src/Add-on/ACAD/Entity2DxfEntity.ts +++ b/src/Add-on/ACAD/Entity2DxfEntity.ts @@ -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}`);