brepjs 18.118.13 → 18.118.14

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.
Files changed (37) hide show
  1. package/dist/2d.cjs +4 -4
  2. package/dist/2d.js +4 -4
  3. package/dist/{blueprint-DF-Ig1SW.cjs → blueprint-CN536u9V.cjs} +8 -3
  4. package/dist/{blueprint-CJ7k25eW.js → blueprint-dqI319c7.js} +8 -3
  5. package/dist/{blueprintFns-CjvHOuIy.cjs → blueprintFns-CF-6WzuR.cjs} +2 -2
  6. package/dist/{blueprintFns-BKtVfo16.js → blueprintFns-Ci1QVESM.js} +2 -2
  7. package/dist/{blueprintSketcher-DRGumaWR.cjs → blueprintSketcher-CGnohIOe.cjs} +1 -1
  8. package/dist/{blueprintSketcher-BIUHqWo9.js → blueprintSketcher-CY9DgQqk.js} +1 -1
  9. package/dist/{boolean2D-Buf04D7l.js → boolean2D-CaAwVwCR.js} +2 -2
  10. package/dist/{boolean2D-5WdQm5Kb.cjs → boolean2D-DnBT9gQ5.cjs} +2 -2
  11. package/dist/brepjs.cjs +105 -64
  12. package/dist/brepjs.js +105 -64
  13. package/dist/{cameraFns-CiGOarQ4.cjs → cameraFns-Ckw5prda.cjs} +28 -12
  14. package/dist/{cameraFns-MViqtlSh.js → cameraFns-CythF7Ob.js} +30 -14
  15. package/dist/{drawFns-DZHPT-nb.cjs → drawFns-CMyY6ED-.cjs} +15 -9
  16. package/dist/{drawFns-CWfBvGiY.js → drawFns-hOQecCHR.js} +15 -9
  17. package/dist/{importFns-Tgnymh7F.cjs → importFns-CvlUuJ59.cjs} +1 -1
  18. package/dist/{importFns-CzBtuX0j.js → importFns-TbwuxynG.js} +1 -1
  19. package/dist/io.cjs +1 -1
  20. package/dist/io.js +1 -1
  21. package/dist/{loftFns-Be0OZxYM.cjs → loftFns-BTWRncKQ.cjs} +44 -25
  22. package/dist/{loftFns-DxJAP4Qv.js → loftFns-CUg8_4_X.js} +45 -26
  23. package/dist/operations.cjs +2 -2
  24. package/dist/operations.js +2 -2
  25. package/dist/projection.cjs +1 -1
  26. package/dist/projection.js +1 -1
  27. package/dist/sketching.cjs +3 -3
  28. package/dist/sketching.js +3 -3
  29. package/dist/text.cjs +2 -2
  30. package/dist/text.js +2 -2
  31. package/dist/{textBlueprints-DgTBXc6O.cjs → textBlueprints-D5mNvqKF.cjs} +2 -2
  32. package/dist/{textBlueprints-CFPE5_QI.js → textBlueprints-DBjpb8G_.js} +2 -2
  33. package/dist/{textMetrics-C2cwK7wU.js → textMetrics-C7pEipGp.js} +1 -1
  34. package/dist/{textMetrics-BH-izd6N.cjs → textMetrics-CgyvE6u0.cjs} +1 -1
  35. package/dist/{threadFns-B6SQd48K.cjs → threadFns-DDcOeRGs.cjs} +1 -1
  36. package/dist/{threadFns-G71HVwW7.js → threadFns-Dsn9lSDD.js} +1 -1
  37. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { b as isShape3D, m as disposeResultShape, nt as getKernel, p as disposeDowncastSource, t as castResultShape, u as createSolid, w as isWire } from "./shapeTypes-BalkiKtK.js";
1
+ import { b as isShape3D, et as _usingCtx, m as disposeResultShape, nt as getKernel, p as disposeDowncastSource, t as castResultShape, u as createSolid, w as isWire } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
@@ -36,7 +36,9 @@ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
36
36
  function makeSpineWire(start, end) {
37
37
  const kernel = getKernel();
38
38
  const edge = kernel.makeLineEdge([...start], [...end]);
39
- return castResultShape(kernel.makeWire([edge]));
39
+ const wire = kernel.makeWire([edge]);
40
+ kernel.dispose(edge);
41
+ return castResultShape(wire);
40
42
  }
