-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.js
More file actions
35 lines (27 loc) · 1.19 KB
/
Copy pathplugin.js
File metadata and controls
35 lines (27 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const createBlock = async (w,l,h) => {
const pt1 = await WSM.Geom.Point3d(0,0,0);
const pt2 = await WSM.Geom.Point3d(w,l,h);
const histID = await FormIt.GroupEdit.GetEditingHistoryID();
console.log(histID, pt1, pt2)
const test = await WSM.APICreateBlock(histID, pt1, pt2);
}
const createCylinder = async (w,l,h) => {
const pt1 = await WSM.Geom.Point3d(0,0,0);
const pt2 = await WSM.Geom.Point3d(w,l,h);
const histID = await FormIt.GroupEdit.GetEditingHistoryID();
console.log(histID, pt1, pt2)
const test = await WSM.APICreateCylinder(histID, pt1, w/2, h);
}
document.getElementById("CreateBlockBtn").addEventListener("click", () => {
const w = Number(document.getElementById("Width").value);
const h = Number(document.getElementById("Height").value);
const l = Number(document.getElementById("Length").value);
createBlock(w,l,h);
//alert("Hello Dave");
});
document.getElementById("CreateCylinderBtn").addEventListener("click", () => {
const w = Number(document.getElementById("Width").value);
const h = Number(document.getElementById("Height").value);
const l = Number(document.getElementById("Length").value);
createCylinder(w,l,h);
});