diff --git a/src/Add-on/Lisp.ts b/src/Add-on/Lisp.ts index 3564f81e1..b6335d0c4 100644 --- a/src/Add-on/Lisp.ts +++ b/src/Add-on/Lisp.ts @@ -2,6 +2,7 @@ import { app } from "../ApplicationServices/Application"; import { copyTextToClipboard } from "../Common/Utils"; import { Polyline } from "../DatabaseServices/Polyline"; import { PromptStatus } from "../Editor/PromptResult"; +import { Vector3 } from "three"; export class Command_Lisp { @@ -33,6 +34,14 @@ export class Command_Lisp ` let str = fun + "(cx-make-pline '("; + + let ocs = pl.OCS; + pts.forEach(p => + { + let p3 = new Vector3(p.x, p.y); + p3.applyMatrix4(ocs); + p.set(p3.x, p3.y); + }) pts.forEach(p => str += `(${p.x} ${p.y})`) str += ") '("; buls.forEach(b => str += `${b} `);