beckhoff-xts-viewer-3d 5.0.0 → 5.1.0
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 +39 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +634 -3
- package/dist/index.d.ts +634 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,6 +106,15 @@ that wraps the seam of a closed loop; stations, areas, dimensions and info bars;
|
|
|
106
106
|
stop-position ghost movers; and a stator heatmap driven by
|
|
107
107
|
`(positionMm, value)` samples.
|
|
108
108
|
|
|
109
|
+
**Measuring and annotating.** CAD-style tools — point-to-point distance with
|
|
110
|
+
optional ΔX/ΔY/ΔZ guides, angle, polyline, and distance _along_ the XTS path —
|
|
111
|
+
picked in the scene with snapping to geometry corners and edges as well as to
|
|
112
|
+
mover centres, module boundaries, station stops and the track path itself.
|
|
113
|
+
Annotations pin a label anywhere, including to a mover, where they follow it
|
|
114
|
+
while it drives. Everything works the same in the 2D plan view, renders into
|
|
115
|
+
screenshots and video frames, and is fully drivable from
|
|
116
|
+
`viewerRef.current.measurements`.
|
|
117
|
+
|
|
109
118
|
**Analysis.** Sub-millimetre mover collision detection, as a one-shot call or a
|
|
110
119
|
continuous monitor, plus module-level collision probes.
|
|
111
120
|
|
|
@@ -119,6 +128,36 @@ the post-processing chain; the result reports whether that happened.
|
|
|
119
128
|
animated `focusOn()` for stations, areas, movers, modules or the whole scene,
|
|
120
129
|
and an opt-in CAD ViewCube.
|
|
121
130
|
|
|
131
|
+
### Measurements and annotations
|
|
132
|
+
|
|
133
|
+
```tsx
|
|
134
|
+
const viewer = useRef<XtsViewer3DRef>(null);
|
|
135
|
+
const [tool, setTool] = useState<MeasurementTool>('none');
|
|
136
|
+
|
|
137
|
+
<XtsViewer3D
|
|
138
|
+
ref={viewer}
|
|
139
|
+
config={config}
|
|
140
|
+
// The same tools work in the 3D view and the 2D plan view.
|
|
141
|
+
projection={plan2D ? 'orthographic' : 'perspective'}
|
|
142
|
+
measurement={{
|
|
143
|
+
tool, // 'distance' | 'angle' | 'path' | 'trackDistance' | 'annotation'
|
|
144
|
+
snap: { enabled: true, radiusPx: 14 },
|
|
145
|
+
onMeasurementCreate: (m, result) => console.log(m.kind, result.text),
|
|
146
|
+
}}
|
|
147
|
+
/>;
|
|
148
|
+
|
|
149
|
+
// …or place and read measurements without any user interaction:
|
|
150
|
+
viewer.current.measurements.add({
|
|
151
|
+
kind: 'distance',
|
|
152
|
+
points: [{ positionMm: [0, 0, 200] }, { positionMm: [1000, 0, 200] }],
|
|
153
|
+
});
|
|
154
|
+
viewer.current.measurements.results(); // [{ value: 1000, text: '1 000.0 mm', … }]
|
|
155
|
+
const saved = viewer.current.measurements.toJSON(); // persist, restore with fromJSON()
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
See [Measurements + annotations](docs/USING-THE-COMPONENT.md#17-measurements--annotations)
|
|
159
|
+
for the tools, the snap kinds and the full API.
|
|
160
|
+
|
|
122
161
|
## Gallery
|
|
123
162
|
|
|
124
163
|
| | |
|