41
43
  /** Build a helix wire for twist extrusion. */
42
44
  function makeHelixWire(pitch, height, radius, center, dir, leftHanded = false) {
@@ -147,16 +149,24 @@ function supportExtrude(wire, center, normal, support) {
147
149
  * @returns `Result` containing the extruded shape or a shell tuple.
148
150
  */
149
151
  function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
150
- const extrusionLength = vecLength(normal);
151
- if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
152
- const spine = makeSpineWire(center, vecAdd(center, normal));
153
- let law = null;
154
- if (profileShape) {
155
- const lawResult = buildLawFromProfile(extrusionLength, profileShape);
156
- if (isErr(lawResult)) return lawResult;
157
- law = lawResult.value;
152
+ try {
153
+ var _usingCtx$1 = _usingCtx();
154
+ const extrusionLength = vecLength(normal);
155
+ if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
156
+ const endPoint = vecAdd(center, normal);
157
+ const spine = _usingCtx$1.u(makeSpineWire(center, endPoint));
158
+ let law = null;
159
+ if (profileShape) {
160
+ const lawResult = buildLawFromProfile(extrusionLength, profileShape);
161
+ if (isErr(lawResult)) return lawResult;
162
+ law = lawResult.value;
163
+ }
164
+ return sweep(wire, spine, { law }, shellMode);
165
+ } catch (_) {
166
+ _usingCtx$1.e = _;
167
+ } finally {
168
+ _usingCtx$1.d();
158
169
  }
159
- return sweep(wire, spine, { law }, shellMode);
160
170
  }
161
171
  /**
162
172
  * Extrude a wire along a normal with helical twist and optional profile scaling.
@@ -174,22 +184,31 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
174
184
  * @returns `Result` containing the twisted extruded shape or a shell tuple.
175
185
  */
176
186
  function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
177
- if (Math.abs(angleDegrees) < 1e-10) return err(validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
178
- const extrusionLength = vecLength(normal);
179
- if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
180
- const spine = makeSpineWire(center, vecAdd(center, normal));
181
- const leftHanded = angleDegrees < 0;
182
- const auxiliarySpine = makeHelixWire(360 / Math.abs(angleDegrees) * extrusionLength, extrusionLength, 1, center, normal, leftHanded);
183
- let law = null;
184
- if (profileShape) {
185
- const lawResult = buildLawFromProfile(extrusionLength, profileShape);
186
- if (isErr(lawResult)) return lawResult;
187
- law = lawResult.value;
187
+ try {
188
+ var _usingCtx3 = _usingCtx();
189
+ if (Math.abs(angleDegrees) < 1e-10) return err(validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
190
+ const extrusionLength = vecLength(normal);
191
+ if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
192
+ const endPoint = vecAdd(center, normal);
193
+ const spine = _usingCtx3.u(makeSpineWire(center, endPoint));
194
+ const leftHanded = angleDegrees < 0;
195
+ const pitch = 360 / Math.abs(angleDegrees) * extrusionLength;
196
+ const auxiliarySpine = _usingCtx3.u(makeHelixWire(pitch, extrusionLength, 1, center, normal, leftHanded));
197
+ let law = null;
198
+ if (profileShape) {
199
+ const lawResult = buildLawFromProfile(extrusionLength, profileShape);
200
+ if (isErr(lawResult)) return lawResult;
201
+ law = lawResult.value;
202
+ }
203
+ return sweep(wire, spine, {
204
+ auxiliarySpine,
205
+ law
206
+ }, shellMode);
207
+ } catch (_) {
208
+ _usingCtx3.e = _;
209
+ } finally {
210
+ _usingCtx3.d();
188
211
  }
189
- return sweep(wire, spine, {
190
- auxiliarySpine,
191
- law
192
- }, shellMode);
193
212
  }
194
213
  /** Validate that explicit section locations are in [0,1] and strictly increasing. */
195
214
  function validateSectionLocations(sections) {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-B6SQd48K.cjs");
3
- const require_loftFns = require("./loftFns-Be0OZxYM.cjs");
2
+ const require_threadFns = require("./threadFns-DDcOeRGs.cjs");
3
+ const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
4
4
  exports.addChild = require_threadFns.addChild;
5
5
  exports.addJoint = require_threadFns.addJoint;
6
6
  exports.addStep = require_threadFns.addStep;
@@ -1,3 +1,3 @@
1
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-G71HVwW7.js";
2
- import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DxJAP4Qv.js";
1
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-Dsn9lSDD.js";
2
+ import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-CUg8_4_X.js";
3
3
  export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-CiGOarQ4.cjs");
2
+ const require_cameraFns = require("./cameraFns-Ckw5prda.cjs");
3
3
  exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
4
4
  exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
5
5
  exports.cameraLookAt = require_cameraFns.cameraLookAt;
@@ -1,2 +1,2 @@
1
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-MViqtlSh.js";
1
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CythF7Ob.js";
2
2
  export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-DgTBXc6O.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
4
- const require_drawFns = require("./drawFns-DZHPT-nb.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-CGnohIOe.cjs");
4
+ const require_drawFns = require("./drawFns-CMyY6ED-.cjs");
5
5
  //#region src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BIUHqWo9.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-CWfBvGiY.js";
3
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-CFPE5_QI.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CY9DgQqk.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-hOQecCHR.js";
3
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DBjpb8G_.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-DgTBXc6O.cjs");
3
- const require_textMetrics = require("./textMetrics-BH-izd6N.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
3
+ const require_textMetrics = require("./textMetrics-CgyvE6u0.cjs");
4
4
  exports.fontMetrics = require_textMetrics.fontMetrics;
5
5
  exports.getFont = require_textBlueprints.getFont;
6
6
  exports.loadFont = require_textBlueprints.loadFont;
package/dist/text.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-CFPE5_QI.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C2cwK7wU.js";
1
+ import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DBjpb8G_.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C7pEipGp.js";
3
3
  export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
@@ -39,8 +39,8 @@ const require_curveFns = require("./curveFns-C2zZ7Xuq.cjs");
39
39
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
40
40
  const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
41
41
  const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
42
- const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
43
- const require_loftFns = require("./loftFns-Be0OZxYM.cjs");
42
+ const require_blueprintSketcher = require("./blueprintSketcher-CGnohIOe.cjs");
43
+ const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
44
44
  let opentype_js = require("opentype.js");
45
45
  opentype_js = __toESM(opentype_js, 1);
46
46
  //#region src/sketching/compoundSketch.ts
@@ -8,8 +8,8 @@ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CH6gaGTf.j
8
8
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
9
9
  import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-HAF4Xtow.js";
10
10
  import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-CgEPRock.js";
11
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BIUHqWo9.js";
12
- import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-DxJAP4Qv.js";
11
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CY9DgQqk.js";
12
+ import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-CUg8_4_X.js";
13
13
  import opentype from "opentype.js";
14
14
  //#region src/sketching/compoundSketch.ts
15
15
  /**
@@ -1,5 +1,5 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-CFPE5_QI.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-DBjpb8G_.js";
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,4 +1,4 @@
1
- const require_textBlueprints = require("./textBlueprints-DgTBXc6O.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
@@ -4,7 +4,7 @@ const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
4
  const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
5
5
  const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
6
6
  const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
7
- const require_loftFns = require("./loftFns-Be0OZxYM.cjs");
7
+ const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
8
8
  const require_refResolveFns = require("./refResolveFns-BLM5XlZR.cjs");
9
9
  const require_primitiveFns = require("./primitiveFns-DZkzMLUq.cjs");
10
10
  //#region src/utils/uuid.ts
@@ -4,7 +4,7 @@ import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
4
  import { b as fromBREP } from "./faceFns-ClvSac1T.js";
5
5
  import { s as toBREP } from "./shapeFns-Gzaax25v.js";
6
6
  import { h as fuseAll } from "./solidBuilders-CgEPRock.js";
7
- import { t as loft } from "./loftFns-DxJAP4Qv.js";
7
+ import { t as loft } from "./loftFns-CUg8_4_X.js";
8
8
  import { c as resolveRefParams } from "./refResolveFns-_niAxNu8.js";
9
9
  import { E as wire, h as line } from "./primitiveFns-1otQpjcN.js";
10
10
  //#region src/utils/uuid.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.118.13",
3
+ "version": "18.118.14",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",