@mlightcad/cad-simple-viewer 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +296 -2
- package/dist/index.js +1348 -122
- package/dist/index.umd.cjs +2 -2
- package/lib/app/AcApContext.d.ts +45 -3
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +43 -3
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocCreator.d.ts +68 -2
- package/lib/app/AcApDocCreator.d.ts.map +1 -1
- package/lib/app/AcApDocCreator.js +67 -2
- package/lib/app/AcApDocCreator.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +227 -12
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +229 -17
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +77 -3
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +75 -3
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApFontLoader.d.ts +32 -0
- package/lib/app/AcApFontLoader.d.ts.map +1 -1
- package/lib/app/AcApFontLoader.js +30 -0
- package/lib/app/AcApFontLoader.js.map +1 -1
- package/lib/app/AcApSettingManager.d.ts +191 -3
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +161 -0
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/command/AcApConvertToSvgCmd.d.ts +26 -0
- package/lib/command/AcApConvertToSvgCmd.d.ts.map +1 -1
- package/lib/command/AcApConvertToSvgCmd.js +26 -0
- package/lib/command/AcApConvertToSvgCmd.js.map +1 -1
- package/lib/command/AcApOpenCmd.d.ts +31 -0
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +31 -0
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApPanCmd.d.ts +25 -0
- package/lib/command/AcApPanCmd.d.ts.map +1 -1
- package/lib/command/AcApPanCmd.js +25 -0
- package/lib/command/AcApPanCmd.js.map +1 -1
- package/lib/command/AcApQNewCmd.d.ts +26 -0
- package/lib/command/AcApQNewCmd.d.ts.map +1 -1
- package/lib/command/AcApQNewCmd.js +26 -0
- package/lib/command/AcApQNewCmd.js.map +1 -1
- package/lib/command/AcApSelectCmd.d.ts +26 -0
- package/lib/command/AcApSelectCmd.d.ts.map +1 -1
- package/lib/command/AcApSelectCmd.js +26 -0
- package/lib/command/AcApSelectCmd.js.map +1 -1
- package/lib/command/AcApSvgConvertor.d.ts +48 -0
- package/lib/command/AcApSvgConvertor.d.ts.map +1 -1
- package/lib/command/AcApSvgConvertor.js +48 -0
- package/lib/command/AcApSvgConvertor.js.map +1 -1
- package/lib/command/AcApZoomCmd.d.ts +29 -0
- package/lib/command/AcApZoomCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomCmd.js +29 -0
- package/lib/command/AcApZoomCmd.js.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.d.ts +57 -0
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.js +57 -0
- package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
- package/lib/editor/command/AcEdCommand.d.ts +118 -9
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +113 -9
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +59 -5
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +48 -5
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +76 -7
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js +38 -0
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/input/AcEdBaseInput.d.ts +65 -1
- package/lib/editor/input/AcEdBaseInput.d.ts.map +1 -1
- package/lib/editor/input/AcEdBaseInput.js +62 -1
- package/lib/editor/input/AcEdBaseInput.js.map +1 -1
- package/lib/editor/input/AcEdBoxSelector.d.ts +81 -0
- package/lib/editor/input/AcEdBoxSelector.d.ts.map +1 -1
- package/lib/editor/input/AcEdBoxSelector.js +80 -0
- package/lib/editor/input/AcEdBoxSelector.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +95 -8
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +95 -11
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdInputPoint.d.ts +38 -1
- package/lib/editor/input/AcEdInputPoint.d.ts.map +1 -1
- package/lib/editor/input/AcEdInputPoint.js +38 -1
- package/lib/editor/input/AcEdInputPoint.js.map +1 -1
- package/lib/editor/input/AcEdJig.d.ts +166 -0
- package/lib/editor/input/AcEdJig.d.ts.map +1 -1
- package/lib/editor/input/AcEdJig.js +164 -0
- package/lib/editor/input/AcEdJig.js.map +1 -1
- package/lib/editor/input/AcEdJigLoop.d.ts +49 -0
- package/lib/editor/input/AcEdJigLoop.d.ts.map +1 -1
- package/lib/editor/input/AcEdJigLoop.js +48 -0
- package/lib/editor/input/AcEdJigLoop.js.map +1 -1
- package/lib/editor/input/AcEdSelectionSet.d.ts +122 -2
- package/lib/editor/input/AcEdSelectionSet.d.ts.map +1 -1
- package/lib/editor/input/AcEdSelectionSet.js +117 -1
- package/lib/editor/input/AcEdSelectionSet.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +90 -6
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +86 -6
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +163 -16
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +94 -5
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/util/AcTrGeometryUtil.d.ts +65 -0
- package/lib/util/AcTrGeometryUtil.d.ts.map +1 -1
- package/lib/util/AcTrGeometryUtil.js +65 -0
- package/lib/util/AcTrGeometryUtil.js.map +1 -1
- package/lib/view/AcTrLayer.d.ts +40 -5
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +34 -5
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayout.d.ts +122 -23
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +103 -23
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrLayoutView.d.ts +74 -16
- package/lib/view/AcTrLayoutView.d.ts.map +1 -1
- package/lib/view/AcTrLayoutView.js +65 -16
- package/lib/view/AcTrLayoutView.js.map +1 -1
- package/lib/view/AcTrLayoutViewManager.d.ts +58 -12
- package/lib/view/AcTrLayoutViewManager.d.ts.map +1 -1
- package/lib/view/AcTrLayoutViewManager.js +56 -12
- package/lib/view/AcTrLayoutViewManager.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +48 -4
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +44 -4
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +71 -0
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +65 -0
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -11,6 +11,15 @@ This module doesn't depend on any UI framework and doesn't provide any UI except
|
|
|
11
11
|
- Performance-focused settings and context management
|
|
12
12
|
- Framework-agnostic design for maximum flexibility
|
|
13
13
|
|
|
14
|
+
## When Should You Choose cad-simple-viewer?
|
|
15
|
+
|
|
16
|
+
Use `cad-simple-viewer` if you need **core CAD logic only** (document management, command stack, rendering engine integration) without any UI framework dependencies. This package is ideal if:
|
|
17
|
+
|
|
18
|
+
- You want to build your **own custom UI** or integrate CAD functionality into a non-Vue or non-web environment.
|
|
19
|
+
- You require maximum flexibility and performance for handling large CAD files, and plan to connect the logic to your own rendering or UI layer.
|
|
20
|
+
- You want a framework-agnostic solution that provides only the essential CAD operations and canvas rendering.
|
|
21
|
+
|
|
22
|
+
**Recommended for:** Custom integrations, headless CAD processing, or advanced users building highly tailored CAD solutions.
|
|
14
23
|
|
|
15
24
|
## Directory Structure (partial)
|
|
16
25
|
- `src/app/` – Document/context management, settings
|
|
@@ -19,8 +28,293 @@ This module doesn't depend on any UI framework and doesn't provide any UI except
|
|
|
19
28
|
- `src/view/` – Layout and scene management
|
|
20
29
|
- `src/util/` – Utilities
|
|
21
30
|
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install @mlightcad/cad-simple-viewer
|
|
35
|
+
```
|
|
36
|
+
|
|
22
37
|
## Usage
|
|
23
|
-
|
|
38
|
+
|
|
39
|
+
Please refer to sub-package `cad-simple-viewer-example` as one example.
|
|
40
|
+
|
|
41
|
+
### Basic Usage
|
|
42
|
+
|
|
43
|
+
Firstly, add the following dependencies into your package.json.
|
|
44
|
+
|
|
45
|
+
- @mlightcad/cad-simple-viewer
|
|
46
|
+
- @mlightcad/data-model
|
|
47
|
+
- @mlightcad/libredwg-converter
|
|
48
|
+
- @mlightcad/libredwg-web
|
|
49
|
+
|
|
50
|
+
Secondly, add one canvas element in your html.
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<body>
|
|
54
|
+
<canvas id="canvas"></canvas>
|
|
55
|
+
</body>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Thirdly, add the following code in the entry point of cad-simple-viewer integration page.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { AcApDocManager } from '@mlightcad/cad-simple-viewer'
|
|
62
|
+
import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model'
|
|
63
|
+
|
|
64
|
+
// Get canvas DOM element by its id
|
|
65
|
+
const canvas = document.getElementById('canvas') as HTMLCanvasElement
|
|
66
|
+
AcApDocManager.createInstance(canvas)
|
|
67
|
+
|
|
68
|
+
// Although it is optional, it is better to call this method to load the default fonts.
|
|
69
|
+
// The default fonts are used if fonts used in drawing are not found.
|
|
70
|
+
await AcApDocManager.instance.loadDefaultFonts()
|
|
71
|
+
|
|
72
|
+
// Read the file content
|
|
73
|
+
const fileContent = await this.readFile(file)
|
|
74
|
+
|
|
75
|
+
// Set database options
|
|
76
|
+
const options: AcDbOpenDatabaseOptions = {
|
|
77
|
+
minimumChunkSize: 1000,
|
|
78
|
+
readOnly: true
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Open the document
|
|
82
|
+
const success = await AcApDocManager.instance.openDocument(
|
|
83
|
+
file.name,
|
|
84
|
+
fileContent,
|
|
85
|
+
options
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
// Your application logic here...
|
|
89
|
+
......
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Register DWG Converter to Display Drawings in DWG Format
|
|
93
|
+
|
|
94
|
+
By default, cad-simple-viewer registers DXF converter only and can view DXF file only. If you want to view DWG file, you need to register DWG converter. The following example code shows how to register DWG converter.
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
import {
|
|
98
|
+
AcDbDatabaseConverterManager,
|
|
99
|
+
AcDbFileType
|
|
100
|
+
} from '@mlightcad/data-model'
|
|
101
|
+
import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter'
|
|
102
|
+
|
|
103
|
+
const registerConverters = async () => {
|
|
104
|
+
try {
|
|
105
|
+
const isDev = import.meta.env.DEV
|
|
106
|
+
if (!isDev) {
|
|
107
|
+
// Production mode - use dynamic import with explicit chunk name
|
|
108
|
+
const instance = await import(
|
|
109
|
+
/* webpackChunkName: "libredwg-web" */ '@mlightcad/libredwg-web'
|
|
110
|
+
)
|
|
111
|
+
const converter = new AcDbLibreDwgConverter(await instance.createModule())
|
|
112
|
+
AcDbDatabaseConverterManager.instance.register(
|
|
113
|
+
AcDbFileType.DWG,
|
|
114
|
+
converter
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error('Failed to load libredwg-web: ', error)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
However, the code above works in production mode only even if removing check on 'isDev'. So you still need to make additional changes in order to make it work in Vite dev mode.
|
|
124
|
+
|
|
125
|
+
Firstly, update `vite.config.ts` to copy `libredwg-web.js` to folder `assets` using `vite-plugin-static-copy`. Do remember adding `vite-plugin-static-copy` as your package devDependencies.
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { resolve } from 'path'
|
|
129
|
+
import { defineConfig, type ConfigEnv } from 'vite'
|
|
130
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
131
|
+
|
|
132
|
+
export default defineConfig(({ command }: ConfigEnv) => {
|
|
133
|
+
return {
|
|
134
|
+
server: {
|
|
135
|
+
port: 3000
|
|
136
|
+
},
|
|
137
|
+
build: {
|
|
138
|
+
target: 'es2020',
|
|
139
|
+
modulePreload: false,
|
|
140
|
+
rollupOptions: {
|
|
141
|
+
// Main entry point for the app
|
|
142
|
+
input: {
|
|
143
|
+
main: resolve(__dirname, 'index.html')
|
|
144
|
+
},
|
|
145
|
+
output: {
|
|
146
|
+
manualChunks: id => {
|
|
147
|
+
if (id.includes('@mlightcad/libredwg-web')) {
|
|
148
|
+
return 'libredwg-web'
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
plugins: [
|
|
155
|
+
command === 'serve' ? viteStaticCopy({
|
|
156
|
+
targets: [
|
|
157
|
+
{
|
|
158
|
+
src: './node_modules/@mlightcad/libredwg-web/dist/libredwg-web.js',
|
|
159
|
+
dest: 'assets'
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}) : undefined
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Secondly, add the following code in your html page such as `index.html` to dynamically import `libredwg-web` and trigger one event `libredwg-ready` after loaded.
|
|
169
|
+
|
|
170
|
+
```html
|
|
171
|
+
<script type="module" defer>
|
|
172
|
+
if (import.meta.env.DEV) {
|
|
173
|
+
(async () => {
|
|
174
|
+
// Create a script element to load the module
|
|
175
|
+
const script = document.createElement("script");
|
|
176
|
+
script.type = "module";
|
|
177
|
+
script.src = "/assets/libredwg-web.js";
|
|
178
|
+
script.async = true;
|
|
179
|
+
|
|
180
|
+
script.onload = async () => {
|
|
181
|
+
// Import dynamically after script is loaded
|
|
182
|
+
const actualModule = await import(/* @vite-ignore */script.src);
|
|
183
|
+
const libredwg = await actualModule.createModule();
|
|
184
|
+
window.dispatchEvent(new CustomEvent("libredwg-ready", { detail: libredwg }));
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
document.body.appendChild(script);
|
|
188
|
+
})();
|
|
189
|
+
}
|
|
190
|
+
</script>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Thirdly, listen event `libredwg-ready` to register DWG converter `AcDbLibreDwgConverter` after `libredwg-ready` loaded.
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
// This is for development mode only. In production mode, the library is bundled
|
|
197
|
+
window.addEventListener('libredwg-ready', event => {
|
|
198
|
+
// @ts-expect-error this is one custom event and you can get details in index.html
|
|
199
|
+
const instance = event.detail as LibreDwgEx
|
|
200
|
+
const converter = new AcDbLibreDwgConverter(instance)
|
|
201
|
+
AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, converter)
|
|
202
|
+
})
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Beyond a Viewer
|
|
206
|
+
|
|
207
|
+
While `cad-simple-viewer` doesn't support saving drawings to DWG/DXF files, it provides comprehensive support for **modifying drawings in real-time**. You can add, edit, and delete entities within the drawing, and the viewer will automatically update to reflect these changes.
|
|
208
|
+
|
|
209
|
+
When you modify entities, you're working directly with the underlying drawing database. The viewer automatically detects these changes and updates the display accordingly. This real-time synchronization ensures that:
|
|
210
|
+
|
|
211
|
+
- All modifications are immediately visible
|
|
212
|
+
- The command stack properly tracks changes for undo/redo operations. This will be implemented soon.
|
|
213
|
+
|
|
214
|
+
This capability makes `cad-simple-viewer` suitable for applications that need to not only display CAD files but also allow users to interact with and modify the drawing content.
|
|
215
|
+
|
|
216
|
+
**Important Note**: The usage patterns in `cad-simple-viewer` are **very similar to AutoCAD RealDWG**. If you're familiar with AutoCAD RealDWG development, you'll find the API structure and workflow nearly identical. The main difference is that we use the [**realdwg-web API**](https://mlight-lee.github.io/realdwg-web/) instead of the native RealDWG libraries.
|
|
217
|
+
|
|
218
|
+
#### Example: Adding Entities
|
|
219
|
+
|
|
220
|
+
The following code demonstrates how to add entities, following the same pattern you'd use in AutoCAD RealDWG:
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import { AcApDocManager } from '@mlightcad/cad-simple-viewer'
|
|
224
|
+
import { AcDbLine, AcDbCircle, AcDbText, AcGePoint3d, AcGeVector3d } from '@mlightcad/data-model'
|
|
225
|
+
|
|
226
|
+
// Get the current document (same as RealDWG)
|
|
227
|
+
const doc = AcApDocManager.instance.activeDocument
|
|
228
|
+
if (!doc) return
|
|
229
|
+
|
|
230
|
+
// Get the model space (identical to RealDWG pattern)
|
|
231
|
+
const modelSpace = doc.database.modelSpace
|
|
232
|
+
|
|
233
|
+
// Add a line (same constructor and property setting as RealDWG)
|
|
234
|
+
const startPoint = new AcGePoint3d(0, 0, 0)
|
|
235
|
+
const endPoint = new AcGePoint3d(100, 100, 0)
|
|
236
|
+
const line = new AcDbLine(startPoint, endPoint)
|
|
237
|
+
line.layer = '0' // Set layer (same property name as RealDWG)
|
|
238
|
+
line.color = 1 // Red color (same color index as RealDWG)
|
|
239
|
+
modelSpace.appendEntity(line)
|
|
240
|
+
|
|
241
|
+
// Add a circle (identical API to RealDWG)
|
|
242
|
+
const centerPoint = new AcGePoint3d(50, 50, 0)
|
|
243
|
+
const radius = 25
|
|
244
|
+
const circle = new AcDbCircle(centerPoint, radius)
|
|
245
|
+
circle.layer = '0'
|
|
246
|
+
circle.color = 2 // Yellow color
|
|
247
|
+
modelSpace.appendEntity(circle)
|
|
248
|
+
|
|
249
|
+
// Add text (same constructor pattern as RealDWG)
|
|
250
|
+
const textPoint = new AcGePoint3d(0, -50, 0)
|
|
251
|
+
const text = new AcDbText(textPoint, 'Sample Text', 10) // position, text, height
|
|
252
|
+
text.layer = '0'
|
|
253
|
+
text.color = 3 // Green color
|
|
254
|
+
modelSpace.appendEntity(text)
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Example: Editing Entities
|
|
258
|
+
|
|
259
|
+
TBD
|
|
260
|
+
|
|
261
|
+
#### Example: Deleting Entities
|
|
262
|
+
|
|
263
|
+
TBD
|
|
264
|
+
|
|
265
|
+
#### Example: Working with Layers
|
|
266
|
+
|
|
267
|
+
TBD
|
|
268
|
+
|
|
269
|
+
## Available Exports
|
|
270
|
+
|
|
271
|
+
### Core Classes
|
|
272
|
+
|
|
273
|
+
- `AcApContext` - Main application context
|
|
274
|
+
- `AcApDocManager` - Document management
|
|
275
|
+
- `AcApDocument` - Individual document handling
|
|
276
|
+
- `AcApSettingManager` - Settings management
|
|
277
|
+
|
|
278
|
+
### Commands
|
|
279
|
+
|
|
280
|
+
- `AcApOpenCmd` - Open file command
|
|
281
|
+
- `AcApZoomCmd` - Zoom command
|
|
282
|
+
- `AcApPanCmd` - Pan command
|
|
283
|
+
- `AcApSelectCmd` - Selection command
|
|
284
|
+
- `AcApConvertToSvgCmd` - SVG conversion command
|
|
285
|
+
|
|
286
|
+
### Editor Components
|
|
287
|
+
|
|
288
|
+
- `AcEditor` - Main editor class
|
|
289
|
+
- `AcEdCommandStack` - Command stack management
|
|
290
|
+
- `AcEdSelectionSet` - Selection handling
|
|
291
|
+
- `AcEdInputPoint` - Input point management
|
|
292
|
+
|
|
293
|
+
### View Components
|
|
294
|
+
|
|
295
|
+
- `AcTrScene` - Scene management
|
|
296
|
+
- `AcTrLayoutView` - Layout view handling
|
|
297
|
+
- `AcTrView2d` - 2D view management
|
|
298
|
+
|
|
299
|
+
## Development
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Install dependencies
|
|
303
|
+
pnpm install
|
|
304
|
+
|
|
305
|
+
# Start development server
|
|
306
|
+
pnpm dev
|
|
307
|
+
|
|
308
|
+
# Build the library
|
|
309
|
+
pnpm build
|
|
310
|
+
|
|
311
|
+
# Preview the build
|
|
312
|
+
pnpm preview
|
|
313
|
+
```
|
|
24
314
|
|
|
25
315
|
## Role in MLightCAD
|
|
26
|
-
This package acts as the core logic layer, connecting the frontend UI with the rendering engines and managing all document-related operations.
|
|
316
|
+
This package acts as the core logic layer, connecting the frontend UI with the rendering engines and managing all document-related operations.
|
|
317
|
+
|
|
318
|
+
## License
|
|
319
|
+
|
|
320
|
+
MIT
|