diff --git a/docs/occt-v8-migration.md b/docs/occt-v8-migration.md new file mode 100644 index 00000000..8d913b30 --- /dev/null +++ b/docs/occt-v8-migration.md @@ -0,0 +1,104 @@ +# OCCT V8 Migration — replicad Perspective + +This document covers the replicad-specific changes for the OCCT V8 migration. + +## Summary + +The OCCT V8 migration consolidates replicad's three WASM builds (`single`, `with_exceptions`, `multi`) into a **single unified build** using native WASM exceptions (`-fwasm-exceptions`). + +| Build variant | V7.6 / V8 (before) | V8 (after) | +|---|---|---| +| `replicad_single` | No exception support | Full exception support via `-fwasm-exceptions` | +| `replicad_with_exceptions` | Separate build with `-fexceptions` | **Removed** — merged into single build | +| `replicad_multi` | pthread-based multi-threading | **Removed** — deferred (see below) | + +## Why a Single Build? + +### Native WASM Exceptions (`-fwasm-exceptions`) + +The WebAssembly Exception Handling proposal (Phase 4) is now supported by 94.5%+ of browsers (Chrome 95+, Firefox 100+, Safari 15.2+). It provides: + +- **Zero-cost happy path**: No `invoke_SIG` wrapper overhead on every function call +- **Proper stack traces**: `WebAssembly.Exception` objects preserve the call stack +- **Smaller binary**: ~10-15% smaller than JavaScript-based exception handling (`-fexceptions`) +- **No performance penalty**: Unlike `-fexceptions`, which added ~75% binary size and measurable runtime overhead, `-fwasm-exceptions` has negligible impact on non-throwing code paths + +This eliminates the need for a separate "with_exceptions" build. The single build has full exception decoding support with `OCJS.getStandard_FailureData()`. + +### Multi-threading Deferred + +Analysis revealed that OCCT's parallel algorithms were never actually activated in the replicad codebase: + +- `BRepMesh_IncrementalMesh`: called with `isInParallel=false` (hardcoded in `shapes.ts`) +- `BOPAlgo_Options::SetRunParallel()`: defaults to `false` +- All benchmark operations showed **slower** performance with the multi-threaded build due to pthread infrastructure overhead (SharedArrayBuffer, mutex costs, pre-spawned workers) + +Multi-threading will be revisited when explicit parallel algorithm activation is implemented upstream. + +## replicad Source Changes + +The following replicad source files were modified for OCCT V8 compatibility: + +- **`packages/replicad/src/Sketcher.ts`**: Updated for V8 API changes +- **`packages/replicad/src/shapes.ts`**: Updated mesh and shape operations +- **`packages/replicad/src/geom.ts`**: Geometry utility updates + +## Build Configuration + +### Single V8 YAML (`custom_build_single_v8.yml`) + +Key changes from the V7.6 configuration: + +```yaml +emccFlags: + - -flto # Dead-code elimination at link + - -fwasm-exceptions # Native WASM exceptions + - -sEXPORT_EXCEPTION_HANDLING_HELPERS # JS helpers for exception decoding + - -sEXPORT_ES6=1 + - -sALLOW_MEMORY_GROWTH=1 + - -sINITIAL_MEMORY=100MB + - -sMAXIMUM_MEMORY=4GB + - --no-entry + - --emit-symbol-map + - -O3 +``` + +Bindings include `OCJS` and `Standard_Failure` for exception decoding (previously only in the `with_exceptions` build). + +## Performance + +Benchmarks show V8 is significantly faster than V7.6, especially for boolean operations: + +| Operation | V7.6.2 (ms) | V8 Single (ms) | Delta | +|---|---|---|---| +| fuse-two-boxes | 26.6 | 20.7 | -22% | +| n-body-fuse | 65.1 | 48.3 | -26% | +| deep-boolean-chain | 132.1 | 91.7 | -31% | +| bottle | 342.3 | 254.4 | -26% | +| birdhouse | 271.1 | 198.3 | -27% | +| vase | 226.4 | 162.8 | -28% | + +## Package Structure + +``` +dist/ + replicad-opencascadejs-0.21.0-v8.XX.tgz # WASM + JS glue + replicad-0.21.0-v8.XX.tgz # replicad library +``` + +Consumers reference these tarballs via GitHub raw URLs: + +```yaml +catalog: + replicad: "https://github.com/taucad/replicad/raw/main/dist/replicad-0.21.0-v8.XX.tgz" + replicad-opencascadejs: "https://github.com/taucad/replicad/raw/main/dist/replicad-opencascadejs-0.21.0-v8.XX.tgz" +``` + +## Removed Files + +- `build-config/custom_build_with_exceptions_v8.yml` — merged into `custom_build_single_v8.yml` +- `build-config/custom_build_multi_v8.yml` — multi-threading deferred +- `src/replicad_with_exceptions.*` — no longer needed +- `src/replicad_multi.*` — no longer needed + +See `repos/opencascade.js/docs/occt-v8-migration.md` for build-level details. diff --git a/packages/replicad-app-example/package.json b/packages/replicad-app-example/package.json index 9a80f0e7..18b3a9ec 100644 --- a/packages/replicad-app-example/package.json +++ b/packages/replicad-app-example/package.json @@ -1,6 +1,6 @@ { "name": "replicad-app-example", - "version": "0.23.1", + "version": "0.21.0", "description": "A simple React app based on replicad.", "private": true, "license": "MIT", @@ -16,9 +16,9 @@ "file-saver": "^2.0.5", "react": "18.2.0", "react-dom": "18.2.0", - "replicad": "^0.23.1", - "replicad-opencascadejs": "^0.23.0", - "replicad-threejs-helper": "^0.23.0", + "replicad": "^0.21.0", + "replicad-opencascadejs": "workspace:@taucad/replicad-opencascadejs@^", + "replicad-threejs-helper": "^0.21.0", "three": "^0.155.0" }, "devDependencies": { diff --git a/packages/replicad-app-example/src/index.jsx b/packages/replicad-app-example/src/index.jsx index 6f0aa572..c4e06daa 100644 --- a/packages/replicad-app-example/src/index.jsx +++ b/packages/replicad-app-example/src/index.jsx @@ -3,7 +3,7 @@ import ReactDOM from "react-dom"; import App from "./App.jsx"; // This is here to compensate for a bug in vite -import "replicad-opencascadejs/src/replicad_single.wasm?url"; +import "replicad-opencascadejs/wasm?url"; ReactDOM.render( diff --git a/packages/replicad-app-example/src/worker.js b/packages/replicad-app-example/src/worker.js index 163cc4b0..dc015f3b 100644 --- a/packages/replicad-app-example/src/worker.js +++ b/packages/replicad-app-example/src/worker.js @@ -1,10 +1,10 @@ -import opencascade from "replicad-opencascadejs/src/replicad_single.js"; -import opencascadeWasm from "replicad-opencascadejs/src/replicad_single.wasm?url"; -import { setOC } from "replicad"; -import { expose } from "comlink"; +import opencascade from 'replicad-opencascadejs'; +import opencascadeWasm from 'replicad-opencascadejs/wasm?url'; +import { setOC } from 'replicad'; +import { expose } from 'comlink'; // We import our model as a simple function -import { drawBox } from "./cad"; +import { drawBox } from './cad'; // This is the logic to load the web assembly code into replicad let loaded = false; diff --git a/packages/replicad-app-example/vite.config.js b/packages/replicad-app-example/vite.config.js index 2481347a..2f7c08a9 100644 --- a/packages/replicad-app-example/vite.config.js +++ b/packages/replicad-app-example/vite.config.js @@ -7,6 +7,9 @@ export default defineConfig({ build: { outDir: "build", }, + worker: { + format: "es", + }, server: { port: 4444, }, diff --git a/packages/replicad-cli/package.json b/packages/replicad-cli/package.json index 4ff60a86..1a808044 100644 --- a/packages/replicad-cli/package.json +++ b/packages/replicad-cli/package.json @@ -43,9 +43,9 @@ "commander": "^14.0.1", "jszip": "^3.10.1", "manifold-3d": "^3.0.1", - "replicad": "workspace:^", + "replicad": "workspace:@taucad/replicad@^", "replicad-evaluator": "workspace:^", - "replicad-opencascadejs": "workspace:^", + "replicad-opencascadejs": "workspace:@taucad/replicad-opencascadejs@^", "tsx": "^4.20.6" }, "devDependencies": { diff --git a/packages/replicad-cli/src/cli.ts b/packages/replicad-cli/src/cli.ts index 1ffe8e52..6e9a57e7 100644 --- a/packages/replicad-cli/src/cli.ts +++ b/packages/replicad-cli/src/cli.ts @@ -3,7 +3,7 @@ import { createRequire } from "node:module"; import { fileURLToPath } from "node:url"; import { Command, Option } from "commander"; import { getManifoldModule, setWasmUrl } from "manifold-3d/lib/wasm.js"; -import opencascadeModule from "replicad-opencascadejs/src/replicad_single.js"; +import opencascadeModule from "replicad-opencascadejs"; import * as replicad from "replicad"; import { createEvaluator } from "replicad-evaluator"; import packageJson from "../package.json" with { type: "json" }; @@ -97,7 +97,7 @@ async function createCliEvaluator() { (opencascadeModule as any)?.default?.default || (opencascadeModule as any)?.default || opencascadeModule; - const wasmPath = require.resolve("replicad-opencascadejs/src/replicad_single.wasm"); + const wasmPath = require.resolve("replicad-opencascadejs/wasm"); const manifoldWasmPath = require.resolve("manifold-3d/manifold.wasm"); setWasmUrl(manifoldWasmPath); const oc = await openCascadeFactory({ diff --git a/packages/replicad-evaluator/__tests__/setup.ts b/packages/replicad-evaluator/__tests__/setup.ts index 4c5eec07..ecb864fb 100644 --- a/packages/replicad-evaluator/__tests__/setup.ts +++ b/packages/replicad-evaluator/__tests__/setup.ts @@ -1,7 +1,6 @@ -import { dirname, join } from "node:path"; -import { fileURLToPath } from "node:url"; +import { createRequire } from "node:module"; import { beforeAll } from "vitest"; -import opencascade from "../../replicad-opencascadejs/src/replicad_single.js"; +import opencascade from "replicad-opencascadejs"; import * as replicad from "../../replicad/src/index"; declare global { @@ -12,11 +11,8 @@ declare global { beforeAll(async () => { if (globalThis.replicadEvaluatorReady) return; - const here = dirname(fileURLToPath(import.meta.url)); - const opencascadeWasm = join( - here, - "../../replicad-opencascadejs/src/replicad_single.wasm" - ); + const require = createRequire(import.meta.url); + const opencascadeWasm = require.resolve("replicad-opencascadejs/wasm"); globalThis.replicadEvaluatorOC = await opencascade({ locateFile: () => opencascadeWasm, diff --git a/packages/replicad-evaluator/package.json b/packages/replicad-evaluator/package.json index 591fa2d1..e3753f2d 100644 --- a/packages/replicad-evaluator/package.json +++ b/packages/replicad-evaluator/package.json @@ -32,6 +32,8 @@ }, "devDependencies": { "@types/node": "^22.13.1", + "replicad": "workspace:@taucad/replicad@^", + "replicad-opencascadejs": "workspace:@taucad/replicad-opencascadejs@^", "typescript": "5.1.6", "vite": "^4.5.5", "vite-plugin-dts": "^3.5.2", diff --git a/packages/replicad-opencascadejs/.npmignore b/packages/replicad-opencascadejs/.npmignore new file mode 100644 index 00000000..f1f5f3d3 --- /dev/null +++ b/packages/replicad-opencascadejs/.npmignore @@ -0,0 +1 @@ +.npm-pack-all-tmp \ No newline at end of file diff --git a/packages/replicad-opencascadejs/build-config/custom_build_multi.yml b/packages/replicad-opencascadejs/build-config/custom_build_multi.yml new file mode 100644 index 00000000..ee978f8a --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/custom_build_multi.yml @@ -0,0 +1,262 @@ +mainBuild: + name: replicad_multi.js + bindings: + - symbol: Message_ProgressRange + - symbol: TColgp_Array1OfDir + - symbol: TColgp_Array1OfPnt + - symbol: TColgp_Array1OfPnt2d + - symbol: TColgp_Array2OfPnt + - symbol: TColStd_Array1OfBoolean + - symbol: TColgp_Array1OfVec + - symbol: TColStd_Array1OfInteger + - symbol: TColStd_Array1OfReal + - symbol: Poly_Array1OfTriangle + - symbol: Standard_Transient + - symbol: Precision + - symbol: MoniTool_TypedValue + - symbol: Interface_TypedValue + - symbol: Interface_Static + - symbol: gp_XYZ + - symbol: gp_XY + - symbol: gp_Vec + - symbol: gp_Pnt + - symbol: gp_Dir + - symbol: gp_Ax1 + - symbol: gp_Ax2 + - symbol: gp_Ax3 + - symbol: gp_Circ + - symbol: gp_Elips + - symbol: gp_Cylinder + - symbol: gp_Sphere + - symbol: gp_Pln + - symbol: gp_Trsf + - symbol: gp_GTrsf + - symbol: Geom2d_Line + - symbol: Geom2d_Curve + - symbol: Geom2d_OffsetCurve + - symbol: Geom2d_BoundedCurve + - symbol: Geom2d_TrimmedCurve + - symbol: Geom2d_BezierCurve + - symbol: Geom2d_BSplineCurve + - symbol: Geom2d_Geometry + - symbol: Geom2d_Ellipse + - symbol: Geom2d_Circle + - symbol: Geom2d_Conic + - symbol: Geom_SphericalSurface + - symbol: Geom_ElementarySurface + - symbol: gp_Vec2d + - symbol: gp_Pnt2d + - symbol: gp_Dir2d + - symbol: gp_Ax2d + - symbol: gp_Ax22d + - symbol: gp_Circ2d + - symbol: gp_Elips2d + - symbol: GC_MakeSegment2d + - symbol: GC_MakeArcOfCircle2d + - symbol: GC_MakeArcOfEllipse2d + - symbol: GC_MakeCircle2d + - symbol: GC_MakeEllipse2d + - symbol: GeomLib + - symbol: gp_Trsf2d + - symbol: gp_GTrsf2d + - symbol: Bnd_Box2d + - symbol: BndLib_Add2dCurve + - symbol: Geom2dAPI_InterCurveCurve + - symbol: Geom2dAPI_ProjectPointOnCurve + - symbol: Geom2dAPI_PointsToBSpline + - symbol: Geom2dAPI_ExtremaCurveCurve + - symbol: Bnd_Box + - symbol: BRepBndLib + - symbol: GeomAbs_CurveType + - symbol: GeomAbs_SurfaceType + - symbol: GeomAbs_Shape + - symbol: GeomTools + - symbol: Geom_Geometry + - symbol: Geom_Curve + - symbol: Geom_Surface + - symbol: Geom_ElementarySurface + - symbol: Geom_CylindricalSurface + - symbol: Geom_BoundedSurface + - symbol: Geom_BSplineSurface + - symbol: Geom_BoundedCurve + - symbol: Geom_TrimmedCurve + - symbol: Geom_BezierCurve + - symbol: Geom_BSplineCurve + - symbol: GeomAPI_PointsToBSpline + - symbol: GeomAPI_ProjectPointOnSurf + - symbol: TopoDS_Edge + - symbol: TopoDS_Face + - symbol: TopoDS_Wire + - symbol: TopoDS_Shell + - symbol: TopoDS_Vertex + - symbol: TopoDS_Solid + - symbol: TopoDS_Compound + - symbol: TopoDS_CompSolid + - symbol: TopoDS_Shape + - symbol: TopoDS_Builder + - symbol: TopAbs_ShapeEnum + - symbol: TopTools_ListOfShape + - symbol: TopAbs_Orientation + - symbol: TopLoc_Location + - symbol: TopExp_Explorer + - symbol: NCollection_BaseList + - symbol: Poly_Triangle + - symbol: Poly_Triangulation + - symbol: Poly_PolygonOnTriangulation + - symbol: Poly_MergeNodesTool + - symbol: BRep_Tool + - symbol: BRepLib + - symbol: BRepTools + - symbol: BRepGProp + - symbol: BRepGProp_Face + - symbol: GProp_GProps + - symbol: GC_MakeArcOfCircle + - symbol: GC_Root + - symbol: GCPnts_TangentialDeflection + - symbol: GeomAdaptor_TransformedSurface + - symbol: GeomAdaptor_TransformedCurve + - symbol: BRepAdaptor_Surface + - symbol: BRepAdaptor_Curve + - symbol: Adaptor3d_Curve + - symbol: Adaptor3d_Surface + - symbol: BRepAdaptor_CompCurve + - symbol: Geom2dAdaptor_Curve + - symbol: Adaptor2d_Curve2d + - symbol: BRepAdaptor_Curve2d + - symbol: Geom2dConvert + - symbol: Convert_ParameterisationType + - symbol: GeomConvert + - symbol: STEPControl_StepModelType + - symbol: IFSelect_ReturnStatus + - symbol: Law_Function + - symbol: Law_Linear + - symbol: Law_Composite + - symbol: Law_Interpol + - symbol: Law_BSpFunc + - symbol: Law_S + - symbol: BRepAlgoAPI_Algo + - symbol: BRepAlgoAPI_BuilderAlgo + - symbol: BRepAlgoAPI_BooleanOperation + - symbol: BRepAlgoAPI_Cut + - symbol: BRepAlgoAPI_Fuse + - symbol: BOPAlgo_GlueEnum + - symbol: BOPAlgo_Options + - symbol: BRepAlgoAPI_Section + - symbol: BRepAlgoAPI_Common + - symbol: BRepExtrema_DistShapeShape + - symbol: BRepBuilderAPI_ModifyShape + - symbol: BRepBuilderAPI_MakeShape + - symbol: BRepBuilderAPI_Command + - symbol: BRepBuilderAPI_Transform + - symbol: BRepBuilderAPI_MakeEdge + - symbol: BRepBuilderAPI_MakeWire + - symbol: BRepBuilderAPI_MakeFace + - symbol: BRepBuilderAPI_MakeVertex + - symbol: BRepBuilderAPI_MakeSolid + - symbol: BRepBuilderAPI_TransitionMode + - symbol: BRepBuilderAPI_Sewing + - symbol: BRepBuilderAPI_WireError + - symbol: BRepBuilderAPI_MakeShell + - symbol: BRepPrimAPI_MakeOneAxis + - symbol: BRepPrimAPI_MakeCylinder + - symbol: BRepPrimAPI_MakeBox + - symbol: BRepPrimAPI_MakeSweep + - symbol: BRepPrimAPI_MakePrism + - symbol: BRepPrimAPI_MakeRevol + - symbol: BRepPrimAPI_MakeSphere + - symbol: BRepOffsetAPI_ThruSections + - symbol: BRepOffsetAPI_MakeThickSolid + - symbol: BRepOffsetAPI_MakeOffset + - symbol: BRepOffsetAPI_MakeOffsetShape + - symbol: BRepOffsetAPI_MakePipeShell + - symbol: BRepOffsetAPI_MakeFilling + - symbol: BRepOffsetAPI_DraftAngle + - symbol: BRepOffset_Mode + - symbol: BRepFilletAPI_LocalOperation + - symbol: BRepFilletAPI_MakeFillet + - symbol: BRepFilletAPI_MakeChamfer + - symbol: BRepFeat_MakeDPrism + - symbol: BRepFeat_Form + - symbol: ChFi3d_FilletShape + - symbol: ChFiDS_ChamfMode + - symbol: GeomAbs_JoinType + - symbol: BRepFill_TypeOfContact + - symbol: Extrema_ExtAlgo + - symbol: ShapeFix_Root + - symbol: ShapeFix_Solid + - symbol: ShapeFix_Face + - symbol: ShapeFix_Wire + - symbol: STEPControl_Reader + - symbol: STEPControl_Writer + - symbol: XSControl_Reader + - symbol: StlAPI_Reader + - symbol: StlAPI + - symbol: Geom2dConvert_ApproxCurve + - symbol: Geom2dConvert_BSplineCurveToBezierCurve + - symbol: ShapeUpgrade_UnifySameDomain + - symbol: TDF_Attribute + - symbol: TDataStd_GenericEmpty + - symbol: CDM_Document + - symbol: TDocStd_Document + - symbol: TDataStd_GenericExtString + - symbol: XCAFDoc_LengthUnit + - symbol: TCollection_ExtendedString + - symbol: XCAFDoc_DocumentTool + - symbol: XCAFDoc_ShapeTool + - symbol: XCAFDoc_ColorTool + - symbol: TDF_Label + - symbol: TDataStd_Name + - symbol: Quantity_ColorRGBA + - symbol: Quantity_Color + - symbol: XCAFDoc_ColorType + - symbol: IFSelect_WorkSession + - symbol: XSControl_WorkSession + - symbol: STEPCAFControl_Writer + - symbol: XCAFDoc_MaterialTool + - symbol: XCAFDoc_Material + - symbol: TCollection_HAsciiString + - symbol: BRepMesh_DiscretRoot + - symbol: BRepMesh_IncrementalMesh + - symbol: OSD_ThreadPool + - symbol: BRepToolsWrapper + - symbol: GeomToolsWrapper + - symbol: OCJS_ShapeHasher + - symbol: ReplicadMeshData + - symbol: ReplicadMeshExtractor + - symbol: ReplicadEdgeMeshData + - symbol: ReplicadEdgeMeshExtractor + - symbol: HLRAlgo_Projector + - symbol: HLRBRep_Algo + - symbol: HLRBRep_HLRToShape + - symbol: HLRBRep_InternalAlgo + - symbol: Standard_Failure + emccFlags: + - -fwasm-exceptions + - -sEXPORT_EXCEPTION_HANDLING_HELPERS + - -sEXPORT_ES6=1 + - -sMODULARIZE + - -sALLOW_MEMORY_GROWTH=1 + - -sINITIAL_MEMORY=100MB + - -sMAXIMUM_MEMORY=4GB + - -sEXPORTED_RUNTIME_METHODS=["FS","HEAP32","HEAPU32","HEAPF32","wasmMemory"] + - --no-entry + - --emit-symbol-map + - -sERROR_ON_UNDEFINED_SYMBOLS=0 + - -Wl,--allow-undefined + - -sSTACK_SIZE=8388608 + - -sWASM_BIGINT + - -msimd128 + - -O3 + # Multi-threading (requires COOP/COEP on consumer pages). + # EVAL_CTORS=2 is omitted — ctor evaluation order is non-deterministic under pthread workers. + - -pthread + - -sUSE_PTHREADS=1 + - -sPTHREAD_POOL_SIZE=navigator.hardwareConcurrency + - -sSHARED_MEMORY=1 + - -sENVIRONMENT=web,worker,node +additionalCppFiles: + - wrappers/brep-io.cpp + - wrappers/edge-mesh-extractor.cpp + - wrappers/geom2d-io.cpp + - wrappers/mesh-extractor.cpp + - wrappers/shape-hasher.cpp diff --git a/packages/replicad-opencascadejs/build-config/custom_build_single.yml b/packages/replicad-opencascadejs/build-config/custom_build_single.yml index 575ed605..43f2ddda 100644 --- a/packages/replicad-opencascadejs/build-config/custom_build_single.yml +++ b/packages/replicad-opencascadejs/build-config/custom_build_single.yml @@ -1,310 +1,256 @@ mainBuild: name: replicad_single.js bindings: - - symbol: Message_ProgressRange - - symbol: TColgp_Array1OfDir - - symbol: TColgp_Array1OfPnt - - symbol: TColgp_Array1OfPnt2d - - symbol: TColgp_Array2OfPnt - - symbol: TColStd_Array1OfBoolean - - symbol: TColgp_Array1OfVec - - symbol: TColStd_Array1OfInteger - - symbol: TColStd_Array1OfReal - - symbol: Poly_Array1OfTriangle - - symbol: Standard_Transient - - symbol: Precision - - symbol: Interface_Static - - symbol: Interface_TypedValue - - symbol: MoniTool_TypedValue - - symbol: Handle_StepData_StepModel - - symbol: gp_XYZ - - symbol: gp_XY - - symbol: gp_Vec - - symbol: gp_Pnt - - symbol: gp_Dir - - symbol: gp_Ax1 - - symbol: gp_Ax2 - - symbol: gp_Ax3 - - symbol: gp_Circ - - symbol: gp_Pln - - symbol: gp_Elips - - symbol: gp_Cylinder - - symbol: gp_Sphere - - symbol: gp_Trsf - - symbol: gp_GTrsf - - symbol: Geom2d_Line - - symbol: Geom2d_Curve - - symbol: Geom2d_OffsetCurve - - symbol: Geom2d_BoundedCurve - - symbol: Geom2d_TrimmedCurve - - symbol: Geom2d_BezierCurve - - symbol: Geom2d_BSplineCurve - - symbol: Geom2d_Geometry - - symbol: Geom2d_Ellipse - - symbol: Geom2d_Circle - - symbol: Geom2d_Conic - - symbol: Geom_SphericalSurface - - symbol: Geom_ElementarySurface - - symbol: Handle_Geom2d_Geometry - - symbol: Handle_Geom2d_Line - - symbol: Handle_Geom2d_Curve - - symbol: Handle_Geom2d_BoundedCurve - - symbol: Handle_Geom2d_TrimmedCurve - - symbol: Handle_Geom2d_Ellipse - - symbol: Handle_Geom2d_Circle - - symbol: Handle_Geom2d_BezierCurve - - symbol: Handle_Geom2d_BSplineCurve - - symbol: Handle_Geom_SphericalSurface - - symbol: Handle_Geom_ElementarySurface - - symbol: Handle_Geom_Geometry - - symbol: gp_Vec2d - - symbol: gp_Pnt2d - - symbol: gp_Dir2d - - symbol: gp_Ax2d - - symbol: gp_Ax22d - - symbol: gp_Circ2d - - symbol: gp_Elips2d - - symbol: GCE2d_Root - - symbol: GCE2d_MakeSegment - - symbol: GCE2d_MakeArcOfCircle - - symbol: GCE2d_MakeArcOfEllipse - - symbol: GCE2d_MakeCircle - - symbol: GCE2d_MakeEllipse - - symbol: GeomLib - - symbol: gp_Trsf2d - - symbol: gp_GTrsf2d - - symbol: Bnd_Box2d - - symbol: BndLib_Add2dCurve - - symbol: Geom2dAPI_InterCurveCurve - - symbol: Geom2dAPI_ProjectPointOnCurve - - symbol: Geom2dAPI_PointsToBSpline - - symbol: Geom2dAPI_ExtremaCurveCurve - - symbol: Bnd_Box - - symbol: Bnd_OBB - - symbol: BRepBndLib - - symbol: GeomAbs_CurveType - - symbol: GeomAbs_SurfaceType - - symbol: GeomAbs_Shape - - symbol: GeomTools - - symbol: Geom_Geometry - - symbol: Geom_Curve - - symbol: Geom_Surface - - symbol: Geom_ElementarySurface - - symbol: Geom_ConicalSurface - - symbol: Geom_CylindricalSurface - - symbol: Geom_BoundedSurface - - symbol: Geom_BSplineSurface - - symbol: Geom_BoundedCurve - - symbol: Geom_TrimmedCurve - - symbol: Geom_BezierCurve - - symbol: Geom_BSplineCurve - - symbol: GeomAPI_Interpolate - - symbol: GeomAPI_PointsToBSpline - - symbol: GeomAPI_PointsToBSplineSurface - - symbol: GeomAPI_ProjectPointOnSurf - - symbol: Handle_Geom_TrimmedCurve - - symbol: Handle_Geom_Curve - - symbol: Handle_Geom_Surface - - symbol: Handle_Geom_BezierCurve - - symbol: Handle_Geom_BSplineCurve - - symbol: Handle_Geom_BSplineSurface - - symbol: TopoDS - - symbol: TopoDS_Edge - - symbol: TopoDS_Face - - symbol: TopoDS_Wire - - symbol: TopoDS_Shell - - symbol: TopoDS_Vertex - - symbol: TopoDS_Solid - - symbol: TopoDS_Compound - - symbol: TopoDS_CompSolid - - symbol: TopoDS_Shape - - symbol: TopoDS_Builder - - symbol: TopAbs_ShapeEnum - - symbol: TopTools_ListOfShape - - symbol: TopAbs_Orientation - - symbol: TopLoc_Location - - symbol: TopExp_Explorer - - symbol: TopTools_ListOfShape - - symbol: NCollection_BaseList - - symbol: Poly_Connect - - symbol: StdPrs_ToolTriangulatedShape - - symbol: Poly_Triangle - - symbol: Poly_Triangulation - - symbol: Handle_Poly_Triangulation - - symbol: Poly_PolygonOnTriangulation - - symbol: Handle_Poly_PolygonOnTriangulation - - symbol: BinTools - - symbol: BRep_Tool - - symbol: BRepLib - - symbol: BRepTools - - symbol: BRepGProp - - symbol: BRepGProp_Face - - symbol: GProp_GProps - - symbol: GC_MakeArcOfCircle - - symbol: GC_MakeArcOfEllipse - - symbol: GC_Root - - symbol: GCPnts_TangentialDeflection - - symbol: BRepMesh_IncrementalMesh - - symbol: BRepMesh_DiscretRoot - - symbol: BRepAdaptor_Surface - - symbol: BRepAdaptor_Curve - - symbol: Adaptor3d_Curve - - symbol: Adaptor3d_Surface - - symbol: BRepAdaptor_CompCurve - - symbol: Geom2dAdaptor_Curve - - symbol: Adaptor2d_Curve2d - - symbol: Handle_Adaptor2d_Curve2d - - symbol: BRepAdaptor_Curve2d - - symbol: Geom2dConvert_BSplineCurveToBezierCurve - - symbol: Geom2dConvert_ApproxCurve - - symbol: Geom2dConvert - - symbol: Convert_ParameterisationType - - symbol: GeomConvert - - symbol: StlAPI_Writer - - symbol: STEPControl_Writer - - symbol: STEPControl_StepModelType - - symbol: IFSelect_ReturnStatus - - symbol: Handle_Law_Function - - symbol: Law_Function - - symbol: Law_Linear - - symbol: Law_Composite - - symbol: Law_Interpol - - symbol: Law_BSpFunc - - symbol: Law_S - - symbol: BRepAlgoAPI_Algo - - symbol: BRepAlgoAPI_BuilderAlgo - - symbol: BRepAlgoAPI_BooleanOperation - - symbol: BRepAlgoAPI_Cut - - symbol: BRepAlgoAPI_Fuse - - symbol: BOPAlgo_GlueEnum - - symbol: BOPAlgo_Options - - symbol: BRepAlgoAPI_Section - - symbol: BRepAlgoAPI_Common - - symbol: BRepExtrema_DistShapeShape - - symbol: BRepBuilderAPI_ModifyShape - - symbol: BRepBuilderAPI_MakeShape - - symbol: BRepBuilderAPI_Command - - symbol: BRepBuilderAPI_Transform - - symbol: BRepBuilderAPI_MakeEdge - - symbol: BRepBuilderAPI_MakeWire - - symbol: BRepBuilderAPI_MakeFace - - symbol: BRepBuilderAPI_MakeVertex - - symbol: BRepBuilderAPI_MakeSolid - - symbol: BRepBuilderAPI_TransitionMode - - symbol: BRepBuilderAPI_Sewing - - symbol: BRepBuilderAPI_WireError - - symbol: BRepBuilderAPI_MakeShell - - symbol: BRepPrimAPI_MakeOneAxis - - symbol: BRepPrimAPI_MakeCylinder - - symbol: BRepPrimAPI_MakeBox - - symbol: BRepCheck_Analyzer - - symbol: BRepPrimAPI_MakeSweep - - symbol: BRepPrimAPI_MakePrism - - symbol: BRepPrimAPI_MakeRevol - - symbol: BRepPrimAPI_MakeSphere - - symbol: BRepPrimAPI_MakeTorus - - symbol: BRepPrimAPI_MakeRevolution - - symbol: BRepOffsetAPI_DraftAngle - - symbol: BRepOffsetAPI_ThruSections - - symbol: BRepOffsetAPI_MakeThickSolid - - symbol: BRepOffsetAPI_MakeOffset - - symbol: BRepOffsetAPI_MakeOffsetShape - - symbol: BRepOffsetAPI_MakePipe - - symbol: BRepOffsetAPI_MakePipeShell - - symbol: BRepOffsetAPI_MakeFilling - - symbol: BRepOffset_Mode - - symbol: BRepFilletAPI_LocalOperation - - symbol: BRepFilletAPI_MakeFillet - - symbol: BRepFilletAPI_MakeChamfer - - symbol: BRepFeat_MakeDPrism - - symbol: BRepFeat_Form - - symbol: ChFi3d_FilletShape - - symbol: ChFiDS_ChamfMode - - symbol: GeomAbs_JoinType - - symbol: BRepFill_TypeOfContact - - symbol: Extrema_ExtAlgo - - symbol: ShapeFix_Root - - symbol: ShapeFix_Solid - - symbol: ShapeFix_Face - - symbol: ShapeFix_Wire - - symbol: STEPControl_Reader - - symbol: XSControl_Reader - - symbol: StlAPI_Reader - - symbol: ShapeUpgrade_UnifySameDomain - - symbol: ShapeFix_EdgeConnect - - symbol: StlAPI - - symbol: HLRBRep_Algo - - symbol: Handle_HLRBRep_Algo - - symbol: HLRBRep_InternalAlgo - - symbol: HLRAlgo_Projector - - symbol: HLRBRep_HLRToShape - - symbol: CDM_Document - - symbol: TDF_Attribute - - symbol: TDataStd_GenericEmpty - - symbol: TDocStd_Document - - symbol: TDataStd_GenericExtString - - symbol: XCAFDoc_LengthUnit - - symbol: Handle_TDocStd_Document - - symbol: TCollection_ExtendedString - - symbol: XCAFDoc_DocumentTool - - symbol: XCAFDoc_ShapeTool - - symbol: Handle_XCAFDoc_ShapeTool - - symbol: XCAFDoc_ColorTool - - symbol: Handle_XCAFDoc_ColorTool - - symbol: TDF_Label - - symbol: TDataStd_Name - - symbol: Handle_TDataStd_Name - - symbol: Quantity_ColorRGBA - - symbol: Quantity_Color - - symbol: XCAFDoc_ColorType - - symbol: XSControl_WorkSession - - symbol: Handle_XSControl_WorkSession - - symbol: STEPCAFControl_Writer - - symbol: STEPControl_StepModelType - - symbol: IFSelect_ReturnStatus - - symbol: IFSelect_WorkSession - - symbol: BRepToolsWrapper - - symbol: GeomToolsWrapper + - symbol: Message_ProgressRange + - symbol: TColgp_Array1OfDir + - symbol: TColgp_Array1OfPnt + - symbol: TColgp_Array1OfPnt2d + - symbol: TColgp_Array2OfPnt + - symbol: TColStd_Array1OfBoolean + - symbol: TColgp_Array1OfVec + - symbol: TColStd_Array1OfInteger + - symbol: TColStd_Array1OfReal + - symbol: Poly_Array1OfTriangle + - symbol: Standard_Transient + - symbol: Precision + - symbol: MoniTool_TypedValue + - symbol: Interface_TypedValue + - symbol: Interface_Static + - symbol: gp_XYZ + - symbol: gp_XY + - symbol: gp_Vec + - symbol: gp_Pnt + - symbol: gp_Dir + - symbol: gp_Ax1 + - symbol: gp_Ax2 + - symbol: gp_Ax3 + - symbol: gp_Circ + - symbol: gp_Elips + - symbol: gp_Cylinder + - symbol: gp_Sphere + - symbol: gp_Pln + - symbol: gp_Trsf + - symbol: gp_GTrsf + - symbol: Geom2d_Line + - symbol: Geom2d_Curve + - symbol: Geom2d_OffsetCurve + - symbol: Geom2d_BoundedCurve + - symbol: Geom2d_TrimmedCurve + - symbol: Geom2d_BezierCurve + - symbol: Geom2d_BSplineCurve + - symbol: Geom2d_Geometry + - symbol: Geom2d_Ellipse + - symbol: Geom2d_Circle + - symbol: Geom2d_Conic + - symbol: Geom_SphericalSurface + - symbol: Geom_ElementarySurface + - symbol: gp_Vec2d + - symbol: gp_Pnt2d + - symbol: gp_Dir2d + - symbol: gp_Ax2d + - symbol: gp_Ax22d + - symbol: gp_Circ2d + - symbol: gp_Elips2d + - symbol: GC_MakeSegment2d + - symbol: GC_MakeArcOfCircle2d + - symbol: GC_MakeArcOfEllipse2d + - symbol: GC_MakeCircle2d + - symbol: GC_MakeEllipse2d + - symbol: GeomLib + - symbol: gp_Trsf2d + - symbol: gp_GTrsf2d + - symbol: Bnd_Box2d + - symbol: BndLib_Add2dCurve + - symbol: Geom2dAPI_InterCurveCurve + - symbol: Geom2dAPI_ProjectPointOnCurve + - symbol: Geom2dAPI_PointsToBSpline + - symbol: Geom2dAPI_ExtremaCurveCurve + - symbol: Bnd_Box + - symbol: BRepBndLib + - symbol: GeomAbs_CurveType + - symbol: GeomAbs_SurfaceType + - symbol: GeomAbs_Shape + - symbol: GeomTools + - symbol: Geom_Geometry + - symbol: Geom_Curve + - symbol: Geom_Surface + - symbol: Geom_ElementarySurface + - symbol: Geom_CylindricalSurface + - symbol: Geom_BoundedSurface + - symbol: Geom_BSplineSurface + - symbol: Geom_BoundedCurve + - symbol: Geom_TrimmedCurve + - symbol: Geom_BezierCurve + - symbol: Geom_BSplineCurve + - symbol: GeomAPI_PointsToBSpline + - symbol: GeomAPI_ProjectPointOnSurf + - symbol: TopoDS_Edge + - symbol: TopoDS_Face + - symbol: TopoDS_Wire + - symbol: TopoDS_Shell + - symbol: TopoDS_Vertex + - symbol: TopoDS_Solid + - symbol: TopoDS_Compound + - symbol: TopoDS_CompSolid + - symbol: TopoDS_Shape + - symbol: TopoDS_Builder + - symbol: TopAbs_ShapeEnum + - symbol: TopTools_ListOfShape + - symbol: TopAbs_Orientation + - symbol: TopLoc_Location + - symbol: TopExp_Explorer + - symbol: NCollection_BaseList + - symbol: Poly_Triangle + - symbol: Poly_Triangulation + - symbol: Poly_PolygonOnTriangulation + - symbol: Poly_MergeNodesTool + - symbol: BRep_Tool + - symbol: BRepLib + - symbol: BRepTools + - symbol: BRepGProp + - symbol: BRepGProp_Face + - symbol: GProp_GProps + - symbol: GC_MakeArcOfCircle + - symbol: GC_Root + - symbol: GCPnts_TangentialDeflection + - symbol: GeomAdaptor_TransformedSurface + - symbol: GeomAdaptor_TransformedCurve + - symbol: BRepAdaptor_Surface + - symbol: BRepAdaptor_Curve + - symbol: Adaptor3d_Curve + - symbol: Adaptor3d_Surface + - symbol: BRepAdaptor_CompCurve + - symbol: Geom2dAdaptor_Curve + - symbol: Adaptor2d_Curve2d + - symbol: BRepAdaptor_Curve2d + - symbol: Geom2dConvert + - symbol: Convert_ParameterisationType + - symbol: GeomConvert + - symbol: STEPControl_StepModelType + - symbol: IFSelect_ReturnStatus + - symbol: Law_Function + - symbol: Law_Linear + - symbol: Law_Composite + - symbol: Law_Interpol + - symbol: Law_BSpFunc + - symbol: Law_S + - symbol: BRepAlgoAPI_Algo + - symbol: BRepAlgoAPI_BuilderAlgo + - symbol: BRepAlgoAPI_BooleanOperation + - symbol: BRepAlgoAPI_Cut + - symbol: BRepAlgoAPI_Fuse + - symbol: BOPAlgo_GlueEnum + - symbol: BOPAlgo_Options + - symbol: BRepAlgoAPI_Section + - symbol: BRepAlgoAPI_Common + - symbol: BRepExtrema_DistShapeShape + - symbol: BRepBuilderAPI_ModifyShape + - symbol: BRepBuilderAPI_MakeShape + - symbol: BRepBuilderAPI_Command + - symbol: BRepBuilderAPI_Transform + - symbol: BRepBuilderAPI_MakeEdge + - symbol: BRepBuilderAPI_MakeWire + - symbol: BRepBuilderAPI_MakeFace + - symbol: BRepBuilderAPI_MakeVertex + - symbol: BRepBuilderAPI_MakeSolid + - symbol: BRepBuilderAPI_TransitionMode + - symbol: BRepBuilderAPI_Sewing + - symbol: BRepBuilderAPI_WireError + - symbol: BRepBuilderAPI_MakeShell + - symbol: BRepPrimAPI_MakeOneAxis + - symbol: BRepPrimAPI_MakeCylinder + - symbol: BRepPrimAPI_MakeBox + - symbol: BRepPrimAPI_MakeSweep + - symbol: BRepPrimAPI_MakePrism + - symbol: BRepPrimAPI_MakeRevol + - symbol: BRepPrimAPI_MakeSphere + - symbol: BRepOffsetAPI_ThruSections + - symbol: BRepOffsetAPI_MakeThickSolid + - symbol: BRepOffsetAPI_MakeOffset + - symbol: BRepOffsetAPI_MakeOffsetShape + - symbol: BRepOffsetAPI_MakePipeShell + - symbol: BRepOffsetAPI_MakeFilling + - symbol: BRepOffsetAPI_DraftAngle + - symbol: BRepOffset_Mode + - symbol: BRepFilletAPI_LocalOperation + - symbol: BRepFilletAPI_MakeFillet + - symbol: BRepFilletAPI_MakeChamfer + - symbol: BRepFeat_MakeDPrism + - symbol: BRepFeat_Form + - symbol: ChFi3d_FilletShape + - symbol: ChFiDS_ChamfMode + - symbol: GeomAbs_JoinType + - symbol: BRepFill_TypeOfContact + - symbol: Extrema_ExtAlgo + - symbol: ShapeFix_Root + - symbol: ShapeFix_Solid + - symbol: ShapeFix_Face + - symbol: ShapeFix_Wire + - symbol: STEPControl_Reader + - symbol: STEPControl_Writer + - symbol: XSControl_Reader + - symbol: StlAPI_Reader + - symbol: StlAPI + - symbol: Geom2dConvert_ApproxCurve + - symbol: Geom2dConvert_BSplineCurveToBezierCurve + - symbol: ShapeUpgrade_UnifySameDomain + - symbol: TDF_Attribute + - symbol: TDataStd_GenericEmpty + - symbol: CDM_Document + - symbol: TDocStd_Document + - symbol: TDataStd_GenericExtString + - symbol: XCAFDoc_LengthUnit + - symbol: TCollection_ExtendedString + - symbol: XCAFDoc_DocumentTool + - symbol: XCAFDoc_ShapeTool + - symbol: XCAFDoc_ColorTool + - symbol: TDF_Label + - symbol: TDataStd_Name + - symbol: Quantity_ColorRGBA + - symbol: Quantity_Color + - symbol: XCAFDoc_ColorType + - symbol: IFSelect_WorkSession + - symbol: XSControl_WorkSession + - symbol: STEPCAFControl_Writer + - symbol: XCAFDoc_MaterialTool + - symbol: XCAFDoc_Material + - symbol: TCollection_HAsciiString + - symbol: BRepMesh_DiscretRoot + - symbol: BRepMesh_IncrementalMesh + - symbol: OSD_ThreadPool + - symbol: BRepToolsWrapper + - symbol: GeomToolsWrapper + - symbol: OCJS_ShapeHasher + - symbol: ReplicadMeshData + - symbol: ReplicadMeshExtractor + - symbol: ReplicadEdgeMeshData + - symbol: ReplicadEdgeMeshExtractor + - symbol: HLRAlgo_Projector + - symbol: HLRBRep_Algo + - symbol: HLRBRep_HLRToShape + - symbol: HLRBRep_InternalAlgo + - symbol: Standard_Failure emccFlags: - - -flto - - -fexceptions - - -sEXPORT_ES6=1 - - -sUSE_ES6_IMPORT_META=0 - - -sALLOW_MEMORY_GROWTH=1 - - -sEXPORTED_RUNTIME_METHODS=["FS"] - - -O3 - - -sDISABLE_EXCEPTION_CATCHING=1 -additionalCppCode: | - class BRepToolsWrapper { - public: - static std::string Write(const TopoDS_Shape& shape) { - std::ostringstream oss(std::ios::binary); - oss << std::setprecision(17); - BRepTools::Write(shape, oss); - return oss.str(); - } - static TopoDS_Shape Read(const std::string& data) { - std::istringstream iss(data, std::ios::binary); - TopoDS_Shape shape; - BRep_Builder builder; - Message_ProgressRange progress; - BRepTools::Read(shape, iss, builder, progress); - return shape; - } - }; - - class GeomToolsWrapper { - public: - static std::string Write(const Handle(Geom2d_Curve)& geometry) { - std::ostringstream oss(std::ios::binary); - oss << std::setprecision(17); - GeomTools::Write(geometry, oss); - return oss.str(); - } - static Handle(Geom2d_Curve) Read(const std::string& data) { - std::istringstream iss(data, std::ios::binary); - Handle(Geom2d_Curve) geometry; - GeomTools::Read(geometry, iss); - return geometry; - } - }; + - -fwasm-exceptions + - -sEXPORT_EXCEPTION_HANDLING_HELPERS + - -sEXPORT_ES6=1 + - -sMODULARIZE + - -sALLOW_MEMORY_GROWTH=1 + - -sINITIAL_MEMORY=100MB + - -sMAXIMUM_MEMORY=4GB + - -sEXPORTED_RUNTIME_METHODS=["FS","HEAP32","HEAPU32","HEAPF32","wasmMemory"] + - --no-entry + - --emit-symbol-map + - -sERROR_ON_UNDEFINED_SYMBOLS=0 + - -Wl,--allow-undefined + - -sSTACK_SIZE=8388608 + - -sWASM_BIGINT + - -sEVAL_CTORS=2 + - -msimd128 + - -O3 +additionalCppFiles: + - wrappers/brep-io.cpp + - wrappers/edge-mesh-extractor.cpp + - wrappers/geom2d-io.cpp + - wrappers/mesh-extractor.cpp + - wrappers/shape-hasher.cpp diff --git a/packages/replicad-opencascadejs/build-config/custom_build_with_exceptions.yml b/packages/replicad-opencascadejs/build-config/custom_build_with_exceptions.yml deleted file mode 100755 index 681dd682..00000000 --- a/packages/replicad-opencascadejs/build-config/custom_build_with_exceptions.yml +++ /dev/null @@ -1,320 +0,0 @@ -mainBuild: - name: replicad_with_exceptions.js - bindings: - - symbol: Message_ProgressRange - - symbol: TColgp_Array1OfDir - - symbol: TColgp_Array1OfPnt - - symbol: TColgp_Array1OfPnt2d - - symbol: TColgp_Array2OfPnt - - symbol: TColStd_Array1OfBoolean - - symbol: TColgp_Array1OfVec - - symbol: TColStd_Array1OfInteger - - symbol: TColStd_Array1OfReal - - symbol: Poly_Array1OfTriangle - - symbol: Standard_Transient - - symbol: Precision - - symbol: Interface_Static - - symbol: Interface_TypedValue - - symbol: MoniTool_TypedValue - - symbol: Handle_StepData_StepModel - - symbol: gp_XYZ - - symbol: gp_XY - - symbol: gp_Vec - - symbol: gp_Pnt - - symbol: gp_Dir - - symbol: gp_Ax1 - - symbol: gp_Ax2 - - symbol: gp_Ax3 - - symbol: gp_Circ - - symbol: gp_Pln - - symbol: gp_Elips - - symbol: gp_Cylinder - - symbol: gp_Sphere - - symbol: gp_Trsf - - symbol: gp_GTrsf - - symbol: Geom2d_Line - - symbol: Geom2d_Curve - - symbol: Geom2d_OffsetCurve - - symbol: Geom2d_BoundedCurve - - symbol: Geom2d_TrimmedCurve - - symbol: Geom2d_BezierCurve - - symbol: Geom2d_BSplineCurve - - symbol: Geom2d_Geometry - - symbol: Geom2d_Ellipse - - symbol: Geom2d_Circle - - symbol: Geom2d_Conic - - symbol: Geom_SphericalSurface - - symbol: Geom_ElementarySurface - - symbol: Handle_Geom2d_Geometry - - symbol: Handle_Geom2d_Line - - symbol: Handle_Geom2d_Curve - - symbol: Handle_Geom2d_BoundedCurve - - symbol: Handle_Geom2d_TrimmedCurve - - symbol: Handle_Geom2d_Ellipse - - symbol: Handle_Geom2d_Circle - - symbol: Handle_Geom2d_BezierCurve - - symbol: Handle_Geom2d_BSplineCurve - - symbol: Handle_Geom_SphericalSurface - - symbol: Handle_Geom_ElementarySurface - - symbol: Handle_Geom_Geometry - - symbol: gp_Vec2d - - symbol: gp_Pnt2d - - symbol: gp_Dir2d - - symbol: gp_Ax2d - - symbol: gp_Ax22d - - symbol: gp_Circ2d - - symbol: gp_Elips2d - - symbol: GCE2d_Root - - symbol: GCE2d_MakeSegment - - symbol: GCE2d_MakeArcOfCircle - - symbol: GCE2d_MakeArcOfEllipse - - symbol: GCE2d_MakeCircle - - symbol: GCE2d_MakeEllipse - - symbol: GeomLib - - symbol: gp_Trsf2d - - symbol: gp_GTrsf2d - - symbol: Bnd_Box2d - - symbol: BndLib_Add2dCurve - - symbol: Geom2dAPI_InterCurveCurve - - symbol: Geom2dAPI_ProjectPointOnCurve - - symbol: Geom2dAPI_PointsToBSpline - - symbol: Geom2dAPI_ExtremaCurveCurve - - symbol: Bnd_Box - - symbol: Bnd_OBB - - symbol: BRepBndLib - - symbol: GeomAbs_CurveType - - symbol: GeomAbs_SurfaceType - - symbol: GeomAbs_Shape - - symbol: GeomTools - - symbol: Geom_Geometry - - symbol: Geom_Curve - - symbol: Geom_Surface - - symbol: Geom_ElementarySurface - - symbol: Geom_ConicalSurface - - symbol: Geom_CylindricalSurface - - symbol: Geom_BoundedSurface - - symbol: Geom_BSplineSurface - - symbol: Geom_BoundedCurve - - symbol: Geom_TrimmedCurve - - symbol: Geom_BezierCurve - - symbol: Geom_BSplineCurve - - symbol: GeomAPI_Interpolate - - symbol: GeomAPI_PointsToBSpline - - symbol: GeomAPI_PointsToBSplineSurface - - symbol: GeomAPI_ProjectPointOnSurf - - symbol: Handle_Geom_TrimmedCurve - - symbol: Handle_Geom_Curve - - symbol: Handle_Geom_Surface - - symbol: Handle_Geom_BezierCurve - - symbol: Handle_Geom_BSplineCurve - - symbol: Handle_Geom_BSplineSurface - - symbol: TopoDS - - symbol: TopoDS_Edge - - symbol: TopoDS_Face - - symbol: TopoDS_Wire - - symbol: TopoDS_Shell - - symbol: TopoDS_Vertex - - symbol: TopoDS_Solid - - symbol: TopoDS_Compound - - symbol: TopoDS_CompSolid - - symbol: TopoDS_Shape - - symbol: TopoDS_Builder - - symbol: TopAbs_ShapeEnum - - symbol: TopTools_ListOfShape - - symbol: TopAbs_Orientation - - symbol: TopLoc_Location - - symbol: TopExp_Explorer - - symbol: TopTools_ListOfShape - - symbol: NCollection_BaseList - - symbol: Poly_Connect - - symbol: StdPrs_ToolTriangulatedShape - - symbol: Poly_Triangle - - symbol: Poly_Triangulation - - symbol: Handle_Poly_Triangulation - - symbol: Poly_PolygonOnTriangulation - - symbol: Handle_Poly_PolygonOnTriangulation - - symbol: BinTools - - symbol: BRep_Tool - - symbol: BRepLib - - symbol: BRepTools - - symbol: BRepGProp - - symbol: BRepGProp_Face - - symbol: GProp_GProps - - symbol: GC_MakeArcOfCircle - - symbol: GC_MakeArcOfEllipse - - symbol: GC_Root - - symbol: GCPnts_TangentialDeflection - - symbol: BRepMesh_IncrementalMesh - - symbol: BRepMesh_DiscretRoot - - symbol: BRepAdaptor_Surface - - symbol: BRepAdaptor_Curve - - symbol: Adaptor3d_Curve - - symbol: Adaptor3d_Surface - - symbol: BRepAdaptor_CompCurve - - symbol: Geom2dAdaptor_Curve - - symbol: Adaptor2d_Curve2d - - symbol: Handle_Adaptor2d_Curve2d - - symbol: BRepAdaptor_Curve2d - - symbol: Geom2dConvert_BSplineCurveToBezierCurve - - symbol: Geom2dConvert_ApproxCurve - - symbol: Geom2dConvert - - symbol: Convert_ParameterisationType - - symbol: GeomConvert - - symbol: StlAPI_Writer - - symbol: STEPControl_Writer - - symbol: STEPControl_StepModelType - - symbol: IFSelect_ReturnStatus - - symbol: Handle_Law_Function - - symbol: Law_Function - - symbol: Law_Linear - - symbol: Law_Composite - - symbol: Law_Interpol - - symbol: Law_BSpFunc - - symbol: Law_S - - symbol: BRepAlgoAPI_Algo - - symbol: BRepAlgoAPI_BuilderAlgo - - symbol: BRepAlgoAPI_BooleanOperation - - symbol: BRepAlgoAPI_Cut - - symbol: BRepAlgoAPI_Fuse - - symbol: BOPAlgo_GlueEnum - - symbol: BOPAlgo_Options - - symbol: BRepAlgoAPI_Section - - symbol: BRepAlgoAPI_Common - - symbol: BRepExtrema_DistShapeShape - - symbol: BRepBuilderAPI_ModifyShape - - symbol: BRepBuilderAPI_MakeShape - - symbol: BRepBuilderAPI_Command - - symbol: BRepBuilderAPI_Transform - - symbol: BRepBuilderAPI_MakeEdge - - symbol: BRepBuilderAPI_MakeWire - - symbol: BRepBuilderAPI_MakeFace - - symbol: BRepBuilderAPI_MakeVertex - - symbol: BRepBuilderAPI_MakeSolid - - symbol: BRepBuilderAPI_TransitionMode - - symbol: BRepBuilderAPI_Sewing - - symbol: BRepBuilderAPI_WireError - - symbol: BRepBuilderAPI_MakeShell - - symbol: BRepPrimAPI_MakeOneAxis - - symbol: BRepPrimAPI_MakeCylinder - - symbol: BRepPrimAPI_MakeBox - - symbol: BRepCheck_Analyzer - - symbol: BRepPrimAPI_MakeSweep - - symbol: BRepPrimAPI_MakePrism - - symbol: BRepPrimAPI_MakeRevol - - symbol: BRepPrimAPI_MakeSphere - - symbol: BRepPrimAPI_MakeTorus - - symbol: BRepPrimAPI_MakeRevolution - - symbol: BRepOffsetAPI_DraftAngle - - symbol: BRepOffsetAPI_ThruSections - - symbol: BRepOffsetAPI_MakeThickSolid - - symbol: BRepOffsetAPI_MakeOffset - - symbol: BRepOffsetAPI_MakeOffsetShape - - symbol: BRepOffsetAPI_MakePipe - - symbol: BRepOffsetAPI_MakePipeShell - - symbol: BRepOffsetAPI_MakeFilling - - symbol: BRepOffset_Mode - - symbol: BRepFilletAPI_LocalOperation - - symbol: BRepFilletAPI_MakeFillet - - symbol: BRepFilletAPI_MakeChamfer - - symbol: BRepFeat_MakeDPrism - - symbol: BRepFeat_Form - - symbol: ChFi3d_FilletShape - - symbol: ChFiDS_ChamfMode - - symbol: GeomAbs_JoinType - - symbol: BRepFill_TypeOfContact - - symbol: Extrema_ExtAlgo - - symbol: ShapeFix_Root - - symbol: ShapeFix_Solid - - symbol: ShapeFix_Face - - symbol: ShapeFix_Wire - - symbol: STEPControl_Reader - - symbol: XSControl_Reader - - symbol: StlAPI_Reader - - symbol: ShapeUpgrade_UnifySameDomain - - symbol: ShapeFix_EdgeConnect - - symbol: StlAPI - - symbol: HLRBRep_Algo - - symbol: Handle_HLRBRep_Algo - - symbol: HLRBRep_InternalAlgo - - symbol: HLRAlgo_Projector - - symbol: HLRBRep_HLRToShape - - symbol: CDM_Document - - symbol: TDF_Attribute - - symbol: TDataStd_GenericEmpty - - symbol: TDocStd_Document - - symbol: TDataStd_GenericExtString - - symbol: XCAFDoc_LengthUnit - - symbol: Handle_TDocStd_Document - - symbol: TCollection_ExtendedString - - symbol: XCAFDoc_DocumentTool - - symbol: XCAFDoc_ShapeTool - - symbol: Handle_XCAFDoc_ShapeTool - - symbol: XCAFDoc_ColorTool - - symbol: Handle_XCAFDoc_ColorTool - - symbol: TDF_Label - - symbol: TDataStd_Name - - symbol: Handle_TDataStd_Name - - symbol: Quantity_ColorRGBA - - symbol: Quantity_Color - - symbol: XCAFDoc_ColorType - - symbol: XSControl_WorkSession - - symbol: Handle_XSControl_WorkSession - - symbol: STEPCAFControl_Writer - - symbol: STEPControl_StepModelType - - symbol: IFSelect_ReturnStatus - - symbol: IFSelect_WorkSession - - symbol: BRepToolsWrapper - - symbol: GeomToolsWrapper - - symbol: OCJS - - symbol: Standard_Failure - emccFlags: - - -flto - - -fexceptions - - -sEXPORT_ES6=1 - - -sUSE_ES6_IMPORT_META=0 - - -sALLOW_MEMORY_GROWTH=1 - - -sEXPORTED_RUNTIME_METHODS=["FS"] - - -O3 - - -sDISABLE_EXCEPTION_CATCHING=1 -additionalCppCode: | - typedef Handle(IMeshTools_Context) Handle_IMeshTools_Context; - class OCJS { - public: - static Standard_Failure* getStandard_FailureData(intptr_t exceptionPtr) { - return reinterpret_cast(exceptionPtr); - } - }; - - class BRepToolsWrapper { - public: - static std::string Write(const TopoDS_Shape& shape) { - std::ostringstream oss(std::ios::binary); - oss << std::setprecision(17); - BRepTools::Write(shape, oss); - return oss.str(); - } - static TopoDS_Shape Read(const std::string& data) { - std::istringstream iss(data, std::ios::binary); - TopoDS_Shape shape; - BRep_Builder builder; - Message_ProgressRange progress; - BRepTools::Read(shape, iss, builder, progress); - return shape; - } - }; - - class GeomToolsWrapper { - public: - static std::string Write(const Handle(Geom2d_Curve)& geometry) { - std::ostringstream oss(std::ios::binary); - oss << std::setprecision(17); - GeomTools::Write(geometry, oss); - return oss.str(); - } - static Handle(Geom2d_Curve) Read(const std::string& data) { - std::istringstream iss(data, std::ios::binary); - Handle(Geom2d_Curve) geometry; - GeomTools::Read(geometry, iss); - return geometry; - } - }; diff --git a/packages/replicad-opencascadejs/build-config/wrappers/brep-io.cpp b/packages/replicad-opencascadejs/build-config/wrappers/brep-io.cpp new file mode 100644 index 00000000..8a27e618 --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/wrappers/brep-io.cpp @@ -0,0 +1,22 @@ +// BREP file Read/Write wrapper -- exposes BRepTools::Read/Write to JS via +// std::string round-trip (BRepTools' own stream API isn't directly +// embind-friendly). Used by replicad to serialise shapes for the +// off-thread CAD worker and for project save/load. + +class BRepToolsWrapper { +public: + static std::string Write(const TopoDS_Shape& shape) { + std::ostringstream oss(std::ios::binary); + oss << std::setprecision(17); + BRepTools::Write(shape, oss); + return oss.str(); + } + static TopoDS_Shape Read(const std::string& data) { + std::istringstream iss(data, std::ios::binary); + TopoDS_Shape shape; + BRep_Builder builder; + Message_ProgressRange progress; + BRepTools::Read(shape, iss, builder, progress); + return shape; + } +}; diff --git a/packages/replicad-opencascadejs/build-config/wrappers/edge-mesh-extractor.cpp b/packages/replicad-opencascadejs/build-config/wrappers/edge-mesh-extractor.cpp new file mode 100644 index 00000000..3a6e0194 --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/wrappers/edge-mesh-extractor.cpp @@ -0,0 +1,210 @@ +// Edge-polyline extractor used by replicad's wireframe rendering path. +// +// `ReplicadEdgeMeshExtractor::extract` walks every TopoDS_Edge in a shape +// and emits a packed line-soup suitable for direct upload to a WebGL/WebGPU +// vertex buffer: +// lines : float[] (6 floats per segment: x1,y1,z1, x2,y2,z2) +// edgeGroups : int32[] ({lineStart, segmentCount, edgeHash} per edge) +// +// Two-pass strategy: +// 1. For edges that are already triangulated on a face (`PolygonOnTriangulation`), +// reuse the face's Poly_Triangulation nodes -- avoids re-meshing and keeps +// edges perfectly coincident with triangle boundaries. +// 2. For "free" edges with no triangulation (typically wire-mode shapes), +// fall back to `GCPnts_TangentialDeflection` curve tessellation with the +// same tolerance/angularTolerance budget as the face mesher. +// +// `seenEdges` deduplicates edges shared between adjacent faces so a single +// shared edge contributes exactly one polyline. + +#include +#include +#include +#include + +class ReplicadEdgeMeshData { +public: + ReplicadEdgeMeshData() + : linesPtr_(nullptr), edgeGroupsPtr_(nullptr), + linesSize_(0), edgeGroupsSize_(0) {} + + ~ReplicadEdgeMeshData() { + std::free(linesPtr_); + std::free(edgeGroupsPtr_); + } + + ReplicadEdgeMeshData(const ReplicadEdgeMeshData& other) + : linesPtr_(other.linesPtr_), edgeGroupsPtr_(other.edgeGroupsPtr_), + linesSize_(other.linesSize_), edgeGroupsSize_(other.edgeGroupsSize_) { + auto& m = const_cast(other); + m.linesPtr_ = nullptr; + m.edgeGroupsPtr_ = nullptr; + } + + int getLinesPtr() const { return static_cast(reinterpret_cast(linesPtr_)); } + int getLinesSize() const { return linesSize_; } + int getEdgeGroupsPtr() const { return static_cast(reinterpret_cast(edgeGroupsPtr_)); } + int getEdgeGroupsSize() const { return edgeGroupsSize_; } + +private: + float* linesPtr_; + int32_t* edgeGroupsPtr_; + int linesSize_; + int edgeGroupsSize_; + + friend class ReplicadEdgeMeshExtractor; +}; + +class ReplicadEdgeMeshExtractor { +public: + static ReplicadEdgeMeshData extract( + const TopoDS_Shape& shape, + double tolerance, + double angularTolerance + ) { + BRepMesh_IncrementalMesh mesher(shape, tolerance, false, angularTolerance, false); + + NCollection_Map seenEdges; + + int totalSegments = 0; + int totalEdges = 0; + + for (TopExp_Explorer faceEx(shape, TopAbs_FACE); faceEx.More(); faceEx.Next()) { + const TopoDS_Face& face = TopoDS::Face(faceEx.Current()); + TopLoc_Location faceLoc; + Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(face, faceLoc); + if (tri.IsNull()) continue; + + for (TopExp_Explorer edgeEx(face, TopAbs_EDGE); edgeEx.More(); edgeEx.Next()) { + const TopoDS_Edge& edge = TopoDS::Edge(edgeEx.Current()); + if (seenEdges.Contains(edge)) continue; + + TopLoc_Location edgeLoc; + Handle(Poly_PolygonOnTriangulation) polygon = + BRep_Tool::PolygonOnTriangulation(edge, tri, edgeLoc); + if (polygon.IsNull()) continue; + + seenEdges.Add(edge); + int nNodes = polygon->Nodes().Length(); + if (nNodes < 2) continue; + totalSegments += (nNodes - 1); + totalEdges++; + } + } + + struct CurveTessInfo { TopoDS_Edge edge; int nbPts; }; + std::vector curveEdges; + + for (TopExp_Explorer edgeEx(shape, TopAbs_EDGE); edgeEx.More(); edgeEx.Next()) { + const TopoDS_Edge& edge = TopoDS::Edge(edgeEx.Current()); + if (seenEdges.Contains(edge)) continue; + seenEdges.Add(edge); + + BRepAdaptor_Curve adaptor(edge); + GCPnts_TangentialDeflection tangDef(adaptor, tolerance, angularTolerance, 2, 1e-9, 1e-7); + int nbPts = tangDef.NbPoints(); + if (nbPts < 2) continue; + + totalSegments += (nbPts - 1); + totalEdges++; + curveEdges.push_back({edge, nbPts}); + } + + ReplicadEdgeMeshData result; + + result.linesSize_ = totalSegments * 6; + if (result.linesSize_ > 0) { + result.linesPtr_ = static_cast(std::malloc(result.linesSize_ * sizeof(float))); + if (!result.linesPtr_) throw std::bad_alloc(); + } + + result.edgeGroupsSize_ = totalEdges * 3; + if (result.edgeGroupsSize_ > 0) { + result.edgeGroupsPtr_ = static_cast(std::malloc(result.edgeGroupsSize_ * sizeof(int32_t))); + if (!result.edgeGroupsPtr_) throw std::bad_alloc(); + } + + int lineOffset = 0; + int groupOffset = 0; + seenEdges.Clear(); + + for (TopExp_Explorer faceEx(shape, TopAbs_FACE); faceEx.More(); faceEx.Next()) { + const TopoDS_Face& face = TopoDS::Face(faceEx.Current()); + TopLoc_Location faceLoc; + Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(face, faceLoc); + if (tri.IsNull()) continue; + + for (TopExp_Explorer edgeEx(face, TopAbs_EDGE); edgeEx.More(); edgeEx.Next()) { + const TopoDS_Edge& edge = TopoDS::Edge(edgeEx.Current()); + if (seenEdges.Contains(edge)) continue; + + TopLoc_Location edgeLoc; + Handle(Poly_PolygonOnTriangulation) polygon = + BRep_Tool::PolygonOnTriangulation(edge, tri, edgeLoc); + if (polygon.IsNull()) continue; + + seenEdges.Add(edge); + const NCollection_Array1& nodes = polygon->Nodes(); + if (nodes.Length() < 2) continue; + + int lineStart = lineOffset / 3; + int pointCount = 0; + const gp_Trsf& trsf = edgeLoc.Transformation(); + + gp_Pnt prevPt; + bool hasPrev = false; + + for (int i = nodes.Lower(); i <= nodes.Upper(); i++) { + gp_Pnt p = tri->Node(nodes.Value(i)).Transformed(trsf); + if (hasPrev) { + result.linesPtr_[lineOffset++] = static_cast(prevPt.X()); + result.linesPtr_[lineOffset++] = static_cast(prevPt.Y()); + result.linesPtr_[lineOffset++] = static_cast(prevPt.Z()); + result.linesPtr_[lineOffset++] = static_cast(p.X()); + result.linesPtr_[lineOffset++] = static_cast(p.Y()); + result.linesPtr_[lineOffset++] = static_cast(p.Z()); + pointCount += 2; + } + prevPt = p; + hasPrev = true; + } + + result.edgeGroupsPtr_[groupOffset++] = lineStart; + result.edgeGroupsPtr_[groupOffset++] = pointCount; + result.edgeGroupsPtr_[groupOffset++] = static_cast(TopTools_ShapeMapHasher{}(edge) % 2147483647); + } + } + + for (const auto& info : curveEdges) { + BRepAdaptor_Curve adaptor(info.edge); + GCPnts_TangentialDeflection tangDef(adaptor, tolerance, angularTolerance, 2, 1e-9, 1e-7); + + int lineStart = lineOffset / 3; + int pointCount = 0; + + gp_Pnt prevPt; + bool hasPrev = false; + + for (int j = 1; j <= info.nbPts; j++) { + gp_Pnt p = tangDef.Value(j); + if (hasPrev) { + result.linesPtr_[lineOffset++] = static_cast(prevPt.X()); + result.linesPtr_[lineOffset++] = static_cast(prevPt.Y()); + result.linesPtr_[lineOffset++] = static_cast(prevPt.Z()); + result.linesPtr_[lineOffset++] = static_cast(p.X()); + result.linesPtr_[lineOffset++] = static_cast(p.Y()); + result.linesPtr_[lineOffset++] = static_cast(p.Z()); + pointCount += 2; + } + prevPt = p; + hasPrev = true; + } + + result.edgeGroupsPtr_[groupOffset++] = lineStart; + result.edgeGroupsPtr_[groupOffset++] = pointCount; + result.edgeGroupsPtr_[groupOffset++] = static_cast(TopTools_ShapeMapHasher{}(info.edge) % 2147483647); + } + + return result; + } +}; diff --git a/packages/replicad-opencascadejs/build-config/wrappers/geom2d-io.cpp b/packages/replicad-opencascadejs/build-config/wrappers/geom2d-io.cpp new file mode 100644 index 00000000..761731c0 --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/wrappers/geom2d-io.cpp @@ -0,0 +1,20 @@ +// Geom2d curve Read/Write wrapper -- exposes GeomTools::Read/Write to JS +// via std::string round-trip. Mirrors BRepToolsWrapper for 2D parametric +// curves; replicad uses this to persist sketch geometry alongside BREP +// data in the same string-blob storage path. + +class GeomToolsWrapper { +public: + static std::string Write(const opencascade::handle& geometry) { + std::ostringstream oss(std::ios::binary); + oss << std::setprecision(17); + GeomTools::Write(geometry, oss); + return oss.str(); + } + static opencascade::handle Read(const std::string& data) { + std::istringstream iss(data, std::ios::binary); + opencascade::handle geometry; + GeomTools::Read(geometry, iss); + return geometry; + } +}; diff --git a/packages/replicad-opencascadejs/build-config/wrappers/mesh-extractor.cpp b/packages/replicad-opencascadejs/build-config/wrappers/mesh-extractor.cpp new file mode 100644 index 00000000..d2c2a76c --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/wrappers/mesh-extractor.cpp @@ -0,0 +1,221 @@ +// Face-triangulation extractor used by replicad's render path. +// +// `ReplicadMeshExtractor::extract` walks every TopoDS_Face in a shape, +// runs BRepMesh_IncrementalMesh, then packs the resulting triangulation +// into four malloc'd arrays exposed to JS as raw integer pointers: +// vertices : float[] (xyz per node, length = 3 * total_nodes) +// normals : float[] (xyz per node; omitted when skipNormals=true) +// triangles : uint32[] (3 vertex indices per triangle, into vertices) +// faceGroups : int32[] ({triStart, triCount, faceHash} per face) +// +// Normals are sampled via BRepLProp_SLProps after stripping the face +// orientation/location to FORWARD/identity, mirroring OCCT's own +// `RWMesh_FaceIterator::initFace()` pattern so JS-side rendering aligns +// with OCCT's expected surface frame. +// +// Triangle winding is flipped when the face is REVERSED xor the trsf is +// mirrored (negative determinant), keeping outward-facing normals +// consistent for downstream backface culling. + +#include +#include +#include + +class ReplicadMeshData { +public: + ReplicadMeshData() + : verticesPtr_(nullptr), normalsPtr_(nullptr), + trianglesPtr_(nullptr), faceGroupsPtr_(nullptr), + verticesSize_(0), normalsSize_(0), + trianglesSize_(0), faceGroupsSize_(0) {} + + ~ReplicadMeshData() { + std::free(verticesPtr_); + std::free(normalsPtr_); + std::free(trianglesPtr_); + std::free(faceGroupsPtr_); + } + + ReplicadMeshData(const ReplicadMeshData& other) + : verticesPtr_(other.verticesPtr_), normalsPtr_(other.normalsPtr_), + trianglesPtr_(other.trianglesPtr_), faceGroupsPtr_(other.faceGroupsPtr_), + verticesSize_(other.verticesSize_), normalsSize_(other.normalsSize_), + trianglesSize_(other.trianglesSize_), faceGroupsSize_(other.faceGroupsSize_) { + auto& m = const_cast(other); + m.verticesPtr_ = nullptr; + m.normalsPtr_ = nullptr; + m.trianglesPtr_ = nullptr; + m.faceGroupsPtr_ = nullptr; + } + + int getVerticesPtr() const { return static_cast(reinterpret_cast(verticesPtr_)); } + int getNormalsPtr() const { return static_cast(reinterpret_cast(normalsPtr_)); } + int getTrianglesPtr() const { return static_cast(reinterpret_cast(trianglesPtr_)); } + int getFaceGroupsPtr() const { return static_cast(reinterpret_cast(faceGroupsPtr_)); } + + int getVerticesSize() const { return verticesSize_; } + int getNormalsSize() const { return normalsSize_; } + int getTrianglesSize() const { return trianglesSize_; } + int getFaceGroupsSize() const { return faceGroupsSize_; } + +private: + float* verticesPtr_; + float* normalsPtr_; + uint32_t* trianglesPtr_; + int32_t* faceGroupsPtr_; + + int verticesSize_; + int normalsSize_; + int trianglesSize_; + int faceGroupsSize_; + + friend class ReplicadMeshExtractor; +}; + +class ReplicadMeshExtractor { +public: + static ReplicadMeshData extract( + const TopoDS_Shape& shape, + double tolerance, + double angularTolerance, + bool skipNormals + ) { + BRepTools::Clean(shape, false); + BRepMesh_IncrementalMesh mesher(shape, tolerance, false, angularTolerance, false); + + int totalNodes = 0; + int totalTriangles = 0; + int totalFaces = 0; + + for (TopExp_Explorer ex(shape, TopAbs_FACE); ex.More(); ex.Next()) { + TopLoc_Location loc; + Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation( + TopoDS::Face(ex.Current()), loc); + if (tri.IsNull()) continue; + totalNodes += tri->NbNodes(); + totalTriangles += tri->NbTriangles(); + totalFaces++; + } + + ReplicadMeshData result; + + result.verticesSize_ = totalNodes * 3; + result.verticesPtr_ = static_cast( + std::malloc(result.verticesSize_ * sizeof(float))); + if (!result.verticesPtr_ && result.verticesSize_ > 0) throw std::bad_alloc(); + + if (!skipNormals) { + result.normalsSize_ = totalNodes * 3; + result.normalsPtr_ = static_cast( + std::malloc(result.normalsSize_ * sizeof(float))); + if (!result.normalsPtr_ && result.normalsSize_ > 0) throw std::bad_alloc(); + } + + result.trianglesSize_ = totalTriangles * 3; + result.trianglesPtr_ = static_cast( + std::malloc(result.trianglesSize_ * sizeof(uint32_t))); + if (!result.trianglesPtr_ && result.trianglesSize_ > 0) throw std::bad_alloc(); + + result.faceGroupsSize_ = totalFaces * 3; + result.faceGroupsPtr_ = static_cast( + std::malloc(result.faceGroupsSize_ * sizeof(int32_t))); + if (!result.faceGroupsPtr_ && result.faceGroupsSize_ > 0) throw std::bad_alloc(); + + int vertexOffset = 0; + int triOffset = 0; + int faceGroupIdx = 0; + + for (TopExp_Explorer ex(shape, TopAbs_FACE); ex.More(); ex.Next()) { + const TopoDS_Face& face = TopoDS::Face(ex.Current()); + TopLoc_Location loc; + Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(face, loc); + if (tri.IsNull()) continue; + + const gp_Trsf& trsf = loc.Transformation(); + int nbNodes = tri->NbNodes(); + int nbTri = tri->NbTriangles(); + + for (int i = 1; i <= nbNodes; i++) { + gp_Pnt p = tri->Node(i).Transformed(trsf); + int base = (vertexOffset + i - 1) * 3; + result.verticesPtr_[base + 0] = static_cast(p.X()); + result.verticesPtr_[base + 1] = static_cast(p.Y()); + result.verticesPtr_[base + 2] = static_cast(p.Z()); + } + + bool isReversed = (face.Orientation() == TopAbs_REVERSED); + + if (!skipNormals) { + // Align with OCCT RWMesh_FaceIterator::initFace() pattern: + // strip orientation to FORWARD then clear location. + TopoDS_Face faceFwd = TopoDS::Face(face.Oriented(TopAbs_FORWARD)); + faceFwd.Location(TopLoc_Location()); + + TopLoc_Location surfLoc; + bool hasSurface = !BRep_Tool::Surface(faceFwd, surfLoc).IsNull(); + + if (hasSurface) { + BRepAdaptor_Surface adaptor(faceFwd, false); + BRepLProp_SLProps slProps(adaptor, 1, 1e-12); + + for (int i = 1; i <= nbNodes; i++) { + gp_Dir d(0, 0, 1); + if (tri->HasUVNodes()) { + gp_Pnt2d uv = tri->UVNode(i); + slProps.SetParameters(uv.X(), uv.Y()); + if (slProps.IsNormalDefined()) { + d = slProps.Normal(); + } + } + d.Transform(trsf); + if (isReversed) { + d.Reverse(); + } + int base = (vertexOffset + i - 1) * 3; + result.normalsPtr_[base + 0] = static_cast(d.X()); + result.normalsPtr_[base + 1] = static_cast(d.Y()); + result.normalsPtr_[base + 2] = static_cast(d.Z()); + } + } else { + for (int i = 1; i <= nbNodes; i++) { + int base = (vertexOffset + i - 1) * 3; + result.normalsPtr_[base + 0] = 0.0f; + result.normalsPtr_[base + 1] = 0.0f; + result.normalsPtr_[base + 2] = 1.0f; + } + } + } + + bool isMirrored = (trsf.VectorialPart().Determinant() < 0.0); + + int faceTriStart = triOffset; + for (int t = 1; t <= nbTri; t++) { + const Poly_Triangle& triangle = tri->Triangle(t); + int n1 = triangle.Value(1); + int n2 = triangle.Value(2); + int n3 = triangle.Value(3); + + if (isReversed ^ isMirrored) { + int tmp = n2; + n2 = n3; + n3 = tmp; + } + + result.trianglesPtr_[triOffset + 0] = static_cast(n1 - 1 + vertexOffset); + result.trianglesPtr_[triOffset + 1] = static_cast(n2 - 1 + vertexOffset); + result.trianglesPtr_[triOffset + 2] = static_cast(n3 - 1 + vertexOffset); + triOffset += 3; + } + + int faceHash = static_cast(TopTools_ShapeMapHasher{}(face) % 2147483647); + result.faceGroupsPtr_[faceGroupIdx + 0] = faceTriStart; + result.faceGroupsPtr_[faceGroupIdx + 1] = (triOffset - faceTriStart); + result.faceGroupsPtr_[faceGroupIdx + 2] = faceHash; + faceGroupIdx += 3; + + vertexOffset += nbNodes; + } + + return result; + } +}; diff --git a/packages/replicad-opencascadejs/build-config/wrappers/shape-hasher.cpp b/packages/replicad-opencascadejs/build-config/wrappers/shape-hasher.cpp new file mode 100644 index 00000000..a75aca5f --- /dev/null +++ b/packages/replicad-opencascadejs/build-config/wrappers/shape-hasher.cpp @@ -0,0 +1,13 @@ +// Hash adapter for TopoDS_Shape, exposed to JS as a class with a static +// HashCode(shape, _) method so replicad can build shape -> id maps in JS. +// +// Uses std::hash from OCCT 8.x (TopoDS_TShape::HashCode +// dispatcher), keyed by the underlying TShape* identity so two TopoDS_Shape +// handles to the same TShape compare equal. + +class OCJS_ShapeHasher { +public: + static size_t HashCode(const TopoDS_Shape& shape, int) { + return std::hash{}(shape); + } +}; diff --git a/packages/replicad-opencascadejs/build-source/custom_build_multi.yml b/packages/replicad-opencascadejs/build-source/custom_build_multi.yml new file mode 100644 index 00000000..6bf8b18b --- /dev/null +++ b/packages/replicad-opencascadejs/build-source/custom_build_multi.yml @@ -0,0 +1,19 @@ +#@ load("@ytt:data", "data") + +#@ data.values.buildFlags.extend(["-pthread"]) +#@ data.values.buildFlags.extend(["-sUSE_PTHREADS=1"]) +#@ data.values.buildFlags.extend(["-sPTHREAD_POOL_SIZE=navigator.hardwareConcurrency"]) +#@ data.values.buildFlags.extend(["-sSHARED_MEMORY=1"]) +#@ data.values.buildFlags.extend(["-sENVIRONMENT=web,worker,node"]) + +mainBuild: + name: replicad_multi.js + bindings: #@ data.values.bindings + emccFlags: #@ data.values.buildFlags + +additionalCppFiles: + - wrappers/brep-io.cpp + - wrappers/edge-mesh-extractor.cpp + - wrappers/geom2d-io.cpp + - wrappers/mesh-extractor.cpp + - wrappers/shape-hasher.cpp diff --git a/packages/replicad-opencascadejs/build-source/custom_build_single.yml b/packages/replicad-opencascadejs/build-source/custom_build_single.yml index d524af22..88be71b0 100644 --- a/packages/replicad-opencascadejs/build-source/custom_build_single.yml +++ b/packages/replicad-opencascadejs/build-source/custom_build_single.yml @@ -1,10 +1,15 @@ #@ load("@ytt:data", "data") -#@ data.values.buildFlags.extend(["-sDISABLE_EXCEPTION_CATCHING=1"]) +#@ data.values.buildFlags.extend(["-sEVAL_CTORS=2"]) mainBuild: name: replicad_single.js bindings: #@ data.values.bindings emccFlags: #@ data.values.buildFlags -additionalCppCode: #@ data.values.additionalCppCode +additionalCppFiles: + - wrappers/brep-io.cpp + - wrappers/edge-mesh-extractor.cpp + - wrappers/geom2d-io.cpp + - wrappers/mesh-extractor.cpp + - wrappers/shape-hasher.cpp diff --git a/packages/replicad-opencascadejs/build-source/custom_build_with_exceptions.yml b/packages/replicad-opencascadejs/build-source/custom_build_with_exceptions.yml deleted file mode 100644 index ac845a95..00000000 --- a/packages/replicad-opencascadejs/build-source/custom_build_with_exceptions.yml +++ /dev/null @@ -1,21 +0,0 @@ -#@ load("@ytt:data", "data") - -#@ data.values.bindings.extend([{"symbol": "OCJS"}, {"symbol": "Standard_Failure"}]) - - -mainBuild: - name: replicad_with_exceptions.js - bindings: #@ data.values.bindings - emccFlags: #@ data.values.buildFlags - -#@yaml/text-templated-strings -additionalCppCode: | - typedef Handle(IMeshTools_Context) Handle_IMeshTools_Context; - class OCJS { - public: - static Standard_Failure* getStandard_FailureData(intptr_t exceptionPtr) { - return reinterpret_cast(exceptionPtr); - } - }; - - (@= data.values.additionalCppCode.rstrip() @) diff --git a/packages/replicad-opencascadejs/build-source/defaults.yml b/packages/replicad-opencascadejs/build-source/defaults.yml index 1bb8261d..0220c671 100644 --- a/packages/replicad-opencascadejs/build-source/defaults.yml +++ b/packages/replicad-opencascadejs/build-source/defaults.yml @@ -156,6 +156,11 @@ - symbol: GCPnts_TangentialDeflection - symbol: BRepMesh_IncrementalMesh - symbol: BRepMesh_DiscretRoot + # OSD_ThreadPool is needed alongside BOPAlgo_Options + BRepMesh_IncrementalMesh + # to right-size OCCT's default thread pool. Without it the lazy default pool + # is smaller than the pre-spawned worker count and caps speedup. See: + # https://github.com/taucad/opencascade.js/blob/main/docs-site/content/docs/package/guides/multi-threading.mdx + - symbol: OSD_ThreadPool - symbol: BRepAdaptor_Surface - symbol: BRepAdaptor_Curve @@ -293,14 +298,24 @@ - symbol: GeomToolsWrapper buildFlags: - - -flto - - -fexceptions + - -fwasm-exceptions + - -sEXPORT_EXCEPTION_HANDLING_HELPERS - -sEXPORT_ES6=1 - - -sUSE_ES6_IMPORT_META=0 + - -sMODULARIZE - -sALLOW_MEMORY_GROWTH=1 - - -sEXPORTED_RUNTIME_METHODS=["FS"] + - -sINITIAL_MEMORY=100MB + - -sMAXIMUM_MEMORY=4GB + - -sEXPORTED_RUNTIME_METHODS=["FS","HEAP32","HEAPU32","HEAPF32","wasmMemory"] + - --no-entry + - --emit-symbol-map + - -sERROR_ON_UNDEFINED_SYMBOLS=0 + - -Wl,--allow-undefined + - -sSTACK_SIZE=8388608 + - -sWASM_BIGINT + - -msimd128 - -O3 + # Legacy inline C++ kept for reference; wrapper .cpp files in build-config/wrappers/ are used instead. additionalCppCode: |2 class BRepToolsWrapper { public: diff --git a/packages/replicad-opencascadejs/dist/replicad_multi.build-manifest.json b/packages/replicad-opencascadejs/dist/replicad_multi.build-manifest.json new file mode 100644 index 00000000..fb15b0f4 --- /dev/null +++ b/packages/replicad-opencascadejs/dist/replicad_multi.build-manifest.json @@ -0,0 +1,328 @@ +{ + "schema": "build-manifest-v2", + "timestamp": "2026-05-31T05:17:37Z", + "yaml_config": "custom_build_multi.yml", + "yaml_hash": "0d2c08fa5910", + "validation_passed": true, + "symbols": { + "requested": [ + "Adaptor2d_Curve2d", + "Adaptor3d_Curve", + "Adaptor3d_Surface", + "BOPAlgo_GlueEnum", + "BOPAlgo_Options", + "BRepAdaptor_CompCurve", + "BRepAdaptor_Curve", + "BRepAdaptor_Curve2d", + "BRepAdaptor_Surface", + "BRepAlgoAPI_Algo", + "BRepAlgoAPI_BooleanOperation", + "BRepAlgoAPI_BuilderAlgo", + "BRepAlgoAPI_Common", + "BRepAlgoAPI_Cut", + "BRepAlgoAPI_Fuse", + "BRepAlgoAPI_Section", + "BRepBndLib", + "BRepBuilderAPI_Command", + "BRepBuilderAPI_MakeEdge", + "BRepBuilderAPI_MakeFace", + "BRepBuilderAPI_MakeShape", + "BRepBuilderAPI_MakeShell", + "BRepBuilderAPI_MakeSolid", + "BRepBuilderAPI_MakeVertex", + "BRepBuilderAPI_MakeWire", + "BRepBuilderAPI_ModifyShape", + "BRepBuilderAPI_Sewing", + "BRepBuilderAPI_Transform", + "BRepBuilderAPI_TransitionMode", + "BRepBuilderAPI_WireError", + "BRepExtrema_DistShapeShape", + "BRepFeat_Form", + "BRepFeat_MakeDPrism", + "BRepFill_TypeOfContact", + "BRepFilletAPI_LocalOperation", + "BRepFilletAPI_MakeChamfer", + "BRepFilletAPI_MakeFillet", + "BRepGProp", + "BRepGProp_Face", + "BRepLib", + "BRepMesh_DiscretRoot", + "BRepMesh_IncrementalMesh", + "BRepOffsetAPI_DraftAngle", + "BRepOffsetAPI_MakeFilling", + "BRepOffsetAPI_MakeOffset", + "BRepOffsetAPI_MakeOffsetShape", + "BRepOffsetAPI_MakePipeShell", + "BRepOffsetAPI_MakeThickSolid", + "BRepOffsetAPI_ThruSections", + "BRepOffset_Mode", + "BRepPrimAPI_MakeBox", + "BRepPrimAPI_MakeCylinder", + "BRepPrimAPI_MakeOneAxis", + "BRepPrimAPI_MakePrism", + "BRepPrimAPI_MakeRevol", + "BRepPrimAPI_MakeSphere", + "BRepPrimAPI_MakeSweep", + "BRepTools", + "BRepToolsWrapper", + "BRep_Tool", + "BndLib_Add2dCurve", + "Bnd_Box", + "Bnd_Box2d", + "CDM_Document", + "ChFi3d_FilletShape", + "ChFiDS_ChamfMode", + "Convert_ParameterisationType", + "Extrema_ExtAlgo", + "GCPnts_TangentialDeflection", + "GC_MakeArcOfCircle", + "GC_MakeArcOfCircle2d", + "GC_MakeArcOfEllipse2d", + "GC_MakeCircle2d", + "GC_MakeEllipse2d", + "GC_MakeSegment2d", + "GC_Root", + "GProp_GProps", + "Geom2dAPI_ExtremaCurveCurve", + "Geom2dAPI_InterCurveCurve", + "Geom2dAPI_PointsToBSpline", + "Geom2dAPI_ProjectPointOnCurve", + "Geom2dAdaptor_Curve", + "Geom2dConvert", + "Geom2dConvert_ApproxCurve", + "Geom2dConvert_BSplineCurveToBezierCurve", + "Geom2d_BSplineCurve", + "Geom2d_BezierCurve", + "Geom2d_BoundedCurve", + "Geom2d_Circle", + "Geom2d_Conic", + "Geom2d_Curve", + "Geom2d_Ellipse", + "Geom2d_Geometry", + "Geom2d_Line", + "Geom2d_OffsetCurve", + "Geom2d_TrimmedCurve", + "GeomAPI_PointsToBSpline", + "GeomAPI_ProjectPointOnSurf", + "GeomAbs_CurveType", + "GeomAbs_JoinType", + "GeomAbs_Shape", + "GeomAbs_SurfaceType", + "GeomAdaptor_TransformedCurve", + "GeomAdaptor_TransformedSurface", + "GeomConvert", + "GeomLib", + "GeomTools", + "GeomToolsWrapper", + "Geom_BSplineCurve", + "Geom_BSplineSurface", + "Geom_BezierCurve", + "Geom_BoundedCurve", + "Geom_BoundedSurface", + "Geom_Curve", + "Geom_CylindricalSurface", + "Geom_ElementarySurface", + "Geom_Geometry", + "Geom_SphericalSurface", + "Geom_Surface", + "Geom_TrimmedCurve", + "HLRAlgo_Projector", + "HLRBRep_Algo", + "HLRBRep_HLRToShape", + "HLRBRep_InternalAlgo", + "IFSelect_ReturnStatus", + "IFSelect_WorkSession", + "Interface_Static", + "Interface_TypedValue", + "Law_BSpFunc", + "Law_Composite", + "Law_Function", + "Law_Interpol", + "Law_Linear", + "Law_S", + "Message_ProgressRange", + "MoniTool_TypedValue", + "NCollection_BaseList", + "OCJS_ShapeHasher", + "OSD_ThreadPool", + "Poly_Array1OfTriangle", + "Poly_MergeNodesTool", + "Poly_PolygonOnTriangulation", + "Poly_Triangle", + "Poly_Triangulation", + "Precision", + "Quantity_Color", + "Quantity_ColorRGBA", + "ReplicadEdgeMeshData", + "ReplicadEdgeMeshExtractor", + "ReplicadMeshData", + "ReplicadMeshExtractor", + "STEPCAFControl_Writer", + "STEPControl_Reader", + "STEPControl_StepModelType", + "STEPControl_Writer", + "ShapeFix_Face", + "ShapeFix_Root", + "ShapeFix_Solid", + "ShapeFix_Wire", + "ShapeUpgrade_UnifySameDomain", + "Standard_Failure", + "Standard_Transient", + "StlAPI", + "StlAPI_Reader", + "TColStd_Array1OfBoolean", + "TColStd_Array1OfInteger", + "TColStd_Array1OfReal", + "TColgp_Array1OfDir", + "TColgp_Array1OfPnt", + "TColgp_Array1OfPnt2d", + "TColgp_Array1OfVec", + "TColgp_Array2OfPnt", + "TCollection_ExtendedString", + "TCollection_HAsciiString", + "TDF_Attribute", + "TDF_Label", + "TDataStd_GenericEmpty", + "TDataStd_GenericExtString", + "TDataStd_Name", + "TDocStd_Document", + "TopAbs_Orientation", + "TopAbs_ShapeEnum", + "TopExp_Explorer", + "TopLoc_Location", + "TopTools_ListOfShape", + "TopoDS_Builder", + "TopoDS_CompSolid", + "TopoDS_Compound", + "TopoDS_Edge", + "TopoDS_Face", + "TopoDS_Shape", + "TopoDS_Shell", + "TopoDS_Solid", + "TopoDS_Vertex", + "TopoDS_Wire", + "XCAFDoc_ColorTool", + "XCAFDoc_ColorType", + "XCAFDoc_DocumentTool", + "XCAFDoc_LengthUnit", + "XCAFDoc_Material", + "XCAFDoc_MaterialTool", + "XCAFDoc_ShapeTool", + "XSControl_Reader", + "XSControl_WorkSession", + "gp_Ax1", + "gp_Ax2", + "gp_Ax22d", + "gp_Ax2d", + "gp_Ax3", + "gp_Circ", + "gp_Circ2d", + "gp_Cylinder", + "gp_Dir", + "gp_Dir2d", + "gp_Elips", + "gp_Elips2d", + "gp_GTrsf", + "gp_GTrsf2d", + "gp_Pln", + "gp_Pnt", + "gp_Pnt2d", + "gp_Sphere", + "gp_Trsf", + "gp_Trsf2d", + "gp_Vec", + "gp_Vec2d", + "gp_XY", + "gp_XYZ" + ], + "compiled": 5325, + "missing": [], + "alias_resolved": [ + { + "alias": "Poly_Array1OfTriangle", + "canonical": "NCollection_Array1_Poly_Triangle" + }, + { + "alias": "TColStd_Array1OfBoolean", + "canonical": "NCollection_Array1_bool" + }, + { + "alias": "TColStd_Array1OfInteger", + "canonical": "NCollection_Array1_int" + }, + { + "alias": "TColStd_Array1OfReal", + "canonical": "NCollection_Array1_double" + }, + { + "alias": "TColgp_Array1OfDir", + "canonical": "NCollection_Array1_gp_Dir" + }, + { + "alias": "TColgp_Array1OfPnt", + "canonical": "NCollection_Array1_gp_Pnt" + }, + { + "alias": "TColgp_Array1OfPnt2d", + "canonical": "NCollection_Array1_gp_Pnt2d" + }, + { + "alias": "TColgp_Array1OfVec", + "canonical": "NCollection_Array1_gp_Vec" + }, + { + "alias": "TColgp_Array2OfPnt", + "canonical": "NCollection_Array2_gp_Pnt" + }, + { + "alias": "TopTools_ListOfShape", + "canonical": "NCollection_List_TopoDS_Shape" + } + ], + "builtin": [], + "extra_compiled": 5097, + "pass": true + }, + "outputs": [ + { + "name": "replicad_multi.js", + "wasm_file": "replicad_multi.wasm", + "wasm_exists": true, + "wasm_size": 22206339, + "js_exists": true, + "js_size": 66727, + "pass": true + } + ], + "runtime_helpers": { + "required": true, + "pass": true, + "checked": [ + "getExceptionMessage", + "incrementExceptionRefcount", + "decrementExceptionRefcount" + ], + "missing": [] + }, + "binding_report": { + "total": 5320, + "succeeded": 5318, + "cached": 0, + "failed": 2, + "error_categories": { + "compile_error": 2 + }, + "failures": [ + { + "file": "Handle_math_NotSquare.cpp", + "error_type": "compile_error", + "message": "/opencascade.js/build/occt-includes/Standard_Handle.hxx:68:9: error: cannot initialize a member subobject of type 'Standard_Transient *' with an rvalue of type 'math_NotSquare *'" + }, + { + "file": "Handle_math_SingularMatrix.cpp", + "error_type": "compile_error", + "message": "/opencascade.js/build/occt-includes/Standard_Handle.hxx:68:9: error: cannot initialize a member subobject of type 'Standard_Transient *' with an rvalue of type 'math_SingularMatrix *'" + } + ] + } +} \ No newline at end of file diff --git a/packages/replicad-opencascadejs/dist/replicad_multi.d.ts b/packages/replicad-opencascadejs/dist/replicad_multi.d.ts new file mode 100644 index 00000000..9be8b256 --- /dev/null +++ b/packages/replicad-opencascadejs/dist/replicad_multi.d.ts @@ -0,0 +1,34654 @@ +/** + * Class defining a thread pool for executing algorithms in multi-threaded mode. Thread pool allocates requested amount of threads and keep them alive (in sleep mode when unused) during thread pool lifetime. The same pool can be used by multiple consumers, including nested multi-threading algorithms and concurrent threads: + * + * - Thread pool can be used either by multi-threaded algorithm by creating {@link Launcher | `OSD_ThreadPool::Launcher`}. The functor performing a job takes two parameters - Thread Index and Data Index: void operator(int theThreadIndex, int theDataIndex){} Multi-threaded algorithm may rely on Thread Index for allocating thread-local variables in array form, since the Thread Index is guaranteed to be within range OSD_ThreadPool::Lower() and OSD_ThreadPool::Upper(). + * - Default thread pool (`OSD_ThreadPool::DefaultPool()`) can be used in general case, but application may prefer creating a dedicated pool for better control. + * - Default thread pool allocates the amount of threads considering concurrency level of the system (amount of logical processors). This can be overridden during {@link OSD_ThreadPool | `OSD_ThreadPool`} construction or by calling `OSD_ThreadPool::Init()` (the pool should not be used!). + * - {@link Launcher | `OSD_ThreadPool::Launcher`} reserves specific amount of threads from the pool for executing multi-threaded `Job`. Normally, single {@link Launcher | `Launcher`} instance will occupy all threads available in thread pool, so that nested multi-threaded algorithms (within the same thread) and concurrent threads trying to use the same thread pool will run sequentially. + * This behavior is affected by `OSD_ThreadPool::NbDefaultThreadsToLaunch()` parameter and {@link Launcher | `Launcher`} constructor, so that single {@link Launcher | `Launcher`} instance will occupy not all threads in the pool allowing other threads to be used concurrently. + * - {@link Launcher | `OSD_ThreadPool::Launcher`} locks thread one-by-one from thread pool in a thread-safe way. + * - Each working thread catches exceptions occurred during job execution, and {@link Launcher | `Launcher`} will throw {@link Standard_Failure | `Standard_Failure`} in a caller thread on completed execution. + */ +export declare class OSD_ThreadPool extends Standard_Transient { + /** + * Main constructor. Application may consider specifying more threads than actually available (`OSD_Parallel::NbLogicalProcessors()`) and set up `NbDefaultThreadsToLaunch()` to a smaller value so that concurrent threads will be able using single Thread Pool instance more efficiently. + * @param theNbThreads threads number to be created by pool (if -1 is specified then `OSD_Parallel::NbLogicalProcessors()` will be used) + */ + constructor(theNbThreads?: number); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Return (or create) a default thread pool. Number of threads argument will be considered only when called first time. + */ + static DefaultPool(theNbThreads?: number): OSD_ThreadPool; + /** + * Return TRUE if at least 2 threads are available (including self-thread). + */ + HasThreads(): boolean; + /** + * Return the lower thread index. + */ + LowerThreadIndex(): number; + /** + * Return the upper thread index (last index is reserved for self-thread). + */ + UpperThreadIndex(): number; + /** + * Return the number of threads; >= 1. + */ + NbThreads(): number; + /** + * Return maximum number of threads to be locked by a single {@link Launcher | `Launcher`} object by default; the entire thread pool size is returned by default. + */ + NbDefaultThreadsToLaunch(): number; + /** + * Set maximum number of threads to be locked by a single {@link Launcher | `Launcher`} object by default. Should be set BEFORE first usage. + */ + SetNbDefaultThreadsToLaunch(theNbThreads: number): void; + /** + * Checks if thread pools has active consumers. + */ + IsInUse(): boolean; + /** + * Reinitialize the thread pool with a different number of threads. Should be called only with no active jobs, or exception Standard_ProgramError will be thrown! + */ + Init(theNbThreads: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Auxiliary class representing a part of the global progress scale allocated by a step of the progress scope, see `Message_ProgressScope::Next()`. + * + * A range object takes responsibility of advancing the progress by the size of allocated step, which is then performed depending on how it is used: + * + * - If {@link Message_ProgressScope | `Message_ProgressScope`} object is created using this range as argument, then this respondibility is taken over by that scope. + * - Otherwise, a range advances progress directly upon destruction. + * + * A range object can be copied, the responsibility for progress advancement is then taken by the copy. The same range object may be used (either copied or used to create scope) only once. Any consequent attempts to use range will give no result on the progress; in debug mode, an assert message will be generated. + * @see {@link Message_ProgressScope | `Message_ProgressScope`} + */ +export declare class Message_ProgressRange { + /** + * Constructor of the empty range. + */ + constructor(); + /** + * Copy constructor disarms the source. + */ + constructor(theOther: Message_ProgressRange); + /** + * Returns true if ProgressIndicator signals UserBreak. + */ + UserBreak(): boolean; + /** + * Returns false if ProgressIndicator signals UserBreak. + */ + More(): boolean; + /** + * Returns true if this progress range is attached to some indicator. + */ + IsActive(): boolean; + /** + * Closes the current range and advances indicator. + */ + Close(): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class allows the definition of an RGB color as triplet of 3 normalized floating point values (red, green, blue). + * + * Although {@link Quantity_Color | `Quantity_Color`} can be technically used for pass-through storage of RGB triplet in any color space, other OCCT interfaces taking/returning {@link Quantity_Color | `Quantity_Color`} would expect them in linear space. Therefore, take a look into methods converting to and from non-linear sRGB color space, if needed; for instance, application usually providing color picking within 0..255 range in sRGB color space. + */ +export declare class Quantity_Color { + /** + * Creates Quantity_NOC_YELLOW color (for historical reasons). + */ + constructor(); + /** + * Creates the color from enumeration value. + */ + constructor(theName: unknown); + /** + * Creates a color according to the definition system theType. Throws exception if values are out of range. + */ + constructor(theC1: number, theC2: number, theC3: number, theType: unknown); + /** + * Returns the name of the nearest color from the `Quantity_NameOfColor` enumeration. + */ + Name(): unknown; + /** + * Returns the color from `Quantity_NameOfColor` enumeration nearest to specified RGB values. + */ + static Name(theR: number, theG: number, theB: number): unknown; + /** + * Updates the color from specified named color. + */ + SetValues(theName: unknown): void; + /** + * Updates a color according to the mode specified by theType. Throws exception if values are out of range. + */ + SetValues(theC1: number, theC2: number, theC3: number, theType: unknown): void; + /** + * Return the color as vector of 3 float elements. + */ + Rgb(): [number, number, number]; + /** + * Returns the Red component (quantity of red) of the color within range [0.0; 1.0]. + */ + Red(): number; + /** + * Returns the Green component (quantity of green) of the color within range [0.0; 1.0]. + */ + Green(): number; + /** + * Returns the Blue component (quantity of blue) of the color within range [0.0; 1.0]. + */ + Blue(): number; + /** + * Returns the Hue component (hue angle) of the color in degrees within range [0.0; 360.0], 0.0 being Red. -1.0 is a special value reserved for grayscale color (S should be 0.0). + */ + Hue(): number; + /** + * Returns the Light component (value of the lightness) of the color within range [0.0; 1.0]. + */ + Light(): number; + /** + * Increases or decreases the intensity (variation of the lightness). The delta is a percentage. Any value greater than zero will increase the intensity. The variation is expressed as a percentage of the current value. + */ + ChangeIntensity(theDelta: number): void; + /** + * Returns the Saturation component (value of the saturation) of the color within range [0.0; 1.0]. + */ + Saturation(): number; + /** + * Increases or decreases the contrast (variation of the saturation). The delta is a percentage. Any value greater than zero will increase the contrast. The variation is expressed as a percentage of the current value. + */ + ChangeContrast(theDelta: number): void; + /** + * Returns TRUE if the distance between two colors is greater than `Epsilon()`. + */ + IsDifferent(theOther: Quantity_Color): boolean; + /** + * Returns TRUE if the distance between two colors is no greater than `Epsilon()`. + */ + IsEqual(theOther: Quantity_Color): boolean; + /** + * Returns the distance between two colors. It's a value between 0 and the square root of 3 (the black/white distance). + */ + Distance(theColor: Quantity_Color): number; + /** + * Returns the square of distance between two colors. + */ + SquareDistance(theColor: Quantity_Color): number; + /** + * Returns the percentage change of contrast and intensity between this and another color. and are percentages, either positive or negative. The calculation is with respect to this color. If is positive then is more contrasty. If is positive then is more intense. + * @returns A result object with fields: + * - `DC`: updated value from the call. + * - `DI`: updated value from the call. + */ + Delta(theColor: Quantity_Color, DC?: number, DI?: number): { DC: number; DI: number }; + /** + * Returns the value of the perceptual difference between this color and `theOther`, computed using the CIEDE2000 formula. The difference is in range [0, 100.], with 1 approximately corresponding to the minimal perceivable difference (usually difference 5 or greater is needed for the difference to be recognizable in practice). + */ + DeltaE2000(theOther: Quantity_Color): number; + /** + * Returns the name of the color identified by the given `Quantity_NameOfColor` enumeration value. + */ + static StringName(theColor: unknown): string; + static ColorFromHex(theHexColorString: string, theColor: Quantity_Color): boolean; + static ColorToHex(theColor: Quantity_Color, theToPrefixHash?: boolean): unknown; + static Color2argb(theColor: Quantity_Color, theARGB?: number): { theARGB: number }; + static Argb2color(theARGB: number, theColor: Quantity_Color): void; + static Convert_LinearRGB_To_sRGB(theLinearValue: number): number; + static Convert_sRGB_To_LinearRGB(thesRGBValue: number): number; + static Convert_LinearRGB_To_sRGB_approx22(theLinearValue: number): number; + static Convert_sRGB_To_LinearRGB_approx22(thesRGBValue: number): number; + static HlsRgb(theH: number, theL: number, theS: number, theR?: number, theG?: number, theB?: number): { theR: number; theG: number; theB: number }; + static RgbHls(theR: number, theG: number, theB: number, theH?: number, theL?: number, theS?: number): { theH: number; theL: number; theS: number }; + static Epsilon(): number; + static SetEpsilon(theEpsilon: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The pair of {@link Quantity_Color | `Quantity_Color`} and Alpha component (1.0 opaque, 0.0 transparent). + */ +export declare class Quantity_ColorRGBA { + /** + * Creates a color with the default value. + */ + constructor(); + /** + * Creates the color with specified RGB value. + */ + constructor(theRgb: Quantity_Color); + /** + * Creates the color with specified RGBA values. + */ + constructor(theRgb: Quantity_Color, theAlpha: number); + /** + * Creates the color from RGBA values. + */ + constructor(theRed: number, theGreen: number, theBlue: number, theAlpha: number); + /** + * Assign new values to the color. + */ + SetValues(theRed: number, theGreen: number, theBlue: number, theAlpha: number): void; + /** + * Return RGB color value. + */ + GetRGB(): Quantity_Color; + /** + * Modify RGB color components without affecting alpha value. + */ + ChangeRGB(): Quantity_Color; + /** + * Assign RGB color components without affecting alpha value. + */ + SetRGB(theRgb: Quantity_Color): void; + /** + * Return alpha value (1.0 means opaque, 0.0 means fully transparent). + */ + Alpha(): number; + /** + * Assign the alpha value. + */ + SetAlpha(theAlpha: number): void; + /** + * Returns true if the distance between colors is greater than `Epsilon()`. + */ + IsDifferent(theOther: Quantity_ColorRGBA): boolean; + /** + * Two colors are considered to be equal if their distance is no greater than `Epsilon()`. + */ + IsEqual(theOther: Quantity_ColorRGBA): boolean; + /** + * Finds color from predefined names. For example, the name of the color which corresponds to "BLACK" is Quantity_NOC_BLACK. An alpha component is set to 1.0. + * @param theColorNameString the color name + * @param theColor a found color Mutated in place; read the updated value from this argument after the call. + * @returns false if the color name is unknown, or true if the search by color name was successful + */ + static ColorFromName(theColorNameString: string, theColor: Quantity_ColorRGBA): boolean; + /** + * Parses the string as a hex color (like "#FF0" for short sRGB color, "#FF0F" for short sRGBA color, "#FFFF00" for RGB color, or "#FFFF00FF" for RGBA color). + * @param theHexColorString the string to be parsed + * @param theColor a color that is a result of parsing Mutated in place; read the updated value from this argument after the call. + * @param theAlphaComponentIsOff the flag that indicates if a color alpha component is presented in the input string (false) or not (true) + * @returns true if parsing was successful, or false otherwise + */ + static ColorFromHex(theHexColorString: string, theColor: Quantity_ColorRGBA, theAlphaComponentIsOff: boolean): boolean; + /** + * Returns hex sRGBA string in format "#RRGGBBAA". + */ + static ColorToHex(theColor: Quantity_ColorRGBA, theToPrefixHash?: boolean): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class NCollection_BaseList { + // dropped: PFirst return resolves to excluded type NCollection_ListNode + // dropped: PLast return resolves to excluded type NCollection_ListNode + // dropped: PAppend param 0 resolves to excluded type NCollection_ListNode + // dropped: PPrepend param 0 resolves to excluded type NCollection_ListNode + Extent(): number; + /** + * Length - number of nodes (legacy int-returning API, synonym of `Extent()`). + */ + Length(): number; + /** + * Size - number of nodes. + */ + Size(): number; + IsEmpty(): boolean; + /** + * Returns attached allocator. + */ + Allocator(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Abstract class which forms the root of the entire Transient class hierarchy. + */ +export declare class Standard_Transient { + /** Returns true if the underlying handle is null. */ + isNull(): boolean; + /** Releases the handle, setting it to null. */ + nullify(): void; + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor - does nothing. + */ + constructor(a0: Standard_Transient); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + IsInstance(theType: unknown): boolean; + IsInstance(theTypeName: string): boolean; + IsKind(theType: unknown): boolean; + IsKind(theTypeName: string): boolean; + This(): Standard_Transient; + GetRefCount(): number; + IncrementRefCounter(): void; + DecrementRefCounter(): number; + Delete(): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Forms the root of the entire exception hierarchy. Inherits from std::exception and implements `what()` interface. + */ +export declare class Standard_Failure { + /** + * Creates a status object of type "Failure". + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: Standard_Failure); + /** + * Creates a status object of type "Failure" with message. + * @param theMessage exception description + */ + constructor(theMessage: string); + /** + * Creates a status object of type "Failure" with message and stack trace. + * @param theMessage exception description + * @param theStackTrace stack trace string + */ + constructor(theMessage: string, theStackTrace: string); + /** + * Returns error message (implements std::exception interface). Returns empty string "" if no message was set. + */ + what(): string; + /** + * Returns error message. + * @deprecated + */ + GetMessageString(): string; + /** + * Returns the exception type name. Default implementation returns "Standard_Failure". Derived classes override this to return their own type name. + */ + ExceptionType(): string; + /** + * Returns the stack trace string (empty string if not available). + */ + GetStackString(): string; + /** + * Returns the default length of stack trace to be captured by {@link Standard_Failure | `Standard_Failure`} constructor; 0 by default meaning no stack trace. + */ + static DefaultStackTraceLength(): number; + /** + * Sets default length of stack trace to be captured by {@link Standard_Failure | `Standard_Failure`} constructor. + */ + static SetDefaultStackTraceLength(theNbStackTraces: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The {@link Precision | `Precision`} package offers a set of functions defining precision criteria for use in conventional situations when comparing two numbers. Generalities It is not advisable to use floating number equality. Instead, the difference between numbers must be compared with a given precision, i.e. : double x1, x2 ; x1 = ... x2 = ... If ( x1 == x2 ) ... should not be used and must be written as indicated below: double x1, x2 ; double {@link Precision | `Precision`} = ... x1 = ... x2 = ... If ( Abs ( x1 - x2 ) < {@link Precision | `Precision`} ) ... + * Likewise, when ordering floating numbers, you must take the following into account : double x1, x2 ; double {@link Precision | `Precision`} = ... x1 = ... ! a large number x2 = ... ! another large number If ( x1 < x2 - {@link Precision | `Precision`} ) ... is incorrect when x1 and x2 are large numbers ; it is better to write : double x1, x2 ; double {@link Precision | `Precision`} = ... x1 = ... ! a large number x2 = ... ! another large number If ( x2 - x1 > {@link Precision | `Precision`} ) ... {@link Precision | `Precision`} in Cas.Cade Generally speaking, the precision criterion is not implicit in Cas.Cade. Low-level geometric algorithms accept precision criteria as arguments. + * As a rule, they should not refer directly to the precision criteria provided by the {@link Precision | `Precision`} package. + * On the other hand, high-level modeling algorithms have to provide the low-level geometric algorithms that they call, with a precision criteria. One way of doing this is to use the above precision criteria. Alternatively, the high-level algorithms can have their own system for precision management. + * For example, the Topology Data Structure stores precision criteria for each elementary shape (as a vertex, an edge or a face). + * When a new topological object is constructed, the precision criteria are taken from those provided by the {@link Precision | `Precision`} package, and stored in the related data structure. Later, a topological algorithm which analyses these objects will work with the values stored in the data structure. + * Also, if this algorithm is to build a new topological object, from these precision criteria, it will compute a new precision criterion for the new topological object, and write it into the data structure of the new topological object. The different precision criteria offered by the {@link Precision | `Precision`} package, cover the most common requirements of geometric algorithms, such as intersections, approximations, and so on. The choice of precision depends on the algorithm and on the geometric space. The geometric space may be : + * + * - a "real" 2D or 3D space, where the lengths are measured in meters, millimeters, microns, inches, etc ..., or + * - a "parametric" space, 1D on a curve or 2D on a surface, where lengths have no dimension. The choice of precision criteria for real space depends on the choice of the product, as it is based on the accuracy of the machine and the unit of measurement. + * The choice of precision criteria for parametric space depends on both the accuracy of the machine and the dimensions of the curve or the surface, since the parametric precision criterion and the real precision criterion are linked : if the curve is defined by the equation P(t), the inequation : Abs ( t2 - t1 ) < ParametricPrecision means that the parameters t1 and t2 are considered to be equal, and the inequation : Distance ( P(t2) , P(t1) ) < RealPrecision means that the points P(t1) and P(t2) are considered to be coincident. It seems to be the same idea, and it would be wonderful if these two inequations were equivalent. + * Note that this is rarely the case ! What is provided in this package? The {@link Precision | `Precision`} package provides : + * - a set of real space precision criteria for the algorithms, in view of checking distances and angles, + * - a set of parametric space precision criteria for the algorithms, in view of checking both : + * - the equality of parameters in a parametric space, + * - or the coincidence of points in the real space, by using parameter values, + * - the notion of infinite value, composed of a value assumed to be infinite, and checking tests designed to verify if any value could be considered as infinite. All the provided functions are very simple. The returned values result from the adaptation of the applications developed by the Open CASCADE company to Open CASCADE algorithms. The main interest of these functions lies in that it incites engineers developing applications to ask questions on precision factors. Which one is to be used in such or such case ? Tolerance criteria are context dependent. They must first choose : + * - either to work in real space, + * - or to work in parametric space, + * - or to work in a combined real and parametric space. They must next decide which precision factor will give the best answer to the current problem. Within an application environment, it is crucial to master precision even though this process may take a great deal of time. + */ +export declare class Precision { + constructor(); + /** + * Returns the recommended precision value when checking the equality of two angles (given in radians). double Angle1 = ... , Angle2 = ... ; If ( std::abs( Angle2 - Angle1 ) < `Precision::Angular()` ) ... + * The tolerance of angular equality may be used to check the parallelism of two vectors : {@link gp_Vec | `gp_Vec`} V1, V2 ; V1 = ... V2 = ... If ( V1.IsParallel (V2, `Precision::Angular()` ) ) ... The tolerance of angular equality is equal to 1.e-12. + * Note : The tolerance of angular equality can be used when working with scalar products or cross products since sines and angles are equivalent for small angles. Therefore, in order to check whether two unit vectors are perpendicular : {@link gp_Dir | `gp_Dir`} D1, D2 ; D1 = ... + * D2 = ... you can use : If ( std::abs( D1.D2 ) < `Precision::Angular()` ) ... (although the function IsNormal does exist). + */ + static Angular(): number; + /** + * Returns the recommended precision value when checking coincidence of two points in real space. The tolerance of confusion is used for testing a 3D distance : + * + * - Two points are considered to be coincident if their distance is smaller than the tolerance of confusion. {@link gp_Pnt | `gp_Pnt`} P1, P2 ; P1 = ... P2 = ... if ( P1.IsEqual ( P2 , `Precision::Confusion()` ) ) then ... + * - A vector is considered to be null if it has a null length : {@link gp_Vec | `gp_Vec`} V ; V = ... if ( V.Magnitude() < `Precision::Confusion()` ) then ... The tolerance of confusion is equal to 1.e-7. The value of the tolerance of confusion is also used to define : + * - the tolerance of intersection, and + * - the tolerance of approximation. + * Note : As a rule, coordinate values in Cas.Cade are not dimensioned, so 1. represents one user unit, whatever value the unit may have : the millimeter, the meter, the inch, or any other unit. + * Let's say that Cas.Cade algorithms are written to be tuned essentially with mechanical design applications, on the basis of the millimeter. + * However, these algorithms may be used with any other unit but the tolerance criterion does no longer have the same signification. + * So pay particular attention to the type of your application, in relation with the impact of your unit on the precision criterion. + * - For example in mechanical design, if the unit is the millimeter, the tolerance of confusion corresponds to a distance of 1 / 10000 micron, which is rather difficult to measure. + * - However in other types of applications, such as cartography, where the kilometer is frequently used, the tolerance of confusion corresponds to a greater distance (1 / 10 millimeter). This distance becomes easily measurable, but only within a restricted space which contains some small objects of the complete scene. + */ + static Confusion(): number; + /** + * Returns square of Confusion. Created for speed and convenience. + */ + static SquareConfusion(): number; + /** + * Returns a precision value at machine epsilon level, used for low-level numerical computations and floating-point comparisons. Unlike the geometric tolerances (Confusion, Intersection, Approximation) which are application-level values for modeling operations, this value represents the fundamental limit of floating-point arithmetic precision. + * + * Typical use cases include: + * + * - Checking if squared magnitudes are effectively zero (e.g., vector.SquareMagnitude() < `SquareComputational()`) + * - Division-by-zero protection in numerical algorithms + * - Convergence criteria in iterative solvers at machine precision level + * - Detecting numerical degeneracies in low-level computations + * + * The computational tolerance is equal to DBL_EPSILON (approximately 2.22e-16), which is the smallest positive value such that 1.0 + eps != 1.0 in double precision floating-point arithmetic. This is the fundamental machine epsilon for double (double) type. + * + * Note: This value should NOT be used for geometric comparisons. Use `Precision::Confusion()` for comparing geometric distances, `Precision::Angular()` for angles, etc. + */ + static Computational(): number; + /** + * Returns square of Computational. Created for speed and convenience when comparing squared values. + */ + static SquareComputational(): number; + /** + * Returns the precision value in real space, frequently used by intersection algorithms to decide that a solution is reached. This function provides an acceptable level of precision for an intersection process to define the adjustment limits. + * The tolerance of intersection is designed to ensure that a point computed by an iterative algorithm as the intersection between two curves is indeed on the intersection. It is obvious that two tangent curves are close to each other, on a large distance. + * An iterative algorithm of intersection may find points on these curves within the scope of the confusion tolerance, but still far from the true intersection point. + * In order to force the intersection algorithm to continue the iteration process until a correct point is found on the tangent objects, the tolerance of intersection must be smaller than the tolerance of confusion. On the other hand, the tolerance of intersection must be large enough to minimize the time required by the process to converge to a solution. The tolerance of intersection is equal to : `Precision::Confusion()` / 100. (that is, 1.e-9). + */ + static Intersection(): number; + /** + * Returns the precision value in real space, frequently used by approximation algorithms. This function provides an acceptable level of precision for an approximation process to define adjustment limits. + * The tolerance of approximation is designed to ensure an acceptable computation time when performing an approximation process. That is why the tolerance of approximation is greater than the tolerance of confusion. The tolerance of approximation is equal to : `Precision::Confusion()` * 10. (that is, 1.e-6). You may use a smaller tolerance in an approximation algorithm, but this option might be costly. + */ + static Approximation(): number; + /** + * Convert a real space precision to a parametric space precision. is the mean value of the length of the tangent of the curve or the surface. + * + * Value is P / T + */ + static Parametric(P: number, T: number): number; + /** + * Convert a real space precision to a parametric space precision on a default curve. + * + * Value is Parametric(P,1.e+2) + */ + static Parametric(P: number): number; + /** + * Returns a precision value in parametric space, which may be used : + * + * - to test the coincidence of two points in the real space, by using parameter values, or + * - to test the equality of two parameter values in a parametric space. The parametric tolerance of confusion is designed to give a mean value in relation with the dimension of the curve or the surface. It considers that a variation of parameter equal to 1. along a curve (or an isoparametric curve of a surface) generates a segment whose length is equal to 100. (default value), or T. The parametric tolerance of confusion is equal to : + * - `Precision::Confusion()` / 100., or `Precision::Confusion()` / T. The value of the parametric tolerance of confusion is also used to define : + * - the parametric tolerance of intersection, and + * - the parametric tolerance of approximation. Warning It is rather difficult to define a unique precision value in parametric space. + * - First consider a curve (c) ; if M is the point of parameter u and M' the point of parameter u+du on the curve, call 'parametric tangent' at point M, for the variation du of the parameter, the quantity : T(u,du)=MM'/du (where MM' represents the distance between the two points M and M', in the real space). + * - Consider the other curve resulting from a scaling transformation of (c) with a scale factor equal to + * + * 1. The 'parametric tangent' at the point of parameter u of this curve is ten times greater than the previous one. This shows that for two different curves, the distance between two points on the curve, resulting from the same variation of parameter du, may vary considerably. + * + * - Moreover, the variation of the parameter along the curve is generally not proportional to the curvilinear abscissa along the curve. So the distance between two points resulting from the same variation of parameter du, at two different points of a curve, may completely differ. + * - Moreover, the parameterization of a surface may generate two quite different 'parametric tangent' values in the u or in the v parametric direction. + * - Last, close to the poles of a sphere (the points which correspond to the values -Pi/2. and Pi/2. of the v parameter) the u parameter may change from 0 to 2.Pi without impacting on the resulting point. Therefore, take great care when adjusting a parametric tolerance to your own algorithm. + */ + static PConfusion(T: number): number; + /** + * Used to test distances in parametric space on a default curve. + * + * This is Precision::Parametric(Precision::Confusion()) + */ + static PConfusion(): number; + /** + * Returns square of PConfusion. Created for speed and convenience. + */ + static SquarePConfusion(): number; + /** + * Returns a precision value in parametric space, which may be used by intersection algorithms, to decide that a solution is reached. + * The purpose of this function is to provide an acceptable level of precision in parametric space, for an intersection process to define the adjustment limits. + * The parametric tolerance of intersection is designed to give a mean value in relation with the dimension of the curve or the surface. + * It considers that a variation of parameter equal to 1. along a curve (or an isoparametric curve of a surface) generates a segment whose length is equal to 100. (default value), or T. The parametric tolerance of intersection is equal to : + * + * - `Precision::Intersection()` / 100., or `Precision::Intersection()` / T. + */ + static PIntersection(T: number): number; + /** + * Used for Intersections in parametric space on a default curve. + * + * This is Precision::Parametric(Precision::Intersection()) + */ + static PIntersection(): number; + /** + * Returns a precision value in parametric space, which may be used by approximation algorithms. + * The purpose of this function is to provide an acceptable level of precision in parametric space, for an approximation process to define the adjustment limits. + * The parametric tolerance of approximation is designed to give a mean value in relation with the dimension of the curve or the surface. + * It considers that a variation of parameter equal to 1. along a curve (or an isoparametric curve of a surface) generates a segment whose length is equal to 100. (default value), or T. The parametric tolerance of intersection is equal to : + * + * - `Precision::Approximation()` / 100., or `Precision::Approximation()` / T. + */ + static PApproximation(T: number): number; + /** + * Used for Approximations in parametric space on a default curve. + * + * This is Precision::Parametric(Precision::Approximation()) + */ + static PApproximation(): number; + /** + * Returns True if R may be considered as an infinite number. Currently std::abs(R) > 1e100. + */ + static IsInfinite(R: number): boolean; + /** + * Returns True if R may be considered as a positive infinite number. Currently R > 1e100. + */ + static IsPositiveInfinite(R: number): boolean; + /** + * Returns True if R may be considered as a negative infinite number. Currently R < -1e100. + */ + static IsNegativeInfinite(R: number): boolean; + /** + * Returns a big number that can be considered as infinite. Use -`Infinite()` for a negative big number. + */ + static Infinite(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A variable-length sequence of "extended" (UNICODE) characters (16-bit character type). It provides editing operations with built-in memory management to make ExtendedString objects easier to use than ordinary extended character arrays. ExtendedString objects follow "value semantics", that is, they are the actual strings, not handles to strings, and are copied through assignment. You may use HExtendedString objects to get handles to strings. + * + * Beware that class can transparently store UTF-16 string with surrogate pairs (Unicode symbol represented by two 16-bit code units). However, surrogate pairs are not considered by the following methods: + * + * - Method ::Length() return the number of 16-bit code units, not the number of Unicode symbols. + * - Methods taking/returning symbol index work with 16-bit code units, not true Unicode symbols, including ::Remove(), ::SetValue(), ::Value(), ::Search(), ::Trunc() and others. If application needs to process surrogate pairs, `NCollection_UtfIterator` class can be used for iterating through Unicode string (UTF-32 code unit will be returned for each position). + */ +export declare class TCollection_ExtendedString { + /** + * Initializes an ExtendedString to an empty ExtendedString. + */ + constructor(); + /** + * Initializes an ExtendedString with an integer value. + * @param theValue the integer value to convert to string + */ + constructor(theValue: number); + /** + * Initializes an ExtendedString with a real value. + * @param theValue the real value to convert to string + */ + constructor(theValue: number); + /** + * Initializes an ExtendedString with another ExtendedString. + * @param theString the string to copy from + */ + constructor(theString: TCollection_ExtendedString); + /** + * Initializes an ExtendedString with a single extended character. + */ + constructor(theStringView: string); + /** + * Creation by converting a CString to an extended string. If theIsMultiByte is true then the string is treated as having UTF-8 coding. If it is not a UTF-8 then theIsMultiByte is ignored and each character is copied to ExtCharacter. + * @param theString the C string to convert + * @param theIsMultiByte flag indicating UTF-8 coding + */ + constructor(theString: string, theIsMultiByte?: boolean); + /** + * Creation by converting an AsciiString to an extended string. The string is treated as having UTF-8 coding. If it is not a UTF-8 or multi byte then each character is copied to ExtCharacter. + * @param theString the ASCII string to convert + * @param theIsMultiByte flag indicating UTF-8 coding + */ + constructor(theString: unknown, theIsMultiByte?: boolean); + /** + * Appends the other extended string to this extended string. Note that this method is an alias of operator +=. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Hello"); TCollection_ExtendedStringanotherString(u"World"); aString+=anotherString; //Result:aString==u"HelloWorld" + * ``` + * @param theOther the string to append + */ + AssignCat(theOther: TCollection_ExtendedString): void; + /** + * Appends the integer value to this extended string. + * @param theOther the integer to append + */ + AssignCat(theOther: number): void; + /** + * Appends the utf16 char to this extended string. + * @param theChar the character to append + */ + AssignCat(theChar: string): void; + /** + * Appends the real value to this extended string. + * @param theOther the real value to append + */ + AssignCat(theOther: number): void; + /** + * Appends the utf16 char to this extended string. + * @param theChar the character to append + */ + AssignCat(theChar: string): void; + /** + * Appends the char16_t string to this extended string. + */ + AssignCat(theStringView: string): void; + /** + * Core implementation: Appends char16_t string (pointer and length) to this extended string. This is the primary implementation that all other AssignCat overloads redirect to. + * @param theString pointer to the string to append + * @param theLength length of the string to append + */ + AssignCat(theString: string, theLength: number): void; + /** + * Concatenates char16_t string and returns a new string. + * @param theOther the null-terminated string to append + * @returns new string with theOther appended + */ + Cat(theOther: number): TCollection_ExtendedString; + /** + * Appends the integer value to this string and returns a new string. + * @param theOther the integer to append + * @returns new string with integer appended + */ + Cat(theOther: number): TCollection_ExtendedString; + /** + * Appends a single extended (char16_t) character to this string and returns a new string. + * @param theChar the extended character to append + */ + Cat(theChar: string): TCollection_ExtendedString; + /** + * Appends the other extended string to this string and returns a new string. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Hello"); TCollection_ExtendedStringanotherString(u"World"); TCollection_ExtendedStringaResult=aString+anotherString; //Result:aResult==u"HelloWorld" + * ``` + * @param theOther the string to append + * @returns new string with theOther appended + */ + Cat(theOther: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * Appends the other extended string to this string and returns a new string. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Hello"); TCollection_ExtendedStringanotherString(u"World"); TCollection_ExtendedStringaResult=aString+anotherString; //Result:aResult==u"HelloWorld" + * ``` + * @param theOther the string to append + * @returns new string with theOther appended + */ + Cat_2(theOther: string): TCollection_ExtendedString; + /** + * Core implementation: Concatenates char16_t string (pointer and length) and returns a new string. + * @param theOther pointer to the string to append + * @param theLength length of the string to append + * @returns new string with theOther appended + */ + Cat(theOther: string, theLength: number): TCollection_ExtendedString; + /** + * Substitutes all the characters equal to theChar by theNewChar in this ExtendedString. The substitution can be case sensitive. If you don't use default case sensitive, no matter whether theChar is uppercase or not. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Histake"); aString.ChangeAll(u'H',u'M'); //Result:aString==u"Mistake" + * ``` + * @param theChar the character to replace + * @param theNewChar the replacement character + */ + ChangeAll(theChar: string, theNewChar: string): void; + /** + * Removes all characters contained in this string. This produces an empty ExtendedString. + */ + Clear(): void; + /** + * Copy theFromWhere to this string. Used as operator =. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString; TCollection_ExtendedStringanotherString(u"HelloWorld"); aString=anotherString;//operator= //Result:aString==u"HelloWorld" + * ``` + * @param theFromWhere the string to copy from + */ + Copy(theFromWhere: TCollection_ExtendedString): void; + /** + * Copy from a char16_t pointer. + * @param theString the null-terminated string to copy + */ + Copy_2(theString: string): void; + /** + * Core implementation: Copy from a char16_t pointer with explicit length. + * @param theString pointer to the string to copy + * @param theLength length of the string to copy + */ + Copy(theString: string, theLength: number): void; + /** + * Exchange the data of two strings (without reallocating memory). + * @param theOther the string to exchange data with Mutated in place; read the updated value from this argument after the call. + */ + Swap(theOther: TCollection_ExtendedString): void; + /** + * Insert a Character at position theWhere. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"hynot?"); aString.Insert(1,u'W'); //Result:aString==u"Whynot?" + * ``` + * @param theWhere the position to insert at (1-based) + * @param theWhat the character to insert + */ + Insert(theWhere: number, theWhat: string): void; + /** + * Insert a char16_t string at position theWhere. + * @param theWhere the position to insert at (1-based) + * @param theWhat the null-terminated string to insert + */ + Insert(theWhere: number, theWhat: TCollection_ExtendedString): void; + /** + * Core implementation: Insert a char16_t string (pointer and length) at position theWhere. + * @param theWhere the position to insert at (1-based) + * @param theWhat pointer to the string to insert + * @param theLength length of the string to insert + */ + Insert(theWhere: number, theWhat: string, theLength: number): void; + /** + * Returns True if this string contains no characters. + */ + IsEmpty(): boolean; + /** + * Returns true if this string equals theOther null-terminated string. Note that this method is an alias of operator ==. + * @param theOther the char16_t string to compare with + * @returns true if strings are equal, false otherwise + */ + IsEqual(theOther: TCollection_ExtendedString): boolean; + /** + * Returns true if the characters in this extended string are identical to the characters in theOther extended string. Note that this method is an alias of operator ==. + * @param theOther the extended string to compare with + * @returns true if strings are equal, false otherwise + */ + IsEqual_2(theOther: string): boolean; + /** + * Returns true if the characters in this extended string are identical to the characters in the other extended string. Note that this method is an alias of operator ==. + * @param theString1 first string to compare + * @param theString2 second string to compare + * @returns true if strings are equal + */ + static IsEqual(theString1: TCollection_ExtendedString, theString2: TCollection_ExtendedString): boolean; + /** + * Core implementation: Returns true if this string equals theOther (pointer and length). + * @param theOther pointer to the string to compare with + * @param theLength length of the string to compare with + * @returns true if strings are equal, false otherwise + */ + IsEqual_1(theOther: string, theLength: number): boolean; + /** + * Returns true if this string differs from theOther null-terminated string. Note that this method is an alias of operator !=. + * @param theOther the char16_t string to compare with + * @returns true if strings are different, false otherwise + */ + IsDifferent(theOther: TCollection_ExtendedString): boolean; + /** + * Returns true if there are differences between the characters in this extended string and theOther extended string. Note that this method is an alias of operator !=. + * @param theOther the extended string to compare with + * @returns true if strings are different, false otherwise + */ + IsDifferent_2(theOther: string): boolean; + /** + * Core implementation: Returns true if this string differs from theOther (pointer and length). + * @param theOther pointer to the string to compare with + * @param theLength length of the string to compare with + * @returns true if strings are different, false otherwise + */ + IsDifferent(theOther: string, theLength: number): boolean; + /** + * Returns TRUE if this string is lexicographically less than theOther. + * @param theOther the char16_t string to compare with + * @returns true if this string is less than theOther + */ + IsLess(theOther: TCollection_ExtendedString): boolean; + /** + * Returns TRUE if this string is lexicographically less than theOther. + * @param theOther the extended string to compare with + * @returns true if this string is less than theOther + */ + IsLess_2(theOther: string): boolean; + /** + * Core implementation: Returns TRUE if this string is lexicographically less than theOther. + * @param theOther pointer to the string to compare with + * @param theLength length of the string to compare with + * @returns true if this string is less than theOther + */ + IsLess(theOther: string, theLength: number): boolean; + /** + * Returns TRUE if this string is lexicographically greater than theOther. + * @param theOther the char16_t string to compare with + * @returns true if this string is greater than theOther + */ + IsGreater(theOther: TCollection_ExtendedString): boolean; + /** + * Returns TRUE if this string is lexicographically greater than theOther. + * @param theOther the extended string to compare with + * @returns true if this string is greater than theOther + */ + IsGreater_2(theOther: string): boolean; + /** + * Core implementation: Returns TRUE if this string is lexicographically greater than theOther. + * @param theOther pointer to the string to compare with + * @param theLength length of the string to compare with + * @returns true if this string is greater than theOther + */ + IsGreater(theOther: string, theLength: number): boolean; + /** + * Determines whether this string starts with theStartString. + * @param theStartString the null-terminated string to check for + * @returns true if this string starts with theStartString + */ + StartsWith(theStartString: TCollection_ExtendedString): boolean; + /** + * Determines whether the beginning of this string instance matches the specified string. + * @param theStartString the string to check for at the beginning + * @returns true if this string starts with theStartString + */ + StartsWith_2(theStartString: string): boolean; + /** + * Core implementation: Determines whether this string starts with theStartString. + * @param theStartString pointer to the string to check for + * @param theLength length of the string to check for + * @returns true if this string starts with theStartString + */ + StartsWith(theStartString: string, theLength: number): boolean; + /** + * Determines whether this string ends with theEndString. + * @param theEndString the null-terminated string to check for + * @returns true if this string ends with theEndString + */ + EndsWith(theEndString: TCollection_ExtendedString): boolean; + /** + * Determines whether the end of this string instance matches the specified string. + * @param theEndString the string to check for at the end + * @returns true if this string ends with theEndString + */ + EndsWith_2(theEndString: string): boolean; + /** + * Core implementation: Determines whether this string ends with theEndString. + * @param theEndString pointer to the string to check for + * @param theLength length of the string to check for + * @returns true if this string ends with theEndString + */ + EndsWith(theEndString: string, theLength: number): boolean; + /** + * Returns True if the ExtendedString contains only "Ascii Range" characters. + * @returns true if string contains only ASCII characters + */ + IsAscii(): boolean; + /** + * Returns the number of 16-bit code units (might be greater than number of Unicode symbols if string contains surrogate pairs). + * @returns the number of 16-bit code units + */ + Length(): number; + /** + * Removes every theWhat characters from this string. + * @param theWhat the character to remove + */ + RemoveAll(theWhat: string): void; + /** + * Erases theHowMany characters from position theWhere, theWhere included. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Hello"); aString.Remove(2,2);//erases2charactersfromposition2 //Result:aString==u"Hlo" + * ``` + * @param theWhere the position to start erasing from (1-based) + * @param theHowMany the number of characters to erase + */ + Remove(theWhere: number, theHowMany?: number): void; + /** + * Searches for theWhat null-terminated string from the beginning. + * @param theWhat the null-terminated string to search for + * @returns the position of first match (1-based), or -1 if not found + */ + Search(theWhat: TCollection_ExtendedString): number; + /** + * Searches an ExtendedString in this string from the beginning and returns position of first item theWhat matching. It returns -1 if not found. + * @param theWhat the string to search for + * @returns the position of first match (1-based), or -1 if not found + */ + Search_2(theWhat: string): number; + /** + * Core implementation: Searches for theWhat (pointer and length) from the beginning. + * @param theWhat pointer to the string to search for + * @param theLength length of the string to search for + * @returns the position of first match (1-based), or -1 if not found + */ + Search(theWhat: string, theLength: number): number; + /** + * Searches for theWhat null-terminated string from the end. + * @param theWhat the null-terminated string to search for + * @returns the position of first match from end (1-based), or -1 if not found + */ + SearchFromEnd(theWhat: TCollection_ExtendedString): number; + /** + * Searches an ExtendedString in this string from the end and returns position of first item theWhat matching. It returns -1 if not found. + * @param theWhat the string to search for + * @returns the position of first match from end (1-based), or -1 if not found + */ + SearchFromEnd_2(theWhat: string): number; + /** + * Core implementation: Searches for theWhat (pointer and length) from the end. + * @param theWhat pointer to the string to search for + * @param theLength length of the string to search for + * @returns the position of first match from end (1-based), or -1 if not found + */ + SearchFromEnd(theWhat: string, theLength: number): number; + /** + * Replaces one character in the ExtendedString at position theWhere. If theWhere is less than zero or greater than the length of this string an exception is raised. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Garbake"); aString.SetValue(6,u'g'); //Result:aString==u"Garbage" + * ``` + * @param theWhere the position to replace at (1-based) + * @param theWhat the character to replace with + */ + SetValue(theWhere: number, theWhat: string): void; + /** + * Replaces a part of this string by a null-terminated char16_t string. + * @param theWhere the position to start replacement (1-based) + * @param theWhat the null-terminated string to replace with + */ + SetValue(theWhere: number, theWhat: TCollection_ExtendedString): void; + /** + * Core implementation: Replaces a part of this string by char16_t string (pointer and length). + * @param theWhere the position to start replacement (1-based) + * @param theWhat pointer to the string to replace with + * @param theLength length of the string to replace with + */ + SetValue(theWhere: number, theWhat: string, theLength: number): void; + /** + * Copies characters from this string starting from index theFromIndex to the index theToIndex (inclusive). Raises an exception if theToIndex or theFromIndex is out of bounds. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"abcdefg"); TCollection_ExtendedStringaSubString=aString.SubString(3,6); //Result:aSubString==u"cdef" + * ``` + * @param theFromIndex the starting index (1-based) + * @param theToIndex the ending index (1-based, inclusive) + * @returns the substring from theFromIndex to theToIndex + */ + SubString(theFromIndex: number, theToIndex: number): TCollection_ExtendedString; + /** + * Splits this extended string into two sub-strings at position theWhere. + * + * - The second sub-string (from position theWhere + 1 of this string to the end) is returned in a new extended string. + * - This extended string is modified: its last characters are removed, it becomes equal to the first sub-string (from the first character to position theWhere). + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"abcdefg"); TCollection_ExtendedStringaSecondPart=aString.Split(3); //Result:aString==u"abc"andaSecondPart==u"defg" + * ``` + * @param theWhere the position to split at (0-based) + * @returns the second part of the split string + */ + Split(theWhere: number): TCollection_ExtendedString; + /** + * Extracts theWhichOne token from this string. By default, the theSeparators is set to space and tabulation. By default, the token extracted is the first one (theWhichOne = 1). theSeparators contains all separators you need. If no token indexed by theWhichOne is found, it returns an empty ExtendedString. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Thisisamessage"); TCollection_ExtendedStringaToken1=aString.Token(); //Result:aToken1==u"This" TCollection_ExtendedStringaToken2=aString.Token(u"",4); //Result:aToken2==u"message" TCollection_ExtendedStringaToken3=aString.Token(u"",2); //Result:aToken3==u"is" TCollection_ExtendedStringaToken4=aString.Token(u"",9); //Result:aToken4==u"" TCollection_ExtendedStringbString(u"1234;test:message,value"); TCollection_ExtendedStringbToken1=bString.Token(u";:,",4); //Result:bToken1==u"value" + * ``` + * @param theSeparators the separator characters + * @param theWhichOne the token number to extract (1-based) + * @returns the extracted token + */ + Token(theSeparators: string, theWhichOne?: number): TCollection_ExtendedString; + /** + * Returns pointer to ExtString (char16_t*). + * @returns the char16_t string representation + */ + ToExtString(): string; + /** + * Truncates this string to theHowMany characters. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"HelloDolly"); aString.Trunc(3); //Result:aString==u"Hel" + * ``` + * @param theHowMany the number of characters to keep + */ + Trunc(theHowMany: number): void; + /** + * Returns character at position theWhere in this string. If theWhere is less than zero or greater than the length of this string, an exception is raised. + * + * Example: + * + * ``` + * TCollection_ExtendedStringaString(u"Hello"); char16_taChar=aString.Value(2); //Result:aChar==u'e' + * ``` + * @param theWhere the position to get character from (1-based) + * @returns the character at the specified position + */ + Value(theWhere: number): string; + /** + * Returns a hashed value for the extended string. Note: if string is ASCII, the computed value is the same as the value computed with the HashCode function on a {@link TCollection_AsciiString | `TCollection_AsciiString`} string composed with equivalent ASCII characters. + * @returns a computed hash code + */ + HashCode(): number; + /** + * Returns a const reference to a single shared empty string instance. This method provides access to a static empty string to avoid creating temporary empty strings. Use this method instead of constructing empty strings when you need a const reference. + * + * Example: + * + * ``` + * constTCollection_ExtendedString&anEmptyStr=TCollection_ExtendedString::EmptyString(); //UseanEmptyStrinsteadofTCollection_ExtendedString() + * ``` + * @returns const reference to static empty string + */ + static EmptyString(): TCollection_ExtendedString; + /** + * Returns expected CString length in UTF8 coding (like strlen, without null terminator). It can be used for memory calculation before converting to CString containing symbols in UTF8 coding. For external allocation, use: char* buf = new char[str.LengthOfCString() + 1];. + * @returns expected UTF-8 string length + */ + LengthOfCString(): number; + /** + * Removes all space characters in the beginning of the string. + */ + LeftAdjust(): void; + /** + * Removes all space characters at the end of the string. + */ + RightAdjust(): void; + /** + * Left justify. Length becomes equal to theWidth and the new characters are equal to theFiller. If theWidth < Length nothing happens. + * @param theWidth the desired width of the string + * @param theFiller the character to fill with + */ + LeftJustify(theWidth: number, theFiller: string): void; + /** + * Right justify. Length becomes equal to theWidth and the new characters are equal to theFiller. If theWidth < Length nothing happens. + * @param theWidth the desired width of the string + * @param theFiller the character to fill with + */ + RightJustify(theWidth: number, theFiller: string): void; + /** + * Modifies this string so that its length becomes equal to theWidth and the new characters are equal to theFiller. New characters are added both at the beginning and at the end of this string. If theWidth is less than the length of this string, nothing happens. + * @param theWidth the desired width of the string + * @param theFiller the character to fill with + */ + Center(theWidth: number, theFiller: string): void; + /** + * Converts the first character into its corresponding upper-case character and the other characters into lowercase. + * @remarks **Note:** Only ASCII characters (a-z, A-Z) are affected by case conversion. + */ + Capitalize(): void; + /** + * Inserts a null-terminated char16_t string at the beginning. + * @param theOther the null-terminated string to prepend + */ + Prepend(theOther: TCollection_ExtendedString): void; + /** + * Inserts the other extended string at the beginning of this string. + * @param theOther the string to prepend + */ + Prepend_2(theOther: string): void; + /** + * Core implementation: Inserts char16_t string (pointer and length) at the beginning. + * @param theOther pointer to the string to prepend + * @param theLength length of the string to prepend + */ + Prepend(theOther: string, theLength: number): void; + /** + * Returns the index of the first character of this string that is present in theSet. The search begins at index theFromIndex and ends at index theToIndex. Returns zero if failure. + * @param theSet the set of characters to search for + * @param theFromIndex the starting index for search (1-based) + * @param theToIndex the ending index for search (1-based) + * @returns the index of first character found in set, or 0 if not found + */ + FirstLocationInSet(theSet: TCollection_ExtendedString, theFromIndex: number, theToIndex: number): number; + /** + * Returns the index of the first character of this string that is NOT present in theSet. The search begins at index theFromIndex and ends at index theToIndex. Returns zero if failure. + * @param theSet the set of characters to check against + * @param theFromIndex the starting index for search (1-based) + * @param theToIndex the ending index for search (1-based) + * @returns the index of first character not in set, or 0 if not found + */ + FirstLocationNotInSet(theSet: TCollection_ExtendedString, theFromIndex: number, theToIndex: number): number; + /** + * Converts this extended string containing a numeric expression to an Integer. + * @returns the integer value + */ + IntegerValue(): number; + /** + * Returns True if this extended string contains an integer value. + * @returns true if string represents an integer value + */ + IsIntegerValue(): boolean; + /** + * Converts this extended string containing a numeric expression to a Real. + * @returns the real value + */ + RealValue(): number; + /** + * Returns True if this extended string starts with characters that can be interpreted as a real value. + * @param theToCheckFull when TRUE, checks if entire string defines a real value; otherwise checks if string starts with a real value + * @returns true if string represents a real value + */ + IsRealValue(theToCheckFull?: boolean): boolean; + /** + * Returns True if the strings contain same characters. + * @param theOther the string to compare with + * @param theIsCaseSensitive flag indicating case sensitivity + * @returns true if strings contain same characters + * @remarks **Note:** When case-insensitive, only ASCII characters (a-z, A-Z) are affected. + */ + IsSameString(theOther: TCollection_ExtendedString, theIsCaseSensitive: boolean): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A variable-length sequence of ASCII characters (normal 8-bit character type). It provides editing operations with built-in memory management to make HAsciiString objects easier to use than ordinary character arrays. HAsciiString objects are handles to strings. + * + * - HAsciiString strings may be shared by several objects. + * - You may use an AsciiString object to get the actual string. Note: HAsciiString objects use an AsciiString string as a field. + */ +export declare class TCollection_HAsciiString extends Standard_Transient { + /** + * Initializes a HAsciiString to an empty AsciiString. + */ + constructor(); + /** + * Initializes a HAsciiString with a CString. + */ + constructor(message: string); + /** + * Initializes a HAsciiString with a single character. + */ + constructor(value: number); + /** + * Initializes a HAsciiString with an integer value. + */ + constructor(value: number); + /** + * Initializes a HAsciiString with a real value. + */ + constructor(aString: unknown); + /** + * Initializes a HAsciiString with a AsciiString. + */ + constructor(aString: TCollection_HAsciiString); + /** + * Initializes a HAsciiString with space allocated. and filled with .This is useful for buffers. + */ + constructor(length: number, filler: string); + /** + * Initializes a HAsciiString with a HExtendedString. If replaceNonAscii is non-null character, it will be used in place of any non-ascii character found in the source string. Otherwise, creates UTF-8 unicode string. + */ + constructor(aString: unknown, replaceNonAscii: string); + /** + * Appends to me. + */ + AssignCat(other: string): void; + /** + * Appends to me. Example: aString = aString + anotherString. + */ + AssignCat(other: TCollection_HAsciiString): void; + /** + * Converts the first character into its corresponding upper-case character and the other characters into lowercase. Example: before me = "hellO " after me = "Hello ". + */ + Capitalize(): void; + /** + * Creates a new string by concatenation of this ASCII string and the other ASCII string. Example: aString = aString + anotherString aString = aString + "Dummy" aString contains "I say " aString = aString + "Hello " + "Dolly" gives "I say Hello Dolly" Warning: To catenate more than one CString, you must put a String before. So the following example is WRONG ! aString = "Hello " + "Dolly" THIS IS NOT ALLOWED This rule is applicable to AssignCat (operator +=) too. + */ + Cat(other: string): TCollection_HAsciiString; + /** + * Creates a new string by concatenation of this ASCII string and the other ASCII string. Example: aString = aString + anotherString. + */ + Cat(other: TCollection_HAsciiString): TCollection_HAsciiString; + /** + * Modifies this ASCII string so that its length becomes equal to Width and the new characters are equal to Filler. New characters are added both at the beginning and at the end of this string. If Width is less than the length of this ASCII string, nothing happens. Example `occ::handle` myAlphabet = new {@link TCollection_HAsciiString | `TCollection_HAsciiString`} ("abcdef"); myAlphabet->Center(9,' '); assert ( !strcmp( myAlphabet->`ToCString()`, " abcdef ") );. + */ + Center(Width: number, Filler: string): void; + /** + * Replaces all characters equal to aChar by NewChar in this ASCII string. The substitution is case sensitive if CaseSensitive is true (default value). If you do not use the default case sensitive option, it does not matter whether aChar is upper-case or not. Example `occ::handle` myMistake = new {@link TCollection_HAsciiString | `TCollection_HAsciiString`} ("Hather"); myMistake->ChangeAll('H','F'); assert ( !strcmp( myMistake->`ToCString()`, "Father") );. + */ + ChangeAll(aChar: string, NewChar: string, CaseSensitive?: boolean): void; + /** + * Removes all characters contained in . This produces an empty HAsciiString. + */ + Clear(): void; + /** + * Returns the index of the first character of that is present in . The search begins to the index FromIndex and ends to the the index ToIndex. Returns zero if failure. Raises an exception if FromIndex or ToIndex is out of range Example: before me = "aabAcAa", S = "Aa", FromIndex = 1, Toindex = 7 after me = "aabAcAa" returns 1. + */ + FirstLocationInSet(Set: TCollection_HAsciiString, FromIndex: number, ToIndex: number): number; + /** + * Returns the index of the first character of that is not present in the set . The search begins to the index FromIndex and ends to the the index ToIndex in . Returns zero if failure. Raises an exception if FromIndex or ToIndex is out of range. Example: before me = "aabAcAa", S = "Aa", FromIndex = 1, Toindex = 7 after me = "aabAcAa" returns 3. + */ + FirstLocationNotInSet(Set: TCollection_HAsciiString, FromIndex: number, ToIndex: number): number; + /** + * Insert a Character at position . Example: aString contains "hy not ?" aString.Insert(1,'W'); gives "Why not ?" aString contains "Wh" aString.Insert(3,'y'); gives "Why" aString contains "Way" aString.Insert(2,'h'); gives "Why". + */ + Insert(where: number, what: string): void; + /** + * Insert a HAsciiString at position . + */ + Insert(where: number, what: string): void; + /** + * Insert a HAsciiString at position . + */ + Insert(where: number, what: TCollection_HAsciiString): void; + /** + * Inserts the other ASCII string a after a specific index in the string Example: before me = "cde" , Index = 0 , other = "ab" after me = "abcde" , other = "ab". + */ + InsertAfter(Index: number, other: TCollection_HAsciiString): void; + /** + * Inserts the other ASCII string a before a specific index in the string Raises an exception if Index is out of bounds Example: before me = "cde" , Index = 1 , other = "ab" after me = "abcde" , other = "ab". + */ + InsertBefore(Index: number, other: TCollection_HAsciiString): void; + /** + * Returns True if the string contains zero character. + */ + IsEmpty(): boolean; + /** + * Returns TRUE if is 'ASCII' less than . + */ + IsLess(other: TCollection_HAsciiString): boolean; + /** + * Returns TRUE if is 'ASCII' greater than . + */ + IsGreater(other: TCollection_HAsciiString): boolean; + /** + * Converts a HAsciiString containing a numeric expression to an Integer. Example: "215" returns 215. + */ + IntegerValue(): number; + /** + * Returns True if the string contains an integer value. + */ + IsIntegerValue(): boolean; + /** + * Returns True if the string contains a real value. + */ + IsRealValue(): boolean; + /** + * Returns True if the string contains only ASCII characters between ' ' and '~'. This means no control character and no extended ASCII code. + */ + IsAscii(): boolean; + /** + * Returns True if the string S not contains same characters than the string . + */ + IsDifferent(S: TCollection_HAsciiString): boolean; + /** + * Returns True if the string S contains same characters than the string . + */ + IsSameString(S: TCollection_HAsciiString): boolean; + /** + * Returns True if the string S contains same characters than the string . + */ + IsSameString(S: TCollection_HAsciiString, CaseSensitive: boolean): boolean; + /** + * Removes all space characters in the beginning of the string. + */ + LeftAdjust(): void; + /** + * Left justify. Length becomes equal to Width and the new characters are equal to Filler if Width < Length nothing happens Raises an exception if Width is less than zero Example: before me = "abcdef" , Width = 9 , Filler = ' ' after me = "abcdef ". + */ + LeftJustify(Width: number, Filler: string): void; + /** + * Returns number of characters in . This is the same functionality as 'strlen' in C. + */ + Length(): number; + /** + * returns an index in the string of the first occurrence of the string S in the string from the starting index FromIndex to the ending index ToIndex returns zero if failure Raises an exception if FromIndex or ToIndex is out of range. Example: before me = "aabAaAa", S = "Aa", FromIndex = 1, ToIndex = 7 after me = "aabAaAa" returns 4 + */ + Location(other: TCollection_HAsciiString, FromIndex: number, ToIndex: number): number; + /** + * Returns the index of the nth occurrence of the character C in the string from the starting index FromIndex to the ending index ToIndex. Returns zero if failure. Raises an exception if FromIndex or ToIndex is out of range Example: before me = "aabAa", N = 3, C = 'a', FromIndex = 1, ToIndex = 5 after me = "aabAa" returns 5. + */ + Location(N: number, C: string, FromIndex: number, ToIndex: number): number; + /** + * Converts to its lower-case equivalent. + */ + LowerCase(): void; + /** + * Inserts the other string at the beginning of the string Example: before me = "cde" , S = "ab" after me = "abcde" , S = "ab". + */ + Prepend(other: TCollection_HAsciiString): void; + /** + * Converts a string containing a numeric expression to a Real. Example: "215" returns 215.0. "3.14159267" returns 3.14159267. + */ + RealValue(): number; + /** + * Remove all the occurrences of the character C in the string Example: before me = "HellLLo", C = 'L' , CaseSensitive = True after me = "Hello". + */ + RemoveAll(C: string, CaseSensitive: boolean): void; + /** + * Removes every characters from . + */ + RemoveAll(what: string): void; + /** + * Erases characters from position , included. Example: aString contains "Hello" aString.Erase(2,2) erases 2 characters from position 1 This gives "Hlo". + */ + Remove(where: number, ahowmany?: number): void; + /** + * Removes all space characters at the end of the string. + */ + RightAdjust(): void; + /** + * Right justify. Length becomes equal to Width and the new characters are equal to Filler if Width < Length nothing happens Raises an exception if Width is less than zero Example: before me = "abcdef" , Width = 9 , Filler = ' ' after me = " abcdef". + */ + RightJustify(Width: number, Filler: string): void; + /** + * Searches a CString in from the beginning and returns position of first item matching. It returns -1 if not found. Example: aString contains "Sample single test" aString.Search("le") returns 5. + */ + Search(what: string): number; + /** + * Searches a String in from the beginning and returns position of first item matching. it returns -1 if not found. + */ + Search(what: TCollection_HAsciiString): number; + /** + * Searches a CString in a String from the end and returns position of first item matching. It returns -1 if not found. Example: aString contains "Sample single test" aString.SearchFromEnd("le") returns 12. + */ + SearchFromEnd(what: string): number; + /** + * Searches a HAsciiString in another HAsciiString from the end and returns position of first item matching. It returns -1 if not found. + */ + SearchFromEnd(what: TCollection_HAsciiString): number; + /** + * Replaces one character in the string at position . If is less than zero or greater than the length of an exception is raised. Example: aString contains "Garbake" astring.Replace(6,'g') gives = "Garbage". + */ + SetValue(where: number, what: string): void; + /** + * Replaces a part of in the string at position . If is less than zero or greater than the length of an exception is raised. Example: aString contains "Garbake" astring.Replace(6,'g') gives = "Garbage". + */ + SetValue(where: number, what: string): void; + /** + * Replaces a part of by another string. + */ + SetValue(where: number, what: TCollection_HAsciiString): void; + /** + * Splits a HAsciiString into two sub-strings. Example: aString contains "abcdefg" aString.Split(3) gives = "abc" and returns "defg". + */ + Split(where: number): TCollection_HAsciiString; + /** + * Creation of a sub-string of the string . The sub-string starts to the index Fromindex and ends to the index ToIndex. Raises an exception if ToIndex or FromIndex is out of bounds Example: before me = "abcdefg", ToIndex=3, FromIndex=6 after me = "abcdefg" returns "cdef". + */ + SubString(FromIndex: number, ToIndex: number): TCollection_HAsciiString; + /** + * Returns pointer to string (char *) This is useful for some casual manipulations Because this "char *" is 'const', you can't modify its contents. + */ + ToCString(): string; + /** + * Extracts token from . By default, the is set to space and tabulation. By default, the token extracted is the first one (whichone = 1). contains all separators you need. If no token indexed by is found, it returns an empty String. + * Example: aString contains "This is a message" aString.Token() returns "This" aString.Token(" ",4) returns "message" aString.Token(" ",2) returns "is" aString.Token(" ",9) returns "" Other separators than space character and tabulation are allowed aString contains "1234; test:message , value" aString.Token("; :,",4) returns "value" aString.Token("; :,",2) returns "test". + */ + Token(separators?: string, whichone?: number): TCollection_HAsciiString; + /** + * Truncates to characters. Example: me = "Hello Dolly" -> Trunc(3) -> me = "Hel". + */ + Trunc(ahowmany: number): void; + /** + * Converts to its upper-case equivalent. + */ + UpperCase(): void; + /** + * Length of the string ignoring all spaces (' ') and the control character at the end. + */ + UsefullLength(): number; + /** + * Returns character at position in . If is less than zero or greater than the length of , an exception is raised. Example: aString contains "Hello" aString.Value(2) returns 'e'. + */ + Value(where: number): string; + /** + * Returns the field myString. + */ + String(): unknown; + IsSameState(other: TCollection_HAsciiString): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A Location is a composite transition. It comprises a series of elementary reference coordinates, i.e. objects of type {@link TopLoc_Datum3D | `TopLoc_Datum3D`}, and the powers to which these objects are raised. + */ +export declare class TopLoc_Location { + /** + * Constructs an empty local coordinate system object. Note: A Location constructed from a default datum is said to be "empty". + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: TopLoc_Location); + /** + * Move constructor. + */ + constructor(T: gp_Trsf); + /** + * Constructs the local coordinate system object defined by the transformation T. T invokes in turn, a {@link TopLoc_Datum3D | `TopLoc_Datum3D`} object. + */ + constructor(D: unknown); + /** + * Returns true if this location is equal to the Identity transformation. + */ + IsIdentity(): boolean; + /** + * Resets this location to the Identity transformation. + */ + Identity(): void; + /** + * Returns the first elementary datum of the Location. Use the NextLocation function recursively to access the other data comprising this location. Exceptions Standard_NoSuchObject if this location is empty. + */ + FirstDatum(): unknown; + /** + * Returns the power elevation of the first elementary datum. Exceptions Standard_NoSuchObject if this location is empty. + */ + FirstPower(): number; + /** + * Returns a Location representing without the first datum. We have the relation: + * + * = `NextLocation()` * `FirstDatum()` ^ `FirstPower()` Exceptions Standard_NoSuchObject if this location is empty. + */ + NextLocation(): TopLoc_Location; + /** + * Returns the transformation associated to the coordinate system. + */ + Transformation(): gp_Trsf; + /** + * Returns the inverse of . + * + * * `Inverted()` is an Identity. + */ + Inverted(): TopLoc_Location; + /** + * Returns * , the elementary datums are concatenated. + */ + Multiplied(Other: TopLoc_Location): TopLoc_Location; + /** + * Returns / . + */ + Divided(Other: TopLoc_Location): TopLoc_Location; + /** + * Returns .`Inverted()` * . + */ + Predivided(Other: TopLoc_Location): TopLoc_Location; + /** + * Returns me at the power . If is zero returns Identity. can be lower than zero (usual meaning for powers). + */ + Powered(pwr: number): TopLoc_Location; + /** + * Returns a hashed value for this local coordinate system. This value is used, with map tables, to store and retrieve the object easily. + * @returns a computed hash code + */ + HashCode(): number; + /** + * Returns true if this location and the location Other have the same elementary data, i.e. contain the same series of {@link TopLoc_Datum3D | `TopLoc_Datum3D`} and respective powers. This method is an alias for operator ==. + */ + IsEqual(theOther: TopLoc_Location): boolean; + /** + * Returns true if this location and the location Other do not have the same elementary data, i.e. do not contain the same series of {@link TopLoc_Datum3D | `TopLoc_Datum3D`} and respective powers. This method is an alias for operator !=. + */ + IsDifferent(theOther: TopLoc_Location): boolean; + /** + * Clear myItems. + */ + Clear(): void; + static ScalePrec(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a circle in the plane (2D space). A circle is defined by its radius and positioned in the plane with a coordinate system (a {@link gp_Ax22d | `gp_Ax22d`} object) as follows: + * + * - the origin of the coordinate system is the center of the circle, and + * - the orientation (direct or indirect) of the coordinate system gives an implicit orientation to the circle (and defines its trigonometric sense). This positioning coordinate system is the "local coordinate system" of the circle. Note: when a {@link gp_Circ2d | `gp_Circ2d`} circle is converted into a {@link Geom2d_Circle | `Geom2d_Circle`} circle, some implicit properties of the circle are used explicitly: + * - the implicit orientation corresponds to the direction in which parameter values increase, + * - the starting point for parameterization is that of the "X Axis" of the local coordinate system (i.e. the "X Axis" of the circle). See Also GccAna and {@link Geom2dGcc | `Geom2dGcc`} packages which provide functions for constructing circles defined by geometric constraints {@link gce_MakeCirc2d | `gce_MakeCirc2d`} which provides functions for more complex circle constructions {@link Geom2d_Circle | `Geom2d_Circle`} which provides additional functions for constructing circles and works, with the parametric equations of circles in particular {@link gp_Ax22d | `gp_Ax22d`} + */ +export declare class gp_Circ2d { + /** + * creates an indefinite circle. + */ + constructor(); + /** + * theAxis defines the Xaxis and Yaxis of the circle which defines the origin and the sense of parametrization. The location point of theAxis is the center of the circle. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0. + */ + constructor(theAxis: gp_Ax22d, theRadius: number); + /** + * The location point of theXAxis is the center of the circle. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0. + */ + constructor(theXAxis: gp_Ax2d, theRadius: number, theIsSense?: boolean); + /** + * Changes the location point (center) of the circle. + */ + SetLocation(theP: gp_Pnt2d): void; + /** + * Changes the X axis of the circle. + */ + SetXAxis(theA: gp_Ax2d): void; + /** + * Changes the X axis of the circle. + */ + SetAxis(theA: gp_Ax22d): void; + /** + * Changes the Y axis of the circle. + */ + SetYAxis(theA: gp_Ax2d): void; + /** + * Modifies the radius of this circle. This class does not prevent the creation of a circle where theRadius is null. Exceptions Standard_ConstructionError if theRadius is negative. + */ + SetRadius(theRadius: number): void; + /** + * Computes the area of the circle. + */ + Area(): number; + /** + * Returns the normalized coefficients from the implicit equation of the circle : theA * (X**2) + theB * (Y**2) + 2*theC*(X*Y) + 2*theD*X + 2*theE*Y + theF = 0.0. + * @returns A result object with fields: + * - `theA`: updated value from the call. + * - `theB`: updated value from the call. + * - `theC`: updated value from the call. + * - `theD`: updated value from the call. + * - `theE`: updated value from the call. + * - `theF`: updated value from the call. + */ + Coefficients(theA?: number, theB?: number, theC?: number, theD?: number, theE?: number, theF?: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }; + /** + * Does contain theP ? Returns True if the distance between theP and any point on the circumference of the circle is lower of equal to . + */ + Contains(theP: gp_Pnt2d, theLinearTolerance: number): boolean; + /** + * Computes the minimum of distance between the point theP and any point on the circumference of the circle. + */ + Distance(theP: gp_Pnt2d): number; + /** + * Computes the square distance between and the point theP. + */ + SquareDistance(theP: gp_Pnt2d): number; + /** + * computes the circumference of the circle. + */ + Length(): number; + /** + * Returns the location point (center) of the circle. + */ + Location(): gp_Pnt2d; + /** + * Returns the radius value of the circle. + */ + Radius(): number; + /** + * returns the position of the circle. + */ + Axis(): gp_Ax22d; + /** + * returns the position of the circle. Idem Axis(me). + */ + Position(): gp_Ax22d; + /** + * returns the X axis of the circle. + */ + XAxis(): gp_Ax2d; + /** + * Returns the Y axis of the circle. Reverses the direction of the circle. + */ + YAxis(): gp_Ax2d; + /** + * Reverses the orientation of the local coordinate system of this circle (the "Y Direction" is reversed) and therefore changes the implicit orientation of this circle. Reverse assigns the result to this circle,. + */ + Reverse(): void; + /** + * Reverses the orientation of the local coordinate system of this circle (the "Y Direction" is reversed) and therefore changes the implicit orientation of this circle. Reversed creates a new circle. + */ + Reversed(): gp_Circ2d; + /** + * Returns true if the local coordinate system is direct and false in the other case. + */ + IsDirect(): boolean; + Mirror(theP: gp_Pnt2d): void; + Mirror(theA: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of a circle with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt2d): gp_Circ2d; + /** + * Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA: gp_Ax2d): gp_Circ2d; + Rotate(theP: gp_Pnt2d, theAng: number): void; + /** + * Rotates a circle. theP is the center of the rotation. Ang is the angular value of the rotation in radians. + */ + Rotated(theP: gp_Pnt2d, theAng: number): gp_Circ2d; + Scale(theP: gp_Pnt2d, theS: number): void; + /** + * Scales a circle. theS is the scaling value. Warnings: If theS is negative the radius stay positive but the "XAxis" and the "YAxis" are reversed as for an ellipse. + */ + Scaled(theP: gp_Pnt2d, theS: number): gp_Circ2d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms a circle with the transformation theT from class Trsf2d. + */ + Transformed(theT: gp_Trsf2d): gp_Circ2d; + Translate(theV: gp_Vec2d): void; + Translate(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + /** + * Translates a circle in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec2d): gp_Circ2d; + /** + * Translates a circle from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Circ2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent vector in 3D space. + */ +export declare class gp_Vec { + /** + * Creates a zero vector. + */ + constructor(); + /** + * Creates a unitary vector from a direction theV. + */ + constructor(theV: gp_Dir); + /** + * Creates a vector with a triplet of coordinates. + */ + constructor(theCoord: gp_XYZ); + /** + * Creates a vector from two points. The length of the vector is the distance between theP1 and theP2. + */ + constructor(theP1: gp_Pnt, theP2: gp_Pnt); + /** + * Creates a point with its three cartesian coordinates. + */ + constructor(theXv: number, theYv: number, theZv: number); + /** + * Changes the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this vector, assigns. + * + * - the values theXv, theYv and theZv to its three coordinates. + */ + SetCoord(theXv: number, theYv: number, theZv: number): void; + /** + * Assigns the given value to the X coordinate of this vector. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the X coordinate of this vector. + */ + SetY(theY: number): void; + /** + * Assigns the given value to the X coordinate of this vector. + */ + SetZ(theZ: number): void; + /** + * Assigns the three coordinates of theCoord to this vector. + */ + SetXYZ(theCoord: gp_XYZ): void; + /** + * Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raised if theIndex != {1, 2, 3}. + */ + Coord(theIndex: number): number; + /** + * For this vector returns its three coordinates theXv, theYv, and theZv inline. + * @returns A result object with fields: + * - `theXv`: updated value from the call. + * - `theYv`: updated value from the call. + * - `theZv`: updated value from the call. + */ + Coord(theXv?: number, theYv?: number, theZv?: number): { theXv: number; theYv: number; theZv: number }; + /** + * For this vector, returns its X coordinate. + */ + X(): number; + /** + * For this vector, returns its Y coordinate. + */ + Y(): number; + /** + * For this vector, returns its Z coordinate. + */ + Z(): number; + /** + * For this vector, returns. + * + * - its three coordinates as a number triple + */ + XYZ(): gp_XYZ; + /** + * Returns True if the two vectors have the same magnitude value and the same direction. The precision values are theLinearTolerance for the magnitude and theAngularTolerance for the direction. + */ + IsEqual(theOther: gp_Vec, theLinearTolerance: number, theAngularTolerance: number): boolean; + /** + * Returns True if abs(.Angle(theOther) - PI/2.) <= theAngularTolerance Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or theOther.Magnitude() <= Resolution from gp. + */ + IsNormal(theOther: gp_Vec, theAngularTolerance: number): boolean; + /** + * Returns True if PI - .Angle(theOther) <= theAngularTolerance Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or Other.Magnitude() <= Resolution from gp. + */ + IsOpposite(theOther: gp_Vec, theAngularTolerance: number): boolean; + /** + * Returns True if Angle(, theOther) <= theAngularTolerance or PI - Angle(, theOther) <= theAngularTolerance This definition means that two parallel vectors cannot define a plane but two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or Other.Magnitude() <= Resolution from gp. + */ + IsParallel(theOther: gp_Vec, theAngularTolerance: number): boolean; + /** + * Computes the angular value between and Returns the angle value between 0 and PI in radian. Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution from gp or theOther.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude. + */ + Angle(theOther: gp_Vec): number; + /** + * Computes the angle, in radians, between this vector and vector theOther. The result is a value between -Pi and Pi. + * For this, theVRef defines the positive sense of rotation: the angular value is positive, if the cross product this ^ theOther has the same orientation as theVRef relative to the plane defined by the vectors this and theOther. Otherwise, the angular value is negative. + * Exceptions gp_VectorWithNullMagnitude if the magnitude of this vector, the vector theOther, or the vector theVRef is less than or equal to `gp::Resolution()`. + * Standard_DomainError if this vector, the vector theOther, and the vector theVRef are coplanar, unless this vector and the vector theOther are parallel. + */ + AngleWithRef(theOther: gp_Vec, theVRef: gp_Vec): number; + /** + * Computes the magnitude of this vector. + */ + Magnitude(): number; + /** + * Computes the square magnitude of this vector. + */ + SquareMagnitude(): number; + /** + * Adds two vectors. + */ + Add(theOther: gp_Vec): void; + /** + * Adds two vectors. + */ + Added(theOther: gp_Vec): gp_Vec; + /** + * Subtracts two vectors. + */ + Subtract(theRight: gp_Vec): void; + /** + * Subtracts two vectors. + */ + Subtracted(theRight: gp_Vec): gp_Vec; + /** + * Multiplies a vector by a scalar. + */ + Multiply(theScalar: number): void; + /** + * Multiplies a vector by a scalar. + */ + Multiplied(theScalar: number): gp_Vec; + /** + * Divides a vector by a scalar. + */ + Divide(theScalar: number): void; + /** + * Divides a vector by a scalar. + */ + Divided(theScalar: number): gp_Vec; + /** + * computes the cross product between two vectors + */ + Cross(theRight: gp_Vec): void; + /** + * computes the cross product between two vectors + */ + Crossed(theRight: gp_Vec): gp_Vec; + /** + * Computes the magnitude of the cross product between and theRight. Returns || ^ theRight ||. + */ + CrossMagnitude(theRight: gp_Vec): number; + /** + * Computes the square magnitude of the cross product between and theRight. Returns || ^ theRight ||**2. + */ + CrossSquareMagnitude(theRight: gp_Vec): number; + /** + * Computes the triple vector product. ^= (theV1 ^ theV2). + */ + CrossCross(theV1: gp_Vec, theV2: gp_Vec): void; + /** + * Computes the triple vector product. ^ (theV1 ^ theV2). + */ + CrossCrossed(theV1: gp_Vec, theV2: gp_Vec): gp_Vec; + /** + * computes the scalar product + */ + Dot(theOther: gp_Vec): number; + /** + * Computes the triple scalar product * (theV1 ^ theV2). + */ + DotCross(theV1: gp_Vec, theV2: gp_Vec): number; + /** + * normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp. + */ + Normalize(): void; + /** + * normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp. + */ + Normalized(): gp_Vec; + /** + * Reverses the direction of a vector. + */ + Reverse(): void; + /** + * Reverses the direction of a vector. + */ + Reversed(): gp_Vec; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3 + theV4 + */ + SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theA3: number, theV3: gp_Vec, theV4: gp_Vec): void; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3 + */ + SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theA3: number, theV3: gp_Vec): void; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theV3 + */ + SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theV3: gp_Vec): void; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + */ + SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec): void; + /** + * is set to the following linear form : theA1 * theV1 + theV2 + */ + SetLinearForm(theA1: number, theV1: gp_Vec, theV2: gp_Vec): void; + /** + * is set to the following linear form : theV1 + theV2 + */ + SetLinearForm(theV1: gp_Vec, theV2: gp_Vec): void; + Mirror(theV: gp_Vec): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry. + */ + Mirrored(theV: gp_Vec): gp_Vec; + /** + * Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Vec; + /** + * Performs the symmetrical transformation of a vector with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Vec; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a vector. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Vec; + Scale(theS: number): void; + /** + * Scales a vector. theS is the scaling value. + */ + Scaled(theS: number): gp_Vec; + /** + * Transforms a vector with the transformation theT. + */ + Transform(theT: gp_Trsf): void; + /** + * Transforms a vector with the transformation theT. + */ + Transformed(theT: gp_Trsf): gp_Vec; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a plane. + * A plane is positioned in space with a coordinate system (a {@link gp_Ax3 | `gp_Ax3`} object), such that the plane is defined by the origin, "X Direction" and "Y Direction" of this coordinate system, which is the "local coordinate system" of the plane. The "main Direction" of the coordinate system is a vector normal to the plane. + * It gives the plane an implicit orientation such that the plane is said to be "direct", if the coordinate system is right-handed, or "indirect" in the other case. + * Note: when a {@link gp_Pln | `gp_Pln`} plane is converted into a {@link Geom_Plane | `Geom_Plane`} plane, some implicit properties of its local coordinate system are used explicitly: + * + * - its origin defines the origin of the two parameters of the planar surface, + * - its implicit orientation is also that of the {@link Geom_Plane | `Geom_Plane`}. See Also {@link gce_MakePln | `gce_MakePln`} which provides functions for more complex plane constructions {@link Geom_Plane | `Geom_Plane`} which provides additional functions for constructing planes and works, in particular, with the parametric equations of planes + */ +export declare class gp_Pln { + /** + * Creates a plane coincident with OXY plane of the reference coordinate system. + */ + constructor(); + /** + * The coordinate system of the plane is defined with the axis placement theA3. The "Direction" of theA3 defines the normal to the plane. The "Location" of theA3 defines the location (origin) of the plane. The "XDirection" and "YDirection" of theA3 define the "XAxis" and the "YAxis" of the plane used to parametrize the plane. + */ + constructor(theA3: gp_Ax3); + /** + * Creates a plane with the "Location" point and the normal direction . + */ + constructor(theP: gp_Pnt, theV: gp_Dir); + /** + * Creates a plane from its cartesian equation : + * + * ``` + * theA*X+theB*Y+theC*Z+theD=0.0 + * ``` + * + * Raises ConstructionError if std::sqrt (theA*theA + theB*theB + theC*theC) <= Resolution from gp. + */ + constructor(theA: number, theB: number, theC: number, theD: number); + /** + * Returns the coefficients of the plane's cartesian equation: + * + * ``` + * theA*X+theB*Y+theC*Z+theD=0. + * ``` + * @returns A result object with fields: + * - `theA`: updated value from the call. + * - `theB`: updated value from the call. + * - `theC`: updated value from the call. + * - `theD`: updated value from the call. + */ + Coefficients(theA?: number, theB?: number, theC?: number, theD?: number): { theA: number; theB: number; theC: number; theD: number }; + /** + * Modifies this plane, by redefining its local coordinate system so that. + * + * - its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed). Raises ConstructionError if the theA1 is parallel to the "XAxis" of the plane. + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Changes the origin of the plane. + */ + SetLocation(theLoc: gp_Pnt): void; + /** + * Changes the local coordinate system of the plane. + */ + SetPosition(theA3: gp_Ax3): void; + /** + * Reverses the U parametrization of the plane reversing the XAxis. + */ + UReverse(): void; + /** + * Reverses the V parametrization of the plane reversing the YAxis. + */ + VReverse(): void; + /** + * Returns true if the Ax3 is right handed. + */ + Direct(): boolean; + /** + * Returns the plane's normal Axis. + */ + Axis(): gp_Ax1; + /** + * Returns the plane's location (origin). + */ + Location(): gp_Pnt; + /** + * Returns the local coordinate system of the plane. + */ + Position(): gp_Ax3; + /** + * Computes the distance between and the point . + */ + Distance(theP: gp_Pnt): number; + /** + * Computes the distance between and the line . + */ + Distance(theL: unknown): number; + /** + * Computes the distance between two planes. + */ + Distance(theOther: gp_Pln): number; + /** + * Computes the signed distance between and the point . The sign of the distance indicates on which side of the plane the point is located: + * + * - positive sign: the point is located in the direction of the plane normal, + * - negative sign: the point is located in the opposite direction to the plane normal, + * - zero: the point is located on the plane. + */ + SignedDistance(theP: gp_Pnt): number; + /** + * Computes the signed distance between and the line . The sign of the distance indicates on which side of the plane the line is located: + * + * - positive sign: the line is located in the direction of the plane normal, + * - negative sign: the line is located in the opposite direction to the plane normal, + * - zero: the line intersects the plane. + */ + SignedDistance(theL: unknown): number; + /** + * Computes the signed distance between two planes. The sign of the distance indicates on which side of the other plane is located: + * + * - positive sign: the other plane is located in the direction of the plane normal, + * - negative sign: the other plane is located in the opposite direction to the plane normal, + * - zero: the planes intersect. + */ + SignedDistance(theOther: gp_Pln): number; + /** + * Computes the square distance between and the point . + */ + SquareDistance(theP: gp_Pnt): number; + /** + * Computes the square distance between and the line . + */ + SquareDistance(theL: unknown): number; + /** + * Computes the square distance between two planes. + */ + SquareDistance(theOther: gp_Pln): number; + /** + * Returns the X axis of the plane. + */ + XAxis(): gp_Ax1; + /** + * Returns the Y axis of the plane. + */ + YAxis(): gp_Ax1; + /** + * Returns true if this plane contains the point theP. This means that. + * + * - the distance between point theP and this plane is less than or equal to theLinearTolerance, or + * - line L is normal to the "main Axis" of the local coordinate system of this plane, within the tolerance AngularTolerance, and the distance between the origin of line L and this plane is less than or equal to theLinearTolerance. + */ + Contains(theP: gp_Pnt, theLinearTolerance: number): boolean; + /** + * Returns true if this plane contains the line theL. This means that. + * + * - the distance between point P and this plane is less than or equal to LinearTolerance, or + * - line theL is normal to the "main Axis" of the local coordinate system of this plane, within the tolerance theAngularTolerance, and the distance between the origin of line theL and this plane is less than or equal to theLinearTolerance. + */ + Contains(theL: unknown, theLinearTolerance: number, theAngularTolerance: number): boolean; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a plane with respect to the point which is the center of the symmetry Warnings : The normal direction to the plane is not changed. The "XAxis" and the "YAxis" are reversed. + */ + Mirrored(theP: gp_Pnt): gp_Pln; + /** + * Performs the symmetrical transformation of a plane with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation if the initial plane was right handed, else it is the opposite. + */ + Mirrored(theA1: gp_Ax1): gp_Pln; + /** + * Performs the symmetrical transformation of a plane with respect to an axis placement. The axis placement locates the plane of the symmetry. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation if the initial plane was right handed, else it is the opposite. + */ + Mirrored(theA2: gp_Ax2): gp_Pln; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a plane. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Pln; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Scales a plane. theS is the scaling value. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Pln; + Transform(theT: gp_Trsf): void; + /** + * Transforms a plane with the transformation theT from class Trsf. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Transformed(theT: gp_Trsf): gp_Pln; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates a plane in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Pln; + /** + * Translates a plane from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Pln; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an ellipse in the plane (2D space). An ellipse is defined by its major and minor radii and positioned in the plane with a coordinate system (a {@link gp_Ax22d | `gp_Ax22d`} object) as follows: + * + * - the origin of the coordinate system is the center of the ellipse, + * - its "X Direction" defines the major axis of the ellipse, and + * - its "Y Direction" defines the minor axis of the ellipse. This coordinate system is the "local coordinate system" of the ellipse. Its orientation (direct or indirect) gives an implicit orientation to the ellipse. + * In this coordinate system, the equation of the ellipse is: X*X/(`MajorRadius`**2)+Y*Y/(`MinorRadius`**2)=1.0 See Also {@link gce_MakeElips2d | `gce_MakeElips2d`} which provides functions for more complex ellipse constructions {@link Geom2d_Ellipse | `Geom2d_Ellipse`} which provides additional functions for constructing ellipses and works, in particular, with the parametric equations of ellipses + */ +export declare class gp_Elips2d { + /** + * Creates an indefinite ellipse. + */ + constructor(); + /** + * Creates an ellipse with radii MajorRadius and MinorRadius, positioned in the plane by coordinate system theA where: + * + * - the origin of theA is the center of the ellipse, + * - the "X Direction" of theA defines the major axis of the ellipse, that is, the major radius MajorRadius is measured along this axis, and + * - the "Y Direction" of theA defines the minor axis of the ellipse, that is, the minor radius theMinorRadius is measured along this axis, and + * - the orientation (direct or indirect sense) of theA gives the orientation of the ellipse. Warnings : It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0 + */ + constructor(theA: gp_Ax22d, theMajorRadius: number, theMinorRadius: number); + /** + * Creates an ellipse with the major axis, the major and the minor radius. The location of the theMajorAxis is the center of the ellipse. The sense of parametrization is given by theIsSense. Warnings: It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0. + */ + constructor(theMajorAxis: gp_Ax2d, theMajorRadius: number, theMinorRadius: number, theIsSense?: boolean); + /** + * Modifies this ellipse, by redefining its local coordinate system so that. + * + * - its origin becomes theP. + */ + SetLocation(theP: gp_Pnt2d): void; + /** + * Changes the value of the major radius. Raises ConstructionError if theMajorRadius < MinorRadius. + */ + SetMajorRadius(theMajorRadius: number): void; + /** + * Changes the value of the minor radius. Raises ConstructionError if MajorRadius < theMinorRadius or MinorRadius < 0.0. + */ + SetMinorRadius(theMinorRadius: number): void; + /** + * Modifies this ellipse, by redefining its local coordinate system so that it becomes theA. + */ + SetAxis(theA: gp_Ax22d): void; + /** + * Modifies this ellipse, by redefining its local coordinate system so that its origin and its "X Direction" become those of the axis theA. The "Y Direction" is then recomputed. The orientation of the local coordinate system is not modified. + */ + SetXAxis(theA: gp_Ax2d): void; + /** + * Modifies this ellipse, by redefining its local coordinate system so that its origin and its "Y Direction" become those of the axis theA. The "X Direction" is then recomputed. The orientation of the local coordinate system is not modified. + */ + SetYAxis(theA: gp_Ax2d): void; + /** + * Computes the area of the ellipse. + */ + Area(): number; + /** + * Returns the coefficients of the implicit equation of the ellipse. theA * (X**2) + theB * (Y**2) + 2*theC*(X*Y) + 2*theD*X + 2*theE*Y + theF = 0. + * @returns A result object with fields: + * - `theA`: updated value from the call. + * - `theB`: updated value from the call. + * - `theC`: updated value from the call. + * - `theD`: updated value from the call. + * - `theE`: updated value from the call. + * - `theF`: updated value from the call. + */ + Coefficients(theA?: number, theB?: number, theC?: number, theD?: number, theE?: number, theF?: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }; + /** + * This directrix is the line normal to the XAxis of the ellipse in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the ellipse, where e is the eccentricity of the ellipse. This line is parallel to the "YAxis". The intersection point between directrix1 and the "XAxis" is the location point of the directrix1. This point is on the positive side of the "XAxis". + * + * Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle) + */ + Directrix1(): gp_Ax2d; + /** + * This line is obtained by the symmetrical transformation of "Directrix1" with respect to the minor axis of the ellipse. + * + * Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle). + */ + Directrix2(): gp_Ax2d; + /** + * Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Returns 0 if MajorRadius = 0. + */ + Eccentricity(): number; + /** + * Returns the distance between the center of the ellipse and focus1 or focus2. + */ + Focal(): number; + /** + * Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse. + */ + Focus1(): gp_Pnt2d; + /** + * Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse. + */ + Focus2(): gp_Pnt2d; + /** + * Returns the center of the ellipse. + */ + Location(): gp_Pnt2d; + /** + * Returns the major radius of the Ellipse. + */ + MajorRadius(): number; + /** + * Returns the minor radius of the Ellipse. + */ + MinorRadius(): number; + /** + * Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0. + */ + Parameter(): number; + /** + * Returns the major axis of the ellipse. + */ + Axis(): gp_Ax22d; + /** + * Returns the major axis of the ellipse. + */ + XAxis(): gp_Ax2d; + /** + * Returns the minor axis of the ellipse. Reverses the direction of the circle. + */ + YAxis(): gp_Ax2d; + Reverse(): void; + Reversed(): gp_Elips2d; + /** + * Returns true if the local coordinate system is direct and false in the other case. + */ + IsDirect(): boolean; + Mirror(theP: gp_Pnt2d): void; + Mirror(theA: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of a ellipse with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt2d): gp_Elips2d; + /** + * Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA: gp_Ax2d): gp_Elips2d; + Rotate(theP: gp_Pnt2d, theAng: number): void; + Rotated(theP: gp_Pnt2d, theAng: number): gp_Elips2d; + Scale(theP: gp_Pnt2d, theS: number): void; + /** + * Scales a ellipse. theS is the scaling value. + */ + Scaled(theP: gp_Pnt2d, theS: number): gp_Elips2d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms an ellipse with the transformation theT from class Trsf2d. + */ + Transformed(theT: gp_Trsf2d): gp_Elips2d; + Translate(theV: gp_Vec2d): void; + Translate(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + /** + * Translates a ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec2d): gp_Elips2d; + /** + * Translates a ellipse from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Elips2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non persistent transformation in 2D space. This transformation is a general transformation. It can be a {@link gp_Trsf2d | `gp_Trsf2d`}, an affinity, or you can define your own transformation giving the corresponding matrix of transformation. + * + * With a {@link gp_GTrsf2d | `gp_GTrsf2d`} you can transform only a doublet of coordinates {@link gp_XY | `gp_XY`}. It is not possible to transform other geometric objects because these transformations can change the nature of non-elementary geometric objects. A {@link gp_GTrsf2d | `gp_GTrsf2d`} is represented with a 2 rows * 3 columns matrix: + * + * ``` + * V1V2TXYXY |a11a12a14||x||x'| |a21a22a24||y|=|y'| |001||1||1| + * ``` + * + * where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. Warning A {@link gp_GTrsf2d | `gp_GTrsf2d`} transformation is only applicable on coordinates. + * Be careful if you apply such a transformation to all the points of a geometric object, as this can change the nature of the object and thus render it incoherent! Typically, a circle is transformed into an ellipse by an affinity transformation. To avoid modifying the nature of an object, use a {@link gp_Trsf2d | `gp_Trsf2d`} transformation instead, as objects of this class respect the nature of geometric objects. + */ +export declare class gp_GTrsf2d { + /** + * returns identity transformation. + */ + constructor(); + /** + * Converts the {@link gp_Trsf2d | `gp_Trsf2d`} transformation theT into a general transformation. + */ + constructor(theT: gp_Trsf2d); + /** + * Creates a transformation based on the matrix theM and the vector theV where theM defines the vectorial part of the transformation, and theV the translation part. + */ + constructor(theM: unknown, theV: gp_XY); + /** + * Changes this transformation into an affinity of ratio theRatio with respect to the axis theA. Note: An affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis theA, the vectors HP and HP' satisfy: HP' = theRatio * HP. + */ + SetAffinity(theA: gp_Ax2d, theRatio: number): void; + /** + * Replaces the coefficient (theRow, theCol) of the matrix representing this transformation by theValue, Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3. + */ + SetValue(theRow: number, theCol: number, theValue: number): void; + /** + * Replaces the translation part of this transformation by the coordinates of the number pair theCoord. + */ + SetTranslationPart(theCoord: gp_XY): void; + /** + * Assigns the vectorial and translation parts of theT to this transformation. + */ + SetTrsf2d(theT: gp_Trsf2d): void; + /** + * Replaces the vectorial part of this transformation by theMatrix. + */ + SetVectorialPart(theMatrix: unknown): void; + /** + * Returns true if the determinant of the vectorial part of this transformation is negative. + */ + IsNegative(): boolean; + /** + * Returns true if this transformation is singular (and therefore, cannot be inverted). Note: The Gauss LU decomposition is used to invert the transformation matrix. Consequently, the transformation is considered as singular if the largest pivot found is less than or equal to `gp::Resolution()`. Warning If this transformation is singular, it cannot be inverted. + */ + IsSingular(): boolean; + /** + * Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror transformation (relative to a point or axis), a scaling transformation, a compound transformation or some other type of transformation. + */ + Form(): unknown; + /** + * Returns the translation part of the GTrsf2d. + */ + TranslationPart(): gp_XY; + /** + * Computes the vectorial part of the GTrsf2d. The returned Matrix is a 2*2 matrix. + */ + VectorialPart(): unknown; + /** + * Returns the coefficients of the global matrix of transformation. Raised OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3. + */ + Value(theRow: number, theCol: number): number; + Invert(): void; + /** + * Computes the reverse transformation. Raised an exception if the matrix of the transformation is not inversible. + */ + Inverted(): gp_GTrsf2d; + /** + * Computes the transformation composed with theT and . In a C++ implementation you can also write Tcomposed = * theT. Example : + * + * ``` + * gp_GTrsf2dT1,T2,Tcomp;............... //composition: Tcomp=T2.Multiplied(T1);//or(Tcomp=T2*T1) //transformationofapoint gp_XYP(10.,3.); gp_XYP1(P); Tcomp.Transforms(P1);//usingTcomp gp_XYP2(P); T1.Transforms(P2);//usingT1thenT2 T2.Transforms(P2);//P1=P2!!! + * ``` + */ + Multiplied(theT: gp_GTrsf2d): gp_GTrsf2d; + Multiply(theT: gp_GTrsf2d): void; + /** + * Computes the product of the transformation theT and this transformation, and assigns the result to this transformation: this = theT * this. + */ + PreMultiply(theT: gp_GTrsf2d): void; + Power(theN: number): void; + /** + * Computes the following composition of transformations * * .......* , theN time. if theN = 0 = Identity if theN < 0 = .Inverse() *...........* .Inverse(). + * + * Raises an exception if theN < 0 and if the matrix of the transformation is not inversible. + */ + Powered(theN: number): gp_GTrsf2d; + Transforms(theCoord: gp_XY): void; + /** + * Applies this transformation to the coordinates: + * + * - of the number pair Coord, or + * - X and Y. + * + * Note: + * + * - Transforms modifies theX, theY, or the coordinate pair Coord, while + * - Transformed creates a new coordinate pair. + * @returns A result object with fields: + * - `theX`: updated value from the call. + * - `theY`: updated value from the call. + */ + Transforms(theX?: number, theY?: number): { theX: number; theY: number }; + Transformed(theCoord: gp_XY): gp_XY; + /** + * Converts this transformation into a {@link gp_Trsf2d | `gp_Trsf2d`} transformation. Exceptions Standard_ConstructionError if this transformation cannot be converted, i.e. if its form is gp_Other. + */ + Trsf2d(): gp_Trsf2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an axis in 3D space. An axis is defined by: + * + * - its origin (also referred to as its "Location point"), and + * - its unit vector (referred to as its "Direction" or "main Direction"). An axis is used: + * - to describe 3D geometric entities (for example, the axis of a revolution entity). It serves the same purpose as the STEP function "axis placement one axis", or + * - to define geometric transformations (axis of symmetry, axis of rotation, and so on). For example, this entity can be used to locate a geometric entity or to define a symmetry axis. + */ +export declare class gp_Ax1 { + /** + * Creates an axis object representing Z axis of the reference coordinate system. + */ + constructor(); + /** + * Creates an axis at the origin with the given standard direction. Replaces `gp::OX()`, `gp::OY()`, `gp::OZ()` static functions. + */ + constructor(theDir: gp_Dir_D); + /** + * P is the location point and V is the direction of . + */ + constructor(theP: gp_Pnt, theV: gp_Dir); + /** + * Creates an axis with the given location point and standard direction. + */ + constructor(theP: gp_Pnt, theDir: gp_Dir_D); + /** + * Assigns V as the "Direction" of this axis. + */ + SetDirection(theV: gp_Dir): void; + /** + * Assigns P as the origin of this axis. + */ + SetLocation(theP: gp_Pnt): void; + /** + * Returns the direction of . + */ + Direction(): gp_Dir; + /** + * Returns the location point of . + */ + Location(): gp_Pnt; + /** + * Returns True if: . the angle between and is lower or equal to and . the distance between .`Location()` and is lower or equal to and . the distance between .`Location()` and is lower or equal to LinearTolerance. + */ + IsCoaxial(Other: gp_Ax1, AngularTolerance: number, LinearTolerance: number): boolean; + /** + * Returns True if the direction of this and another axis are normal to each other. That is, if the angle between the two axes is equal to Pi/2. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsNormal(theOther: gp_Ax1, theAngularTolerance: number): boolean; + /** + * Returns True if the direction of this and another axis are parallel with opposite orientation. That is, if the angle between the two axes is equal to Pi. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsOpposite(theOther: gp_Ax1, theAngularTolerance: number): boolean; + /** + * Returns True if the direction of this and another axis are parallel with same orientation or opposite orientation. That is, if the angle between the two axes is equal to 0 or Pi. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsParallel(theOther: gp_Ax1, theAngularTolerance: number): boolean; + /** + * Computes the angular value, in radians, between this.Direction() and theOther.Direction(). Returns the angle between 0 and 2*PI radians. + */ + Angle(theOther: gp_Ax1): number; + /** + * Reverses the unit vector of this axis and assigns the result to this axis. + */ + Reverse(): void; + /** + * Reverses the unit vector of this axis and creates a new one. + */ + Reversed(): gp_Ax1; + /** + * Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry and assigns the result to this axis. + */ + Mirror(P: gp_Pnt): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry and assigns the result to this axis. + */ + Mirror(A1: gp_Ax1): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement locates the plane of the symmetry : (Location, XDirection, YDirection) and assigns the result to this axis. + */ + Mirror(A2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry and creates a new axis. + */ + Mirrored(P: gp_Pnt): gp_Ax1; + /** + * Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry and creates a new axis. + */ + Mirrored(A1: gp_Ax1): gp_Ax1; + /** + * Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement locates the plane of the symmetry : (Location, XDirection, YDirection) and creates a new axis. + */ + Mirrored(A2: gp_Ax2): gp_Ax1; + /** + * Rotates this axis at an angle theAngRad (in radians) about the axis theA1 and assigns the result to this axis. + */ + Rotate(theA1: gp_Ax1, theAngRad: number): void; + /** + * Rotates this axis at an angle theAngRad (in radians) about the axis theA1 and creates a new one. + */ + Rotated(theA1: gp_Ax1, theAngRad: number): gp_Ax1; + /** + * Applies a scaling transformation to this axis with: + * + * - scale factor theS, and + * - center theP and assigns the result to this axis. + */ + Scale(theP: gp_Pnt, theS: number): void; + /** + * Applies a scaling transformation to this axis with: + * + * - scale factor theS, and + * - center theP and creates a new axis. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Ax1; + /** + * Applies the transformation theT to this axis and assigns the result to this axis. + */ + Transform(theT: gp_Trsf): void; + /** + * Applies the transformation theT to this axis and creates a new one. + * + * Translates an axis plaxement in the direction of the vector . The magnitude of the translation is the vector's magnitude. + */ + Transformed(theT: gp_Trsf): gp_Ax1; + /** + * Translates this axis by the vector theV, and assigns the result to this axis. + */ + Translate(theV: gp_Vec): void; + /** + * Translates this axis by: the vector (theP1, theP2) defined from point theP1 to point theP2. and assigns the result to this axis. + */ + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates this axis by the vector theV, and creates a new one. + */ + Translated(theV: gp_Vec): gp_Ax1; + /** + * Translates this axis by: the vector (theP1, theP2) defined from point theP1 to point theP2. and creates a new one. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax1; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent transformation in 3D space. The following transformations are implemented : . Translation, Rotation, Scale . Symmetry with respect to a point, a line, a plane. Complex transformations can be obtained by combining the previous elementary transformations using the method Multiply. The transformations can be represented as follow : + * + * ``` + * V1V2V3TXYZXYZ |a11a12a13a14||x||x'| |a21a22a23a24||y||y'| |a31a32a33a34||z|=|z'| |0001||1||1| + * ``` + * + * where {V1, V2, V3} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects. + */ +export declare class gp_Trsf { + /** + * Returns the identity transformation. + */ + constructor(); + /** + * Creates a 3D transformation from the 2D transformation theT. The resulting transformation has a homogeneous vectorial part, V3, and a translation part, T3, built from theT: a11 a12 0 a13 V3 = a21 a22 0 T3 = a23 0 0 1. 0 It also has the same scale factor as theT. + * This guarantees (by projection) that the transformation which would be performed by theT in a plane (2D space) is performed by the resulting transformation in the xOy plane of the 3D space, (i.e. in the plane defined by the origin (0., 0., 0.) and the vectors DX (1., 0., 0.), and DY (0., 1., 0.)). The scale factor is applied to the entire space. + */ + constructor(theT: gp_Trsf2d); + /** + * Makes the transformation into a symmetrical transformation. theP is the center of the symmetry. + */ + SetMirror(theP: gp_Pnt): void; + /** + * Makes the transformation into a symmetrical transformation. theA1 is the center of the axial symmetry. + */ + SetMirror(theA1: gp_Ax1): void; + /** + * Makes the transformation into a symmetrical transformation. theA2 is the center of the planar symmetry and defines the plane of symmetry by its origin, "X Direction" and "Y Direction". + */ + SetMirror(theA2: gp_Ax2): void; + /** + * Changes the transformation into a rotation. theA1 is the rotation axis and theAng is the angular value of the rotation in radians. + */ + SetRotation(theA1: gp_Ax1, theAng: number): void; + /** + * Changes the transformation into a rotation defined by quaternion. Note that rotation is performed around origin, i.e. no translation is involved. + */ + SetRotation(theR: unknown): void; + /** + * Replaces the rotation part with specified quaternion. + */ + SetRotationPart(theR: unknown): void; + /** + * Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value. Raises ConstructionError If is null. + */ + SetScale(theP: gp_Pnt, theS: number): void; + /** + * Modifies this transformation so that it transforms the coordinate system defined by theFromSystem1 into the one defined by theToSystem2. After this modification, this transformation transforms: + * + * - the origin of theFromSystem1 into the origin of theToSystem2, + * - the "X Direction" of theFromSystem1 into the "X Direction" of theToSystem2, + * - the "Y Direction" of theFromSystem1 into the "Y Direction" of theToSystem2, and + * - the "main Direction" of theFromSystem1 into the "main Direction" of theToSystem2. Warning When you know the coordinates of a point in one coordinate system and you want to express these coordinates in another one, do not use the transformation resulting from this function. Use the transformation that results from SetTransformation instead. SetDisplacement and SetTransformation create related transformations: the vectorial part of one is the inverse of the vectorial part of the other. + */ + SetDisplacement(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void; + /** + * Modifies this transformation so that it transforms the coordinates of any point, (x, y, z), relative to a source coordinate system into the coordinates (x', y', z') which are relative to a target coordinate system, but which represent the same point The transformation is from the default coordinate system. + * + * ``` + * {P(0.,0.,0.),VX(1.,0.,0.),VY(0.,1.,0.),VZ(0.,0.,1.)} + * ``` + * + * to the local coordinate system defined with the Ax3 theToSystem. Use in the same way as the previous method. FromSystem1 is defaulted to the absolute coordinate system. + */ + SetTransformation(theToSystem: gp_Ax3): void; + /** + * Modifies this transformation so that it transforms the coordinates of any point, (x, y, z), relative to a source coordinate system into the coordinates (x', y', z') which are relative to a target coordinate system, but which represent the same point The transformation is from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2". Example : + * + * ``` + * gp_Ax3theFromSystem1,theToSystem2; doublex1,y1,z1;//arethecoordinatesofapointinthelocalsystemtheFromSystem1 doublex2,y2,z2;//arethecoordinatesofapointinthelocalsystemtheToSystem2 gp_PntP1(x1,y1,z1) gp_TrsfT; T.SetTransformation(theFromSystem1,theToSystem2); gp_PntP2=P1.Transformed(T); P2.Coord(x2,y2,z2); + * ``` + */ + SetTransformation(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void; + /** + * Sets transformation by directly specified rotation and translation. + */ + SetTransformation(R: unknown, theT: gp_Vec): void; + /** + * Changes the transformation into a translation. theV is the vector of the translation. + */ + SetTranslation(theV: gp_Vec): void; + /** + * Makes the transformation into a translation where the translation vector is the vector (theP1, theP2) defined from point theP1 to point theP2. + */ + SetTranslation(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Replaces the translation vector with the vector theV. + */ + SetTranslationPart(theV: gp_Vec): void; + /** + * Modifies the scale factor. Raises ConstructionError If theS is null. + */ + SetScaleFactor(theS: number): void; + SetForm(theP: unknown): void; + /** + * Sets the coefficients of the transformation. The transformation of the point x,y,z is the point x',y',z' with : + * + * ``` + * x'=a11x+a12y+a13z+a14 y'=a21x+a22y+a23z+a24 z'=a31x+a32y+a33z+a34 + * ``` + * + * The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. The matrix is orthogonalized before future using. + */ + SetValues(a11: number, a12: number, a13: number, a14: number, a21: number, a22: number, a23: number, a24: number, a31: number, a32: number, a33: number, a34: number): void; + /** + * Returns true if the determinant of the vectorial part of this transformation is negative. + */ + IsNegative(): boolean; + /** + * Returns the nature of the transformation. It can be: an identity transformation, a rotation, a translation, a mirror transformation (relative to a point, an axis or a plane), a scaling transformation, or a compound transformation. + */ + Form(): unknown; + /** + * Returns the scale factor. + */ + ScaleFactor(): number; + /** + * Returns the translation part of the transformation's matrix. + */ + TranslationPart(): gp_XYZ; + /** + * Returns the boolean True if there is non-zero rotation. In the presence of rotation, the output parameters store the axis and the angle of rotation. The method always returns positive value "theAngle", i.e., 0. < theAngle <= PI. Note that this rotation is defined only by the vectorial part of the transformation; generally you would need to check also the translational part to obtain the axis ({@link gp_Ax1 | `gp_Ax1`}) of rotation. + * @param theAxis Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `theAngle`: updated value from the call. + */ + GetRotation(theAxis: gp_XYZ, theAngle?: number): { returnValue: boolean; theAngle: number }; + /** + * Returns quaternion representing rotational part of the transformation. + */ + GetRotation(): unknown; + /** + * Returns the vectorial part of the transformation. It is a 3*3 matrix which includes the scale factor. + */ + VectorialPart(): unknown; + /** + * Computes the homogeneous vectorial part of the transformation. It is a 3*3 matrix which doesn't include the scale factor. In other words, the vectorial part of this transformation is equal to its homogeneous vectorial part, multiplied by the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation. + */ + HVectorialPart(): unknown; + /** + * Returns the coefficients of the transformation's matrix. It is a 3 rows * 4 columns matrix. This coefficient includes the scale factor. Raises OutOfRanged if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4. + */ + Value(theRow: number, theCol: number): number; + Invert(): void; + /** + * Computes the reverse transformation Raises an exception if the matrix of the transformation is not inversible, it means that the scale factor is lower or equal to Resolution from package gp. Computes the transformation composed with T and . In a C++ implementation you can also write Tcomposed = * T. Example : + * + * ``` + * gp_TrsfT1,T2,Tcomp;............... Tcomp=T2.Multiplied(T1);//or(Tcomp=T2*T1) gp_PntP1(10.,3.,4.); gp_PntP2=P1.Transformed(Tcomp);//usingTcomp gp_PntP3=P1.Transformed(T1);//usingT1thenT2 P3.Transform(T2);//P3=P2!!! + * ``` + */ + Inverted(): gp_Trsf; + Multiplied(theT: gp_Trsf): gp_Trsf; + /** + * Computes the transformation composed with and theT. = * theT. + */ + Multiply(theT: gp_Trsf): void; + /** + * Computes the transformation composed with and T. = theT * . + */ + PreMultiply(theT: gp_Trsf): void; + Power(theN: number): void; + /** + * Computes the following composition of transformations * * .......* , theN time. if theN = 0 = Identity if theN < 0 = .Inverse() *...........* .Inverse(). + * + * Raises if theN < 0 and if the matrix of the transformation not inversible. + */ + Powered(theN: number): gp_Trsf; + Transforms(theX?: number, theY?: number, theZ?: number): { theX: number; theY: number; theZ: number }; + /** + * Transformation of a triplet XYZ with a Trsf. + * @param theCoord Mutated in place; read the updated value from this argument after the call. + */ + Transforms(theCoord: gp_XYZ): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a 3D cartesian point. + */ +export declare class gp_Pnt { + /** + * Creates a point with zero coordinates. + */ + constructor(); + /** + * Creates a point from a XYZ object. + */ + constructor(theCoord: gp_XYZ); + /** + * Creates a point with its 3 cartesian's coordinates: theXp, theYp, theZp. + */ + constructor(theXp: number, theYp: number, theZp: number); + /** + * Changes the coordinate of range theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this point, assigns the values theXp, theYp and theZp to its three coordinates. + */ + SetCoord(theXp: number, theYp: number, theZp: number): void; + /** + * Assigns the given value to the X coordinate of this point. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this point. + */ + SetY(theY: number): void; + /** + * Assigns the given value to the Z coordinate of this point. + */ + SetZ(theZ: number): void; + /** + * Assigns the three coordinates of theCoord to this point. + */ + SetXYZ(theCoord: gp_XYZ): void; + /** + * Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}. + */ + Coord(theIndex: number): number; + /** + * For this point gives its three coordinates theXp, theYp and theZp. + * @returns A result object with fields: + * - `theXp`: updated value from the call. + * - `theYp`: updated value from the call. + * - `theZp`: updated value from the call. + */ + Coord(theXp?: number, theYp?: number, theZp?: number): { theXp: number; theYp: number; theZp: number }; + /** + * For this point, returns its three coordinates as a XYZ object. + */ + Coord(): gp_XYZ; + /** + * For this point, returns its X coordinate. + */ + X(): number; + /** + * For this point, returns its Y coordinate. + */ + Y(): number; + /** + * For this point, returns its Z coordinate. + */ + Z(): number; + /** + * For this point, returns its three coordinates as a XYZ object. + */ + XYZ(): gp_XYZ; + /** + * Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value. + */ + ChangeCoord(): gp_XYZ; + /** + * Assigns the result of the following expression to this point (theAlpha*this + theBeta*theP) / (theAlpha + theBeta). + */ + BaryCenter(theAlpha: number, theP: gp_Pnt, theBeta: number): void; + /** + * Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance. + */ + IsEqual(theOther: gp_Pnt, theLinearTolerance: number): boolean; + /** + * Computes the distance between two points. + */ + Distance(theOther: gp_Pnt): number; + /** + * Computes the square distance between two points. + */ + SquareDistance(theOther: gp_Pnt): number; + /** + * Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry. + */ + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theP: gp_Pnt): gp_Pnt; + /** + * Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA1: gp_Ax1): gp_Pnt; + /** + * Rotates a point. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Mirrored(theA2: gp_Ax2): gp_Pnt; + Rotate(theA1: gp_Ax1, theAng: number): void; + Rotated(theA1: gp_Ax1, theAng: number): gp_Pnt; + /** + * Scales a point. theS is the scaling value. + */ + Scale(theP: gp_Pnt, theS: number): void; + Scaled(theP: gp_Pnt, theS: number): gp_Pnt; + /** + * Transforms a point with the transformation T. + */ + Transform(theT: gp_Trsf): void; + Transformed(theT: gp_Trsf): gp_Pnt; + /** + * Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translate(theV: gp_Vec): void; + /** + * Translates a point from the point theP1 to the point theP2. + */ + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + Translated(theV: gp_Vec): gp_Pnt; + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Pnt; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an ellipse in 3D space. An ellipse is defined by its major and minor radii and positioned in space with a coordinate system (a {@link gp_Ax2 | `gp_Ax2`} object) as follows: + * + * - the origin of the coordinate system is the center of the ellipse, + * - its "X Direction" defines the major axis of the ellipse, and + * - its "Y Direction" defines the minor axis of the ellipse. Together, the origin, "X Direction" and "Y Direction" of this coordinate system define the plane of the ellipse. This coordinate system is the "local coordinate system" of the ellipse. + * In this coordinate system, the equation of the ellipse is: X*X/(`MajorRadius`**2)+Y*Y/(`MinorRadius`**2)=1.0 The "main Direction" of the local coordinate system gives the normal vector to the plane of the ellipse. This vector gives an implicit orientation to the ellipse (definition of the trigonometric sense). We refer to the "main Axis" of the local coordinate system as the "Axis" of the ellipse. + * See Also {@link gce_MakeElips | `gce_MakeElips`} which provides functions for more complex ellipse constructions {@link Geom_Ellipse | `Geom_Ellipse`} which provides additional functions for constructing ellipses and works, in particular, with the parametric equations of ellipses + */ +export declare class gp_Elips { + /** + * Creates an indefinite ellipse. + */ + constructor(); + /** + * The major radius of the ellipse is on the "XAxis" and the minor radius is on the "YAxis" of the ellipse. The "XAxis" is defined with the "XDirection" of theA2 and the "YAxis" is defined with the "YDirection" of theA2. Warnings : It is not forbidden to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0. + */ + constructor(theA2: gp_Ax2, theMajorRadius: number, theMinorRadius: number); + /** + * Changes the axis normal to the plane of the ellipse. It modifies the definition of this plane. The "XAxis" and the "YAxis" are recomputed. The local coordinate system is redefined so that: + * + * - its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any {@link gp_Ax2 | `gp_Ax2`}), or Raises ConstructionError if the direction of theA1 is parallel to the direction of the "XAxis" of the ellipse. + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Modifies this ellipse, by redefining its local coordinate so that its origin becomes theP. + */ + SetLocation(theP: gp_Pnt): void; + /** + * The major radius of the ellipse is on the "XAxis" (major axis) of the ellipse. Raises ConstructionError if theMajorRadius < MinorRadius. + */ + SetMajorRadius(theMajorRadius: number): void; + /** + * The minor radius of the ellipse is on the "YAxis" (minor axis) of the ellipse. Raises ConstructionError if theMinorRadius > MajorRadius or MinorRadius < 0. + */ + SetMinorRadius(theMinorRadius: number): void; + /** + * Modifies this ellipse, by redefining its local coordinate so that it becomes theA2. + */ + SetPosition(theA2: gp_Ax2): void; + /** + * Computes the area of the Ellipse. + */ + Area(): number; + /** + * Computes the axis normal to the plane of the ellipse. + */ + Axis(): gp_Ax1; + /** + * Computes the first or second directrix of this ellipse. + * These are the lines, in the plane of the ellipse, normal to the major axis, at a distance equal to MajorRadius/e from the center of the ellipse, where e is the eccentricity of the ellipse. The first directrix (Directrix1) is on the positive side of the major axis. The second directrix (Directrix2) is on the negative side. + * The directrix is returned as an axis ({@link gp_Ax1 | `gp_Ax1`} object), the origin of which is situated on the "X Axis" of the local coordinate system of this ellipse. Exceptions Standard_ConstructionError if the eccentricity is null (the ellipse has degenerated into a circle). + */ + Directrix1(): gp_Ax1; + /** + * This line is obtained by the symmetrical transformation of "Directrix1" with respect to the "YAxis" of the ellipse. Exceptions Standard_ConstructionError if the eccentricity is null (the ellipse has degenerated into a circle). + */ + Directrix2(): gp_Ax1; + /** + * Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Raises ConstructionError if MajorRadius = 0.0. + */ + Eccentricity(): number; + /** + * Computes the focal distance. It is the distance between the two focus focus1 and focus2 of the ellipse. + */ + Focal(): number; + /** + * Returns the first focus of the ellipse. This focus is on the positive side of the "XAxis" of the ellipse. + */ + Focus1(): gp_Pnt; + /** + * Returns the second focus of the ellipse. This focus is on the negative side of the "XAxis" of the ellipse. + */ + Focus2(): gp_Pnt; + /** + * Returns the center of the ellipse. It is the "Location" point of the coordinate system of the ellipse. + */ + Location(): gp_Pnt; + /** + * Returns the major radius of the ellipse. + */ + MajorRadius(): number; + /** + * Returns the minor radius of the ellipse. + */ + MinorRadius(): number; + /** + * Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0. + */ + Parameter(): number; + /** + * Returns the coordinate system of the ellipse. + */ + Position(): gp_Ax2; + /** + * Returns the "XAxis" of the ellipse whose origin is the center of this ellipse. It is the major axis of the ellipse. + */ + XAxis(): gp_Ax1; + /** + * Returns the "YAxis" of the ellipse whose unit vector is the "X Direction" or the "Y Direction" of the local coordinate system of this ellipse. This is the minor axis of the ellipse. + */ + YAxis(): gp_Ax1; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of an ellipse with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt): gp_Elips; + /** + * Performs the symmetrical transformation of an ellipse with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Elips; + /** + * Performs the symmetrical transformation of an ellipse with respect to a plane. The axis placement theA2 locates the plane of the symmetry (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Elips; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates an ellipse. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Elips; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Scales an ellipse. theS is the scaling value. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Elips; + Transform(theT: gp_Trsf): void; + /** + * Transforms an ellipse with the transformation theT from class Trsf. + */ + Transformed(theT: gp_Trsf): gp_Elips; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates an ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Elips; + /** + * Translates an ellipse from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Elips; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a coordinate system in 3D space. Unlike a {@link gp_Ax2 | `gp_Ax2`} coordinate system, a {@link gp_Ax3 | `gp_Ax3`} can be right-handed ("direct sense") or left-handed ("indirect sense"). A coordinate system is defined by: + * + * - its origin (also referred to as its "Location point"), and + * - three orthogonal unit vectors, termed the "X Direction", the "Y Direction" and the "Direction" (also referred to as the "main Direction"). The "Direction" of the coordinate system is called its "main Direction" because whenever this unit vector is modified, the "X Direction" and the "Y Direction" are recomputed. However, when we modify either the "X Direction" or the "Y Direction", "Direction" is not modified. "Direction" is also the "Z Direction". The "main Direction" is always parallel to the cross product of its "X Direction" and "Y Direction". + * If the coordinate system is right-handed, it satisfies the equation: "main Direction" = "X Direction" ^ "Y Direction" and if it is left-handed, it satisfies the equation: "main Direction" = -"X Direction" ^ "Y Direction" A coordinate system is used: + * - to describe geometric entities, in particular to position them. The local coordinate system of a geometric entity serves the same purpose as the STEP function "axis placement three axes", or + * - to define geometric transformations. Note: + * - We refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as the axes having: + * - the origin of the coordinate system as their origin, and + * - the unit vectors "X Direction", "Y Direction" and "main Direction", respectively, as their unit vectors. + * - The "Z Axis" is also the "main Axis". + * - {@link gp_Ax2 | `gp_Ax2`} is used to define a coordinate system that must be always right-handed. + */ +export declare class gp_Ax3 { + /** + * Creates an object corresponding to the reference coordinate system (OXYZ). + */ + constructor(); + /** + * Creates a coordinate system from a right-handed coordinate system. + */ + constructor(theA: gp_Ax2); + /** + * Creates an axis placement at the origin with the given standard direction. + */ + constructor(theV: gp_Dir_D); + /** + * Creates an axis placement with the "Location" point and the normal direction . + */ + constructor(theP: gp_Pnt, theV: gp_Dir); + /** + * Creates an axis placement with the given location point and standard direction. + */ + constructor(theP: gp_Pnt, theV: gp_Dir_D); + /** + * Creates a right handed axis placement with the "Location" point theP and two directions, theN gives the "Direction" and theVx gives the "XDirection". Raises ConstructionError if theN and theVx are parallel (same or opposite orientation). + */ + constructor(theP: gp_Pnt, theN: gp_Dir, theVx: gp_Dir); + /** + * Creates an axis placement with standard directions. This constructor allows constexpr and noexcept construction when using standard directions. + */ + constructor(theP: gp_Pnt, theN: gp_Dir_D, theVx: gp_Dir_D); + /** + * Reverses the X direction of . + */ + XReverse(): void; + /** + * Reverses the Y direction of . + */ + YReverse(): void; + /** + * Reverses the Z direction of . + */ + ZReverse(): void; + /** + * Assigns the origin and "main Direction" of the axis theA1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: + * + * - The new "X Direction" is computed as follows: new "X Direction" = V1 ^(previous "X Direction" ^ V) where V is the "Direction" of theA1. + * - The orientation of this coordinate system (right-handed or left-handed) is not modified. Raises ConstructionError if the "Direction" of and the "XDirection" of are parallel (same or opposite orientation) because it is impossible to calculate the new "XDirection" and the new "YDirection". + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Changes the main direction of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: + * + * - The new "X Direction" is computed as follows: new "X Direction" = theV ^ (previous "X Direction" ^ theV). + * - The orientation of this coordinate system (left- or right-handed) is not modified. Raises ConstructionError if and the previous "XDirection" are parallel because it is impossible to calculate the new "XDirection" and the new "YDirection". + */ + SetDirection(theV: gp_Dir): void; + /** + * Changes the "Location" point (origin) of . + */ + SetLocation(theP: gp_Pnt): void; + /** + * Changes the "Xdirection" of . The main direction "Direction" is not modified, the "Ydirection" is modified. If is not normal to the main direction then is computed as follows XDirection = Direction ^ (theVx ^ Direction). Raises ConstructionError if is parallel (same or opposite orientation) to the main direction of . + */ + SetXDirection(theVx: gp_Dir): void; + /** + * Changes the "Ydirection" of . The main direction is not modified but the "Xdirection" is changed. If is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ ( ^ Direction). Raises ConstructionError if is parallel to the main direction of . + */ + SetYDirection(theVy: gp_Dir): void; + /** + * Computes the angular value between the main direction of and the main direction of . Returns the angle between 0 and PI in radians. + */ + Angle(theOther: gp_Ax3): number; + /** + * Returns the main axis of . It is the "Location" point and the main "Direction". + */ + Axis(): gp_Ax1; + /** + * Computes a right-handed coordinate system with the same "X Direction" and "Y Direction" as those of this coordinate system, then recomputes the "main Direction". If this coordinate system is right-handed, the result returned is the same coordinate system. If this coordinate system is left-handed, the result is reversed. + */ + Ax2(): gp_Ax2; + /** + * Returns the main direction of . + */ + Direction(): gp_Dir; + /** + * Returns the "Location" point (origin) of . + */ + Location(): gp_Pnt; + /** + * Returns the "XDirection" of . + */ + XDirection(): gp_Dir; + /** + * Returns the "YDirection" of . + */ + YDirection(): gp_Dir; + /** + * Returns True if the coordinate system is right-handed. i.e. `XDirection()`.Crossed(YDirection()).Dot(Direction()) > 0. + */ + Direct(): boolean; + /** + * Returns True if . the distance between the "Location" point of and is lower or equal to theLinearTolerance and . the distance between the "Location" point of and is lower or equal to theLinearTolerance and . the main direction of and the main direction of are parallel (same or opposite orientation). + */ + IsCoplanar(theOther: gp_Ax3, theLinearTolerance: number, theAngularTolerance: number): boolean; + /** + * Returns True if . the distance between and the "Location" point of theA1 is lower of equal to theLinearTolerance and . the distance between theA1 and the "Location" point of is lower or equal to theLinearTolerance and . the main direction of and the direction of theA1 are normal. + */ + IsCoplanar(theA1: gp_Ax1, theLinearTolerance: number, theAngularTolerance: number): boolean; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to the point theP which is the center of the symmetry. Warnings : The main direction of the axis placement is not changed. The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. + */ + Mirrored(theP: gp_Pnt): gp_Ax3; + /** + * Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Mirrored(theA1: gp_Ax1): gp_Ax3; + /** + * Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement locates the plane of the symmetry: (Location, XDirection, YDirection). The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Mirrored(theA2: gp_Ax2): gp_Ax3; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates an axis placement. is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Ax3; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale is negative : . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Ax3; + Transform(theT: gp_Trsf): void; + /** + * Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Transformed(theT: gp_Trsf): gp_Ax3; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates an axis plaxement in the direction of the vector . The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Ax3; + /** + * Translates an axis placement from the point to the point . + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax3; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a right-handed coordinate system in 3D space. A coordinate system is defined by: + * + * - its origin (also referred to as its "Location point"), and + * - three orthogonal unit vectors, termed respectively the "X Direction", the "Y Direction" and the "Direction" (also referred to as the "main Direction"). The "Direction" of the coordinate system is called its "main Direction" because whenever this unit vector is modified, the "X Direction" and the "Y Direction" are recomputed. However, when we modify either the "X Direction" or the "Y Direction", "Direction" is not modified. The "main Direction" is also the "Z Direction". + * Since an Ax2 coordinate system is right-handed, its "main Direction" is always equal to the cross product of its "X Direction" and "Y Direction". (To define a left-handed coordinate system, use {@link gp_Ax3 | `gp_Ax3`}.) A coordinate system is used: + * - to describe geometric entities, in particular to position them. The local coordinate system of a geometric entity serves the same purpose as the STEP function "axis placement two axes", or + * - to define geometric transformations. Note: we refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as to axes having: + * - the origin of the coordinate system as their origin, and + * - the unit vectors "X Direction", "Y Direction" and "main Direction", respectively, as their unit vectors. The "Z Axis" is also the "main Axis". + */ +export declare class gp_Ax2 { + /** + * Creates an object corresponding to the reference coordinate system (OXYZ). + */ + constructor(); + /** + * Creates a coordinate system at the origin with the given standard main direction. Replaces `gp::XOY()`, `gp::YOZ()`, `gp::ZOX()` static functions. + */ + constructor(theV: gp_Dir_D); + /** + * Creates a coordinate system with an origin P, where V gives the "main Direction" (here, "X Direction" and "Y Direction" are defined automatically). + */ + constructor(P: gp_Pnt, V: gp_Dir); + /** + * Creates a coordinate system with an origin P and standard main direction. + */ + constructor(theP: gp_Pnt, theV: gp_Dir_D); + /** + * Creates an axis placement with an origin P such that: + * + * - N is the Direction, and + * - the "X Direction" is normal to N, in the plane defined by the vectors (N, Vx): "X Direction" = (N ^ Vx) ^ N, Exception: raises ConstructionError if N and Vx are parallel (same or opposite orientation). + */ + constructor(P: gp_Pnt, N: gp_Dir, Vx: gp_Dir); + /** + * Creates an axis placement with standard directions. + */ + constructor(theP: gp_Pnt, theN: gp_Dir_D, theVx: gp_Dir_D); + /** + * Assigns the origin and "main Direction" of the axis A1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: The new "X Direction" is computed as follows: new "X Direction" = V1 ^(previous "X Direction" ^ V) where V is the "Direction" of A1. Exceptions Standard_ConstructionError if A1 is parallel to the "X Direction" of this coordinate system. + */ + SetAxis(A1: gp_Ax1): void; + /** + * Changes the "main Direction" of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: the new "X Direction" is computed as follows: new "X Direction" = V ^ (previous "X Direction" ^ V) Exceptions Standard_ConstructionError if V is parallel to the "X Direction" of this coordinate system. + */ + SetDirection(V: gp_Dir): void; + /** + * Changes the "Location" point (origin) of . + */ + SetLocation(theP: gp_Pnt): void; + /** + * Changes the "Xdirection" of . The main direction "Direction" is not modified, the "Ydirection" is modified. If is not normal to the main direction then is computed as follows XDirection = Direction ^ (Vx ^ Direction). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system. + */ + SetXDirection(theVx: gp_Dir): void; + /** + * Changes the "Ydirection" of . The main direction is not modified but the "Xdirection" is changed. If is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ ( ^ Direction). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system. + */ + SetYDirection(theVy: gp_Dir): void; + /** + * Computes the angular value, in radians, between the main direction of and the main direction of . Returns the angle between 0 and PI in radians. + */ + Angle(theOther: gp_Ax2): number; + /** + * Returns the main axis of . It is the "Location" point and the main "Direction". + */ + Axis(): gp_Ax1; + /** + * Returns the main direction of . + */ + Direction(): gp_Dir; + /** + * Returns the "Location" point (origin) of . + */ + Location(): gp_Pnt; + /** + * Returns the "XDirection" of . + */ + XDirection(): gp_Dir; + /** + * Returns the "YDirection" of . + */ + YDirection(): gp_Dir; + IsCoplanar(Other: gp_Ax2, LinearTolerance: number, AngularTolerance: number): boolean; + /** + * Returns True if: . the distance between and the "Location" point of A1 is lower of equal to LinearTolerance and . the main direction of and the direction of A1 are normal. Note: the tolerance criterion for angular equality is given by AngularTolerance. + */ + IsCoplanar(A1: gp_Ax1, LinearTolerance: number, AngularTolerance: number): boolean; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the point P, and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirror(P: gp_Pnt): void; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the axis A1, and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirror(A1: gp_Ax1): void; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirror(A2: gp_Ax2): void; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the point P, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirrored(P: gp_Pnt): gp_Ax2; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the axis A1, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirrored(A1: gp_Ax1): gp_Ax2; + /** + * Performs a symmetrical transformation of this coordinate system with respect to: + * + * - the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point: + * - the main direction of the coordinate system is not changed, and + * - the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane: + * - the transformation is applied to the "X Direction" and the "Y Direction", then + * - the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system. + */ + Mirrored(A2: gp_Ax2): gp_Ax2; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates an axis placement. is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Ax2; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale is negative: . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Ax2; + Transform(theT: gp_Trsf): void; + /** + * Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Transformed(theT: gp_Trsf): gp_Ax2; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates an axis plaxement in the direction of the vector . The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Ax2; + /** + * Translates an axis placement from the point to the point . + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax2; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent 2D cartesian point. + */ +export declare class gp_Pnt2d { + /** + * Creates a point with zero coordinates. + */ + constructor(); + /** + * Creates a point with a doublet of coordinates. + */ + constructor(theCoord: gp_XY); + /** + * Creates a point with its 2 cartesian's coordinates: theXp, theYp. + */ + constructor(theXp: number, theYp: number); + /** + * Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this point, assigns the values theXp and theYp to its two coordinates. + */ + SetCoord(theXp: number, theYp: number): void; + /** + * Assigns the given value to the X coordinate of this point. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this point. + */ + SetY(theY: number): void; + /** + * Assigns the two coordinates of Coord to this point. + */ + SetXY(theCoord: gp_XY): void; + /** + * Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}. + */ + Coord(theIndex: number): number; + /** + * For this point returns its two coordinates as a number pair. + * @returns A result object with fields: + * - `theXp`: updated value from the call. + * - `theYp`: updated value from the call. + */ + Coord(theXp?: number, theYp?: number): { theXp: number; theYp: number }; + /** + * For this point, returns its two coordinates as a number pair. + */ + Coord(): gp_XY; + /** + * For this point, returns its X coordinate. + */ + X(): number; + /** + * For this point, returns its Y coordinate. + */ + Y(): number; + /** + * For this point, returns its two coordinates as a number pair. + */ + XY(): gp_XY; + /** + * Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value. + */ + ChangeCoord(): gp_XY; + /** + * Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance. + */ + IsEqual(theOther: gp_Pnt2d, theLinearTolerance: number): boolean; + /** + * Computes the distance between two points. + */ + Distance(theOther: gp_Pnt2d): number; + /** + * Computes the square distance between two points. + */ + SquareDistance(theOther: gp_Pnt2d): number; + /** + * Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry. + */ + Mirror(theP: gp_Pnt2d): void; + Mirror(theA: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of a point with respect to an axis placement which is the axis. + */ + Mirrored(theP: gp_Pnt2d): gp_Pnt2d; + Mirrored(theA: gp_Ax2d): gp_Pnt2d; + /** + * Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians. + */ + Rotate(theP: gp_Pnt2d, theAng: number): void; + Rotated(theP: gp_Pnt2d, theAng: number): gp_Pnt2d; + /** + * Scales a point. theS is the scaling value. + */ + Scale(theP: gp_Pnt2d, theS: number): void; + Scaled(theP: gp_Pnt2d, theS: number): gp_Pnt2d; + /** + * Transforms a point with the transformation theT. + */ + Transform(theT: gp_Trsf2d): void; + Transformed(theT: gp_Trsf2d): gp_Pnt2d; + /** + * Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translate(theV: gp_Vec2d): void; + /** + * Translates a point from the point theP1 to the point theP2. + */ + Translate(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + Translated(theV: gp_Vec2d): gp_Pnt2d; + Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Pnt2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class describes a cartesian coordinate entity in 2D space {X,Y}. This class is non persistent. This entity used for algebraic calculation. An XY can be transformed with a Trsf2d or a GTrsf2d from package gp. It is used in vectorial computations or for holding this type of information in data structures. + */ +export declare class gp_XY { + /** + * Creates XY object with zero coordinates (0,0). + */ + constructor(); + /** + * a number pair defined by the XY coordinates + */ + constructor(theX: number, theY: number); + /** + * modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this number pair, assigns the values theX and theY to its coordinates. + */ + SetCoord(theX: number, theY: number): void; + /** + * Assigns the given value to the X coordinate of this number pair. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this number pair. + */ + SetY(theY: number): void; + /** + * returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}. + */ + Coord(theIndex: number): number; + /** + * For this number pair, returns its coordinates X and Y. + * @returns A result object with fields: + * - `theX`: updated value from the call. + * - `theY`: updated value from the call. + */ + Coord(theX?: number, theY?: number): { theX: number; theY: number }; + ChangeCoord(theIndex: number): number; + /** + * Returns the X coordinate of this number pair. + */ + X(): number; + /** + * Returns the Y coordinate of this number pair. + */ + Y(): number; + /** + * Computes std::sqrt(X*X + Y*Y) where X and Y are the two coordinates of this number pair. + */ + Modulus(): number; + /** + * Computes X*X + Y*Y where X and Y are the two coordinates of this number pair. + */ + SquareModulus(): number; + /** + * Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair theOther, within the specified tolerance theTolerance. + */ + IsEqual(theOther: gp_XY, theTolerance: number): boolean; + /** + * Computes the sum of this number pair and number pair theOther. + * + * ``` + * .X()=.X()+theOther.X() .Y()=.Y()+theOther.Y() + * ``` + */ + Add(theOther: gp_XY): void; + /** + * Computes the sum of this number pair and number pair theOther. + * + * ``` + * new.X()=.X()+theOther.X() new.Y()=.Y()+theOther.Y() + * ``` + */ + Added(theOther: gp_XY): gp_XY; + /** + * ``` + * doubleD=.X()*theOther.Y()-.Y()*theOther.X() + * ``` + */ + Crossed(theOther: gp_XY): number; + /** + * computes the magnitude of the cross product between and theRight. Returns || ^ theRight || + */ + CrossMagnitude(theRight: gp_XY): number; + /** + * computes the square magnitude of the cross product between and theRight. Returns || ^ theRight ||**2 + */ + CrossSquareMagnitude(theRight: gp_XY): number; + /** + * divides by a real. + */ + Divide(theScalar: number): void; + /** + * Divides by a real. + */ + Divided(theScalar: number): gp_XY; + /** + * Computes the scalar product between and theOther. + */ + Dot(theOther: gp_XY): number; + /** + * ``` + * .X()=.X()*theScalar; .Y()=.Y()*theScalar; + * ``` + */ + Multiply(theScalar: number): void; + /** + * ``` + * .X()=.X()*theOther.X(); .Y()=.Y()*theOther.Y(); + * ``` + */ + Multiply(theOther: gp_XY): void; + /** + * = theMatrix * + */ + Multiply(theMatrix: unknown): void; + /** + * ``` + * New.X()=.X()*theScalar; New.Y()=.Y()*theScalar; + * ``` + */ + Multiplied(theScalar: number): gp_XY; + /** + * ``` + * new.X()=.X()*theOther.X(); new.Y()=.Y()*theOther.Y(); + * ``` + */ + Multiplied(theOther: gp_XY): gp_XY; + /** + * New = theMatrix * . + */ + Multiplied(theMatrix: unknown): gp_XY; + /** + * ``` + * .X()=.X()/.Modulus() .Y()=.Y()/.Modulus() + * ``` + * + * Raises ConstructionError if .`Modulus()` <= Resolution from gp + */ + Normalize(): void; + /** + * ``` + * New.X()=.X()/.Modulus() New.Y()=.Y()/.Modulus() + * ``` + * + * Raises ConstructionError if .`Modulus()` <= Resolution from gp + */ + Normalized(): gp_XY; + /** + * ``` + * .X()=-.X() .Y()=-.Y() + * ``` + */ + Reverse(): void; + /** + * ``` + * New.X()=-.X() New.Y()=-.Y() + * ``` + */ + Reversed(): gp_XY; + /** + * Computes the following linear combination and assigns the result to this number pair: + * + * ``` + * theA1*theXY1+theA2*theXY2 + * ``` + */ + SetLinearForm(theA1: number, theXY1: gp_XY, theA2: number, theXY2: gp_XY): void; + /** + * Computes the following linear combination and assigns the result to this number pair: + * + * ``` + * theA1*theXY1+theA2*theXY2+theXY3 + * ``` + */ + SetLinearForm(theA1: number, theXY1: gp_XY, theA2: number, theXY2: gp_XY, theXY3: gp_XY): void; + /** + * Computes the following linear combination and assigns the result to this number pair: + * + * ``` + * theA1*theXY1+theXY2 + * ``` + */ + SetLinearForm(theA1: number, theXY1: gp_XY, theXY2: gp_XY): void; + /** + * Computes the following linear combination and assigns the result to this number pair: + * + * ``` + * theXY1+theXY2 + * ``` + */ + SetLinearForm(theXY1: gp_XY, theXY2: gp_XY): void; + /** + * ``` + * .X()=.X()-theOther.X() .Y()=.Y()-theOther.Y() + * ``` + */ + Subtract(theOther: gp_XY): void; + /** + * ``` + * new.X()=.X()-theOther.X() new.Y()=.Y()-theOther.Y() + * ``` + */ + Subtracted(theOther: gp_XY): gp_XY; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a unit vector in 3`D` space. This unit vector is also called "Direction". See Also {@link gce_MakeDir | `gce_MakeDir`} which provides functions for more complex unit vector constructions {@link Geom_Direction | `Geom_Direction`} which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors. + */ +export declare class gp_Dir { + /** + * Creates a direction corresponding to X axis. + */ + constructor(); + /** + * Creates a direction from a standard direction enumeration. + */ + constructor(theDir: gp_Dir_D); + /** + * Normalizes the vector theV and creates a direction. Raises ConstructionError if theV.Magnitude() <= Resolution. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theV: gp_Vec); + /** + * Creates a direction from a triplet of coordinates. Raises ConstructionError if theCoord.Modulus() <= Resolution from gp. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theCoord: gp_XYZ); + constructor(a0: gp_Dir); + /** + * Creates a direction with its 3 cartesian coordinates. Raises ConstructionError if std::sqrt(theXv*theXv + theYv*theYv + theZv*theZv) <= Resolution Modification of the direction's coordinates If std::sqrt (theXv*theXv + theYv*theYv + theZv*theZv) <= Resolution from gp where theXv, theYv ,theZv are the new coordinates it is not possible to construct the direction and the method raises the exception ConstructionError. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theXv: number, theYv: number, theZv: number); + /** + * For this unit vector, assigns the value Xi to: + * + * - the X coordinate if theIndex is 1, or + * - the Y coordinate if theIndex is 2, or + * - the Z coordinate if theIndex is 3, and then normalizes it. Warning: Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1, 2, or 3. Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * - std::sqrt(Xv*Xv + Yv*Yv + Zv*Zv), or + * - the modulus of the number triple formed by the new value theXi and the two other coordinates of this vector that were not directly modified. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this unit vector, assigns the values theXv, theYv and theZv to its three coordinates. Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + SetCoord(theXv: number, theYv: number, theZv: number): void; + /** + * Assigns the given value to the X coordinate of this unit vector. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this unit vector. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetY(theY: number): void; + /** + * Assigns the given value to the Z coordinate of this unit vector. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetZ(theZ: number): void; + /** + * Assigns the three coordinates of theCoord to this unit vector. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + SetXYZ(theCoord: gp_XYZ): void; + /** + * Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Exceptions Standard_OutOfRange if theIndex is not 1, 2, or 3. + */ + Coord(theIndex: number): number; + /** + * Returns for the unit vector its three coordinates theXv, theYv, and theZv. + * @returns A result object with fields: + * - `theXv`: updated value from the call. + * - `theYv`: updated value from the call. + * - `theZv`: updated value from the call. + */ + Coord(theXv?: number, theYv?: number, theZv?: number): { theXv: number; theYv: number; theZv: number }; + /** + * Returns the X coordinate for a unit vector. + */ + X(): number; + /** + * Returns the Y coordinate for a unit vector. + */ + Y(): number; + /** + * Returns the Z coordinate for a unit vector. + */ + Z(): number; + /** + * for this unit vector, returns its three coordinates as a number triple. + */ + XYZ(): gp_XYZ; + /** + * Returns True if the angle between the two directions is lower or equal to theAngularTolerance. + */ + IsEqual(theOther: gp_Dir, theAngularTolerance: number): boolean; + /** + * Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi/2 (normal). + */ + IsNormal(theOther: gp_Dir, theAngularTolerance: number): boolean; + /** + * Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi (opposite). + */ + IsOpposite(theOther: gp_Dir, theAngularTolerance: number): boolean; + /** + * Returns true if the angle between this unit vector and the unit vector theOther is equal to 0 or to Pi. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsParallel(theOther: gp_Dir, theAngularTolerance: number): boolean; + /** + * Computes the angular value in radians between and . This value is always positive in 3`D` space. Returns the angle in the range [0, PI]. + */ + Angle(theOther: gp_Dir): number; + /** + * Computes the angular value between and . is the direction of reference normal to and and its orientation gives the positive sense of rotation. If the cross product ^ has the same orientation as the angular value is positive else negative. Returns the angular value in the range -PI and PI (in radians). Raises DomainError if and are not parallel this exception is raised when is in the same plane as and The tolerance criterion is Resolution from package gp. + */ + AngleWithRef(theOther: gp_Dir, theVRef: gp_Dir): number; + /** + * Computes the cross product between two directions Raises the exception ConstructionError if the two directions are parallel because the computed vector cannot be normalized to create a direction. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + Cross(theRight: gp_Dir): void; + /** + * Computes the triple vector product. ^ (V1 ^ V2) Raises the exception ConstructionError if V1 and V2 are parallel or and (V1^V2) are parallel because the computed vector can't be normalized to create a direction. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + Crossed(theRight: gp_Dir): gp_Dir; + /** + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + CrossCross(theV1: gp_Dir, theV2: gp_Dir): void; + /** + * Computes the double vector product this ^ (theV1 ^ theV2). + * + * - CrossCrossed creates a new unit vector. Exceptions Standard_ConstructionError if: + * - theV1 and theV2 are parallel, or + * - this unit vector and (theV1 ^ theV2) are parallel. This is because, in these conditions, the computed vector is null and cannot be normalized. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + CrossCrossed(theV1: gp_Dir, theV2: gp_Dir): gp_Dir; + /** + * Computes the scalar product. + */ + Dot(theOther: gp_Dir): number; + /** + * Computes the triple scalar product * (theV1 ^ theV2). Warnings : The computed vector theV1' = theV1 ^ theV2 is not normalized to create a unitary vector. So this method never raises an exception even if theV1 and theV2 are parallel. + */ + DotCross(theV1: gp_Dir, theV2: gp_Dir): number; + Reverse(): void; + /** + * Reverses the orientation of a direction geometric transformations Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry. + */ + Reversed(): gp_Dir; + Mirror(theV: gp_Dir): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a direction with respect to the direction theV which is the center of the symmetry. + */ + Mirrored(theV: gp_Dir): gp_Dir; + /** + * Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Dir; + /** + * Performs the symmetrical transformation of a direction with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Dir; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a direction. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Dir; + Transform(theT: gp_Trsf): void; + /** + * Transforms a direction with a "Trsf" from gp. Warnings : If the scale factor of the "Trsf" theT is negative then the direction is reversed. + */ + Transformed(theT: gp_Trsf): gp_Dir; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type gp_Dir_D = typeof gp_Dir_D[keyof typeof gp_Dir_D]; +/** + * {@link Standard | `Standard`} directions in 3`D` space for optimized constexpr construction. + */ +export declare const gp_Dir_D: { + /** + * Direction along positive X axis (1, 0, 0). + */ + readonly X: 'X'; + /** + * Direction along positive Y axis (0, 1, 0). + */ + readonly Y: 'Y'; + /** + * Direction along positive Z axis (0, 0, 1). + */ + readonly Z: 'Z'; + /** + * Direction along negative X axis (-1, 0, 0). + */ + readonly NX: 'NX'; + /** + * Direction along negative Y axis (0, -1, 0). + */ + readonly NY: 'NY'; + /** + * Direction along negative Z axis (0, 0, -1). + */ + readonly NZ: 'NZ'; +}; + +/** + * Describes a coordinate system in a plane (2D space). A coordinate system is defined by: + * + * - its origin (also referred to as its "Location point"), and + * - two orthogonal unit vectors, respectively, called the "X Direction" and the "Y Direction". A {@link gp_Ax22d | `gp_Ax22d`} may be right-handed ("direct sense") or left-handed ("inverse" or "indirect sense"). You use a {@link gp_Ax22d | `gp_Ax22d`} to: + * - describe 2D geometric entities, in particular to position them. The local coordinate system of a geometric entity serves for the same purpose as the STEP function "axis placement two axes", or + * - define geometric transformations. Note: we refer to the "X Axis" and "Y Axis" as the axes having: + * - the origin of the coordinate system as their origin, and + * - the unit vectors "X Direction" and "Y Direction", respectively, as their unit vectors. + */ +export declare class gp_Ax22d { + /** + * Creates an object representing the reference coordinate system (OXY). + */ + constructor(); + /** + * Creates a coordinate system where its origin is the origin of theA and its "X Direction" is the unit vector of theA, which is: + * + * - right-handed if theIsSense is true (default value), or + * - left-handed if theIsSense is false. + */ + constructor(theA: gp_Ax2d, theIsSense?: boolean); + /** + * Creates a coordinate system with origin theP and where: + * + * - theVx is the "X Direction", and + * - the "Y Direction" is orthogonal to theVx and oriented so that the cross products theVx^"Y Direction" and theVx^theVy have the same sign. Raises ConstructionError if theVx and theVy are parallel (same or opposite orientation). + */ + constructor(theP: gp_Pnt2d, theVx: gp_Dir2d, theVy: gp_Dir2d); + /** + * Creates a coordinate system with origin theP and "X Direction" theV, which is: + * + * - right-handed if theIsSense is true (default value), or + * - left-handed if theIsSense is false + */ + constructor(theP: gp_Pnt2d, theV: gp_Dir2d, theIsSense?: boolean); + /** + * Assigns the origin and the two unit vectors of the coordinate system theA1 to this coordinate system. + */ + SetAxis(theA1: gp_Ax22d): void; + /** + * Changes the XAxis and YAxis ("Location" point and "Direction") of . The "YDirection" is recomputed in the same sense as before. + */ + SetXAxis(theA1: gp_Ax2d): void; + /** + * Changes the XAxis and YAxis ("Location" point and "Direction") of . The "XDirection" is recomputed in the same sense as before. + */ + SetYAxis(theA1: gp_Ax2d): void; + /** + * Changes the "Location" point (origin) of . + */ + SetLocation(theP: gp_Pnt2d): void; + /** + * Assigns theVx to the "X Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVx , without modifying the orientation (right-handed or left-handed) of this coordinate system. + */ + SetXDirection(theVx: gp_Dir2d): void; + /** + * Assigns theVy to the "Y Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVy, without modifying the orientation (right-handed or left-handed) of this coordinate system. + */ + SetYDirection(theVy: gp_Dir2d): void; + /** + * Returns an axis, for which. + * + * - the origin is that of this coordinate system, and + * - the unit vector is either the "X Direction" of this coordinate system. Note: the result is the "X Axis" of this coordinate system. + */ + XAxis(): gp_Ax2d; + /** + * Returns an axis, for which. + * + * - the origin is that of this coordinate system, and + * - the unit vector is either the "Y Direction" of this coordinate system. Note: the result is the "Y Axis" of this coordinate system. + */ + YAxis(): gp_Ax2d; + /** + * Returns the "Location" point (origin) of . + */ + Location(): gp_Pnt2d; + /** + * Returns the "XDirection" of . + */ + XDirection(): gp_Dir2d; + /** + * Returns the "YDirection" of . + */ + YDirection(): gp_Dir2d; + Mirror(theP: gp_Pnt2d): void; + Mirror(theA: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to the point theP which is the center of the symmetry. Warnings : The main direction of the axis placement is not changed. The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. + */ + Mirrored(theP: gp_Pnt2d): gp_Ax22d; + /** + * Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Mirrored(theA: gp_Ax2d): gp_Ax22d; + Rotate(theP: gp_Pnt2d, theAng: number): void; + /** + * Rotates an axis placement. is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theP: gp_Pnt2d, theAng: number): gp_Ax22d; + Scale(theP: gp_Pnt2d, theS: number): void; + /** + * Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale is negative: . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. + */ + Scaled(theP: gp_Pnt2d, theS: number): gp_Ax22d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of is the cross product between the "XDirection" and the "YDirection" after transformation. + */ + Transformed(theT: gp_Trsf2d): gp_Ax22d; + Translate(theV: gp_Vec2d): void; + Translate(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + /** + * Translates an axis plaxement in the direction of the vector . The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec2d): gp_Ax22d; + /** + * Translates an axis placement from the point to the point . + */ + Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Ax22d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. This entity is used for algebraic calculation. This entity can be transformed with a "Trsf" or a "GTrsf" from package "gp". It is used in vectorial computations or for holding this type of information in data structures. + */ +export declare class gp_XYZ { + /** + * Creates an XYZ object with zero coordinates (0,0,0). + */ + constructor(); + /** + * creates an XYZ with given coordinates + */ + constructor(theX: number, theY: number, theZ: number); + /** + * For this XYZ object, assigns the values theX, theY and theZ to its three coordinates. + */ + SetCoord(theX: number, theY: number, theZ: number): void; + /** + * modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raises OutOfRange if theIndex != {1, 2, 3}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * Assigns the given value to the X coordinate. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate. + */ + SetY(theY: number): void; + /** + * Assigns the given value to the Z coordinate. + */ + SetZ(theZ: number): void; + /** + * returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned + * + * Raises OutOfRange if theIndex != {1, 2, 3}. + */ + Coord(theIndex: number): number; + Coord(theX?: number, theY?: number, theZ?: number): { theX: number; theY: number; theZ: number }; + ChangeCoord(theIndex: number): number; + /** + * Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS! + */ + GetData(): number; + /** + * Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS! + */ + ChangeData(): number; + /** + * Returns the X coordinate. + */ + X(): number; + /** + * Returns the Y coordinate. + */ + Y(): number; + /** + * Returns the Z coordinate. + */ + Z(): number; + /** + * Computes std::sqrt(X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object. + */ + Modulus(): number; + /** + * Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object. + */ + SquareModulus(): number; + /** + * Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance theTolerance. + */ + IsEqual(theOther: gp_XYZ, theTolerance: number): boolean; + /** + * ``` + * .X()=.X()+theOther.X() .Y()=.Y()+theOther.Y() .Z()=.Z()+theOther.Z() + * ``` + */ + Add(theOther: gp_XYZ): void; + /** + * ``` + * new.X()=.X()+theOther.X() new.Y()=.Y()+theOther.Y() new.Z()=.Z()+theOther.Z() + * ``` + */ + Added(theOther: gp_XYZ): gp_XYZ; + /** + * ``` + * .X()=.Y()*theOther.Z()-.Z()*theOther.Y() .Y()=.Z()*theOther.X()-.X()*theOther.Z() .Z()=.X()*theOther.Y()-.Y()*theOther.X() + * ``` + */ + Cross(theOther: gp_XYZ): void; + /** + * ``` + * new.X()=.Y()*theOther.Z()-.Z()*theOther.Y() new.Y()=.Z()*theOther.X()-.X()*theOther.Z() new.Z()=.X()*theOther.Y()-.Y()*theOther.X() + * ``` + */ + Crossed(theOther: gp_XYZ): gp_XYZ; + /** + * Computes the magnitude of the cross product between and theRight. Returns || ^ theRight ||. + */ + CrossMagnitude(theRight: gp_XYZ): number; + /** + * Computes the square magnitude of the cross product between and theRight. Returns || ^ theRight ||**2. + */ + CrossSquareMagnitude(theRight: gp_XYZ): number; + /** + * Triple vector product Computes = .Cross(theCoord1.Cross(theCoord2)). + */ + CrossCross(theCoord1: gp_XYZ, theCoord2: gp_XYZ): void; + /** + * Triple vector product computes New = .Cross(theCoord1.Cross(theCoord2)). + */ + CrossCrossed(theCoord1: gp_XYZ, theCoord2: gp_XYZ): gp_XYZ; + /** + * divides by a real. + */ + Divide(theScalar: number): void; + /** + * divides by a real. + */ + Divided(theScalar: number): gp_XYZ; + /** + * Computes the scalar product between and theOther. + */ + Dot(theOther: gp_XYZ): number; + /** + * Computes the triple scalar product. + */ + DotCross(theCoord1: gp_XYZ, theCoord2: gp_XYZ): number; + /** + * ``` + * .X()=.X()*theScalar; .Y()=.Y()*theScalar; .Z()=.Z()*theScalar; + * ``` + */ + Multiply(theScalar: number): void; + /** + * ``` + * .X()=.X()*theOther.X(); .Y()=.Y()*theOther.Y(); .Z()=.Z()*theOther.Z(); + * ``` + */ + Multiply(theOther: gp_XYZ): void; + /** + * = theMatrix * + */ + Multiply(theMatrix: unknown): void; + /** + * ``` + * New.X()=.X()*theScalar; New.Y()=.Y()*theScalar; New.Z()=.Z()*theScalar; + * ``` + */ + Multiplied(theScalar: number): gp_XYZ; + /** + * ``` + * new.X()=.X()*theOther.X(); new.Y()=.Y()*theOther.Y(); new.Z()=.Z()*theOther.Z(); + * ``` + */ + Multiplied(theOther: gp_XYZ): gp_XYZ; + /** + * New = theMatrix * . + */ + Multiplied(theMatrix: unknown): gp_XYZ; + /** + * ``` + * .X()=.X()/.Modulus() .Y()=.Y()/.Modulus() .Z()=.Z()/.Modulus() + * ``` + * + * Raised if .`Modulus()` <= Resolution from gp + */ + Normalize(): void; + /** + * ``` + * New.X()=.X()/.Modulus() New.Y()=.Y()/.Modulus() New.Z()=.Z()/.Modulus() + * ``` + * + * Raised if .`Modulus()` <= Resolution from gp + */ + Normalized(): gp_XYZ; + /** + * ``` + * .X()=-.X() .Y()=-.Y() .Z()=-.Z() + * ``` + */ + Reverse(): void; + /** + * ``` + * New.X()=-.X() New.Y()=-.Y() New.Z()=-.Z() + * ``` + */ + Reversed(): gp_XYZ; + /** + * ``` + * .X()=.X()-theOther.X() .Y()=.Y()-theOther.Y() .Z()=.Z()-theOther.Z() + * ``` + */ + Subtract(theOther: gp_XYZ): void; + /** + * ``` + * new.X()=.X()-theOther.X() new.Y()=.Y()-theOther.Y() new.Z()=.Z()-theOther.Z() + * ``` + */ + Subtracted(theOther: gp_XYZ): gp_XYZ; + /** + * is set to the following linear form : + * + * ``` + * theA1*theXYZ1+theA2*theXYZ2+theA3*theXYZ3+theXYZ4 + * ``` + */ + SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theA3: number, theXYZ3: gp_XYZ, theXYZ4: gp_XYZ): void; + /** + * is set to the following linear form : + * + * ``` + * theA1*theXYZ1+theA2*theXYZ2+theA3*theXYZ3 + * ``` + */ + SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theA3: number, theXYZ3: gp_XYZ): void; + /** + * is set to the following linear form : + * + * ``` + * theA1*theXYZ1+theA2*theXYZ2+theXYZ3 + * ``` + */ + SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theXYZ3: gp_XYZ): void; + /** + * is set to the following linear form : + * + * ``` + * theA1*theXYZ1+theA2*theXYZ2 + * ``` + */ + SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ): void; + /** + * is set to the following linear form : + * + * ``` + * theA1*theXYZ1+theXYZ2 + * ``` + */ + SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void; + /** + * is set to the following linear form : + * + * ``` + * theXYZ1+theXYZ2 + * ``` + */ + SetLinearForm(theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an infinite cylindrical surface. A cylinder is defined by its radius and positioned in space with a coordinate system (a {@link gp_Ax3 | `gp_Ax3`} object), the "main Axis" of which is the axis of the cylinder. This coordinate system is the "local coordinate system" of the cylinder. Note: when a {@link gp_Cylinder | `gp_Cylinder`} cylinder is converted into a {@link Geom_CylindricalSurface | `Geom_CylindricalSurface`} cylinder, some implicit properties of its local coordinate system are used explicitly: + * + * - its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the cylinder and the origin of the parameters, + * - its implicit orientation (right-handed or left-handed) gives an orientation (direct or indirect) to the {@link Geom_CylindricalSurface | `Geom_CylindricalSurface`} cylinder. See Also {@link gce_MakeCylinder | `gce_MakeCylinder`} which provides functions for more complex cylinder constructions {@link Geom_CylindricalSurface | `Geom_CylindricalSurface`} which provides additional functions for constructing cylinders and works, in particular, with the parametric equations of cylinders {@link gp_Ax3 | `gp_Ax3`} + */ +export declare class gp_Cylinder { + /** + * Creates a indefinite cylinder. + */ + constructor(); + /** + * Creates a cylinder of radius Radius, whose axis is the "main Axis" of theA3. theA3 is the local coordinate system of the cylinder. Raises ConstructionErrord if theRadius < 0.0. + */ + constructor(theA3: gp_Ax3, theRadius: number); + /** + * Changes the symmetry axis of the cylinder. Raises ConstructionError if the direction of theA1 is parallel to the "XDirection" of the coordinate system of the cylinder. + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Changes the location of the surface. + */ + SetLocation(theLoc: gp_Pnt): void; + /** + * Change the local coordinate system of the surface. + */ + SetPosition(theA3: gp_Ax3): void; + /** + * Modifies the radius of this cylinder. Exceptions Standard_ConstructionError if theR is negative. + */ + SetRadius(theR: number): void; + /** + * Reverses the U parametrization of the cylinder reversing the YAxis. + */ + UReverse(): void; + /** + * Reverses the V parametrization of the plane reversing the Axis. + */ + VReverse(): void; + /** + * Returns true if the local coordinate system of this cylinder is right-handed. + */ + Direct(): boolean; + /** + * Returns the symmetry axis of the cylinder. + */ + Axis(): gp_Ax1; + /** + * Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate system : theA1.X**2 + theA2.Y**2 + theA3.Z**2 + 2.(theB1.X.Y + theB2.X.Z + theB3.Y.Z) + 2.(theC1.X + theC2.Y + theC3.Z) + theD = 0.0. + * @returns A result object with fields: + * - `theA1`: updated value from the call. + * - `theA2`: updated value from the call. + * - `theA3`: updated value from the call. + * - `theB1`: updated value from the call. + * - `theB2`: updated value from the call. + * - `theB3`: updated value from the call. + * - `theC1`: updated value from the call. + * - `theC2`: updated value from the call. + * - `theC3`: updated value from the call. + * - `theD`: updated value from the call. + */ + Coefficients(theA1?: number, theA2?: number, theA3?: number, theB1?: number, theB2?: number, theB3?: number, theC1?: number, theC2?: number, theC3?: number, theD?: number): { theA1: number; theA2: number; theA3: number; theB1: number; theB2: number; theB3: number; theC1: number; theC2: number; theC3: number; theD: number }; + /** + * Returns the "Location" point of the cylinder. + */ + Location(): gp_Pnt; + /** + * Returns the local coordinate system of the cylinder. + */ + Position(): gp_Ax3; + /** + * Returns the radius of the cylinder. + */ + Radius(): number; + /** + * Returns the axis X of the cylinder. + */ + XAxis(): gp_Ax1; + /** + * Returns the axis Y of the cylinder. + */ + YAxis(): gp_Ax1; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a cylinder with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt): gp_Cylinder; + /** + * Performs the symmetrical transformation of a cylinder with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Cylinder; + /** + * Performs the symmetrical transformation of a cylinder with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Cylinder; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a cylinder. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Cylinder; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Scales a cylinder. theS is the scaling value. The absolute value of theS is used to scale the cylinder. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Cylinder; + Transform(theT: gp_Trsf): void; + /** + * Transforms a cylinder with the transformation theT from class Trsf. + */ + Transformed(theT: gp_Trsf): gp_Cylinder; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates a cylinder in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Cylinder; + /** + * Translates a cylinder from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Cylinder; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a unit vector in the plane (2`D` space). This unit vector is also called "Direction". See Also {@link gce_MakeDir2d | `gce_MakeDir2d`} which provides functions for more complex unit vector constructions {@link Geom2d_Direction | `Geom2d_Direction`} which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors. + */ +export declare class gp_Dir2d { + /** + * Creates a direction corresponding to X axis. + */ + constructor(); + /** + * Creates a direction from a standard direction enumeration. + */ + constructor(theDir: gp_Dir2d_D); + /** + * Normalizes the vector theV and creates a Direction. Raises ConstructionError if theV.Magnitude() <= Resolution from gp. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theV: gp_Vec2d); + /** + * Creates a Direction from a doublet of coordinates. Raises ConstructionError if theCoord.Modulus() <= Resolution from gp. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theCoord: gp_XY); + /** + * Creates a Direction with its 2 cartesian coordinates. Raises ConstructionError if std::sqrt(theXv*theXv + theYv*theYv) <= Resolution from gp. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + constructor(theXv: number, theYv: number); + /** + * For this unit vector, assigns: the value theXi to: + * + * - the X coordinate if theIndex is 1, or + * - the Y coordinate if theIndex is 2, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * - std::sqrt(theXv*theXv + theYv*theYv), or + * - the modulus of the number pair formed by the new value theXi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if theIndex != {1, 2}. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this unit vector, assigns: + * + * - the values theXv and theYv to its two coordinates, Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * - std::sqrt(theXv*theXv + theYv*theYv), or + * - the modulus of the number pair formed by the new value Xi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if theIndex != {1, 2}. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + SetCoord(theXv: number, theYv: number): void; + /** + * Assigns the given value to the X coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * + * - the modulus of Coord, or + * - the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * + * - the modulus of Coord, or + * - the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified. + * @remarks **Note:** Constexpr-compatible when result is already normalized. + */ + SetY(theY: number): void; + /** + * Assigns: + * + * - the two coordinates of theCoord to this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to `gp::Resolution()`: + * - the modulus of theCoord, or + * - the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified. + * @remarks **Note:** Constexpr-compatible when input is already normalized. + */ + SetXY(theCoord: gp_XY): void; + /** + * For this unit vector returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}. + */ + Coord(theIndex: number): number; + /** + * For this unit vector returns its two coordinates theXv and theYv. Raises OutOfRange if theIndex != {1, 2}. + * @returns A result object with fields: + * - `theXv`: updated value from the call. + * - `theYv`: updated value from the call. + */ + Coord(theXv?: number, theYv?: number): { theXv: number; theYv: number }; + /** + * For this unit vector, returns its X coordinate. + */ + X(): number; + /** + * For this unit vector, returns its Y coordinate. + */ + Y(): number; + /** + * For this unit vector, returns its two coordinates as a number pair. Comparison between Directions The precision value is an input data. + */ + XY(): gp_XY; + /** + * Returns True if the two vectors have the same direction i.e. the angle between this unit vector and the unit vector theOther is less than or equal to theAngularTolerance. + */ + IsEqual(theOther: gp_Dir2d, theAngularTolerance: number): boolean; + /** + * Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi/2 or -Pi/2 (normal) i.e. std::abs(std::abs(.Angle(theOther)) - PI/2.) <= theAngularTolerance. + */ + IsNormal(theOther: gp_Dir2d, theAngularTolerance: number): boolean; + /** + * Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi or -Pi (opposite). i.e. PI - std::abs(.Angle(theOther)) <= theAngularTolerance. + */ + IsOpposite(theOther: gp_Dir2d, theAngularTolerance: number): boolean; + /** + * Returns True if the angle between this unit vector and unit vector theOther is equal to 0, Pi or -Pi. i.e. std::abs(Angle(, theOther)) <= theAngularTolerance or PI - std::abs(Angle(, theOther)) <= theAngularTolerance. + */ + IsParallel(theOther: gp_Dir2d, theAngularTolerance: number): boolean; + /** + * Computes the angular value in radians between and . Returns the angle in the range [-PI, PI]. + */ + Angle(theOther: gp_Dir2d): number; + /** + * Computes the cross product between two directions. + */ + Crossed(theRight: gp_Dir2d): number; + /** + * Computes the scalar product. + */ + Dot(theOther: gp_Dir2d): number; + Reverse(): void; + /** + * Reverses the orientation of a direction. + */ + Reversed(): gp_Dir2d; + Mirror(theV: gp_Dir2d): void; + Mirror(theA: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of a direction with respect to the direction theV which is the center of the symmetry. + */ + Mirrored(theV: gp_Dir2d): gp_Dir2d; + /** + * Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA: gp_Ax2d): gp_Dir2d; + Rotate(Ang: number): void; + /** + * Rotates a direction. theAng is the angular value of the rotation in radians. + */ + Rotated(theAng: number): gp_Dir2d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms a direction with the "Trsf" theT. Warnings : If the scale factor of the "Trsf" theT is negative then the direction is reversed. + */ + Transformed(theT: gp_Trsf2d): gp_Dir2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type gp_Dir2d_D = typeof gp_Dir2d_D[keyof typeof gp_Dir2d_D]; +/** + * {@link Standard | `Standard`} directions in 2`D` space for optimized constexpr construction. + */ +export declare const gp_Dir2d_D: { + /** + * Direction along positive X axis (1, 0). + */ + readonly X: 'X'; + /** + * Direction along positive Y axis (0, 1). + */ + readonly Y: 'Y'; + /** + * Direction along negative X axis (-1, 0). + */ + readonly NX: 'NX'; + /** + * Direction along negative Y axis (0, -1). + */ + readonly NY: 'NY'; +}; + +/** + * Describes a circle in 3D space. A circle is defined by its radius and positioned in space with a coordinate system (a {@link gp_Ax2 | `gp_Ax2`} object) as follows: + * + * - the origin of the coordinate system is the center of the circle, and + * - the origin, "X Direction" and "Y Direction" of the coordinate system define the plane of the circle. This positioning coordinate system is the "local coordinate system" of the circle. Its "main Direction" gives the normal vector to the plane of the circle. The "main Axis" of the coordinate system is referred to as the "Axis" of the circle. Note: when a {@link gp_Circ | `gp_Circ`} circle is converted into a {@link Geom_Circle | `Geom_Circle`} circle, some implicit properties of the circle are used explicitly: + * - the "main Direction" of the local coordinate system gives an implicit orientation to the circle (and defines its trigonometric sense), + * - this orientation corresponds to the direction in which parameter values increase, + * - the starting point for parameterization is that of the "X Axis" of the local coordinate system (i.e. the "X Axis" of the circle). See Also {@link gce_MakeCirc | `gce_MakeCirc`} which provides functions for more complex circle constructions {@link Geom_Circle | `Geom_Circle`} which provides additional functions for constructing circles and works, in particular, with the parametric equations of circles + */ +export declare class gp_Circ { + /** + * Creates an indefinite circle. + */ + constructor(); + /** + * A2 locates the circle and gives its orientation in 3D space. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0. + */ + constructor(theA2: gp_Ax2, theRadius: number); + /** + * Changes the main axis of the circle. It is the axis perpendicular to the plane of the circle. Raises ConstructionError if the direction of theA1 is parallel to the "XAxis" of the circle. + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Changes the "Location" point (center) of the circle. + */ + SetLocation(theP: gp_Pnt): void; + /** + * Changes the position of the circle. + */ + SetPosition(theA2: gp_Ax2): void; + /** + * Modifies the radius of this circle. Warning: This class does not prevent the creation of a circle where theRadius is null. Exceptions Standard_ConstructionError if theRadius is negative. + */ + SetRadius(theRadius: number): void; + /** + * Computes the area of the circle. + */ + Area(): number; + /** + * Returns the main axis of the circle. It is the axis perpendicular to the plane of the circle, passing through the "Location" point (center) of the circle. + */ + Axis(): gp_Ax1; + /** + * Computes the circumference of the circle. + */ + Length(): number; + /** + * Returns the center of the circle. It is the "Location" point of the local coordinate system of the circle. + */ + Location(): gp_Pnt; + /** + * Returns the position of the circle. It is the local coordinate system of the circle. + */ + Position(): gp_Ax2; + /** + * Returns the radius of this circle. + */ + Radius(): number; + /** + * Returns the "XAxis" of the circle. This axis is perpendicular to the axis of the conic. This axis and the "Yaxis" define the plane of the conic. + */ + XAxis(): gp_Ax1; + /** + * Returns the "YAxis" of the circle. This axis and the "Xaxis" define the plane of the conic. The "YAxis" is perpendicular to the "Xaxis". + */ + YAxis(): gp_Ax1; + /** + * Computes the minimum of distance between the point theP and any point on the circumference of the circle. + */ + Distance(theP: gp_Pnt): number; + /** + * Computes the square distance between and the point theP. + */ + SquareDistance(theP: gp_Pnt): number; + /** + * Returns True if the point theP is on the circumference. The distance between and must be lower or equal to theLinearTolerance. + */ + Contains(theP: gp_Pnt, theLinearTolerance: number): boolean; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a circle with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt): gp_Circ; + /** + * Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Circ; + /** + * Performs the symmetrical transformation of a circle with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Circ; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a circle. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Circ; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Scales a circle. theS is the scaling value. Warnings : If theS is negative the radius stay positive but the "XAxis" and the "YAxis" are reversed as for an ellipse. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Circ; + Transform(theT: gp_Trsf): void; + /** + * Transforms a circle with the transformation theT from class Trsf. + */ + Transformed(theT: gp_Trsf): gp_Circ; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates a circle in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Circ; + /** + * Translates a circle from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Circ; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an axis in the plane (2D space). An axis is defined by: + * + * - its origin (also referred to as its "Location point"), and + * - its unit vector (referred to as its "Direction"). An axis implicitly defines a direct, right-handed coordinate system in 2D space by: + * - its origin, + * - its "Direction" (giving the "X Direction" of the coordinate system), and + * - the unit vector normal to "Direction" (positive angle measured in the trigonometric sense). An axis is used: + * - to describe 2D geometric entities (for example, the axis which defines angular coordinates on a circle). It serves for the same purpose as the STEP function "axis placement one axis", or + * - to define geometric transformations (axis of symmetry, axis of rotation, and so on). Note: to define a left-handed 2D coordinate system, use {@link gp_Ax22d | `gp_Ax22d`}. + */ +export declare class gp_Ax2d { + /** + * Creates an axis object representing X axis of the reference coordinate system. + */ + constructor(); + /** + * Creates an axis at the origin with the given standard direction. Replaces `gp::OX2d()`, `gp::OY2d()` static functions. + */ + constructor(theDir: gp_Dir2d_D); + /** + * Creates an Ax2d. is the "Location" point of the axis placement and theV is the "Direction" of the axis placement. + */ + constructor(theP: gp_Pnt2d, theV: gp_Dir2d); + /** + * Creates an axis with the given location point and standard direction. + */ + constructor(theP: gp_Pnt2d, theDir: gp_Dir2d_D); + /** + * Changes the "Location" point (origin) of . + */ + SetLocation(theP: gp_Pnt2d): void; + /** + * Changes the direction of . + */ + SetDirection(theV: gp_Dir2d): void; + /** + * Returns the origin of . + */ + Location(): gp_Pnt2d; + /** + * Returns the direction of . + */ + Direction(): gp_Dir2d; + /** + * Returns True if: . the angle between and is lower or equal to and . the distance between .`Location()` and is lower or equal to and . the distance between .`Location()` and is lower or equal to LinearTolerance. + */ + IsCoaxial(Other: gp_Ax2d, AngularTolerance: number, LinearTolerance: number): boolean; + /** + * Returns true if this axis and the axis theOther are normal to each other. That is, if the angle between the two axes is equal to Pi/2 or -Pi/2. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsNormal(theOther: gp_Ax2d, theAngularTolerance: number): boolean; + /** + * Returns true if this axis and the axis theOther are parallel, and have opposite orientations. That is, if the angle between the two axes is equal to Pi or -Pi. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsOpposite(theOther: gp_Ax2d, theAngularTolerance: number): boolean; + /** + * Returns true if this axis and the axis theOther are parallel, and have either the same or opposite orientations. That is, if the angle between the two axes is equal to 0, Pi or -Pi. Note: the tolerance criterion is given by theAngularTolerance. + */ + IsParallel(theOther: gp_Ax2d, theAngularTolerance: number): boolean; + /** + * Computes the angle, in radians, between this axis and the axis theOther. The value of the angle is between -Pi and Pi. + */ + Angle(theOther: gp_Ax2d): number; + /** + * Reverses the direction of and assigns the result to this axis. + */ + Reverse(): void; + /** + * Computes a new axis placement with a direction opposite to the direction of . + */ + Reversed(): gp_Ax2d; + Mirror(P: gp_Pnt2d): void; + Mirror(A: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry. + */ + Mirrored(P: gp_Pnt2d): gp_Ax2d; + /** + * Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(A: gp_Ax2d): gp_Ax2d; + Rotate(theP: gp_Pnt2d, theAng: number): void; + /** + * Rotates an axis placement. is the center of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theP: gp_Pnt2d, theAng: number): gp_Ax2d; + Scale(P: gp_Pnt2d, S: number): void; + /** + * Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. The "Direction" is reversed if the scale is negative. + */ + Scaled(theP: gp_Pnt2d, theS: number): gp_Ax2d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms an axis placement with a Trsf. + */ + Transformed(theT: gp_Trsf2d): gp_Ax2d; + Translate(theV: gp_Vec2d): void; + Translate(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + /** + * Translates an axis placement in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec2d): gp_Ax2d; + /** + * Translates an axis placement from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Ax2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a sphere. A sphere is defined by its radius and positioned in space with a coordinate system (a {@link gp_Ax3 | `gp_Ax3`} object). The origin of the coordinate system is the center of the sphere. This coordinate system is the "local coordinate system" of the sphere. Note: when a {@link gp_Sphere | `gp_Sphere`} sphere is converted into a {@link Geom_SphericalSurface | `Geom_SphericalSurface`} sphere, some implicit properties of its local coordinate system are used explicitly: + * + * - its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the sphere and the origin of the parameters, + * - its implicit orientation (right-handed or left-handed) gives the orientation (direct, indirect) to the {@link Geom_SphericalSurface | `Geom_SphericalSurface`} sphere. See Also gce_MakeSphere which provides functions for more complex sphere constructions {@link Geom_SphericalSurface | `Geom_SphericalSurface`} which provides additional functions for constructing spheres and works, in particular, with the parametric equations of spheres. + */ +export declare class gp_Sphere { + /** + * Creates an indefinite sphere. + */ + constructor(); + /** + * Constructs a sphere with radius theRadius, centered on the origin of theA3. theA3 is the local coordinate system of the sphere. Warnings: It is not forbidden to create a sphere with null radius. Raises ConstructionError if theRadius < 0.0. + */ + constructor(theA3: gp_Ax3, theRadius: number); + /** + * Changes the center of the sphere. + */ + SetLocation(theLoc: gp_Pnt): void; + /** + * Changes the local coordinate system of the sphere. + */ + SetPosition(theA3: gp_Ax3): void; + /** + * Assigns theR the radius of the Sphere. Warnings : It is not forbidden to create a sphere with null radius. Raises ConstructionError if theR < 0.0. + */ + SetRadius(theR: number): void; + /** + * Computes the area of the sphere. + */ + Area(): number; + /** + * Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : + * + * ``` + * theA1.X**2+theA2.Y**2+theA3.Z**2+2.(theB1.X.Y+theB2.X.Z+theB3.Y.Z)+ 2.(theC1.X+theC2.Y+theC3.Z)+theD=0.0 + * ``` + * @returns A result object with fields: + * - `theA1`: updated value from the call. + * - `theA2`: updated value from the call. + * - `theA3`: updated value from the call. + * - `theB1`: updated value from the call. + * - `theB2`: updated value from the call. + * - `theB3`: updated value from the call. + * - `theC1`: updated value from the call. + * - `theC2`: updated value from the call. + * - `theC3`: updated value from the call. + * - `theD`: updated value from the call. + */ + Coefficients(theA1?: number, theA2?: number, theA3?: number, theB1?: number, theB2?: number, theB3?: number, theC1?: number, theC2?: number, theC3?: number, theD?: number): { theA1: number; theA2: number; theA3: number; theB1: number; theB2: number; theB3: number; theC1: number; theC2: number; theC3: number; theD: number }; + /** + * Reverses the U parametrization of the sphere reversing the YAxis. + */ + UReverse(): void; + /** + * Reverses the V parametrization of the sphere reversing the ZAxis. + */ + VReverse(): void; + /** + * Returns true if the local coordinate system of this sphere is right-handed. + */ + Direct(): boolean; + /** + * -- Purpose ; Returns the center of the sphere. + */ + Location(): gp_Pnt; + /** + * Returns the local coordinates system of the sphere. + */ + Position(): gp_Ax3; + /** + * Returns the radius of the sphere. + */ + Radius(): number; + /** + * Computes the volume of the sphere. + */ + Volume(): number; + /** + * Returns the axis X of the sphere. + */ + XAxis(): gp_Ax1; + /** + * Returns the axis Y of the sphere. + */ + YAxis(): gp_Ax1; + Mirror(theP: gp_Pnt): void; + Mirror(theA1: gp_Ax1): void; + Mirror(theA2: gp_Ax2): void; + /** + * Performs the symmetrical transformation of a sphere with respect to the point theP which is the center of the symmetry. + */ + Mirrored(theP: gp_Pnt): gp_Sphere; + /** + * Performs the symmetrical transformation of a sphere with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax1): gp_Sphere; + /** + * Performs the symmetrical transformation of a sphere with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection). + */ + Mirrored(theA2: gp_Ax2): gp_Sphere; + Rotate(theA1: gp_Ax1, theAng: number): void; + /** + * Rotates a sphere. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. + */ + Rotated(theA1: gp_Ax1, theAng: number): gp_Sphere; + Scale(theP: gp_Pnt, theS: number): void; + /** + * Scales a sphere. theS is the scaling value. The absolute value of S is used to scale the sphere. + */ + Scaled(theP: gp_Pnt, theS: number): gp_Sphere; + Transform(theT: gp_Trsf): void; + /** + * Transforms a sphere with the transformation theT from class Trsf. + */ + Transformed(theT: gp_Trsf): gp_Sphere; + Translate(theV: gp_Vec): void; + Translate(theP1: gp_Pnt, theP2: gp_Pnt): void; + /** + * Translates a sphere in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. + */ + Translated(theV: gp_Vec): gp_Sphere; + /** + * Translates a sphere from the point theP1 to the point theP2. + */ + Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Sphere; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent vector in 2D space. + */ +export declare class gp_Vec2d { + /** + * Creates a zero vector. + */ + constructor(); + /** + * Creates a unitary vector from a direction theV. + */ + constructor(theV: gp_Dir2d); + /** + * Creates a vector with a doublet of coordinates. + */ + constructor(theCoord: gp_XY); + /** + * Creates a point with its two Cartesian coordinates. + */ + constructor(theXv: number, theYv: number); + /** + * Creates a vector from two points. The length of the vector is the distance between theP1 and theP2. + */ + constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d); + /** + * Changes the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}. + */ + SetCoord(theIndex: number, theXi: number): void; + /** + * For this vector, assigns the values theXv and theYv to its two coordinates. + */ + SetCoord(theXv: number, theYv: number): void; + /** + * Assigns the given value to the X coordinate of this vector. + */ + SetX(theX: number): void; + /** + * Assigns the given value to the Y coordinate of this vector. + */ + SetY(theY: number): void; + /** + * Assigns the two coordinates of theCoord to this vector. + */ + SetXY(theCoord: gp_XY): void; + /** + * Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raised if theIndex != {1, 2}. + */ + Coord(theIndex: number): number; + /** + * For this vector, returns its two coordinates theXv and theYv. + * @returns A result object with fields: + * - `theXv`: updated value from the call. + * - `theYv`: updated value from the call. + */ + Coord(theXv?: number, theYv?: number): { theXv: number; theYv: number }; + /** + * For this vector, returns its X coordinate. + */ + X(): number; + /** + * For this vector, returns its Y coordinate. + */ + Y(): number; + /** + * For this vector, returns its two coordinates as a number pair. + */ + XY(): gp_XY; + /** + * Returns True if the two vectors have the same magnitude value and the same direction. The precision values are theLinearTolerance for the magnitude and theAngularTolerance for the direction. + */ + IsEqual(theOther: gp_Vec2d, theLinearTolerance: number, theAngularTolerance: number): boolean; + /** + * Returns True if abs(std::abs(.Angle(theOther)) - PI/2.) <= theAngularTolerance Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or theOther.Magnitude() <= Resolution from gp. + */ + IsNormal(theOther: gp_Vec2d, theAngularTolerance: number): boolean; + /** + * Returns True if PI - std::abs(.Angle(theOther)) <= theAngularTolerance Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or theOther.Magnitude() <= Resolution from gp. + */ + IsOpposite(theOther: gp_Vec2d, theAngularTolerance: number): boolean; + /** + * Returns true if std::abs(Angle(, theOther)) <= theAngularTolerance or PI - std::abs(Angle(, theOther)) <= theAngularTolerance Two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution or theOther.Magnitude() <= Resolution from gp. + */ + IsParallel(theOther: gp_Vec2d, theAngularTolerance: number): boolean; + /** + * Computes the angular value between and returns the angle value between -PI and PI in radian. The orientation is from to theOther. The positive sense is the trigonometric sense. Raises VectorWithNullMagnitude if .`Magnitude()` <= Resolution from gp or theOther.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude. + */ + Angle(theOther: gp_Vec2d): number; + /** + * Computes the magnitude of this vector. + */ + Magnitude(): number; + /** + * Computes the square magnitude of this vector. + */ + SquareMagnitude(): number; + Add(theOther: gp_Vec2d): void; + /** + * Adds two vectors. + */ + Added(theOther: gp_Vec2d): gp_Vec2d; + /** + * Computes the crossing product between two vectors. + */ + Crossed(theRight: gp_Vec2d): number; + /** + * Computes the magnitude of the cross product between and theRight. Returns || ^ theRight ||. + */ + CrossMagnitude(theRight: gp_Vec2d): number; + /** + * Computes the square magnitude of the cross product between and theRight. Returns || ^ theRight ||**2. + */ + CrossSquareMagnitude(theRight: gp_Vec2d): number; + Divide(theScalar: number): void; + /** + * divides a vector by a scalar + */ + Divided(theScalar: number): gp_Vec2d; + /** + * Computes the scalar product. + */ + Dot(theOther: gp_Vec2d): number; + GetNormal(): gp_Vec2d; + Multiply(theScalar: number): void; + /** + * Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp. + */ + Multiplied(theScalar: number): gp_Vec2d; + Normalize(): void; + /** + * Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp. Reverses the direction of a vector. + */ + Normalized(): gp_Vec2d; + Reverse(): void; + /** + * Reverses the direction of a vector. + */ + Reversed(): gp_Vec2d; + /** + * Subtracts two vectors. + */ + Subtract(theRight: gp_Vec2d): void; + /** + * Subtracts two vectors. + */ + Subtracted(theRight: gp_Vec2d): gp_Vec2d; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theV3 + */ + SetLinearForm(theA1: number, theV1: gp_Vec2d, theA2: number, theV2: gp_Vec2d, theV3: gp_Vec2d): void; + /** + * is set to the following linear form : theA1 * theV1 + theA2 * theV2 + */ + SetLinearForm(theA1: number, theV1: gp_Vec2d, theA2: number, theV2: gp_Vec2d): void; + /** + * is set to the following linear form : theA1 * theV1 + theV2 + */ + SetLinearForm(theA1: number, theV1: gp_Vec2d, theV2: gp_Vec2d): void; + /** + * is set to the following linear form : theV1 + theV2 + */ + SetLinearForm(theV1: gp_Vec2d, theV2: gp_Vec2d): void; + /** + * Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry. + */ + Mirror(theV: gp_Vec2d): void; + /** + * Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry. + */ + Mirror(theA1: gp_Ax2d): void; + /** + * Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry. + */ + Mirrored(theV: gp_Vec2d): gp_Vec2d; + /** + * Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry. + */ + Mirrored(theA1: gp_Ax2d): gp_Vec2d; + Rotate(theAng: number): void; + /** + * Rotates a vector. theAng is the angular value of the rotation in radians. + */ + Rotated(theAng: number): gp_Vec2d; + Scale(theS: number): void; + /** + * Scales a vector. theS is the scaling value. + */ + Scaled(theS: number): gp_Vec2d; + Transform(theT: gp_Trsf2d): void; + /** + * Transforms a vector with a Trsf from gp. + */ + Transformed(theT: gp_Trsf2d): gp_Vec2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent transformation in 2D space. The following transformations are implemented : + * + * - Translation, Rotation, Scale + * - Symmetry with respect to a point and a line. Complex transformations can be obtained by combining the previous elementary transformations using the method Multiply. The transformations can be represented as follow : V1V2TXYXY |a11a12a13||`x`||`x`'| |a21a22a23||y||y'| |001||1||1| where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects. + */ +export declare class gp_Trsf2d { + /** + * Returns identity transformation. + */ + constructor(); + /** + * Creates a 2d transformation in the XY plane from a 3d transformation . + */ + constructor(theT: gp_Trsf); + /** + * Changes the transformation into a symmetrical transformation. theP is the center of the symmetry. + */ + SetMirror(theP: gp_Pnt2d): void; + /** + * Changes the transformation into a symmetrical transformation. theA is the center of the axial symmetry. + */ + SetMirror(theA: gp_Ax2d): void; + /** + * Changes the transformation into a rotation. theP is the rotation's center and theAng is the angular value of the rotation in radian. + */ + SetRotation(theP: gp_Pnt2d, theAng: number): void; + /** + * Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value. + */ + SetScale(theP: gp_Pnt2d, theS: number): void; + /** + * Changes a transformation allowing passage from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2". + */ + SetTransformation(theFromSystem1: gp_Ax2d, theToSystem2: gp_Ax2d): void; + /** + * Changes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.)} to the local coordinate system defined with the Ax2d theToSystem. + */ + SetTransformation(theToSystem: gp_Ax2d): void; + /** + * Changes the transformation into a translation. theV is the vector of the translation. + */ + SetTranslation(theV: gp_Vec2d): void; + /** + * Makes the transformation into a translation from the point theP1 to the point theP2. + */ + SetTranslation(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; + /** + * Replaces the translation vector with theV. + */ + SetTranslationPart(theV: gp_Vec2d): void; + /** + * Modifies the scale factor. + */ + SetScaleFactor(theS: number): void; + /** + * Returns true if the determinant of the vectorial part of this transformation is negative.. + */ + IsNegative(): boolean; + /** + * Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror (relative to a point or an axis), a scaling transformation, or a compound transformation. + */ + Form(): unknown; + /** + * Returns the scale factor. + */ + ScaleFactor(): number; + /** + * Returns the translation part of the transformation's matrix. + */ + TranslationPart(): gp_XY; + /** + * Returns the vectorial part of the transformation. It is a 2*2 matrix which includes the scale factor. + */ + VectorialPart(): unknown; + /** + * Returns the homogeneous vectorial part of the transformation. It is a 2*2 matrix which doesn't include the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation. + */ + HVectorialPart(): unknown; + /** + * Returns the angle corresponding to the rotational component of the transformation matrix (operation opposite to `SetRotation()`). + */ + RotationPart(): number; + /** + * Returns the coefficients of the transformation's matrix. It is a 2 rows * 3 columns matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3. + */ + Value(theRow: number, theCol: number): number; + Invert(): void; + /** + * Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible, it means that the scale factor is lower or equal to Resolution from package gp. + */ + Inverted(): gp_Trsf2d; + Multiplied(theT: gp_Trsf2d): gp_Trsf2d; + /** + * Computes the transformation composed from and theT. = * theT. + */ + Multiply(theT: gp_Trsf2d): void; + /** + * Computes the transformation composed from and theT. = theT * . + */ + PreMultiply(theT: gp_Trsf2d): void; + Power(theN: number): void; + /** + * Computes the following composition of transformations * * .......* , theN time. if theN = 0 = Identity if theN < 0 = .Inverse() *...........* .Inverse(). + * + * Raises if theN < 0 and if the matrix of the transformation not inversible. + */ + Powered(theN: number): gp_Trsf2d; + Transforms(theX?: number, theY?: number): { theX: number; theY: number }; + /** + * Transforms a doublet XY with a Trsf2d. + * @param theCoord Mutated in place; read the updated value from this argument after the call. + */ + Transforms(theCoord: gp_XY): void; + /** + * Sets the coefficients of the transformation. The transformation of the point x,y is the point x',y' with : + * + * ``` + * x'=a11x+a12y+a13 y'=a21x+a22y+a23 + * ``` + * + * The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. If the matrix as not a uniform scale it will be orthogonalized before future using. + */ + SetValues(a11: number, a12: number, a13: number, a21: number, a22: number, a23: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a non-persistent transformation in 3D space. This transformation is a general transformation. It can be a {@link gp_Trsf | `gp_Trsf`}, an affinity, or you can define your own transformation giving the matrix of transformation. + * + * With a {@link gp_GTrsf | `gp_GTrsf`} you can transform only a triplet of coordinates {@link gp_XYZ | `gp_XYZ`}. It is not possible to transform other geometric objects because these transformations can change the nature of non-elementary geometric objects. The transformation {@link gp_GTrsf | `gp_GTrsf`} can be represented as follow: + * + * ``` + * V1V2V3TXYZXYZ |a11a12a13a14||x||x'| |a21a22a23a24||y||y'| |a31a32a33a34||z|=|z'| |0001||1||1| + * ``` + * + * where {V1, V2, V3} define the vectorial part of the transformation and T defines the translation part of the transformation. Warning A {@link gp_GTrsf | `gp_GTrsf`} transformation is only applicable to coordinates. + * Be careful if you apply such a transformation to all points of a geometric object, as this can change the nature of the object and thus render it incoherent! Typically, a circle is transformed into an ellipse by an affinity transformation. + * To avoid modifying the nature of an object, use a {@link gp_Trsf | `gp_Trsf`} transformation instead, as objects of this class respect the nature of geometric objects. + */ +export declare class gp_GTrsf { + /** + * Returns the Identity transformation. + */ + constructor(); + /** + * Converts the {@link gp_Trsf | `gp_Trsf`} transformation theT into a general transformation, i.e. Returns a GTrsf with the same matrix of coefficients as the Trsf theT. + */ + constructor(theT: gp_Trsf); + /** + * Creates a transformation based on the matrix theM and the vector theV where theM defines the vectorial part of the transformation, and V the translation part, or. + */ + constructor(theM: unknown, theV: gp_XYZ); + /** + * Changes this transformation into an affinity of ratio theRatio with respect to the axis theA1. Note: an affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis theA1 or the plane A2, the vectors HP and HP' satisfy: HP' = theRatio * HP. + */ + SetAffinity(theA1: gp_Ax1, theRatio: number): void; + /** + * Changes this transformation into an affinity of ratio theRatio with respect to the plane defined by the origin, the "X Direction" and the "Y Direction" of coordinate system theA2. Note: an affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis A1 or the plane theA2, the vectors HP and HP' satisfy: HP' = theRatio * HP. + */ + SetAffinity(theA2: gp_Ax2, theRatio: number): void; + /** + * Replaces the coefficient (theRow, theCol) of the matrix representing this transformation by theValue. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4. + */ + SetValue(theRow: number, theCol: number, theValue: number): void; + /** + * Replaces the vectorial part of this transformation by theMatrix. + */ + SetVectorialPart(theMatrix: unknown): void; + /** + * Replaces the translation part of this transformation by the coordinates of the number triple theCoord. + */ + SetTranslationPart(theCoord: gp_XYZ): void; + /** + * Assigns the vectorial and translation parts of theT to this transformation. + */ + SetTrsf(theT: gp_Trsf): void; + /** + * Returns true if the determinant of the vectorial part of this transformation is negative. + */ + IsNegative(): boolean; + /** + * Returns true if this transformation is singular (and therefore, cannot be inverted). Note: The Gauss LU decomposition is used to invert the transformation matrix. Consequently, the transformation is considered as singular if the largest pivot found is less than or equal to `gp::Resolution()`. Warning If this transformation is singular, it cannot be inverted. + */ + IsSingular(): boolean; + /** + * Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror transformation (relative to a point, an axis or a plane), a scaling transformation, a compound transformation or some other type of transformation. + */ + Form(): unknown; + /** + * verify and set the shape of the GTrsf Other or CompoundTrsf Ex : + * + * ``` + * myGTrsf.SetValue(row1,col1,val1); myGTrsf.SetValue(row2,col2,val2); ... myGTrsf.SetForm(); + * ``` + */ + SetForm(): void; + /** + * Returns the translation part of the GTrsf. + */ + TranslationPart(): gp_XYZ; + /** + * Computes the vectorial part of the GTrsf. The returned Matrix is a 3*3 matrix. + */ + VectorialPart(): unknown; + /** + * Returns the coefficients of the global matrix of transformation. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4. + */ + Value(theRow: number, theCol: number): number; + Invert(): void; + /** + * Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible. + */ + Inverted(): gp_GTrsf; + /** + * Computes the transformation composed from theT and . In a C++ implementation you can also write Tcomposed = * theT. Example : + * + * ``` + * gp_GTrsfT1,T2,Tcomp;............... //composition: Tcomp=T2.Multiplied(T1);//or(Tcomp=T2*T1) //transformationofapoint gp_XYZP(10.,3.,4.); gp_XYZP1(P); Tcomp.Transforms(P1);//usingTcomp gp_XYZP2(P); T1.Transforms(P2);//usingT1thenT2 T2.Transforms(P2);//P1=P2!!! + * ``` + */ + Multiplied(theT: gp_GTrsf): gp_GTrsf; + /** + * Computes the transformation composed with and theT. = * theT. + */ + Multiply(theT: gp_GTrsf): void; + /** + * Computes the product of the transformation theT and this transformation and assigns the result to this transformation. this = theT * this. + */ + PreMultiply(theT: gp_GTrsf): void; + Power(theN: number): void; + /** + * Computes: + * + * - the product of this transformation multiplied by itself theN times, if theN is positive, or + * - the product of the inverse of this transformation multiplied by itself |theN| times, if theN is negative. If theN equals zero, the result is equal to the Identity transformation. I.e.: * * .......* , theN time. if theN =0 = Identity if theN < 0 = .Inverse() *...........* .Inverse(). + * + * Raises an exception if N < 0 and if the matrix of the transformation not inversible. + */ + Powered(theN: number): gp_GTrsf; + Transforms(theCoord: gp_XYZ): void; + /** + * Transforms a triplet XYZ with a GTrsf. + * @returns A result object with fields: + * - `theX`: updated value from the call. + * - `theY`: updated value from the call. + * - `theZ`: updated value from the call. + */ + Transforms(theX?: number, theY?: number, theZ?: number): { theX: number; theY: number; theZ: number }; + Trsf(): gp_Trsf; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type GeomAbs_SurfaceType = typeof GeomAbs_SurfaceType[keyof typeof GeomAbs_SurfaceType]; +export declare const GeomAbs_SurfaceType: { + readonly GeomAbs_Plane: 'GeomAbs_Plane'; + readonly GeomAbs_Cylinder: 'GeomAbs_Cylinder'; + readonly GeomAbs_Cone: 'GeomAbs_Cone'; + readonly GeomAbs_Sphere: 'GeomAbs_Sphere'; + readonly GeomAbs_Torus: 'GeomAbs_Torus'; + readonly GeomAbs_BezierSurface: 'GeomAbs_BezierSurface'; + readonly GeomAbs_BSplineSurface: 'GeomAbs_BSplineSurface'; + readonly GeomAbs_SurfaceOfRevolution: 'GeomAbs_SurfaceOfRevolution'; + readonly GeomAbs_SurfaceOfExtrusion: 'GeomAbs_SurfaceOfExtrusion'; + readonly GeomAbs_OffsetSurface: 'GeomAbs_OffsetSurface'; + readonly GeomAbs_OtherSurface: 'GeomAbs_OtherSurface'; +}; + +export type GeomAbs_JoinType = typeof GeomAbs_JoinType[keyof typeof GeomAbs_JoinType]; +/** + * Characterizes the type of a join, built by an algorithm for constructing parallel curves, between two consecutive arcs of a contour parallel to a given contour. + */ +export declare const GeomAbs_JoinType: { + readonly GeomAbs_Arc: 'GeomAbs_Arc'; + readonly GeomAbs_Tangent: 'GeomAbs_Tangent'; + readonly GeomAbs_Intersection: 'GeomAbs_Intersection'; +}; + +export type GeomAbs_CurveType = typeof GeomAbs_CurveType[keyof typeof GeomAbs_CurveType]; +/** + * Identifies the type of a curve. + */ +export declare const GeomAbs_CurveType: { + readonly GeomAbs_Line: 'GeomAbs_Line'; + readonly GeomAbs_Circle: 'GeomAbs_Circle'; + readonly GeomAbs_Ellipse: 'GeomAbs_Ellipse'; + readonly GeomAbs_Hyperbola: 'GeomAbs_Hyperbola'; + readonly GeomAbs_Parabola: 'GeomAbs_Parabola'; + readonly GeomAbs_BezierCurve: 'GeomAbs_BezierCurve'; + readonly GeomAbs_BSplineCurve: 'GeomAbs_BSplineCurve'; + readonly GeomAbs_OffsetCurve: 'GeomAbs_OffsetCurve'; + readonly GeomAbs_OtherCurve: 'GeomAbs_OtherCurve'; +}; + +export type GeomAbs_Shape = typeof GeomAbs_Shape[keyof typeof GeomAbs_Shape]; +/** + * Provides information about the continuity of a curve: + * + * - C0: only geometric continuity. + * - G1: for each point on the curve, the tangent vectors "on the right" and "on the left" are collinear with the same orientation. + * - C1: continuity of the first derivative. The "C1" curve is also "G1" but, in addition, the tangent vectors " on the right" and "on the left" are equal. + * - G2: for each point on the curve, the normalized normal vectors "on the right" and "on the left" are equal. + * - C2: continuity of the second derivative. + * - C3: continuity of the third derivative. + * - CN: continuity of the N-th derivative, whatever is the value given for N (infinite order of continuity). Also provides information about the continuity of a surface: + * - C0: only geometric continuity. + * - C1: continuity of the first derivatives; any isoparametric (in U or V) of a surface "C1" is also "C1". + * - G2: for BSpline curves only; "on the right" and "on the left" of a knot the computation of the "main curvature radii" and the "main directions" (when they exist) gives the same result. + * - C2: continuity of the second derivative. + * - C3: continuity of the third derivative. + * - CN: continuity of any N-th derivative, whatever is the value given for N (infinite order of continuity). We may also say that a surface is "Ci" in u, and "Cj" in v to indicate the continuity of its derivatives up to the order i in the u parametric direction, and j in the v parametric direction. + */ +export declare const GeomAbs_Shape: { + readonly GeomAbs_C0: 'GeomAbs_C0'; + readonly GeomAbs_G1: 'GeomAbs_G1'; + readonly GeomAbs_C1: 'GeomAbs_C1'; + readonly GeomAbs_G2: 'GeomAbs_G2'; + readonly GeomAbs_C2: 'GeomAbs_C2'; + readonly GeomAbs_C3: 'GeomAbs_C3'; + readonly GeomAbs_CN: 'GeomAbs_CN'; +}; + +/** + * Describes a bounding box in 2D space. A bounding box is parallel to the axes of the coordinates system. If it is finite, it is defined by the two intervals: + * + * - [ Xmin,Xmax ], and + * - [ Ymin,Ymax ]. A bounding box may be infinite (i.e. open) in one or more directions. It is said to be: + * - OpenXmin if it is infinite on the negative side of the "X Direction"; + * - OpenXmax if it is infinite on the positive side of the "X Direction"; + * - OpenYmin if it is infinite on the negative side of the "Y Direction"; + * - OpenYmax if it is infinite on the positive side of the "Y Direction"; + * - WholeSpace if it is infinite in all four directions. In this case, any point of the space is inside the box; + * - Void if it is empty. In this case, there is no point included in the box. A bounding box is defined by four bounds (Xmin, Xmax, Ymin and Ymax) which limit the bounding box if it is finite, six flags (OpenXmin, OpenXmax, OpenYmin, OpenYmax, WholeSpace and Void) which describe the bounding box if it is infinite or empty, and + * - a gap, which is included on both sides in any direction when consulting the finite bounds of the box. + */ +export declare class Bnd_Box2d { + constructor(); + /** + * Sets this bounding box so that it covers the whole 2D space, i.e. it is infinite in all directions. + */ + SetWhole(): void; + /** + * Sets this 2D bounding box so that it is empty. All points are outside a void box. + */ + SetVoid(): void; + /** + * Sets this 2D bounding box so that it bounds the point P. This involves first setting this bounding box to be void and then adding the point PThe rectangle bounds the point. + * + * . + */ + Set(thePnt: gp_Pnt2d): void; + /** + * Sets this 2D bounding box so that it bounds the half-line defined by point P and direction D, i.e. all points M defined by M=P+u*D, where u is greater than or equal to 0, are inside the bounding area. This involves first setting this 2D box to be void and then adding the half-line. + */ + Set(thePnt: gp_Pnt2d, theDir: gp_Dir2d): void; + /** + * Enlarges this 2D bounding box, if required, so that it contains at least: + * + * - interval [ aXmin,aXmax ] in the "X Direction", + * - interval [ aYmin,aYmax ] in the "Y Direction" + */ + Update(aXmin: number, aYmin: number, aXmax: number, aYmax: number): void; + /** + * Adds a point of coordinates (X,Y) to this bounding box. + */ + Update(X: number, Y: number): void; + /** + * Set the gap of this 2D bounding box to abs(Tol). + */ + SetGap(Tol: number): void; + /** + * Enlarges the box with a tolerance value. This means that the minimum values of its X and Y intervals of definition, when they are finite, are reduced by the absolute value of Tol, while the maximum values are increased by the same amount. + */ + Enlarge(theTol: number): void; + /** + * Returns the Xmin value (`IsOpenXmin()` ? -`Precision::Infinite()` : Xmin - `GetGap()`). + */ + GetXMin(): number; + /** + * Returns the Xmax value (`IsOpenXmax()` ? `Precision::Infinite()` : Xmax + `GetGap()`). + */ + GetXMax(): number; + /** + * Returns the Ymin value (`IsOpenYmin()` ? -`Precision::Infinite()` : Ymin - `GetGap()`). + */ + GetYMin(): number; + /** + * Returns the Ymax value (`IsOpenYmax()` ? `Precision::Infinite()` : Ymax + `GetGap()`). + */ + GetYMax(): number; + /** + * Returns the center of this 2D bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- `Precision::Infinite()`. Returns std::nullopt if the box is void. + */ + Center(): gp_Pnt2d | null | undefined; + /** + * The Box will be infinitely long in the Xmin direction. + */ + OpenXmin(): void; + /** + * The Box will be infinitely long in the Xmax direction. + */ + OpenXmax(): void; + /** + * The Box will be infinitely long in the Ymin direction. + */ + OpenYmin(): void; + /** + * The Box will be infinitely long in the Ymax direction. + */ + OpenYmax(): void; + /** + * Returns true if this bounding box is open in the Xmin direction. + */ + IsOpenXmin(): boolean; + /** + * Returns true if this bounding box is open in the Xmax direction. + */ + IsOpenXmax(): boolean; + /** + * Returns true if this bounding box is open in the Ymin direction. + */ + IsOpenYmin(): boolean; + /** + * Returns true if this bounding box is open in the Ymax direction. + */ + IsOpenYmax(): boolean; + /** + * Returns true if this bounding box is infinite in all 4 directions (Whole Space flag). + */ + IsWhole(): boolean; + /** + * Returns true if this 2D bounding box is empty (Void flag). + */ + IsVoid(): boolean; + /** + * Returns a bounding box which is the result of applying the transformation T to this bounding box. Warning Applying a geometric transformation (for example, a rotation) to a bounding box generally increases its dimensions. This is not optimal for algorithms which use it. + */ + Transformed(T: gp_Trsf2d): Bnd_Box2d; + /** + * Adds the 2d box to . + */ + Add(Other: Bnd_Box2d): void; + /** + * Adds the 2d point. + */ + Add(thePnt: gp_Pnt2d): void; + /** + * Extends the Box in the given Direction, i.e. adds a half-line. The box may become infinite in 1 or 2 directions. + */ + Add(D: gp_Dir2d): void; + /** + * Extends bounding box from thePnt in the direction theDir. + */ + Add(thePnt: gp_Pnt2d, theDir: gp_Dir2d): void; + /** + * Returns True if the 2d pnt. + * + * is out . + */ + IsOut(P: gp_Pnt2d): boolean; + /** + * Returns True if the line doesn't intersect the box. + */ + IsOut(theL: unknown): boolean; + /** + * Returns True if is out . + */ + IsOut(Other: Bnd_Box2d): boolean; + /** + * Returns True if the segment doesn't intersect the box. + */ + IsOut(theP0: gp_Pnt2d, theP1: gp_Pnt2d): boolean; + /** + * Returns True if transformed is out . + */ + IsOut(theOther: Bnd_Box2d, theTrsf: gp_Trsf2d): boolean; + /** + * Compares a transformed bounding with a transformed bounding. The default implementation is to make a copy of and , to transform them and to test. + */ + IsOut(T1: gp_Trsf2d, Other: Bnd_Box2d, T2: gp_Trsf2d): boolean; + /** + * Returns True if the 2d point is inside or on the boundary of this box. + */ + Contains(theP: gp_Pnt2d): boolean; + /** + * Returns True if the other 2d box intersects or is inside this box. + */ + Intersects(theOther: Bnd_Box2d): boolean; + /** + * Computes the minimum distance between two 2D boxes. + */ + Distance(theOther: Bnd_Box2d): number; + Dump(): void; + /** + * Computes the squared diagonal of me. + */ + SquareExtent(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Bnd_Box2d_Limits { + Xmin: number; + Xmax: number; + Ymin: number; + Ymax: number; +} + +/** + * Describes a bounding box in 3D space. A bounding box is parallel to the axes of the coordinates system. If it is finite, it is defined by the three intervals: + * + * - [ Xmin,Xmax ], + * - [ Ymin,Ymax ], + * - [ Zmin,Zmax ]. A bounding box may be infinite (i.e. open) in one or more directions. It is said to be: + * - OpenXmin if it is infinite on the negative side of the "X Direction"; + * - OpenXmax if it is infinite on the positive side of the "X Direction"; + * - OpenYmin if it is infinite on the negative side of the "Y Direction"; + * - OpenYmax if it is infinite on the positive side of the "Y Direction"; + * - OpenZmin if it is infinite on the negative side of the "Z Direction"; + * - OpenZmax if it is infinite on the positive side of the "Z Direction"; + * - WholeSpace if it is infinite in all six directions. In this case, any point of the space is inside the box; + * - Void if it is empty. In this case, there is no point included in the box. A bounding box is defined by: + * - six bounds (Xmin, Xmax, Ymin, Ymax, Zmin and Zmax) which limit the bounding box if it is finite, + * - eight flags (OpenXmin, OpenXmax, OpenYmin, OpenYmax, OpenZmin, OpenZmax, WholeSpace and Void) which describe the bounding box if it is infinite or empty, and + * - a gap, which is included on both sides in any direction when consulting the finite bounds of the box. + */ +export declare class Bnd_Box { + /** + * Creates an empty Box. The constructed box is qualified Void. Its gap is null. + */ + constructor(); + /** + * Creates a bounding box, it contains: + * + * - minimum/maximum point of bounding box, The constructed box is qualified Void. Its gap is null. + */ + constructor(theMin: gp_Pnt, theMax: gp_Pnt); + /** + * Sets this bounding box so that it covers the whole of 3D space. It is infinitely long in all directions. + */ + SetWhole(): void; + /** + * Sets this bounding box so that it is empty. All points are outside a void box. + */ + SetVoid(): void; + /** + * Sets this bounding box so that it bounds. + * + * - the point P. This involves first setting this bounding box to be void and then adding the point P. + */ + Set(P: gp_Pnt): void; + /** + * Sets this bounding box so that it bounds the half-line defined by point P and direction D, i.e. all points M defined by M=P+u*D, where u is greater than or equal to 0, are inside the bounding volume. This involves first setting this box to be void and then adding the half-line. + */ + Set(P: gp_Pnt, D: gp_Dir): void; + /** + * Enlarges this bounding box, if required, so that it contains at least: + * + * - interval [ aXmin,aXmax ] in the "X Direction", + * - interval [ aYmin,aYmax ] in the "Y Direction", + * - interval [ aZmin,aZmax ] in the "Z Direction"; + */ + Update(aXmin: number, aYmin: number, aZmin: number, aXmax: number, aYmax: number, aZmax: number): void; + /** + * Adds a point of coordinates (X,Y,Z) to this bounding box. + */ + Update(X: number, Y: number, Z: number): void; + /** + * Set the gap of this bounding box to abs(Tol). + */ + SetGap(Tol: number): void; + /** + * Enlarges the box with a tolerance value. (minvalues-std::abs() and maxvalues+std::abs()) This means that the minimum values of its X, Y and Z intervals of definition, when they are finite, are reduced by the absolute value of Tol, while the maximum values are increased by the same amount. + */ + Enlarge(Tol: number): void; + /** + * Returns the Xmin value (`IsOpenXmin()` ? -`Precision::Infinite()` : Xmin - `GetGap()`). + */ + GetXMin(): number; + /** + * Returns the Xmax value (`IsOpenXmax()` ? `Precision::Infinite()` : Xmax + `GetGap()`). + */ + GetXMax(): number; + /** + * Returns the Ymin value (`IsOpenYmin()` ? -`Precision::Infinite()` : Ymin - `GetGap()`). + */ + GetYMin(): number; + /** + * Returns the Ymax value (`IsOpenYmax()` ? `Precision::Infinite()` : Ymax + `GetGap()`). + */ + GetYMax(): number; + /** + * Returns the Zmin value (`IsOpenZmin()` ? -`Precision::Infinite()` : Zmin - `GetGap()`). + */ + GetZMin(): number; + /** + * Returns the Zmax value (`IsOpenZmax()` ? `Precision::Infinite()` : Zmax + `GetGap()`). + */ + GetZMax(): number; + /** + * Returns the lower corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- `Precision::Infinite()`. Standard_ConstructionError exception will be thrown if the box is void. if `IsVoid()`. + */ + CornerMin(): gp_Pnt; + /** + * Returns the upper corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- `Precision::Infinite()`. Standard_ConstructionError exception will be thrown if the box is void. if `IsVoid()`. + */ + CornerMax(): gp_Pnt; + /** + * Returns the center of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- `Precision::Infinite()`. Returns std::nullopt if the box is void. + */ + Center(): gp_Pnt | null | undefined; + /** + * The Box will be infinitely long in the Xmin direction. + */ + OpenXmin(): void; + /** + * The Box will be infinitely long in the Xmax direction. + */ + OpenXmax(): void; + /** + * The Box will be infinitely long in the Ymin direction. + */ + OpenYmin(): void; + /** + * The Box will be infinitely long in the Ymax direction. + */ + OpenYmax(): void; + /** + * The Box will be infinitely long in the Zmin direction. + */ + OpenZmin(): void; + /** + * The Box will be infinitely long in the Zmax direction. + */ + OpenZmax(): void; + /** + * Returns true if this bounding box has at least one open direction. + */ + IsOpen(): boolean; + /** + * Returns true if this bounding box is open in the Xmin direction. + */ + IsOpenXmin(): boolean; + /** + * Returns true if this bounding box is open in the Xmax direction. + */ + IsOpenXmax(): boolean; + /** + * Returns true if this bounding box is open in the Ymin direction. + */ + IsOpenYmin(): boolean; + /** + * Returns true if this bounding box is open in the Ymax direction. + */ + IsOpenYmax(): boolean; + /** + * Returns true if this bounding box is open in the Zmin direction. + */ + IsOpenZmin(): boolean; + /** + * Returns true if this bounding box is open in the Zmax direction. + */ + IsOpenZmax(): boolean; + /** + * Returns true if this bounding box is infinite in all 6 directions (WholeSpace flag). + */ + IsWhole(): boolean; + /** + * Returns true if this bounding box is empty (Void flag). + */ + IsVoid(): boolean; + /** + * true if xmax-xmin < tol. + */ + IsXThin(tol: number): boolean; + /** + * true if ymax-ymin < tol. + */ + IsYThin(tol: number): boolean; + /** + * true if zmax-zmin < tol. + */ + IsZThin(tol: number): boolean; + /** + * Returns true if IsXThin, IsYThin and IsZThin are all true, i.e. if the box is thin in all three dimensions. + */ + IsThin(tol: number): boolean; + /** + * Returns a bounding box which is the result of applying the transformation T to this bounding box. Warning Applying a geometric transformation (for example, a rotation) to a bounding box generally increases its dimensions. This is not optimal for algorithms which use it. + */ + Transformed(T: gp_Trsf): Bnd_Box; + /** + * Adds the box to . + */ + Add(Other: Bnd_Box): void; + /** + * Adds a Pnt to the box. + */ + Add(P: gp_Pnt): void; + /** + * Extends the Box in the given Direction, i.e. adds an half-line. The box may become infinite in 1,2 or 3 directions. + */ + Add(D: gp_Dir): void; + /** + * Extends from the Pnt. + * + * in the direction . + */ + Add(P: gp_Pnt, D: gp_Dir): void; + /** + * Returns True if the Pnt is out the box. + */ + IsOut(P: gp_Pnt): boolean; + /** + * Returns False if the line intersects the box. + */ + IsOut(L: unknown): boolean; + /** + * Returns False if the plane intersects the box. + */ + IsOut(P: gp_Pln): boolean; + /** + * Returns False if the intersects or is inside . + */ + IsOut(Other: Bnd_Box): boolean; + /** + * Returns False if the transformed intersects or is inside . + */ + IsOut(Other: Bnd_Box, T: gp_Trsf): boolean; + /** + * Returns False if the transformed intersects or is inside the transformed box . + */ + IsOut(T1: gp_Trsf, Other: Bnd_Box, T2: gp_Trsf): boolean; + /** + * Returns False if the flat band lying between two parallel lines represented by their reference points , and direction intersects the box. + */ + IsOut(P1: gp_Pnt, P2: gp_Pnt, D: gp_Dir): boolean; + /** + * Returns True if the point is inside or on the boundary of this box. + */ + Contains(theP: gp_Pnt): boolean; + /** + * Returns True if the other box intersects or is inside this box. + */ + Intersects(theOther: Bnd_Box): boolean; + /** + * Computes the minimum distance between two boxes. + */ + Distance(Other: Bnd_Box): number; + Dump(): void; + /** + * Computes the squared diagonal of me. + */ + SquareExtent(): number; + /** + * Returns a finite part of an infinite bounding box (returns self if this is already finite box). This can be a Void box in case if its sides has been defined as infinite (Open) without adding any finite points. WARNING! This method relies on Open flags, the infinite points added using `Add()` method will be returned as is. + */ + FinitePart(): Bnd_Box; + /** + * Returns TRUE if this box has finite part. + */ + HasFinitePart(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Bnd_Box_Limits { + Xmin: number; + Xmax: number; + Ymin: number; + Ymax: number; + Zmin: number; + Zmax: number; +} + +export type Convert_ParameterisationType = typeof Convert_ParameterisationType[keyof typeof Convert_ParameterisationType]; +/** + * Identifies a type of parameterization of a circle or ellipse represented as a BSpline curve. For a circle with a center C and a radius R (for example a {@link Geom2d_Circle | `Geom2d_Circle`} or a {@link Geom_Circle | `Geom_Circle`}), the natural parameterization is angular. It uses the angle Theta made by the vector CM with the 'X Axis' of the circle's local coordinate system as parameter for the current point M. + * The coordinates of the point M are as follows: X = R *cos ( Theta ) y = R * sin ( Theta ) Similarly, for an ellipse with a center C, a major radius R and a minor radius r, the circle Circ with center C and radius R (and located in the same plane as the ellipse) lends its natural angular parameterization to the ellipse. This is achieved by an affine transformation in the plane of the ellipse, in the ratio r / R, about the 'X Axis' of its local coordinate system. + * The coordinates of the current point M are as follows: X = R * cos ( Theta ) y = r * sin ( Theta ) The process of converting a circle or an ellipse into a rational or non-rational BSpline curve transforms the Theta angular parameter into a parameter t. This ensures the rational or polynomial parameterization of the resulting BSpline curve. Several types of parametric transformations are available. + * TgtThetaOver2 The most usual method is Convert_TgtThetaOver2 where the parameter t on the BSpline curve is obtained by means of transformation of the following type: t = tan ( Theta / 2 ) The result of this definition is: cos ( Theta ) = ( 1. - t**2 ) / ( 1. + t**2 ) sin ( Theta ) = 2. * t / ( 1. + t**2 ) which ensures the rational parameterization of the circle or the ellipse. + * However, this is not the most suitable parameterization method where the arc of the circle or ellipse has a large opening angle. In such cases, the curve will be represented by a BSpline with intermediate knots. Each span, i.e. each portion of curve between two different knot values, will use parameterization of this type. The number of spans is calculated using the following rule: ( 1.2.* + * + * - Delta / Pi ) + 1 where Delta is equal to the opening angle (in radians) of the arc of the circle (Delta is equal to 2. + * + * Pi in the case of a complete circle). The resulting BSpline curve is "exact", i.e. computing any point of parameter t on the BSpline curve gives an exact point on the circle or the ellipse. TgtThetaOver2_N Where N is equal to 1, 2, 3 or 4, this ensures the same type of parameterization as Convert_TgtThetaOver2 but sets the number of spans in the resulting BSpline curve to N rather than allowing the algorithm to make this calculation. However, the opening angle Delta (parametric angle, given in radians) of the arc of the circle (or of the ellipse) must comply with the following: + * + * - Delta <= 0.9999 * Pi for the Convert_TgtThetaOver2_1 method, or + * - Delta <= 1.9999 * Pi for the Convert_TgtThetaOver2_2 method. QuasiAngular The Convert_QuasiAngular method of parameterization uses a different type of rational parameterization. + * This method ensures that the parameter t along the resulting BSpline curve is very close to the natural parameterization angle Theta of the circle or ellipse (i.e. which uses the functions sin ( Theta ) and cos ( Theta ). + * The resulting BSpline curve is "exact", i.e. computing any point of parameter t on the BSpline curve gives an exact point on the circle or the ellipse. RationalC1 The Convert_RationalC1 method of parameterization uses a further type of rational parameterization. + * This method ensures that the equation relating to the resulting BSpline curve has a "C1" continuous denominator, which is not the case with the above methods. RationalC1 enhances the degree of continuity at the junction point of the different spans of the curve. + * The resulting BSpline curve is "exact", i.e. computing any point of parameter t on the BSpline curve gives an exact point on the circle or the ellipse. + * Polynomial The Convert_Polynomial method is used to produce polynomial (i.e. non-rational) parameterization of the resulting BSpline curve with 8 poles (i.e. a polynomial degree equal to 7). + * However, the result is an approximation of the circle or ellipse (i.e. computing the point of parameter t on the BSpline curve does not give an exact point on the circle or the ellipse). + */ +export declare const Convert_ParameterisationType: { + readonly Convert_TgtThetaOver2: 'Convert_TgtThetaOver2'; + readonly Convert_TgtThetaOver2_1: 'Convert_TgtThetaOver2_1'; + readonly Convert_TgtThetaOver2_2: 'Convert_TgtThetaOver2_2'; + readonly Convert_TgtThetaOver2_3: 'Convert_TgtThetaOver2_3'; + readonly Convert_TgtThetaOver2_4: 'Convert_TgtThetaOver2_4'; + readonly Convert_QuasiAngular: 'Convert_QuasiAngular'; + readonly Convert_RationalC1: 'Convert_RationalC1'; + readonly Convert_Polynomial: 'Convert_Polynomial'; +}; + +/** + * This class provides a polygon in 3D space, based on the triangulation of a surface. It may be the approximate representation of a curve on the surface, or more generally the shape. A PolygonOnTriangulation is defined by a table of nodes. Each node is an index in the table of nodes specific to a triangulation, and represents a point on the surface. If the polygon is closed, the index of the point of closure is repeated at the end of the table of nodes. + * If the polygon is an approximate representation of a curve on a surface, you can associate with each of its nodes the value of the parameter of the corresponding point on the curve.represents a 3d Polygon. + */ +export declare class Poly_PolygonOnTriangulation extends Standard_Transient { + /** + * Constructs a 3D polygon on the triangulation of a shape, defined by the table of nodes, . + */ + constructor(Nodes: NCollection_Array1_int); + /** + * Constructs a 3D polygon on the triangulation of a shape with specified size of nodes. + */ + constructor(theNbNodes: number, theHasParams: boolean); + /** + * Constructs a 3D polygon on the triangulation of a shape, defined by: + * + * - the table of nodes, Nodes, and the table of parameters, . where: + * - a node value is an index in the table of nodes specific to an existing triangulation of a shape + * - and a parameter value is the value of the parameter of the corresponding point on the curve approximated by the constructed polygon. Warning The tables Nodes and Parameters must be the same size. This property is not checked at construction time. + */ + constructor(Nodes: NCollection_Array1_int, Parameters: NCollection_Array1_double); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Creates a copy of current polygon. + */ + Copy(): Poly_PolygonOnTriangulation; + /** + * Returns the deflection of this polygon. + */ + Deflection(): number; + /** + * Sets the deflection of this polygon. See more on deflection in Poly_Polygones2D. + */ + Deflection(theDefl: number): void; + /** + * Returns the number of nodes for this polygon. Note: If the polygon is closed, the point of closure is repeated at the end of its table of nodes. Thus, on a closed triangle, the function NbNodes returns 4. + */ + NbNodes(): number; + /** + * Returns node at the given index. + */ + Node(theIndex: number): number; + /** + * Sets node at the given index. + */ + SetNode(theIndex: number, theNode: number): void; + /** + * Returns true if parameters are associated with the nodes in this polygon. + */ + HasParameters(): boolean; + /** + * Returns parameter at the given index. + */ + Parameter(theIndex: number): number; + /** + * Sets parameter at the given index. + */ + SetParameter(theIndex: number, theValue: number): void; + /** + * Sets the table of the parameters associated with each node in this polygon. Raises exception if array size doesn't much number of polygon nodes. + */ + SetParameters(theParameters: NCollection_HArray1_double): void; + /** + * Returns the table of nodes for this polygon. A node value is an index in the table of nodes specific to an existing triangulation of a shape. + */ + Nodes(): NCollection_Array1_int; + /** + * Returns the table of the parameters associated with each node in this polygon. Warning! Use the function HasParameters to check if parameters are associated with the nodes in this polygon. + */ + Parameters(): NCollection_HArray1_double; + /** + * @deprecated + */ + ChangeNodes(): NCollection_Array1_int; + /** + * @deprecated + */ + ChangeParameters(): NCollection_Array1_double; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Auxiliary tool for merging triangulation nodes for visualization purposes. Tool tries to merge all nodes within input triangulation, but split the ones on sharp corners at specified angle. + */ +export declare class Poly_MergeNodesTool extends Standard_Transient { + /** + * Constructor. + * @param theSmoothAngle smooth angle in radians or 0.0 to disable merging by angle + * @param theMergeTolerance node merging maximum distance + * @param theNbFacets estimated number of facets for map preallocation + */ + constructor(theSmoothAngle: number, theMergeTolerance?: number, theNbFacets?: number); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Merge nodes of existing mesh and return the new mesh. + * @param theTris triangulation to add + * @param theTrsf transformation to apply + * @param theToReverse reverse triangle nodes order + * @param theSmoothAngle merge angle in radians + * @param theMergeTolerance linear merge tolerance + * @param theToForce return merged triangulation even if it's statistics is equal to input one + * @returns merged triangulation or NULL on no result + */ + static MergeNodes(theTris: Poly_Triangulation, theTrsf: gp_Trsf, theToReverse: boolean, theSmoothAngle: number, theMergeTolerance?: number, theToForce?: boolean): Poly_Triangulation; + /** + * Return merge tolerance; 0.0 by default (only 3D points with exactly matching coordinates are merged). + */ + MergeTolerance(): number; + /** + * Set merge tolerance. + */ + SetMergeTolerance(theTolerance: number): void; + /** + * Return merge angle in radians; 0.0 by default (normals with non-exact directions are not merged). + */ + MergeAngle(): number; + /** + * Set merge angle. + */ + SetMergeAngle(theAngleRad: number): void; + /** + * Return TRUE if nodes with opposite normals should be merged; FALSE by default. + */ + ToMergeOpposite(): boolean; + /** + * Set if nodes with opposite normals should be merged. + */ + SetMergeOpposite(theToMerge: boolean): void; + /** + * Setup unit factor. + */ + SetUnitFactor(theUnitFactor: number): void; + /** + * Return TRUE if degenerate elements should be discarded; TRUE by default. + */ + ToDropDegenerative(): boolean; + /** + * Set if degenerate elements should be discarded. + */ + SetDropDegenerative(theToDrop: boolean): void; + /** + * Return TRUE if equal elements should be filtered; FALSE by default. + */ + ToMergeElems(): boolean; + /** + * Set if equal elements should be filtered. + */ + SetMergeElems(theToMerge: boolean): void; + /** + * Compute normal for the mesh element. + */ + computeTriNormal(): [number, number, number]; + /** + * Add another triangulation to created one. + * @param theTris triangulation to add + * @param theTrsf transformation to apply + * @param theToReverse reverse triangle nodes order + */ + AddTriangulation(theTris: Poly_Triangulation, theTrsf?: gp_Trsf, theToReverse?: boolean): void; + /** + * Prepare and return result triangulation (temporary data will be truncated to result size). + */ + Result(): Poly_Triangulation; + /** + * Add new triangle. + * @param theElemNodes 3 element nodes + */ + AddTriangle(theElemNodes: [gp_XYZ, gp_XYZ, gp_XYZ]): void; + /** + * Add new quad. + * @param theElemNodes 4 element nodes + */ + AddQuad(theElemNodes: [gp_XYZ, gp_XYZ, gp_XYZ, gp_XYZ]): void; + /** + * Add new triangle or quad. + * @param theElemNodes element nodes + * @param theNbNodes number of element nodes, should be 3 or 4 + */ + AddElement(theElemNodes: gp_XYZ, theNbNodes: number): void; + /** + * Change node coordinates of element to be pushed. + * @param theIndex node index within current element, in 0..3 range + */ + ChangeElementNode(theIndex: number): gp_XYZ; + /** + * Add new triangle or quad with nodes specified by `ChangeElementNode()`. + */ + PushLastElement(theNbNodes: number): void; + /** + * Add new triangle with nodes specified by `ChangeElementNode()`. + */ + PushLastTriangle(): void; + /** + * Add new quad with nodes specified by `ChangeElementNode()`. + */ + PushLastQuad(): void; + /** + * Return current element node index defined by `PushLastElement()`. + */ + ElementNodeIndex(theIndex: number): number; + /** + * Return number of nodes. + */ + NbNodes(): number; + /** + * Return number of elements. + */ + NbElements(): number; + /** + * Return number of discarded degenerate elements. + */ + NbDegenerativeElems(): number; + /** + * Return number of merged equal elements. + */ + NbMergedElems(): number; + /** + * Setup output triangulation for modifications. When set to NULL, the tool could be used as a merge map for filling in external mesh structure. + */ + ChangeOutput(): Poly_Triangulation; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides a triangulation for a surface, a set of surfaces, or more generally a shape. + * + * A triangulation consists of an approximate representation of the actual shape, using a collection of points and triangles. The points are located on the surface. The edges of the triangles connect adjacent points with a straight line that approximates the true curve on the surface. + * + * A triangulation comprises: + * + * - A table of 3D nodes (3D points on the surface). + * - A table of triangles. Each triangle ({@link Poly_Triangle | `Poly_Triangle`} object) comprises a triplet of indices in the table of 3D nodes specific to the triangulation. + * - An optional table of 2D nodes (2D points), parallel to the table of 3D nodes. 2D point are the (u, v) parameters of the corresponding 3D point on the surface approximated by the triangulation. + * - An optional table of 3D vectors, parallel to the table of 3D nodes, defining normals to the surface at specified 3D point. + * - An optional deflection, which maximizes the distance from a point on the surface to the corresponding point on its approximate triangulation. + * + * In many cases, algorithms do not need to work with the exact representation of a surface. A triangular representation induces simpler and more robust adjusting, faster performances, and the results are as good. + */ +export declare class Poly_Triangulation extends Standard_Transient { + /** + * Constructs an empty triangulation. + */ + constructor(); + /** + * Copy constructor for triangulation. + */ + constructor(theTriangulation: Poly_Triangulation); + /** + * Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes and triangles from Triangles. + */ + constructor(Nodes: NCollection_Array1_gp_Pnt, Triangles: NCollection_Array1_Poly_Triangle); + /** + * Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes, 2D points from UVNodes and triangles from Triangles, where coordinates of a 2D point from UVNodes are the (u, v) parameters of the corresponding 3D point from Nodes on the surface approximated by the constructed triangulation. + */ + constructor(Nodes: NCollection_Array1_gp_Pnt, UVNodes: NCollection_Array1_gp_Pnt2d, Triangles: NCollection_Array1_Poly_Triangle); + /** + * Constructs a triangulation from a set of triangles. The triangulation is initialized without a triangle or a node, but capable of containing specified number of nodes and triangles. + * @param theNbNodes number of nodes to allocate + * @param theNbTriangles number of triangles to allocate + * @param theHasUVNodes indicates whether 2D nodes will be associated with 3D ones, (i.e. to enable a 2D representation) + * @param theHasNormals indicates whether normals will be given and associated with nodes + */ + constructor(theNbNodes: number, theNbTriangles: number, theHasUVNodes: boolean, theHasNormals?: boolean); + // dropped: LoadDeferredData param 0 resolves to excluded type OSD_FileSystem + // dropped: DetachedLoadDeferredData param 0 resolves to excluded type OSD_FileSystem + // dropped: loadDeferredData param 0 resolves to excluded type OSD_FileSystem + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Creates full copy of current triangulation. + */ + Copy(): Poly_Triangulation; + /** + * Returns the deflection of this triangulation. + */ + Deflection(): number; + /** + * Sets the deflection of this triangulation to theDeflection. See more on deflection in Polygon2D. + */ + Deflection(theDeflection: number): void; + /** + * Returns initial set of parameters used to generate this triangulation. + */ + Parameters(): unknown; + /** + * Updates initial set of parameters used to generate this triangulation. + */ + Parameters(theParams: unknown): void; + /** + * Clears internal arrays of nodes and all attributes. + */ + Clear(): void; + /** + * Returns TRUE if triangulation has some geometry. + */ + HasGeometry(): boolean; + /** + * Returns the number of nodes for this triangulation. + */ + NbNodes(): number; + /** + * Returns the number of triangles for this triangulation. + */ + NbTriangles(): number; + /** + * Returns true if 2D nodes are associated with 3D nodes for this triangulation. + */ + HasUVNodes(): boolean; + /** + * Returns true if nodal normals are defined. + */ + HasNormals(): boolean; + /** + * Returns a node at the given index. + * @param theIndex node index within [1, `NbNodes()`] range + * @returns 3D point coordinates + */ + Node(theIndex: number): gp_Pnt; + /** + * Sets a node coordinates. + * @param theIndex node index within [1, `NbNodes()`] range + * @param thePnt 3D point coordinates + */ + SetNode(theIndex: number, thePnt: gp_Pnt): void; + /** + * Returns UV-node at the given index. + * @param theIndex node index within [1, `NbNodes()`] range + * @returns 2D point defining UV coordinates + */ + UVNode(theIndex: number): gp_Pnt2d; + /** + * Sets an UV-node coordinates. + * @param theIndex node index within [1, `NbNodes()`] range + * @param thePnt UV coordinates + */ + SetUVNode(theIndex: number, thePnt: gp_Pnt2d): void; + /** + * Returns triangle at the given index. + * @param theIndex triangle index within [1, `NbTriangles()`] range + * @returns triangle node indices, with each node defined within [1, `NbNodes()`] range + */ + Triangle(theIndex: number): Poly_Triangle; + /** + * Sets a triangle. + * @param theIndex triangle index within [1, `NbTriangles()`] range + * @param theTriangle triangle node indices, with each node defined within [1, `NbNodes()`] range + */ + SetTriangle(theIndex: number, theTriangle: Poly_Triangle): void; + /** + * Returns normal at the given index. + * @param theIndex node index within [1, `NbNodes()`] range + * @returns normalized 3D vector defining a surface normal + */ + Normal(theIndex: number): gp_Dir; + /** + * Changes normal at the given index. + * @param theIndex node index within [1, `NbNodes()`] range + * @param theNormal normalized 3D vector defining a surface normal + */ + SetNormal(theIndex: number, theNormal: gp_Dir): void; + /** + * Returns mesh purpose bits. + */ + MeshPurpose(): number; + /** + * Sets mesh purpose bits. + */ + SetMeshPurpose(thePurpose: number): void; + /** + * Returns cached min - max range of triangulation data, which is VOID by default (e.g, no cached information). + */ + CachedMinMax(): Bnd_Box; + /** + * Sets a cached min - max range of this triangulation. The bounding box should exactly match actual range of triangulation data without a gap or transformation, or otherwise undefined behavior will be observed. Passing a VOID range invalidates the cache. + */ + SetCachedMinMax(theBox: Bnd_Box): void; + /** + * Returns TRUE if there is some cached min - max range of this triangulation. + */ + HasCachedMinMax(): boolean; + /** + * Updates cached min - max range of this triangulation with bounding box of nodal data. + */ + UpdateCachedMinMax(): void; + /** + * Extends the passed box with bounding box of this triangulation. Uses cached min - max range when available and: + * + * - input transformation theTrsf has no rotation part; + * - theIsAccurate is set to FALSE; + * - no triangulation data available (e.g. it is deferred and not loaded). out] theBox bounding box to extend by this triangulation + * @param theTrsf optional transformation + * @param theIsAccurate when FALSE, allows using a cached min - max range of this triangulation even for non-identity transformation. + * @param theBox Mutated in place; read the updated value from this argument after the call. + * @returns FALSE if there is no any data to extend the passed box (no both triangulation and cached min - max range). + */ + MinMax(theBox: Bnd_Box, theTrsf: gp_Trsf, theIsAccurate: boolean): boolean; + /** + * Returns TRUE if node positions are defined with double precision; TRUE by default. + */ + IsDoublePrecision(): boolean; + /** + * Set if node positions should be defined with double or single precision for 3D and UV nodes. Raises exception if data was already allocated. + */ + SetDoublePrecision(theIsDouble: boolean): void; + /** + * Method resizing internal arrays of nodes (synchronously for all attributes). + * @param theNbNodes new number of nodes + * @param theToCopyOld copy old nodes into the new array + */ + ResizeNodes(theNbNodes: number, theToCopyOld: boolean): void; + /** + * Method resizing an internal array of triangles. + * @param theNbTriangles new number of triangles + * @param theToCopyOld copy old triangles into the new array + */ + ResizeTriangles(theNbTriangles: number, theToCopyOld: boolean): void; + /** + * If an array for UV coordinates is not allocated yet, do it now. + */ + AddUVNodes(): void; + /** + * Deallocates the UV nodes array. + */ + RemoveUVNodes(): void; + /** + * If an array for normals is not allocated yet, do it now. + */ + AddNormals(): void; + /** + * Deallocates the normals array. + */ + RemoveNormals(): void; + /** + * Compute smooth normals by averaging triangle normals. + */ + ComputeNormals(): void; + /** + * Returns the table of 3D points for read-only access or NULL if nodes array is undefined. `Poly_Triangulation::Node()` should be used instead when possible. Returned object should not be used after {@link Poly_Triangulation | `Poly_Triangulation`} destruction. + */ + MapNodeArray(): NCollection_HArray1_gp_Pnt; + /** + * Returns the triangle array for read-only access or NULL if triangle array is undefined. `Poly_Triangulation::Triangle()` should be used instead when possible. Returned object should not be used after {@link Poly_Triangulation | `Poly_Triangulation`} destruction. + */ + MapTriangleArray(): NCollection_HArray1_Poly_Triangle; + /** + * Returns the table of 2D nodes for read-only access or NULL if UV nodes array is undefined. `Poly_Triangulation::UVNode()` should be used instead when possible. Returned object should not be used after {@link Poly_Triangulation | `Poly_Triangulation`} destruction. + */ + MapUVNodeArray(): NCollection_HArray1_gp_Pnt2d; + /** + * Returns the table of per-vertex normals for read-only access or NULL if normals array is undefined. `Poly_Triangulation::Normal()` should be used instead when possible. Returned object should not be used after {@link Poly_Triangulation | `Poly_Triangulation`} destruction. + */ + MapNormalArray(): NCollection_HArray1_float; + /** + * Returns an internal array of triangles. `Triangle()`/SetTriangle() should be used instead in portable code. + */ + InternalTriangles(): NCollection_Array1_Poly_Triangle; + /** + * Returns an internal array of nodes. `Node()`/SetNode() should be used instead in portable code. + */ + InternalNodes(): unknown; + /** + * Returns an internal array of UV nodes. UBNode()/SetUVNode() should be used instead in portable code. + */ + InternalUVNodes(): unknown; + /** + * Return an internal array of normals. `Normal()`/SetNormal() should be used instead in portable code. + */ + InternalNormals(): NCollection_Array1_NCollection_Vec3_float; + /** + * @deprecated + */ + SetNormals(theNormals: NCollection_HArray1_float): void; + /** + * @deprecated + */ + Triangles(): NCollection_Array1_Poly_Triangle; + /** + * @deprecated + */ + ChangeTriangles(): NCollection_Array1_Poly_Triangle; + /** + * @deprecated + */ + ChangeTriangle(theIndex: number): Poly_Triangle; + NbDeferredNodes(): number; + NbDeferredTriangles(): number; + HasDeferredData(): boolean; + UnloadDeferredData(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a component triangle of a triangulation ({@link Poly_Triangulation | `Poly_Triangulation`} object). A Triangle is defined by a triplet of nodes within [1, `Poly_Triangulation::NbNodes()`] range. Each node is an index in the table of nodes specific to an existing triangulation of a shape, and represents a point on the surface. + */ +export declare class Poly_Triangle { + /** + * Constructs a triangle and sets all indices to zero. + */ + constructor(); + /** + * Constructs a triangle and sets its three indices, where these node values are indices in the table of nodes specific to an existing triangulation of a shape. + */ + constructor(theN1: number, theN2: number, theN3: number); + /** + * Sets the value of the three nodes of this triangle. + */ + Set(theN1: number, theN2: number, theN3: number): void; + /** + * Sets the value of node with specified index of this triangle. Raises Standard_OutOfRange if index is not in 1,2,3. + */ + Set(theIndex: number, theNode: number): void; + /** + * Returns the node indices of this triangle. + * @returns A result object with fields: + * - `theN1`: updated value from the call. + * - `theN2`: updated value from the call. + * - `theN3`: updated value from the call. + */ + Get(theN1?: number, theN2?: number, theN3?: number): { theN1: number; theN2: number; theN3: number }; + /** + * Get the node of given Index. Raises OutOfRange from {@link Standard | `Standard`} if Index is not in 1,2,3. + */ + Value(theIndex: number): number; + /** + * Get the node of given Index. Raises OutOfRange if Index is not in 1,2,3. + */ + ChangeValue(theIndex: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A class each application has to implement. It is used to contain the application data. This abstract class, alongwith Label, is one of the cornerstones of Model Editor. The groundwork is to define the root of information. This information is to be attached to a Label, and could be of any of the following types: + * + * - a feature + * - a constraint + * - a comment + * + * **Contents:** + * + * Each software component who'd like to attach its own information to a label has to inherit from this class and has to add its own information as fields of this new class. + * + * **Identification:** + * + * An attribute can be identified by its ID. Every attributes used with the same meaning (for example: Integer, String, Topology...) have the same worldwide unique ID. + * + * **Addition:** + * + * An attribute can be added to a label only if there is no attribute yet with the same ID. Call-back methods are offered, called automatically before and after the addition action. + * + * **Removal:** + * + * An attribute can be removed from a label only if there is an attribute yet with the same ID. Call-back methods are offered, called automatically before and after the removal action. A removed attribute cannot be found again. After a removal, only an addition of an attribute with the sane ID is possible (no backup...). + * + * **Modification & Transaction:** + * + * An attribute can be backuped before a modification. Only one backup attribute by transaction is possible. The modification can be forgotten (abort transaction) or validated (commit transaction). + * + * BackupCopy and restore are methods used by the backup or abort transaction actions. BackupCopy is called by Backup to generate an attribute with the same contents as the current one. Restore is called when aborting a transaction to transfer the backuped contents into the current attribute. These methods must be implemented by end use inheriting classes. + * + * A standard implementation of BackupCopy is provided, but it is not necessary a good one for any use. + * + * **Copy use methods:** + * + * Paste and NewEmpty methods are used by the copy algorithms. The goal of "Paste" is to transfer an attribute new contents into another attribute. The goal of "NewEmpty" is to create an attribute without contents, to be further filled with the new contents of another one. These 2 methods must be implemented by end use inheriting classes. + * + * **AttributeDelta:** + * + * An AttributeDelta is the difference between to attribute values states. These methods must be implemented by end use inheriting classes, to profit from the delta services. + */ +export declare class TDF_Attribute extends Standard_Transient { + /** + * Returns the ID of the attribute. + */ + ID(): unknown; + /** + * Sets specific ID of the attribute (supports several attributes of one type at the same label feature). + */ + SetID(argNo0: unknown): void; + /** + * Sets default ID defined in nested class (to be used for attributes having User ID feature). + */ + SetID(): void; + /** + * Returns the label to which the attribute is attached. If the label is not included in a DF, the label is null. See Label. Warning: If the label is not included in a data framework, it is null. This function should not be redefined inline. + */ + Label(): TDF_Label; + /** + * Returns the transaction index in which the attribute has been created or modified. + */ + Transaction(): number; + /** + * Returns the upper transaction index until which the attribute is/was valid. This number may vary. A removed attribute validity range is reduced to its transaction index. + */ + UntilTransaction(): number; + /** + * Returns true if the attribute is valid; i.e. not a backuped or removed one. + */ + IsValid(): boolean; + /** + * Returns true if the attribute has no backup. + */ + IsNew(): boolean; + /** + * Returns true if the attribute forgotten status is set. + * + * **ShortCut Methods concerning associated attributes** + */ + IsForgotten(): boolean; + /** + * Returns true if it exists an associated attribute of with as ID. + */ + IsAttribute(anID: unknown): boolean; + /** + * Finds an associated attribute of , according to . the returned is a valid one. The method returns True if found, False otherwise. A removed attribute cannot be found using this method. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `anAttribute`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + FindAttribute(anID: unknown): { returnValue: boolean; anAttribute: TDF_Attribute; [Symbol.dispose](): void }; + /** + * Adds an Attribute to the label of . Raises if there is already one of the same GUID than . + */ + AddAttribute(other: TDF_Attribute): void; + /** + * Forgets the Attribute of GUID associated to the label of . Be careful that if is the attribute of , will have a null label after this call. If the attribute doesn't exist returns False. Otherwise returns True. + */ + ForgetAttribute(aguid: unknown): boolean; + /** + * Forgets all the attributes attached to the label of . Does it on the sub-labels if is set to true. Of course, this method is compatible with Transaction & Delta mechanisms. Be careful that if will have a null label after this call. + */ + ForgetAllAttributes(clearChildren?: boolean): void; + /** + * Something to do after adding an Attribute to a label. + */ + AfterAddition(): void; + /** + * Something to do before removing an Attribute from a label. + */ + BeforeRemoval(): void; + /** + * Something to do before forgetting an Attribute to a label. + */ + BeforeForget(): void; + /** + * Something to do after resuming an Attribute from a label. + */ + AfterResume(): void; + /** + * Something to do AFTER creation of an attribute by persistent-transient translation. The returned status says if AfterUndo has been performed (true) or if this callback must be called once again further (false). If is set to true, the method MUST perform and return true. Does nothing by default and returns true. + */ + AfterRetrieval(forceIt?: boolean): boolean; + /** + * Something to do before applying . The returned status says if AfterUndo has been performed (true) or if this callback must be called once again further (false). If is set to true, the method MUST perform and return true. Does nothing by default and returns true. + */ + BeforeUndo(anAttDelta: unknown, forceIt?: boolean): boolean; + /** + * Something to do after applying . The returned status says if AfterUndo has been performed (true) or if this callback must be called once again further (false). If is set to true, the method MUST perform and return true. Does nothing by default and returns true. + */ + AfterUndo(anAttDelta: unknown, forceIt?: boolean): boolean; + /** + * A callback. By default does nothing. It is called by TDF_Data::CommitTransaction() method. + */ + BeforeCommitTransaction(): void; + /** + * Backups the attribute. The backuped attribute is flagged "Backuped" and not "Valid". + * + * The method does nothing: + * + * 1) If the attribute transaction number is equal to the current transaction number (the attribute has already been backuped). + * + * 2) If the attribute is not attached to a label. + */ + Backup(): void; + /** + * Returns true if the attribute backup status is set. This status is set/unset by the `Backup()` method. + */ + IsBackuped(): boolean; + /** + * Copies the attribute contents into a new other attribute. It is used by `Backup()`. + */ + BackupCopy(): TDF_Attribute; + /** + * Restores the backuped contents from into this one. It is used when aborting a transaction. + */ + Restore(anAttribute: TDF_Attribute): void; + /** + * Makes an AttributeDelta because appeared. The only known use of a redefinition of this method is to return a null handle (no delta). + */ + DeltaOnAddition(): unknown; + /** + * Makes an AttributeDelta because has been forgotten. + */ + DeltaOnForget(): unknown; + /** + * Makes an AttributeDelta because has been resumed. + */ + DeltaOnResume(): unknown; + /** + * Makes a DeltaOnModification between and. + */ + DeltaOnModification(anOldAttribute: TDF_Attribute): unknown; + /** + * Applies a DeltaOnModification to . + */ + DeltaOnModification(aDelta: unknown): void; + /** + * Makes a DeltaOnRemoval on because has disappeared from the DS. + */ + DeltaOnRemoval(): unknown; + /** + * Returns an new empty attribute from the good end type. It is used by the copy algorithm. + */ + NewEmpty(): TDF_Attribute; + /** + * This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method may paste the contents of into . + * + * The given pasted attribute can be full or empty of its contents. But don't make a NEW! Just set the contents! + * + * It is possible to use to get/set the relocation value of a source attribute. + */ + Paste(intoAttribute: TDF_Attribute, aRelocationTable: unknown): void; + /** + * Adds the first level referenced attributes and labels to . + * + * For this, use the AddLabel or AddAttribute of DataSet. + * + * If there is none, do not implement the method. + */ + References(aDataSet: unknown): void; + /** + * Forgets the attribute. is the current transaction in which the forget is done. A forgotten attribute is also flagged not "Valid". + * + * A forgotten attribute is invisible. Set also the "Valid" status to False. Obviously, DF cannot empty an attribute (this has a semantic signification), but can remove it from the structure. So, a forgotten attribute is NOT an empty one, but a soon DEAD one. + * + * Should be private. + */ + Forget(aTransaction: number): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class provides basic operations to define a label in a data structure. A label is a feature in the feature hierarchy. A label is always connected to a Data from {@link TDF | `TDF`}. To a label is attached attributes containing the software components information. + * + * Label information: + * + * It is possible to know the tag, the father, the depth in the tree of the label, if the label is root, null or equal to another label. + * + * Comfort methods: Some methods useful on a label. + * + * Attributes: + * + * It is possible to get an attribute in accordance to an ID, or the yougest previous version of a current attribute. + */ +export declare class TDF_Label { + /** + * Constructs an empty label object. + */ + constructor(); + // dropped: TDF_Label param 0 resolves to excluded type TDF_LabelNode + // dropped: AddToNode param 0 resolves to excluded type TDF_LabelNode + // dropped: ForgetFromNode param 0 resolves to excluded type TDF_LabelNode + // dropped: ResumeToNode param 0 resolves to excluded type TDF_LabelNode + // dropped: FindOrAddChild return resolves to excluded type TDF_LabelNode + /** + * Nullifies the label. + */ + Nullify(): void; + /** + * Returns the Data owning . + */ + Data(): unknown; + /** + * Returns the tag of the label. This is the integer assigned randomly to a label in a data framework. This integer is used to identify this label in an entry. + */ + Tag(): number; + /** + * Returns the label father. This label may be null if the label is root. + */ + Father(): TDF_Label; + /** + * Returns True if the is null, i.e. it has not been included in the data framework. + */ + IsNull(): boolean; + /** + * Sets or unsets and all its descendants as imported label, according to . + */ + Imported(aStatus: boolean): void; + /** + * Returns True if the is imported. + */ + IsImported(): boolean; + /** + * Returns True if the is equal to me (same LabelNode*). + */ + IsEqual(aLabel: TDF_Label): boolean; + IsDifferent(aLabel: TDF_Label): boolean; + IsRoot(): boolean; + /** + * Returns true if owns an attribute with as ID. + */ + IsAttribute(anID: unknown): boolean; + /** + * Adds an Attribute to the current label. Raises if there is already one. + */ + AddAttribute(anAttribute: TDF_Attribute, append?: boolean): void; + /** + * Forgets an Attribute from the current label, setting its forgotten status true and its valid status false. Raises if the attribute is not in the structure. + */ + ForgetAttribute(anAttribute: TDF_Attribute): void; + /** + * Forgets the Attribute of GUID from the current label. If the attribute doesn't exist returns False. Otherwise returns True. + */ + ForgetAttribute(aguid: unknown): boolean; + /** + * Forgets all the attributes. Does it on also on the sub-labels if is set to true. Of course, this method is compatible with Transaction & Delta mechanisms. + */ + ForgetAllAttributes(clearChildren?: boolean): void; + /** + * Undo Forget action, setting its forgotten status false and its valid status true. Raises if the attribute is not in the structure. + */ + ResumeAttribute(anAttribute: TDF_Attribute): void; + /** + * Finds an attribute of the current label, according to . If anAttribute is not a valid one, false is returned. + * + * The method returns True if found, False otherwise. + * + * A removed attribute cannot be found. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `anAttribute`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + FindAttribute(anID: unknown): { returnValue: boolean; anAttribute: TDF_Attribute; [Symbol.dispose](): void }; + /** + * Finds an attribute of the current label, according to and . This attribute has/had to be a valid one for the given transaction index. So, this attribute is not necessarily a valid one. + * + * The method returns True if found, False otherwise. + * + * A removed attribute cannot be found nor a backuped attribute of a removed one. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `anAttribute`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + FindAttribute(anID: unknown, aTransaction: number): { returnValue: boolean; anAttribute: TDF_Attribute; [Symbol.dispose](): void }; + /** + * Returns true if or a DESCENDANT of owns attributes not yet available in transaction 0. It means at least one of their attributes is new, modified or deleted. + */ + MayBeModified(): boolean; + /** + * Returns true if owns attributes not yet available in transaction 0. It means at least one attribute is new, modified or deleted. + */ + AttributesModified(): boolean; + /** + * Returns true if this label has at least one attribute. + */ + HasAttribute(): boolean; + /** + * Returns the number of attributes. + */ + NbAttributes(): number; + /** + * Returns the depth of the label in the data framework. This corresponds to the number of fathers which this label has, and is used in determining whether a label is root, null or equivalent to another label. Exceptions: Standard_NullObject if this label is null. This is because a null object can have no depth. + */ + Depth(): number; + /** + * Returns True if is a descendant of . Attention: every label is its own descendant. + */ + IsDescendant(aLabel: TDF_Label): boolean; + /** + * Returns the root label Root of the data structure. This has a depth of 0. Exceptions: Standard_NullObject if this label is null. This is because a null object can have no depth. + */ + Root(): TDF_Label; + /** + * Returns true if this label has at least one child. + */ + HasChild(): boolean; + /** + * Returns the number of children. + */ + NbChildren(): number; + /** + * Finds a child label having as tag. Creates The tag aTag identifies the label which will be the parent. If create is true and no child label is found, a new one is created. Example: //creating a label with tag 10 at Root {@link TDF_Label | `TDF_Label`} lab1 = aDF->`Root()`.FindChild(10); //creating labels 7 and 2 on label 10 {@link TDF_Label | `TDF_Label`} lab2 = lab1.FindChild(7); {@link TDF_Label | `TDF_Label`} lab3 = lab1.FindChild(2);. + */ + FindChild(aTag: number, create?: boolean): TDF_Label; + /** + * Create a new child label of me using automatic delivery tags provided by TagSource. + */ + NewChild(): TDF_Label; + /** + * Returns the current transaction index. + */ + Transaction(): number; + /** + * Returns true if node address of is lower than one. Used to quickly sort labels (not on entry criterion). + * + * -C++: inline + */ + HasLowerNode(otherLabel: TDF_Label): boolean; + /** + * Returns true if node address of is greater than one. Used to quickly sort labels (not on entry criterion). + * + * -C++: inline + */ + HasGreaterNode(otherLabel: TDF_Label): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Used to define a name attribute containing a string which specifies the name. + */ +export declare class TDataStd_Name extends TDataStd_GenericExtString { + constructor(); + /** + * **class methods working on the name itself** + * + * Returns the GUID for name attributes. + */ + static GetID(): unknown; + /** + * Creates (if does not exist) and sets the name in the name attribute. from any label search in father labels (L is not concerned) the first name attribute. if found set it in . + * + * **class methods working on the name tree** + * + * Search in the whole {@link TDF_Data | `TDF_Data`} the Name attribute which fit with . Returns True if found. Search under a label which fit with . Returns True if found. Shortcut which avoids building a ListOfExtendedStrin. Search in the whole {@link TDF_Data | `TDF_Data`} the label which fit with name Returns True if found. + * + * **tools methods to translate path <-> pathlist** + * + * move to draw For Draw test we may provide this tool method which convert a path in a sequence of string to call after the FindLabel methods. Example: if it's given "Assembly:Part_1:Sketch_5" it will return in the list of 3 strings: "Assembly","Part_1","Sketch_5". move to draw from build the string path + * + * **Name methods** + */ + static Set(label: TDF_Label, string_: TCollection_ExtendedString): TDataStd_Name; + /** + * Finds, or creates, a Name attribute with explicit user defined and sets . The Name attribute is returned. + */ + static Set(label: TDF_Label, guid: unknown, string_: TCollection_ExtendedString): TDataStd_Name; + /** + * Sets as name. Raises if is not a valid name. + */ + Set(S: TCollection_ExtendedString): void; + /** + * Sets the explicit user defined GUID to the attribute. + */ + SetID(argNo0: unknown): void; + /** + * Sets default GUID for the attribute. + */ + SetID(): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + NewEmpty(): TDF_Attribute; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An ancestor attribute for all attributes which have no fields. If an attribute inherits this one it should not have drivers for persistence. + */ +export declare class TDataStd_GenericEmpty extends TDF_Attribute { + /** + * Restores the backuped contents from into this one. It is used when aborting a transaction. + */ + Restore(anAttribute: TDF_Attribute): void; + /** + * This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method may paste the contents of into . + * + * The given pasted attribute can be full or empty of its contents. But don't make a NEW! Just set the contents! + * + * It is possible to use to get/set the relocation value of a source attribute. + */ + Paste(intoAttribute: TDF_Attribute, aRelocationTable: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An ancestor attribute for all attributes which have {@link TCollection_ExtendedString | `TCollection_ExtendedString`} field. If an attribute inherits this one it should not have drivers for persistence. Also this attribute provides functionality to have on the same label same attributes with different IDs. + */ +export declare class TDataStd_GenericExtString extends TDF_Attribute { + /** + * Sets as name. Raises if is not a valid name. + */ + Set(S: TCollection_ExtendedString): void; + /** + * Sets the explicit user defined GUID to the attribute. + */ + SetID(argNo0: unknown): void; + /** + * Sets the explicit user defined GUID to the attribute. + */ + SetID(): void; + /** + * Returns the name contained in this name attribute. + */ + Get(): TCollection_ExtendedString; + /** + * Returns the ID of the attribute. + */ + ID(): unknown; + /** + * Restores the backuped contents from into this one. It is used when aborting a transaction. + */ + Restore(anAttribute: TDF_Attribute): void; + /** + * This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method may paste the contents of into . + * + * The given pasted attribute can be full or empty of its contents. But don't make a NEW! Just set the contents! + * + * It is possible to use to get/set the relocation value of a source attribute. + */ + Paste(intoAttribute: TDF_Attribute, aRelocationTable: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The contents of a {@link TDocStd_Application | `TDocStd_Application`}, a document is a container for a data framework composed of labels and attributes. As such, {@link TDocStd_Document | `TDocStd_Document`} is the entry point into the data framework. To gain access to the data, you create a document as follows: `occ::handle` MyDF = new {@link TDocStd_Document | `TDocStd_Document`} The document also allows you to manage: + * + * - modifications, providing Undo and Redo functions. + * - command transactions. Warning: The only data saved is the framework ({@link TDF_Data | `TDF_Data`}) + */ +export declare class TDocStd_Document extends CDM_Document { + /** + * Constructs a document object defined by the string astorageformat. If a document is created outside of an application using this constructor, it must be managed by a Handle. Otherwise memory problems could appear: call of `TDocStd_Owner::GetDocument` creates a `occ::handle`, so, releasing it will produce a crash. + */ + constructor(astorageformat: TCollection_ExtendedString); + /** + * Will Abort any execution, clear fields returns the document which contains . raises an exception if the document is not found. + */ + static Get(L: TDF_Label): TDocStd_Document; + /** + * the document is saved in a file. + */ + IsSaved(): boolean; + /** + * returns True if document differs from the state of last saving. this method have to be called only working in the transaction mode + */ + IsChanged(): boolean; + /** + * This method have to be called to show document that it has been saved. + */ + SetSaved(): void; + /** + * Say to document what it is not saved. Use value, returned earlier by `GetSavedTime()`. + */ + SetSavedTime(theTime: number): void; + /** + * Returns value of to be used later in `SetSavedTime()`. + */ + GetSavedTime(): number; + /** + * raise if is not saved. + */ + GetName(): TCollection_ExtendedString; + /** + * returns the OS path of the file, in which one is saved. Raise an exception if is not saved. + */ + GetPath(): TCollection_ExtendedString; + SetData(data: unknown): void; + GetData(): unknown; + /** + * Returns the main label in this data framework. By definition, this is the label with the entry 0:1. + */ + Main(): TDF_Label; + /** + * Returns True if the main label has no attributes. + */ + IsEmpty(): boolean; + /** + * Returns False if the document has been modified but not recomputed. + */ + IsValid(): boolean; + /** + * Notify the label as modified, the Document becomes UnValid. returns True if has been notified as modified. + */ + SetModified(L: TDF_Label): void; + /** + * Remove all modifications. After this call The document becomesagain Valid. + */ + PurgeModified(): void; + /** + * Returns the labels which have been modified in this document. + */ + GetModified(): NCollection_Map_TDF_Label; + /** + * Launches a new command. This command may be undone. + */ + NewCommand(): void; + /** + * returns True if a Command transaction is open in the current . + */ + HasOpenCommand(): boolean; + /** + * Opens a new command transaction in this document. You can use HasOpenCommand to see whether a command is already open. Exceptions Standard_DomainError if a command is already open in this document. + */ + OpenCommand(): void; + /** + * Commits documents transactions and fills the transaction manager with documents that have been changed during the transaction. If no command transaction is open, nothing is done. Returns True if a new delta has been added to myUndos. + */ + CommitCommand(): boolean; + /** + * Abort the Command transaction. Does nothing If there is no Command transaction open. + */ + AbortCommand(): void; + /** + * The current limit on the number of undos. + */ + GetUndoLimit(): number; + /** + * Set the limit on the number of Undo Delta stored 0 will disable Undo on the document A negative value means no limit. Note that by default Undo is disabled. Enabling it will take effect with the next call to NewCommand. Of course this limit is the same for Redo. + */ + SetUndoLimit(L: number): void; + /** + * Remove all stored Undos and Redos. + */ + ClearUndos(): void; + /** + * Remove all stored Redos. + */ + ClearRedos(): void; + /** + * Returns the number of undos stored in this document. If this figure is greater than 0, the method Undo can be used. + */ + GetAvailableUndos(): number; + /** + * Will UNDO one step, returns False if no undo was done (Undos == 0). Otherwise, true is returned and one step in the list of undoes is undone. + */ + Undo(): boolean; + /** + * Returns the number of redos stored in this document. If this figure is greater than 0, the method Redo can be used. + */ + GetAvailableRedos(): number; + /** + * Will REDO one step, returns False if no redo was done (Redos == 0). Otherwise, true is returned, and one step in the list of redoes is done again. + */ + Redo(): boolean; + GetUndos(): NCollection_List_handle_TDF_Delta; + GetRedos(): NCollection_List_handle_TDF_Delta; + /** + * Removes the first undo in the list of document undos. It is used in the application when the undo limit is exceed. + */ + RemoveFirstUndo(): void; + /** + * Initializes the procedure of delta compaction Returns false if there is no delta to compact Marks the last delta as a "from" delta. + */ + InitDeltaCompaction(): boolean; + /** + * Performs the procedure of delta compaction Makes all deltas starting from "from" delta till the last one to be one delta. + */ + PerformDeltaCompaction(): boolean; + /** + * Set modifications on labels impacted by external references to the entry. The document becomes invalid and must be recomputed. + */ + UpdateReferences(aDocEntry: unknown): void; + /** + * Recompute if the document was not valid and propagate the recorded modification. + */ + Recompute(): void; + /** + * The {@link Storage | `Storage`} Format is the key which is used to determine in the application resources the storage driver plugin, the file extension and other data used to store the document. + */ + StorageFormat(): TCollection_ExtendedString; + /** + * Sets saving mode for empty labels. If true, empty labels will be saved. + */ + SetEmptyLabelsSavingMode(isAllowed: boolean): void; + /** + * Returns saving mode for empty labels. + */ + EmptyLabelsSavingMode(): boolean; + /** + * methods for the nested transaction mode + */ + ChangeStorageFormat(newStorageFormat: TCollection_ExtendedString): void; + /** + * Sets nested transaction mode if isAllowed == true. + */ + SetNestedTransactionMode(isAllowed?: boolean): void; + /** + * Returns true if mode is set. + */ + IsNestedTransactionMode(): boolean; + /** + * if theTransactionOnly is True changes is denied outside transactions + */ + SetModificationMode(theTransactionOnly: boolean): void; + /** + * returns True if changes allowed only inside transactions + */ + ModificationMode(): boolean; + /** + * Prepares document for closing. + */ + BeforeClose(): void; + /** + * Returns version of the format to be used to store the document. + */ + StorageFormatVersion(): unknown; + /** + * Sets version of the format to be used to store the document. + */ + ChangeStorageFormatVersion(theVersion: unknown): void; + /** + * Returns current storage format version of the document. + */ + static CurrentStorageFormatVersion(): unknown; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An applicative document is an instance of a class inheriting {@link CDM_Document | `CDM_Document`}. These documents have the following properties: + * + * - they can have references to other documents. + * - the modifications of a document are propagated to the referencing documents. + * - a document can be stored in different formats, with or without a persistent model. + * - the drivers for storing and retrieving documents are plugged in when necessary. + * - a document has a modification counter. This counter is incremented when the document is modified. When a document is stored, the current counter value is memorized as the last storage version of the document. A document is considered to be modified when the counter value is different from the storage version. Once the document is saved the storage version and the counter value are identical. The document is now not considered to be modified. + * - a reference is a link between two documents. A reference has two components: the "From Document" and the "To Document". When a reference is created, an identifier of the reference is generated. This identifier is unique in the scope of the From Document and is conserved during storage and retrieval. This means that the referenced document will be always accessible through this identifier. + * - a reference memorizes the counter value of the To Document when the reference is created. The From Document is considered to be up to date relative to the To Document when the reference counter value is equal to the To Document counter value. + * - retrieval of a document having references does not imply the retrieving of the referenced documents. + */ +export declare class CDM_Document extends Standard_Transient { + /** + * This method Update will be called to signal the end of the modified references list. The document should be recomputed and UpdateFromDocuments should be called. Update should returns True in case of success, false otherwise. In case of Failure, additional information can be given in ErrorString. + * @param ErrorString Mutated in place; read the updated value from this argument after the call. + */ + Update(ErrorString: TCollection_ExtendedString): boolean; + /** + * the following method should be used instead: + * + * Update(me:mutable; ErrorString: out ExtendedString from {@link TCollection | `TCollection`}) returns Boolean from {@link Standard | `Standard`} + */ + Update(): void; + /** + * The {@link Storage | `Storage`} Format is the key which is used to determine in the application resources the storage driver plugin, the file extension and other data used to store the document. + */ + StorageFormat(): TCollection_ExtendedString; + /** + * by default empties the extensions. + * @param Extensions Mutated in place; read the updated value from this argument after the call. + */ + Extensions(Extensions: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * This method can be redefined to extract another document in a different format. For example, to extract a Shape from an applicative document. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `anAlternativeDocument`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + GetAlternativeDocument(aFormat: TCollection_ExtendedString): { returnValue: boolean; anAlternativeDocument: CDM_Document; [Symbol.dispose](): void }; + /** + * Creates a reference from this document to {anOtherDocument}. Returns a reference identifier. This reference identifier is unique in the document and will not be used for the next references, even after the storing of the document. If there is already a reference between the two documents, the reference is not created, but its reference identifier is returned. + */ + CreateReference(anOtherDocument: CDM_Document): number; + CreateReference(aMetaData: unknown, aReferenceIdentifier: number, anApplication: unknown, aToDocumentVersion: number, UseStorageConfiguration: boolean): void; + CreateReference(aMetaData: unknown, anApplication: unknown, aDocumentVersion: number, UseStorageConfiguration: boolean): number; + /** + * Removes the reference between the From Document and the To Document identified by a reference identifier. + */ + RemoveReference(aReferenceIdentifier: number): void; + /** + * Removes all references having this document for From Document. + */ + RemoveAllReferences(): void; + /** + * Returns the To Document of the reference identified by aReferenceIdentifier. If the ToDocument is stored and has not yet been retrieved, this method will retrieve it. + */ + Document(aReferenceIdentifier: number): CDM_Document; + /** + * returns True if the To Document of the reference identified by aReferenceIdentifier is in session, False if it corresponds to a not yet retrieved document. + */ + IsInSession(aReferenceIdentifier: number): boolean; + /** + * returns True if the To Document of the reference identified by aReferenceIdentifier has already been stored, False otherwise. + */ + IsStored(aReferenceIdentifier: number): boolean; + IsStored(): boolean; + /** + * returns the name of the metadata of the To Document of the reference identified by aReferenceIdentifier. + */ + Name(aReferenceIdentifier: number): TCollection_ExtendedString; + /** + * returns the number of references having this document as From Document. + */ + ToReferencesNumber(): number; + /** + * returns the number of references having this document as To Document. + */ + FromReferencesNumber(): number; + /** + * returns True is this document references aDocument; + */ + ShallowReferences(aDocument: CDM_Document): boolean; + /** + * returns True is this document references aDocument; + */ + DeepReferences(aDocument: CDM_Document): boolean; + /** + * Copies a reference to this document. This method avoid retrieval of referenced document. The arguments are the original document and a valid reference identifier Returns the local identifier. + */ + CopyReference(aFromDocument: CDM_Document, aReferenceIdentifier: number): number; + /** + * indicates that this document cannot be modified. + */ + IsReadOnly(): boolean; + /** + * indicates that the referenced document cannot be modified, + */ + IsReadOnly(aReferenceIdentifier: number): boolean; + SetIsReadOnly(): void; + UnsetIsReadOnly(): void; + /** + * Indicates that this document has been modified. This method increments the modification counter. + */ + Modify(): void; + /** + * returns the current modification counter. + */ + Modifications(): number; + UnModify(): void; + /** + * returns true if the modification counter found in the given reference is equal to the actual modification counter of the To Document. This method is able to deal with a reference to a not retrieved document. + */ + IsUpToDate(aReferenceIdentifier: number): boolean; + /** + * Resets the modification counter in the given reference to the actual modification counter of its To Document. This method should be called after the application has updated this document. + */ + SetIsUpToDate(aReferenceIdentifier: number): void; + /** + * associates a comment with this document. + */ + SetComment(aComment: TCollection_ExtendedString): void; + /** + * appends a comment into comments of this document. + */ + AddComment(aComment: TCollection_ExtendedString): void; + /** + * associates a comments with this document. + */ + SetComments(aComments: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * returns the associated comments through . Returns empty sequence if no comments are associated. + * @param aComments Mutated in place; read the updated value from this argument after the call. + */ + Comments(aComments: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * Returns the first of associated comments. By default the comment is an empty string. + */ + Comment(): string; + /** + * returns the value of the modification counter at the time of storage. By default returns 0. + */ + StorageVersion(): number; + /** + * associates database information to a document which has been stored. The name of the document is now the name which has beenused to store the data. + */ + SetMetaData(aMetaData: unknown): void; + UnsetIsStored(): void; + MetaData(): unknown; + Folder(): TCollection_ExtendedString; + /** + * defines the folder in which the object should be stored. + */ + SetRequestedFolder(aFolder: TCollection_ExtendedString): void; + RequestedFolder(): TCollection_ExtendedString; + HasRequestedFolder(): boolean; + /** + * defines the name under which the object should be stored. + */ + SetRequestedName(aName: TCollection_ExtendedString): void; + /** + * Determines under which the document is going to be store. By default the name of the document will be used. If the document has no name its presentation will be used. + */ + RequestedName(): TCollection_ExtendedString; + SetRequestedPreviousVersion(aPreviousVersion: TCollection_ExtendedString): void; + UnsetRequestedPreviousVersion(): void; + HasRequestedPreviousVersion(): boolean; + RequestedPreviousVersion(): TCollection_ExtendedString; + /** + * defines the Comment with which the object should be stored. + */ + SetRequestedComment(aComment: TCollection_ExtendedString): void; + RequestedComment(): TCollection_ExtendedString; + /** + * read (or rereads) the following resource. + */ + LoadResources(): void; + FindFileExtension(): boolean; + /** + * gets the Desktop.Domain.Application.`FileFormat`.FileExtension resource. + */ + FileExtension(): TCollection_ExtendedString; + FindDescription(): boolean; + /** + * gets the `FileFormat`.Description resource. + */ + Description(): TCollection_ExtendedString; + /** + * returns true if the version is greater than the storage version + */ + IsModified(): boolean; + IsOpened(): boolean; + /** + * returns true if the document corresponding to the given reference has been retrieved and opened. Otherwise returns false. This method does not retrieve the referenced document + */ + IsOpened(aReferenceIdentifier: number): boolean; + Open(anApplication: unknown): void; + CanClose(): unknown; + Close(): void; + Application(): unknown; + /** + * A referenced document may indicate through this virtual method that it does not allow the closing of aDocument which it references through the reference aReferenceIdentifier. By default returns true. + */ + CanCloseReference(aDocument: CDM_Document, aReferenceIdentifier: number): boolean; + /** + * A referenced document may update its internal data structure when {aDocument} which it references through the reference {aReferenceIdentifier} is being closed. By default this method does nothing. + */ + CloseReference(aDocument: CDM_Document, aReferenceIdentifier: number): void; + ReferenceCounter(): number; + Reference(aReferenceIdentifier: number): unknown; + SetModifications(Modifications: number): void; + SetReferenceCounter(aReferenceCounter: number): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_handle_TDF_Attribute { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_handle_TDF_Attribute); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_handle_TDF_Attribute): NCollection_Sequence_handle_TDF_Attribute; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: TDF_Attribute): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_handle_TDF_Attribute): void; + /** + * Prepend one item. + */ + Prepend(theItem: TDF_Attribute): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_handle_TDF_Attribute): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: TDF_Attribute): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_handle_TDF_Attribute): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_handle_TDF_Attribute): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: TDF_Attribute): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_handle_TDF_Attribute): void; + /** + * First item access. + */ + First(): TDF_Attribute; + /** + * First item access. + */ + ChangeFirst(): TDF_Attribute; + /** + * Last item access. + */ + Last(): TDF_Attribute; + /** + * Last item access. + */ + ChangeLast(): TDF_Attribute; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): TDF_Attribute; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): TDF_Attribute; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: TDF_Attribute): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): TDF_Attribute; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): TDF_Attribute; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class ReplicadMeshExtractor { + constructor(); + static extract(shape: TopoDS_Shape, tolerance: number, angularTolerance: number, skipNormals: boolean): ReplicadMeshData; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_NCollection_Vec3_float { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_NCollection_Vec3_float); + constructor(theLower: number, theUpper: number); + constructor(theBegin: unknown, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: unknown): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_NCollection_Vec3_float): NCollection_Array1_NCollection_Vec3_float; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_NCollection_Vec3_float): NCollection_Array1_NCollection_Vec3_float; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_NCollection_Vec3_float): NCollection_Array1_NCollection_Vec3_float; + /** + * @returns first element + */ + First(): unknown; + /** + * @returns first element + */ + ChangeFirst(): unknown; + /** + * @returns last element + */ + Last(): unknown; + /** + * @returns last element + */ + ChangeLast(): unknown; + /** + * Constant value access. + */ + Value(theIndex: number): unknown; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): unknown; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_handle_TDF_Delta extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_handle_TDF_Delta); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: unknown[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_handle_TDF_Delta): NCollection_List_handle_TDF_Delta; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): unknown; + /** + * Last item. + */ + Last(): unknown; + /** + * Append one item at the end. + */ + Append(theItem: unknown): unknown; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_handle_TDF_Delta): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: unknown): unknown; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_handle_TDF_Delta): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_handle_TDF_Delta): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Class `NCollection_DynamicArray` (dynamic array of objects). + * + * The array's indices always start at 0. + * + * The Vector is always created with 0 length. It can be enlarged by two means: + * + * 1. Calling the method Append (val) - then "val" is added to the end of the vector (the vector length is incremented) + * 2. Calling the method SetValue (i, val) - if "i" is greater than or equal to the current length of the vector, the vector is enlarged to accomo- date this index + * + * The methods Append and SetValue return a non-const reference to the copied object inside the vector. This reference is guaranteed to be valid until the vector is destroyed. It can be used to access the vector member directly or to pass its address to other data structures. + * + * The vector iterator remembers the length of the vector at the moment of the creation or initialisation of the iterator. Therefore the iteration begins at index 0 and stops at the index equal to (remembered_length-1). It is OK to enlarge the vector during the iteration. + */ +export declare class NCollection_DynamicArray_int { + constructor(theOther: NCollection_DynamicArray_int); + Size(): number; + Length(): number; + Lower(): number; + Upper(): number; + IsEmpty(): boolean; + Assign(theOther: NCollection_DynamicArray_int, theOwnAllocator: boolean): NCollection_DynamicArray_int; + Append(theValue: number): number; + InsertAfter(theIndex: number, theValue: number): number; + InsertBefore(theIndex: number, theValue: number): number; + EraseLast(): void; + Appended(): number; + Value(theIndex: number): number; + First(): number; + ChangeFirst(): number; + Last(): number; + ChangeLast(): number; + ChangeValue(theIndex: number): number; + SetValue(theIndex: number, theValue: number): number; + Clear(theReleaseMemory?: boolean): void; + SetIncrement(theIncrement: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + export declare class NCollection_DynamicArray_int_1 extends NCollection_DynamicArray_int { + constructor(theIncrement: number); + } + + export declare class NCollection_DynamicArray_int_2 extends NCollection_DynamicArray_int { + constructor(theIncrement: number); + } + + export declare class NCollection_DynamicArray_int_3 extends NCollection_DynamicArray_int { + constructor(theIncrement: number, theAllocator: unknown); + } + + export declare class NCollection_DynamicArray_int_4 extends NCollection_DynamicArray_int { + constructor(theIncrement: number, theAllocator: unknown); + } + +export declare class GeomToolsWrapper { + constructor(); + static Write(geometry: Geom2d_Curve): string; + static Read(data: string): Geom2d_Curve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Class `NCollection_DynamicArray` (dynamic array of objects). + * + * The array's indices always start at 0. + * + * The Vector is always created with 0 length. It can be enlarged by two means: + * + * 1. Calling the method Append (val) - then "val" is added to the end of the vector (the vector length is incremented) + * 2. Calling the method SetValue (i, val) - if "i" is greater than or equal to the current length of the vector, the vector is enlarged to accomo- date this index + * + * The methods Append and SetValue return a non-const reference to the copied object inside the vector. This reference is guaranteed to be valid until the vector is destroyed. It can be used to access the vector member directly or to pass its address to other data structures. + * + * The vector iterator remembers the length of the vector at the moment of the creation or initialisation of the iterator. Therefore the iteration begins at index 0 and stops at the index equal to (remembered_length-1). It is OK to enlarge the vector during the iteration. + */ +export declare class NCollection_DynamicArray_handle_Standard_Transient { + constructor(theOther: NCollection_DynamicArray_handle_Standard_Transient); + Size(): number; + Length(): number; + Lower(): number; + Upper(): number; + IsEmpty(): boolean; + Assign(theOther: NCollection_DynamicArray_handle_Standard_Transient, theOwnAllocator: boolean): NCollection_DynamicArray_handle_Standard_Transient; + Append(theValue: Standard_Transient): Standard_Transient; + InsertAfter(theIndex: number, theValue: Standard_Transient): Standard_Transient; + InsertBefore(theIndex: number, theValue: Standard_Transient): Standard_Transient; + EraseLast(): void; + Appended(): Standard_Transient; + Value(theIndex: number): Standard_Transient; + First(): Standard_Transient; + ChangeFirst(): Standard_Transient; + Last(): Standard_Transient; + ChangeLast(): Standard_Transient; + ChangeValue(theIndex: number): Standard_Transient; + SetValue(theIndex: number, theValue: Standard_Transient): Standard_Transient; + Clear(theReleaseMemory?: boolean): void; + SetIncrement(theIncrement: number): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + export declare class NCollection_DynamicArray_handle_Standard_Transient_1 extends NCollection_DynamicArray_handle_Standard_Transient { + constructor(theIncrement: number); + } + + export declare class NCollection_DynamicArray_handle_Standard_Transient_2 extends NCollection_DynamicArray_handle_Standard_Transient { + constructor(theIncrement: number); + } + + export declare class NCollection_DynamicArray_handle_Standard_Transient_3 extends NCollection_DynamicArray_handle_Standard_Transient { + constructor(theIncrement: number, theAllocator: unknown); + } + + export declare class NCollection_DynamicArray_handle_Standard_Transient_4 extends NCollection_DynamicArray_handle_Standard_Transient { + constructor(theIncrement: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_gp_Pnt2d { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: gp_Pnt2d); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: gp_Pnt2d, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_2 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_3 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_4 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_5 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_6 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double_7 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_ChFiDS_CircSection { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: unknown); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: unknown, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_TCollection_ExtendedString { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_TCollection_ExtendedString); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_TCollection_ExtendedString): NCollection_Sequence_TCollection_ExtendedString; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: TCollection_ExtendedString): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * Prepend one item. + */ + Prepend(theItem: TCollection_ExtendedString): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: TCollection_ExtendedString): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: TCollection_ExtendedString): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_TCollection_ExtendedString): void; + /** + * First item access. + */ + First(): TCollection_ExtendedString; + /** + * First item access. + */ + ChangeFirst(): TCollection_ExtendedString; + /** + * Last item access. + */ + Last(): TCollection_ExtendedString; + /** + * Last item access. + */ + ChangeLast(): TCollection_ExtendedString; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): TCollection_ExtendedString; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): TCollection_ExtendedString; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: TCollection_ExtendedString): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): TCollection_ExtendedString; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): TCollection_ExtendedString; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_handle_Law_Function extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_handle_Law_Function); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: Law_Function[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_handle_Law_Function): NCollection_List_handle_Law_Function; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): Law_Function; + /** + * Last item. + */ + Last(): Law_Function; + /** + * Append one item at the end. + */ + Append(theItem: Law_Function): Law_Function; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_handle_Law_Function): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: Law_Function): Law_Function; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_handle_Law_Function): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_handle_Law_Function): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher): NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TopoDS_Shape, theItem: NCollection_List_TopoDS_Shape): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TopoDS_Shape, theItem: NCollection_List_TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TopoDS_Shape, theItem: NCollection_List_TopoDS_Shape): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TopoDS_Shape, theItem: NCollection_List_TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * IsBound. + */ + IsBound(theKey: TopoDS_Shape): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TopoDS_Shape): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_2 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_3 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_4 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_5 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_6 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher_7 extends NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_Poly_Triangle { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: Poly_Triangle); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: Poly_Triangle, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_gp_Pnt { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_gp_Pnt); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_gp_Pnt): NCollection_Sequence_gp_Pnt; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: gp_Pnt): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_gp_Pnt): void; + /** + * Prepend one item. + */ + Prepend(theItem: gp_Pnt): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_gp_Pnt): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: gp_Pnt): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: gp_Pnt): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt): void; + /** + * First item access. + */ + First(): gp_Pnt; + /** + * First item access. + */ + ChangeFirst(): gp_Pnt; + /** + * Last item access. + */ + Last(): gp_Pnt; + /** + * Last item access. + */ + ChangeLast(): gp_Pnt; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): gp_Pnt; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): gp_Pnt; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: gp_Pnt): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Pnt; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Pnt; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_gp_Pnt { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: gp_Pnt); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: gp_Pnt, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_handle_Geom2d_BSplineCurve { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_handle_Geom2d_BSplineCurve); + constructor(theLower: number, theUpper: number); + constructor(theBegin: Geom2d_BSplineCurve, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: Geom2d_BSplineCurve): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_handle_Geom2d_BSplineCurve): NCollection_Array1_handle_Geom2d_BSplineCurve; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_handle_Geom2d_BSplineCurve): NCollection_Array1_handle_Geom2d_BSplineCurve; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_handle_Geom2d_BSplineCurve): NCollection_Array1_handle_Geom2d_BSplineCurve; + /** + * @returns first element + */ + First(): Geom2d_BSplineCurve; + /** + * @returns first element + */ + ChangeFirst(): Geom2d_BSplineCurve; + /** + * @returns last element + */ + Last(): Geom2d_BSplineCurve; + /** + * @returns last element + */ + ChangeLast(): Geom2d_BSplineCurve; + /** + * Constant value access. + */ + Value(theIndex: number): Geom2d_BSplineCurve; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): Geom2d_BSplineCurve; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Geom2d_BSplineCurve; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Geom2d_BSplineCurve; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: Geom2d_BSplineCurve): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_unsignedchar { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_unsignedchar); + constructor(theLower: number, theUpper: number); + constructor(theBegin: string, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: string): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_unsignedchar): NCollection_Array1_unsignedchar; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_unsignedchar): NCollection_Array1_unsignedchar; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_unsignedchar): NCollection_Array1_unsignedchar; + /** + * @returns first element + */ + First(): string; + /** + * @returns first element + */ + ChangeFirst(): string; + /** + * @returns last element + */ + Last(): string; + /** + * @returns last element + */ + ChangeLast(): string; + /** + * Constant value access. + */ + Value(theIndex: number): string; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): string; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): string; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): string; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: string): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_handle_TDF_AttributeDelta extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_handle_TDF_AttributeDelta); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: unknown[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_handle_TDF_AttributeDelta): NCollection_List_handle_TDF_AttributeDelta; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): unknown; + /** + * Last item. + */ + Last(): unknown; + /** + * Append one item at the end. + */ + Append(theItem: unknown): unknown; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_handle_TDF_AttributeDelta): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: unknown): unknown; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_handle_TDF_AttributeDelta): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_handle_TDF_AttributeDelta): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_TCollection_ExtendedString { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: TCollection_ExtendedString): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_double { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_double); + constructor(theLower: number, theUpper: number); + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: number): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_double): NCollection_Array1_double; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_double): NCollection_Array1_double; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_double): NCollection_Array1_double; + /** + * @returns first element + */ + First(): number; + /** + * @returns first element + */ + ChangeFirst(): number; + /** + * @returns last element + */ + Last(): number; + /** + * @returns last element + */ + ChangeLast(): number; + /** + * Constant value access. + */ + Value(theIndex: number): number; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): number; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): number; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): number; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: number): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1.. Extent. An Item is stored with each key. + * + * This class is similar to IndexedMap from NCollection with the Item as a new feature. Note the important difference on the operator (). In the IndexedMap this operator returns the Key. In the IndexedDataMap this operator returns the Item. + * + * See the class Map from NCollection for a discussion about the number of buckets. + */ +export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Returns the Index of already bound Key or appends new Key with specified Item value. + * @param theKey1 Key to search (and to bind, if it was not bound already) + * @param theItem Item value to set for newly bound Key; ignored if Key was already bound + * @returns index of Key + */ + Add(theKey1: TDF_Label, theItem: TopoDS_Shape): number; + /** + * TryBound binds Item to Key only if Key is not yet bound. + * @param theKey1 key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey1: TDF_Label, theItem: TopoDS_Shape): TopoDS_Shape; + /** + * TryBind binds Item to Key only if Key is not yet bound. + * @param theKey1 key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if key was newly added, false if key already existed + */ + TryBind(theKey1: TDF_Label, theItem: TopoDS_Shape): boolean; + /** + * Bind binds Item to Key in map; overwrites value if Key already exists. + * @param theKey1 key to add/update + * @param theItem new item; overrides value previously bound to the key + * @returns true if Key was not bound already + */ + Bind(theKey1: TDF_Label, theItem: TopoDS_Shape): boolean; + /** + * Bound binds Item to Key in map; overwrites value if Key already exists. + * @param theKey1 key to add/update + * @param theItem new item; overrides value previously bound to the key + * @returns pointer to modifiable Item + */ + Bound(theKey1: TDF_Label, theItem: TopoDS_Shape): TopoDS_Shape; + /** + * Contains. + */ + Contains(theKey1: TDF_Label): boolean; + /** + * Substitute. + */ + Substitute(theIndex: number, theKey1: TDF_Label, theItem: TopoDS_Shape): void; + /** + * Swaps two elements with the given indices. + */ + Swap(theIndex1: number, theIndex2: number): void; + /** + * RemoveLast. + */ + RemoveLast(): void; + /** + * Remove the key of the given index. Caution! The index of the last key can be changed. + */ + RemoveFromIndex(theIndex: number): void; + /** + * Remove the given key. Caution! The index of the last key can be changed. + */ + RemoveKey(theKey1: TDF_Label): void; + /** + * FindKey. + */ + FindKey(theIndex: number): TDF_Label; + /** + * FindFromIndex. + */ + FindFromIndex(theIndex: number): TopoDS_Shape; + /** + * ChangeFromIndex. + */ + ChangeFromIndex(theIndex: number): TopoDS_Shape; + /** + * FindIndex. + */ + FindIndex(theKey1: TDF_Label): number; + /** + * ChangeFromKey. + */ + ChangeFromKey(theKey1: TDF_Label): TopoDS_Shape; + /** + * Seek returns pointer to Item by Key. Returns NULL if Key was not found. + */ + Seek(theKey1: TDF_Label): TopoDS_Shape; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL if Key was not found. + */ + ChangeSeek(theKey1: TDF_Label): TopoDS_Shape; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_2 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_3 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_4 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_5 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_6 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape_7 extends NCollection_IndexedDataMap_TDF_Label_TopoDS_Shape { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_gp_Dir { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_gp_Dir); + constructor(theLower: number, theUpper: number); + constructor(theBegin: gp_Dir, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: gp_Dir): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_gp_Dir): NCollection_Array1_gp_Dir; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_gp_Dir): NCollection_Array1_gp_Dir; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_gp_Dir): NCollection_Array1_gp_Dir; + /** + * @returns first element + */ + First(): gp_Dir; + /** + * @returns first element + */ + ChangeFirst(): gp_Dir; + /** + * @returns last element + */ + Last(): gp_Dir; + /** + * @returns last element + */ + ChangeLast(): gp_Dir; + /** + * Constant value access. + */ + Value(theIndex: number): gp_Dir; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): gp_Dir; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Dir; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Dir; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: gp_Dir): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1..Extent. See the class Map from NCollection for a discussion about the number of buckets. + */ +export declare class NCollection_IndexedMap_Message_MetricType { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(theExtent: number): void; + /** + * Add adds a new key to the map. + * @param theKey1 key to add + * @returns index of the key (new or existing) + */ + Add(theKey1: unknown): number; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing key. + * @param theKey1 key to add + * @returns const reference to the key in the map + */ + Added(theKey1: unknown): unknown; + /** + * Contains. + */ + Contains(theKey1: unknown): boolean; + /** + * Substitute. + */ + Substitute(theIndex: number, theKey1: unknown): void; + /** + * Swaps two elements with the given indices. + */ + Swap(theIndex1: number, theIndex2: number): void; + /** + * RemoveLast. + */ + RemoveLast(): void; + /** + * Remove the key of the given index. Caution! The index of the last key can be changed. + */ + RemoveFromIndex(theIndex: number): void; + /** + * Remove the given key. Caution! The index of the last key can be changed. + */ + RemoveKey(theKey1: unknown): boolean; + /** + * FindKey. + */ + FindKey(theIndex: number): unknown; + /** + * FindIndex. + */ + FindIndex(theKey1: unknown): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_IndexedMap_Message_MetricType_2 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_IndexedMap_Message_MetricType_3 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_Message_MetricType_4 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_Message_MetricType_5 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_Message_MetricType_6 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_Message_MetricType_7 extends NCollection_IndexedMap_Message_MetricType { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TDF_Attribute, theItem: TDF_Attribute): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TDF_Attribute, theItem: TDF_Attribute): TDF_Attribute; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TDF_Attribute, theItem: TDF_Attribute): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TDF_Attribute, theItem: TDF_Attribute): TDF_Attribute; + /** + * IsBound. + */ + IsBound(theKey: TDF_Attribute): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TDF_Attribute): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TDF_Attribute): TDF_Attribute; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TDF_Attribute): TDF_Attribute; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TDF_Attribute): TDF_Attribute; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_2 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_3 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_4 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_5 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_6 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute_7 extends NCollection_DataMap_handle_TDF_Attribute_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_handle_Standard_Transient { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_handle_Standard_Transient); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_handle_Standard_Transient): NCollection_Sequence_handle_Standard_Transient; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: Standard_Transient): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_handle_Standard_Transient): void; + /** + * Prepend one item. + */ + Prepend(theItem: Standard_Transient): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_handle_Standard_Transient): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: Standard_Transient): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_handle_Standard_Transient): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_handle_Standard_Transient): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: Standard_Transient): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_handle_Standard_Transient): void; + /** + * First item access. + */ + First(): Standard_Transient; + /** + * First item access. + */ + ChangeFirst(): Standard_Transient; + /** + * Last item access. + */ + Last(): Standard_Transient; + /** + * Last item access. + */ + ChangeLast(): Standard_Transient; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): Standard_Transient; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): Standard_Transient; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: Standard_Transient): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Standard_Transient; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Standard_Transient; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_bool { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_bool); + constructor(theLower: number, theUpper: number); + constructor(theBegin: boolean, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: boolean): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_bool): NCollection_Array1_bool; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_bool): NCollection_Array1_bool; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_bool): NCollection_Array1_bool; + /** + * @returns first element + */ + First(): boolean; + /** + * @returns first element + */ + ChangeFirst(): boolean; + /** + * @returns last element + */ + Last(): boolean; + /** + * @returns last element + */ + ChangeLast(): boolean; + /** + * Constant value access. + */ + Value(theIndex: number): boolean; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): boolean; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): boolean; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): boolean; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: boolean): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_int { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_int); + constructor(theLower: number, theUpper: number); + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: number): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_int): NCollection_Array1_int; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_int): NCollection_Array1_int; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_int): NCollection_Array1_int; + /** + * @returns first element + */ + First(): number; + /** + * @returns first element + */ + ChangeFirst(): number; + /** + * @returns last element + */ + Last(): number; + /** + * @returns last element + */ + ChangeLast(): number; + /** + * Constant value access. + */ + Value(theIndex: number): number; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): number; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): number; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): number; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: number): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher): NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TopoDS_Shape, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TopoDS_Shape, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TopoDS_Shape, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TopoDS_Shape, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: TopoDS_Shape): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TopoDS_Shape): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TopoDS_Shape): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TopoDS_Shape): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TopoDS_Shape): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_2 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_3 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_4 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_5 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_6 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher_7 extends NCollection_DataMap_TopoDS_Shape_BRepTopAdaptor_Tool_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1..Extent. See the class Map from NCollection for a discussion about the number of buckets. + */ +export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher; + /** + * ReSize. + */ + ReSize(theExtent: number): void; + /** + * Add adds a new key to the map. + * @param theKey1 key to add + * @returns index of the key (new or existing) + */ + Add(theKey1: TopoDS_Shape): number; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing key. + * @param theKey1 key to add + * @returns const reference to the key in the map + */ + Added(theKey1: TopoDS_Shape): TopoDS_Shape; + /** + * Contains. + */ + Contains(theKey1: TopoDS_Shape): boolean; + /** + * Substitute. + */ + Substitute(theIndex: number, theKey1: TopoDS_Shape): void; + /** + * Swaps two elements with the given indices. + */ + Swap(theIndex1: number, theIndex2: number): void; + /** + * RemoveLast. + */ + RemoveLast(): void; + /** + * Remove the key of the given index. Caution! The index of the last key can be changed. + */ + RemoveFromIndex(theIndex: number): void; + /** + * Remove the given key. Caution! The index of the last key can be changed. + */ + RemoveKey(theKey1: TopoDS_Shape): boolean; + /** + * FindKey. + */ + FindKey(theIndex: number): TopoDS_Shape; + /** + * FindIndex. + */ + FindIndex(theKey1: TopoDS_Shape): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_2 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_3 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_4 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_5 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_6 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher_7 extends NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_AsciiString_int { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: unknown, theItem: number): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: unknown, theItem: number): number; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: unknown, theItem: number): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: unknown, theItem: number): number; + /** + * IsBound. + */ + IsBound(theKey: unknown): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: unknown): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: unknown): number; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: unknown): number; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: unknown): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_2 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_3 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_4 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_5 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_6 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_int_7 extends NCollection_DataMap_TCollection_AsciiString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_float { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: number); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_TCollection_AsciiString { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_TCollection_AsciiString); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_TCollection_AsciiString): NCollection_Sequence_TCollection_AsciiString; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: unknown): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_TCollection_AsciiString): void; + /** + * Prepend one item. + */ + Prepend(theItem: unknown): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_TCollection_AsciiString): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: unknown): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_TCollection_AsciiString): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_TCollection_AsciiString): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: unknown): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_TCollection_AsciiString): void; + /** + * First item access. + */ + First(): unknown; + /** + * First item access. + */ + ChangeFirst(): unknown; + /** + * Last item access. + */ + Last(): unknown; + /** + * Last item access. + */ + ChangeLast(): unknown; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): unknown; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): unknown; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_TopoDS_Shape extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_TopoDS_Shape); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: TopoDS_Shape[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): TopoDS_Shape; + /** + * Last item. + */ + Last(): TopoDS_Shape; + /** + * Append one item at the end. + */ + Append(theItem: TopoDS_Shape): TopoDS_Shape; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_TopoDS_Shape): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: TopoDS_Shape): TopoDS_Shape; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_TopoDS_Shape): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_TopoDS_Shape): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TopoDS_Shape, theItem: TopoDS_Shape): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TopoDS_Shape, theItem: TopoDS_Shape): TopoDS_Shape; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TopoDS_Shape, theItem: TopoDS_Shape): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TopoDS_Shape, theItem: TopoDS_Shape): TopoDS_Shape; + /** + * IsBound. + */ + IsBound(theKey: TopoDS_Shape): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TopoDS_Shape): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TopoDS_Shape): TopoDS_Shape; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TopoDS_Shape): TopoDS_Shape; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TopoDS_Shape): TopoDS_Shape; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_2 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_3 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_4 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_5 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_6 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher_7 extends NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_handle_Standard_Transient { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: Standard_Transient): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_handle_Geom_BSplineCurve { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: Geom_BSplineCurve); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: Geom_BSplineCurve, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The class Array2 represents bi-dimensional arrays of fixed size known at run time. The ranges of indices are user defined. + * + * Class allocates one 1D array storing full data (all Rows and Columns) and extra 1D array storing pointers to each Row. + * + * Warning: Programs clients of such class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * for (i = A.LowerRow(); i <= A.UpperRow(); i++) for (j = A.LowerCol(); j <= A.UpperCol(); j++) + * + * Zero-based (size_t) construction mode: `NCollection_Array2(size_t theNbRows, size_t theNbCols)` creates a zero-based array (`LowerRow()`==0, `LowerCol()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variant `NCollection_Array2(pointer, size_t, size_t)` wraps an existing flat row-major buffer and does NOT own the memory. + */ +export declare class NCollection_Array2_gp_Pnt { + /** + * Empty constructor; should be used with caution. + * @see `Resize()` + * @see `Move()` + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array2_gp_Pnt); + /** + * Zero-based constructor: allocates theNbRows x theNbCols elements with lower bounds 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theNbRows: number, theNbCols: number); + /** + * Constructor. + */ + constructor(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number); + /** + * C array-based constructor. + */ + constructor(theBegin: gp_Pnt, theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number); + static BeginPosition(theRowLower: number, argNo1: number, theColLower: number, theColUpper: number): number; + static LastPosition(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number): number; + /** + * Size (number of items). + */ + Size(): number; + /** + * Length (legacy int-returning API). + */ + Length(): number; + /** + * Returns number of rows. + */ + NbRows(): number; + /** + * Returns number of columns. + */ + NbColumns(): number; + /** + * Returns length of the row, i.e. number of columns. + */ + RowLength(): number; + /** + * Returns length of the column, i.e. number of rows. + */ + ColLength(): number; + /** + * LowerRow. + */ + LowerRow(): number; + /** + * UpperRow. + */ + UpperRow(): number; + /** + * LowerCol. + */ + LowerCol(): number; + /** + * UpperCol. + */ + UpperCol(): number; + /** + * Updates lower row. + */ + UpdateLowerRow(theLowerRow: number): void; + /** + * Updates lower column. + */ + UpdateLowerCol(theLowerCol: number): void; + /** + * Updates upper row. + */ + UpdateUpperRow(theUpperRow: number): void; + /** + * Updates upper column. + */ + UpdateUpperCol(theUpperCol: number): void; + /** + * Replaces this array by a copy of theOther array. Row and column bounds are copied from theOther. + */ + Assign(theOther: NCollection_Array2_gp_Pnt): NCollection_Array2_gp_Pnt; + /** + * Replaces this array by a copy of theOther array. Row and column bounds are copied from theOther. + */ + Assign(theOther: unknown): unknown; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same dimensions as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array2_gp_Pnt): NCollection_Array2_gp_Pnt; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same dimensions as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: unknown): unknown; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will be left uninitialized and should not be used anymore. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array2_gp_Pnt): NCollection_Array2_gp_Pnt; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will be left uninitialized and should not be used anymore. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: unknown): unknown; + /** + * SetValue. + */ + SetValue(theRow: number, theCol: number, theItem: gp_Pnt): void; + /** + * SetValue. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * Resizes the array to specified bounds. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies elements in linear (row-major) order. No re-allocation is done if dimensions are unchanged. + * @param theRowLower new lower Row of array + * @param theRowUpper new upper Row of array + * @param theColLower new lower Column of array + * @param theColUpper new upper Column of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number, theToCopyData: boolean): void; + /** + * Zero-based Resize: resizes to theNbRows x theNbCols, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theNbRows new number of rows + * @param theNbCols new number of columns + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theNbRows: number, theNbCols: number, theToCopyData: boolean): void; + /** + * Zero-based Resize: resizes to theNbRows x theNbCols, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to specified bounds. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies elements in linear (row-major) order. No re-allocation is done if dimensions are unchanged. + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + /** + * Resizes the array preserving 2D element layout. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies min(oldNbRows,newNbRows) x min(oldNbCols,newNbCols) elements from the top-left corner of the old array to the top-left corner of the new, preserving relative (row, col) offsets from lower bounds. Trimming or growing as needed. No re-allocation is done if dimensions are unchanged. + * @param theRowLower new lower Row of array + * @param theRowUpper new upper Row of array + * @param theColLower new lower Column of array + * @param theColUpper new upper Column of array + * @param theToCopyData flag to copy existing data into new array + */ + ResizeWithTrim(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number, theToCopyData: boolean): void; + /** + * Zero-based ResizeWithTrim: resizes preserving 2D layout, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theNbRows new number of rows + * @param theNbCols new number of columns + * @param theToCopyData flag to copy existing data into new array + */ + ResizeWithTrim(theNbRows: number, theNbCols: number, theToCopyData: boolean): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_handle_Poly_Triangulation extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_handle_Poly_Triangulation); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: Poly_Triangulation[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_handle_Poly_Triangulation): NCollection_List_handle_Poly_Triangulation; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): Poly_Triangulation; + /** + * Last item. + */ + Last(): Poly_Triangulation; + /** + * Append one item at the end. + */ + Append(theItem: Poly_Triangulation): Poly_Triangulation; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_handle_Poly_Triangulation): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: Poly_Triangulation): Poly_Triangulation; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_handle_Poly_Triangulation): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_handle_Poly_Triangulation): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_handle_Geom2d_BezierCurve { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_handle_Geom2d_BezierCurve); + constructor(theLower: number, theUpper: number); + constructor(theBegin: Geom2d_BezierCurve, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: Geom2d_BezierCurve): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_handle_Geom2d_BezierCurve): NCollection_Array1_handle_Geom2d_BezierCurve; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_handle_Geom2d_BezierCurve): NCollection_Array1_handle_Geom2d_BezierCurve; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_handle_Geom2d_BezierCurve): NCollection_Array1_handle_Geom2d_BezierCurve; + /** + * @returns first element + */ + First(): Geom2d_BezierCurve; + /** + * @returns first element + */ + ChangeFirst(): Geom2d_BezierCurve; + /** + * @returns last element + */ + Last(): Geom2d_BezierCurve; + /** + * @returns last element + */ + ChangeLast(): Geom2d_BezierCurve; + /** + * Constant value access. + */ + Value(theIndex: number): Geom2d_BezierCurve; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): Geom2d_BezierCurve; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Geom2d_BezierCurve; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Geom2d_BezierCurve; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: Geom2d_BezierCurve): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class ReplicadEdgeMeshData { + constructor(); + constructor(other: ReplicadEdgeMeshData); + getLinesPtr(): number; + getLinesSize(): number; + getEdgeGroupsPtr(): number; + getEdgeGroupsSize(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_int { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: number): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_gp_Pnt2d { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_gp_Pnt2d); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_gp_Pnt2d): NCollection_Sequence_gp_Pnt2d; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: gp_Pnt2d): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_gp_Pnt2d): void; + /** + * Prepend one item. + */ + Prepend(theItem: gp_Pnt2d): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_gp_Pnt2d): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: gp_Pnt2d): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt2d): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt2d): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: gp_Pnt2d): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_gp_Pnt2d): void; + /** + * First item access. + */ + First(): gp_Pnt2d; + /** + * First item access. + */ + ChangeFirst(): gp_Pnt2d; + /** + * Last item access. + */ + Last(): gp_Pnt2d; + /** + * Last item access. + */ + ChangeLast(): gp_Pnt2d; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): gp_Pnt2d; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): gp_Pnt2d; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: gp_Pnt2d): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Pnt2d; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Pnt2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: unknown, theItem: Standard_Transient): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: unknown, theItem: Standard_Transient): Standard_Transient; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: unknown, theItem: Standard_Transient): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: unknown, theItem: Standard_Transient): Standard_Transient; + /** + * IsBound. + */ + IsBound(theKey: unknown): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: unknown): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: unknown): Standard_Transient; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: unknown): Standard_Transient; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: unknown): Standard_Transient; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_2 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_3 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_4 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_5 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_6 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient_7 extends NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_Extrema_POnCurv2d { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_Extrema_POnCurv2d); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_Extrema_POnCurv2d): NCollection_Sequence_Extrema_POnCurv2d; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: unknown): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_Extrema_POnCurv2d): void; + /** + * Prepend one item. + */ + Prepend(theItem: unknown): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_Extrema_POnCurv2d): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: unknown): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_Extrema_POnCurv2d): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_Extrema_POnCurv2d): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: unknown): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_Extrema_POnCurv2d): void; + /** + * First item access. + */ + First(): unknown; + /** + * First item access. + */ + ChangeFirst(): unknown; + /** + * Last item access. + */ + Last(): unknown; + /** + * Last item access. + */ + ChangeLast(): unknown; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): unknown; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): unknown; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_ChFiDS_CircSection { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_ChFiDS_CircSection); + constructor(theLower: number, theUpper: number); + constructor(theBegin: unknown, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: unknown): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_ChFiDS_CircSection): NCollection_Array1_ChFiDS_CircSection; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_ChFiDS_CircSection): NCollection_Array1_ChFiDS_CircSection; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_ChFiDS_CircSection): NCollection_Array1_ChFiDS_CircSection; + /** + * @returns first element + */ + First(): unknown; + /** + * @returns first element + */ + ChangeFirst(): unknown; + /** + * @returns last element + */ + Last(): unknown; + /** + * @returns last element + */ + ChangeLast(): unknown; + /** + * Constant value access. + */ + Value(theIndex: number): unknown; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): unknown; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_handle_TCollection_HAsciiString { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_handle_TCollection_HAsciiString); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_handle_TCollection_HAsciiString): NCollection_Sequence_handle_TCollection_HAsciiString; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: TCollection_HAsciiString): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_handle_TCollection_HAsciiString): void; + /** + * Prepend one item. + */ + Prepend(theItem: TCollection_HAsciiString): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_handle_TCollection_HAsciiString): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: TCollection_HAsciiString): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_handle_TCollection_HAsciiString): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_handle_TCollection_HAsciiString): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: TCollection_HAsciiString): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_handle_TCollection_HAsciiString): void; + /** + * First item access. + */ + First(): TCollection_HAsciiString; + /** + * First item access. + */ + ChangeFirst(): TCollection_HAsciiString; + /** + * Last item access. + */ + Last(): TCollection_HAsciiString; + /** + * Last item access. + */ + ChangeLast(): TCollection_HAsciiString; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): TCollection_HAsciiString; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): TCollection_HAsciiString; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: TCollection_HAsciiString): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): TCollection_HAsciiString; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): TCollection_HAsciiString; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_2 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_3 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_4 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_5 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_6 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int_7 extends NCollection_DataMap_TCollection_ExtendedString_handle_NCollection_HArray1_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_handle_TCollection_HAsciiString { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: TCollection_HAsciiString): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1..Extent. See the class Map from NCollection for a discussion about the number of buckets. + */ +export declare class NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(theExtent: number): void; + /** + * Add adds a new key to the map. + * @param theKey1 key to add + * @returns index of the key (new or existing) + */ + Add(theKey1: TDF_Attribute): number; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing key. + * @param theKey1 key to add + * @returns const reference to the key in the map + */ + Added(theKey1: TDF_Attribute): TDF_Attribute; + /** + * Contains. + */ + Contains(theKey1: TDF_Attribute): boolean; + /** + * Substitute. + */ + Substitute(theIndex: number, theKey1: TDF_Attribute): void; + /** + * Swaps two elements with the given indices. + */ + Swap(theIndex1: number, theIndex2: number): void; + /** + * RemoveLast. + */ + RemoveLast(): void; + /** + * Remove the key of the given index. Caution! The index of the last key can be changed. + */ + RemoveFromIndex(theIndex: number): void; + /** + * Remove the given key. Caution! The index of the last key can be changed. + */ + RemoveKey(theKey1: TDF_Attribute): boolean; + /** + * FindKey. + */ + FindKey(theIndex: number): TDF_Attribute; + /** + * FindIndex. + */ + FindIndex(theKey1: TDF_Attribute): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_2 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_3 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_4 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_5 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_6 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedMap_handle_TDF_Attribute_7 extends NCollection_IndexedMap_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_handle_Geom2d_BSplineCurve { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: Geom2d_BSplineCurve); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: Geom2d_BSplineCurve, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Single hashed Map. This Map is used to store and retrieve keys in linear time. + * + * The {@link Iterator | `Iterator`} class can be used to explore the content of the map. It is not wise to iterate and modify a map in parallel. + * + * To compute the hashcode of the key the function ::HashCode must be defined in the global namespace + * + * To compare two keys the function `IsEqual` must be defined in the global namespace. + * + * The performance of a Map is conditioned by its number of buckets that should be kept greater to the number of keys. This map has an automatic management of the number of buckets. It is resized when the number of Keys becomes greater than the number of buckets. + * + * If you have a fair idea of the number of objects you can save on automatic resizing by giving a number of buckets at creation or using the ReSize method. This should be consider only for crucial optimisation issues. + */ +export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Add. + */ + Add(theKey: TopoDS_Shape): boolean; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing object. + */ + Added(theKey: TopoDS_Shape): TopoDS_Shape; + /** + * Contains. + */ + Contains(theKey: TopoDS_Shape): boolean; + /** + * Checks if this map contains all keys of another map. This function checks if this map contains all keys of another map. + * @deprecated + */ + Contains(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Remove. + */ + Remove(K: TopoDS_Shape): boolean; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** + * Checks if two maps contain exactly the same keys. This function compares the keys of this map and another map and returns true if they contain exactly the same keys. + * @deprecated + */ + IsEqual(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Sets this Map to be the result of union (aka addition, fuse, merge, boolean OR) operation between two given Maps The new Map contains the values that are contained either in the first map or in the second map or in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be passed as one of operands. + * @deprecated + */ + Union(theLeft: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theRight: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Apply to this Map the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in this map or contained in the given (operand) map. This algorithm is similar to method `Union()`. Returns True if contents of this map is changed. + * @deprecated + */ + Unite(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Returns true if this and theMap have common elements. + * @deprecated + */ + HasIntersection(theMap: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Sets this Map to be the result of intersection (aka multiplication, common, boolean AND) operation between two given Maps. The new Map contains only the values that are contained in both map operands. All previous content of this Map is cleared. This same map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Intersection(theLeft: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theRight: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Apply to this Map the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both this and the given maps. This algorithm is similar to method `Intersection()`. Returns True if contents of this map is changed. + * @deprecated + */ + Intersect(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Sets this Map to be the result of subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation between two given Maps. The new Map contains only the values that are contained in the first map operands and not contained in the second one. All previous content of this Map is cleared. + * @deprecated + */ + Subtraction(theLeft: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theRight: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Apply to this Map the subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation with another (given) Map. The result contains only the values that were previously contained in this map and not contained in this map. This algorithm is similar to method `Subtract()` with two operands. Returns True if contents of this map is changed. + * @deprecated + */ + Subtract(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Sets this Map to be the result of symmetric difference (aka exclusive disjunction, boolean XOR) operation between two given Maps. The new Map contains the values that are contained only in the first or the second operand maps but not in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Difference(theLeft: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theRight: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Apply to this Map the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in this or the operand map, but not in both. This algorithm is similar to method `Difference()`. Returns True if contents of this map is changed. + * @deprecated + */ + Differ(theOther: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_2 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_3 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_4 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_5 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_6 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher_7 extends NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: number): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: number): number; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: number): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: number): number; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): number; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): number; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_2 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_3 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_4 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_5 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_6 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_int_7 extends NCollection_DataMap_TCollection_ExtendedString_int { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: unknown, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: unknown, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: unknown, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: unknown, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: unknown): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: unknown): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: unknown): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: unknown): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: unknown): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_2 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_3 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_4 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_5 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_6 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString_7 extends NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_int { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_int); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_int): NCollection_Sequence_int; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: number): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_int): void; + /** + * Prepend one item. + */ + Prepend(theItem: number): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_int): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: number): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_int): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_int): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: number): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_int): void; + /** + * First item access. + */ + First(): number; + /** + * First item access. + */ + ChangeFirst(): number; + /** + * Last item access. + */ + Last(): number; + /** + * Last item access. + */ + ChangeLast(): number; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): number; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): number; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: number): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): number; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class ReplicadMeshData { + constructor(); + constructor(other: ReplicadMeshData); + getVerticesPtr(): number; + getNormalsPtr(): number; + getTrianglesPtr(): number; + getFaceGroupsPtr(): number; + getVerticesSize(): number; + getNormalsSize(): number; + getTrianglesSize(): number; + getFaceGroupsSize(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_float { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_float); + constructor(theLower: number, theUpper: number); + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: number): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_float): NCollection_Array1_float; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_float): NCollection_Array1_float; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_float): NCollection_Array1_float; + /** + * @returns first element + */ + First(): number; + /** + * @returns first element + */ + ChangeFirst(): number; + /** + * @returns last element + */ + Last(): number; + /** + * @returns last element + */ + ChangeLast(): number; + /** + * Constant value access. + */ + Value(theIndex: number): number; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): number; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): number; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): number; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: number): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_double { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_double); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_double): NCollection_Sequence_double; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: number): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_double): void; + /** + * Prepend one item. + */ + Prepend(theItem: number): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_double): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: number): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_double): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_double): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: number): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_double): void; + /** + * First item access. + */ + First(): number; + /** + * First item access. + */ + ChangeFirst(): number; + /** + * Last item access. + */ + Last(): number; + /** + * Last item access. + */ + ChangeLast(): number; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): number; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): number; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: number): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): number; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_IntRes2d_IntersectionPoint { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: unknown): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + /** + * Prepend one item. + */ + Prepend(theItem: unknown): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: unknown): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: unknown): void; + InsertBefore(theIndex: number, theSeq: unknown): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: unknown): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: unknown): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: unknown): void; + /** + * First item access. + */ + First(): unknown; + /** + * First item access. + */ + ChangeFirst(): unknown; + /** + * Last item access. + */ + Last(): unknown; + /** + * Last item access. + */ + ChangeLast(): unknown; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): unknown; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): unknown; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_double { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: number); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_gp_Vec { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_gp_Vec); + constructor(theLower: number, theUpper: number); + constructor(theBegin: gp_Vec, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: gp_Vec): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_gp_Vec): NCollection_Array1_gp_Vec; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_gp_Vec): NCollection_Array1_gp_Vec; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_gp_Vec): NCollection_Array1_gp_Vec; + /** + * @returns first element + */ + First(): gp_Vec; + /** + * @returns first element + */ + ChangeFirst(): gp_Vec; + /** + * @returns last element + */ + Last(): gp_Vec; + /** + * @returns last element + */ + ChangeLast(): gp_Vec; + /** + * Constant value access. + */ + Value(theIndex: number): gp_Vec; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): gp_Vec; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Vec; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Vec; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: gp_Vec): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_gp_Pnt { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_gp_Pnt); + constructor(theLower: number, theUpper: number); + constructor(theBegin: gp_Pnt, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: gp_Pnt): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_gp_Pnt): NCollection_Array1_gp_Pnt; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_gp_Pnt): NCollection_Array1_gp_Pnt; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_gp_Pnt): NCollection_Array1_gp_Pnt; + /** + * @returns first element + */ + First(): gp_Pnt; + /** + * @returns first element + */ + ChangeFirst(): gp_Pnt; + /** + * @returns last element + */ + Last(): gp_Pnt; + /** + * @returns last element + */ + ChangeLast(): gp_Pnt; + /** + * Constant value access. + */ + Value(theIndex: number): gp_Pnt; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): gp_Pnt; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Pnt; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Pnt; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: gp_Pnt): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_TopoDS_Shape { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: TopoDS_Shape): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_handle_Message_Alert extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_handle_Message_Alert); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: unknown[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_handle_Message_Alert): NCollection_List_handle_Message_Alert; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): unknown; + /** + * Last item. + */ + Last(): unknown; + /** + * Append one item at the end. + */ + Append(theItem: unknown): unknown; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_handle_Message_Alert): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: unknown): unknown; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_handle_Message_Alert): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_handle_Message_Alert): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_2 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_3 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_4 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_5 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_6 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData_7 extends NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Single hashed Map. This Map is used to store and retrieve keys in linear time. + * + * The {@link Iterator | `Iterator`} class can be used to explore the content of the map. It is not wise to iterate and modify a map in parallel. + * + * To compute the hashcode of the key the function ::HashCode must be defined in the global namespace + * + * To compare two keys the function `IsEqual` must be defined in the global namespace. + * + * The performance of a Map is conditioned by its number of buckets that should be kept greater to the number of keys. This map has an automatic management of the number of buckets. It is resized when the number of Keys becomes greater than the number of buckets. + * + * If you have a fair idea of the number of objects you can save on automatic resizing by giving a number of buckets at creation or using the ReSize method. This should be consider only for crucial optimisation issues. + */ +export declare class NCollection_Map_handle_TDF_Attribute { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Add. + */ + Add(theKey: TDF_Attribute): boolean; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing object. + */ + Added(theKey: TDF_Attribute): TDF_Attribute; + /** + * Contains. + */ + Contains(theKey: TDF_Attribute): boolean; + /** + * Checks if this map contains all keys of another map. This function checks if this map contains all keys of another map. + * @deprecated + */ + Contains(theOther: unknown): boolean; + /** + * Remove. + */ + Remove(K: TDF_Attribute): boolean; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** + * Checks if two maps contain exactly the same keys. This function compares the keys of this map and another map and returns true if they contain exactly the same keys. + * @deprecated + */ + IsEqual(theOther: unknown): boolean; + /** + * Sets this Map to be the result of union (aka addition, fuse, merge, boolean OR) operation between two given Maps The new Map contains the values that are contained either in the first map or in the second map or in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be passed as one of operands. + * @deprecated + */ + Union(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in this map or contained in the given (operand) map. This algorithm is similar to method `Union()`. Returns True if contents of this map is changed. + * @deprecated + */ + Unite(theOther: unknown): boolean; + /** + * Returns true if this and theMap have common elements. + * @deprecated + */ + HasIntersection(theMap: unknown): boolean; + /** + * Sets this Map to be the result of intersection (aka multiplication, common, boolean AND) operation between two given Maps. The new Map contains only the values that are contained in both map operands. All previous content of this Map is cleared. This same map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Intersection(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both this and the given maps. This algorithm is similar to method `Intersection()`. Returns True if contents of this map is changed. + * @deprecated + */ + Intersect(theOther: unknown): boolean; + /** + * Sets this Map to be the result of subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation between two given Maps. The new Map contains only the values that are contained in the first map operands and not contained in the second one. All previous content of this Map is cleared. + * @deprecated + */ + Subtraction(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation with another (given) Map. The result contains only the values that were previously contained in this map and not contained in this map. This algorithm is similar to method `Subtract()` with two operands. Returns True if contents of this map is changed. + * @deprecated + */ + Subtract(theOther: unknown): boolean; + /** + * Sets this Map to be the result of symmetric difference (aka exclusive disjunction, boolean XOR) operation between two given Maps. The new Map contains the values that are contained only in the first or the second operand maps but not in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Difference(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in this or the operand map, but not in both. This algorithm is similar to method `Difference()`. Returns True if contents of this map is changed. + * @deprecated + */ + Differ(theOther: unknown): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_Map_handle_TDF_Attribute_2 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_Map_handle_TDF_Attribute_3 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_handle_TDF_Attribute_4 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_handle_TDF_Attribute_5 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_handle_TDF_Attribute_6 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_handle_TDF_Attribute_7 extends NCollection_Map_handle_TDF_Attribute { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_TDF_Label { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_TDF_Label); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_TDF_Label): NCollection_Sequence_TDF_Label; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: TDF_Label): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_TDF_Label): void; + /** + * Prepend one item. + */ + Prepend(theItem: TDF_Label): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_TDF_Label): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: TDF_Label): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_TDF_Label): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_TDF_Label): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: TDF_Label): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_TDF_Label): void; + /** + * First item access. + */ + First(): TDF_Label; + /** + * First item access. + */ + ChangeFirst(): TDF_Label; + /** + * Last item access. + */ + Last(): TDF_Label; + /** + * Last item access. + */ + ChangeLast(): TDF_Label; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): TDF_Label; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): TDF_Label; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: TDF_Label): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): TDF_Label; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): TDF_Label; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class OCJS_ShapeHasher { + constructor(); + static HashCode(shape: TopoDS_Shape, argNo1: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: unknown, theItem: unknown): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: unknown, theItem: unknown): unknown; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: unknown, theItem: unknown): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: unknown, theItem: unknown): unknown; + /** + * IsBound. + */ + IsBound(theKey: unknown): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: unknown): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: unknown): unknown; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: unknown): unknown; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: unknown): unknown; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_2 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_3 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_4 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_5 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_6 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile_7 extends NCollection_DataMap_TCollection_AsciiString_handle_STEPCAFControl_ExternFile { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_unsignedchar { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: string); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: string, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_handle_Geom_BSplineCurve { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_handle_Geom_BSplineCurve); + constructor(theLower: number, theUpper: number); + constructor(theBegin: Geom_BSplineCurve, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: Geom_BSplineCurve): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_handle_Geom_BSplineCurve): NCollection_Array1_handle_Geom_BSplineCurve; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_handle_Geom_BSplineCurve): NCollection_Array1_handle_Geom_BSplineCurve; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_handle_Geom_BSplineCurve): NCollection_Array1_handle_Geom_BSplineCurve; + /** + * @returns first element + */ + First(): Geom_BSplineCurve; + /** + * @returns first element + */ + ChangeFirst(): Geom_BSplineCurve; + /** + * @returns last element + */ + Last(): Geom_BSplineCurve; + /** + * @returns last element + */ + ChangeLast(): Geom_BSplineCurve; + /** + * Constant value access. + */ + Value(theIndex: number): Geom_BSplineCurve; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): Geom_BSplineCurve; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Geom_BSplineCurve; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Geom_BSplineCurve; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: Geom_BSplineCurve): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class BRepToolsWrapper { + constructor(); + static Write(shape: TopoDS_Shape): string; + static Read(data: string): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node. + */ +export declare class NCollection_List_TDF_Label extends NCollection_BaseList { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_List_TDF_Label); + /** + * Initializer list constructor. + * @param theInitList initializer list of elements to populate the list + * @param theAllocator optional allocator for memory management + */ + constructor(theInitList: TDF_Label[], theAllocator?: unknown); + // dropped: appendList param 0 resolves to excluded type NCollection_ListNode + /** + * Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. + */ + Assign(theOther: NCollection_List_TDF_Label): NCollection_List_TDF_Label; + /** + * Clear this list. + */ + Clear(theAllocator?: unknown): void; + /** + * First item. + */ + First(): TDF_Label; + /** + * Last item. + */ + Last(): TDF_Label; + /** + * Append one item at the end. + */ + Append(theItem: TDF_Label): TDF_Label; + /** + * Append one item at the end. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Append(theOther: NCollection_List_TDF_Label): void; + /** + * Prepend one item at the beginning. + */ + Prepend(theItem: TDF_Label): TDF_Label; + /** + * Prepend one item at the beginning. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theOther: NCollection_List_TDF_Label): void; + /** + * RemoveFirst item. + */ + RemoveFirst(): void; + /** + * Reverse the list. + */ + Reverse(): void; + /** + * Exchange the content of two lists without re-allocations. Swaps all internal state including allocators, ensuring correct deallocation. Existing iterators remain valid but will point to the other list's elements. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: NCollection_List_TDF_Label): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_Poly_Triangle { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_Poly_Triangle); + constructor(theLower: number, theUpper: number); + constructor(theBegin: Poly_Triangle, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: Poly_Triangle): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_Poly_Triangle): NCollection_Array1_Poly_Triangle; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_Poly_Triangle): NCollection_Array1_Poly_Triangle; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_Poly_Triangle): NCollection_Array1_Poly_Triangle; + /** + * @returns first element + */ + First(): Poly_Triangle; + /** + * @returns first element + */ + ChangeFirst(): Poly_Triangle; + /** + * @returns last element + */ + Last(): Poly_Triangle; + /** + * @returns last element + */ + ChangeLast(): Poly_Triangle; + /** + * Constant value access. + */ + Value(theIndex: number): Poly_Triangle; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): Poly_Triangle; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Poly_Triangle; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Poly_Triangle; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: Poly_Triangle): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_TopoDS_Shape { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_TopoDS_Shape); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_TopoDS_Shape): NCollection_Sequence_TopoDS_Shape; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: TopoDS_Shape): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_TopoDS_Shape): void; + /** + * Prepend one item. + */ + Prepend(theItem: TopoDS_Shape): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_TopoDS_Shape): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: TopoDS_Shape): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_TopoDS_Shape): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_TopoDS_Shape): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: TopoDS_Shape): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_TopoDS_Shape): void; + /** + * First item access. + */ + First(): TopoDS_Shape; + /** + * First item access. + */ + ChangeFirst(): TopoDS_Shape; + /** + * Last item access. + */ + Last(): TopoDS_Shape; + /** + * Last item access. + */ + ChangeLast(): TopoDS_Shape; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): TopoDS_Shape; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): TopoDS_Shape; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: TopoDS_Shape): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): TopoDS_Shape; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed sequences. Inherits from both `NCollection_Sequence` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted sequence functionality. + */ +export declare class NCollection_HSequence_TCollection_AsciiString { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from sequence. + * @param theOther the sequence to copy from + */ + constructor(theOther: any); + /** + * Returns const reference to the underlying sequence. + */ + Sequence(): any; + /** + * Returns mutable reference to the underlying sequence. + */ + ChangeSequence(): any; + /** + * Append single item. + * @param theItem the item to append + */ + Append(theItem: unknown): void; + /** + * Append another sequence. + * @param theSequence the sequence to append + */ + Append(theSequence: any): void; + /** + * Append single item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class `NCollection_Array1` represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays. + * + * Examples: + * + * ``` + * Itemtab[100];//anexamplewithaCarray NCollection_Array1ttab(tab[0],1,100); NCollection_Array1tttab(ttab(10),10,20);//asliceofttab + * ``` + * + * If you want to reindex an array from 1 to Length do: + * + * ``` + * NCollection_Array1tab1(tab(tab.Lower()),1,tab.Length()); + * ``` + * + * Warning: Programs client of such a class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * ``` + * for(i=A.Lower();i<=A.Upper();i++) + * ``` + * + * Zero-based (size_t) construction mode: Use `NCollection_Array1(size_t theSize)` or `NCollection_Array1(pointer, size_t)` to create a zero-based array (`Lower()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variants do NOT own the memory and will not free it on destruction. + * + * ``` + * intaBuffer[100]; NCollection_Array1aZero(100);//allocates,lower=0 NCollection_Array1aWrap(aBuffer,100);//wrapsaBuffer,lower=0,notowner for(size_ti=0;i(i); + * ``` + */ +export declare class NCollection_Array1_gp_Pnt2d { + constructor(); + /** + * Zero-based constructor: allocates theSize elements with lower bound 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theSize: number); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array1_gp_Pnt2d); + constructor(theLower: number, theUpper: number); + constructor(theBegin: gp_Pnt2d, theLower: number, theUpper: number, theUseBuffer?: boolean); + /** + * Initialise the items with theValue. + */ + Init(theValue: gp_Pnt2d): void; + /** + * Size query. + */ + Size(): number; + /** + * Length query (legacy int-returning API). + */ + Length(): number; + /** + * Return TRUE if array has zero length. + */ + IsEmpty(): boolean; + /** + * Lower bound. + */ + Lower(): number; + /** + * Upper bound. + */ + Upper(): number; + /** + * Replaces this array by a copy of theOther array. Bounds and length are copied from theOther. When this array wraps an external (non-owned) buffer: + * + * - if theOther has the same length, values are copied in place into the external buffer and ownership is unchanged; + * - if theOther has a different length, this array detaches from the external buffer and allocates a fresh owned buffer. Use `CopyValues()` to preserve this array's bounds. + */ + Assign(theOther: NCollection_Array1_gp_Pnt2d): NCollection_Array1_gp_Pnt2d; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same length as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array1_gp_Pnt2d): NCollection_Array1_gp_Pnt2d; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will keep pointer to the memory buffer and range, but it will not free the buffer on destruction. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array1_gp_Pnt2d): NCollection_Array1_gp_Pnt2d; + /** + * @returns first element + */ + First(): gp_Pnt2d; + /** + * @returns first element + */ + ChangeFirst(): gp_Pnt2d; + /** + * @returns last element + */ + Last(): gp_Pnt2d; + /** + * @returns last element + */ + ChangeLast(): gp_Pnt2d; + /** + * Constant value access. + */ + Value(theIndex: number): gp_Pnt2d; + /** + * Variable value access. + */ + ChangeValue(theIndex: number): gp_Pnt2d; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): gp_Pnt2d; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): gp_Pnt2d; + /** + * Set value. + */ + SetValue(theIndex: number, theItem: gp_Pnt2d): void; + /** + * Changes the lowest bound. Do not move data. + */ + UpdateLowerBound(theLower: number): void; + /** + * Changes the upper bound. Do not move data. + */ + UpdateUpperBound(theUpper: number): void; + /** + * Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. + * @param theLower new lower bound of array + * @param theUpper new upper bound of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to theSize elements, keeping the lower bound unchanged. + * @param theSize new number of elements + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + IsDeletable(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: Single hashed Map. This Map is used to store and retrieve keys in linear time. + * + * The {@link Iterator | `Iterator`} class can be used to explore the content of the map. It is not wise to iterate and modify a map in parallel. + * + * To compute the hashcode of the key the function ::HashCode must be defined in the global namespace + * + * To compare two keys the function `IsEqual` must be defined in the global namespace. + * + * The performance of a Map is conditioned by its number of buckets that should be kept greater to the number of keys. This map has an automatic management of the number of buckets. It is resized when the number of Keys becomes greater than the number of buckets. + * + * If you have a fair idea of the number of objects you can save on automatic resizing by giving a number of buckets at creation or using the ReSize method. This should be consider only for crucial optimisation issues. + */ +export declare class NCollection_Map_TDF_Label { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assign. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Add. + */ + Add(theKey: TDF_Label): boolean; + /** + * Added: add a new key if not yet in the map, and return reference to either newly added or previously existing object. + */ + Added(theKey: TDF_Label): TDF_Label; + /** + * Contains. + */ + Contains(theKey: TDF_Label): boolean; + /** + * Checks if this map contains all keys of another map. This function checks if this map contains all keys of another map. + * @deprecated + */ + Contains(theOther: unknown): boolean; + /** + * Remove. + */ + Remove(K: TDF_Label): boolean; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** + * Checks if two maps contain exactly the same keys. This function compares the keys of this map and another map and returns true if they contain exactly the same keys. + * @deprecated + */ + IsEqual(theOther: unknown): boolean; + /** + * Sets this Map to be the result of union (aka addition, fuse, merge, boolean OR) operation between two given Maps The new Map contains the values that are contained either in the first map or in the second map or in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be passed as one of operands. + * @deprecated + */ + Union(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in this map or contained in the given (operand) map. This algorithm is similar to method `Union()`. Returns True if contents of this map is changed. + * @deprecated + */ + Unite(theOther: unknown): boolean; + /** + * Returns true if this and theMap have common elements. + * @deprecated + */ + HasIntersection(theMap: unknown): boolean; + /** + * Sets this Map to be the result of intersection (aka multiplication, common, boolean AND) operation between two given Maps. The new Map contains only the values that are contained in both map operands. All previous content of this Map is cleared. This same map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Intersection(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both this and the given maps. This algorithm is similar to method `Intersection()`. Returns True if contents of this map is changed. + * @deprecated + */ + Intersect(theOther: unknown): boolean; + /** + * Sets this Map to be the result of subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation between two given Maps. The new Map contains only the values that are contained in the first map operands and not contained in the second one. All previous content of this Map is cleared. + * @deprecated + */ + Subtraction(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation with another (given) Map. The result contains only the values that were previously contained in this map and not contained in this map. This algorithm is similar to method `Subtract()` with two operands. Returns True if contents of this map is changed. + * @deprecated + */ + Subtract(theOther: unknown): boolean; + /** + * Sets this Map to be the result of symmetric difference (aka exclusive disjunction, boolean XOR) operation between two given Maps. The new Map contains the values that are contained only in the first or the second operand maps but not in both. All previous content of this Map is cleared. This map (result of the boolean operation) can also be used as one of operands. + * @deprecated + */ + Difference(theLeft: unknown, theRight: unknown): void; + /** + * Apply to this Map the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in this or the operand map, but not in both. This algorithm is similar to method `Difference()`. Returns True if contents of this map is changed. + * @deprecated + */ + Differ(theOther: unknown): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_Map_TDF_Label_2 extends NCollection_Map_TDF_Label { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_Map_TDF_Label_3 extends NCollection_Map_TDF_Label { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TDF_Label_4 extends NCollection_Map_TDF_Label { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TDF_Label_5 extends NCollection_Map_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TDF_Label_6 extends NCollection_Map_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_Map_TDF_Label_7 extends NCollection_Map_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1.. Extent. An Item is stored with each key. + * + * This class is similar to IndexedMap from NCollection with the Item as a new feature. Note the important difference on the operator (). In the IndexedMap this operator returns the Key. In the IndexedDataMap this operator returns the Item. + * + * See the class Map from NCollection for a discussion about the number of buckets. + */ +export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Empty constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Returns the Index of already bound Key or appends new Key with specified Item value. + * @param theKey1 Key to search (and to bind, if it was not bound already) + * @param theItem Item value to set for newly bound Key; ignored if Key was already bound + * @returns index of Key + */ + Add(theKey1: Standard_Transient, theItem: Standard_Transient): number; + /** + * TryBound binds Item to Key only if Key is not yet bound. + * @param theKey1 key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey1: Standard_Transient, theItem: Standard_Transient): Standard_Transient; + /** + * TryBind binds Item to Key only if Key is not yet bound. + * @param theKey1 key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if key was newly added, false if key already existed + */ + TryBind(theKey1: Standard_Transient, theItem: Standard_Transient): boolean; + /** + * Bind binds Item to Key in map; overwrites value if Key already exists. + * @param theKey1 key to add/update + * @param theItem new item; overrides value previously bound to the key + * @returns true if Key was not bound already + */ + Bind(theKey1: Standard_Transient, theItem: Standard_Transient): boolean; + /** + * Bound binds Item to Key in map; overwrites value if Key already exists. + * @param theKey1 key to add/update + * @param theItem new item; overrides value previously bound to the key + * @returns pointer to modifiable Item + */ + Bound(theKey1: Standard_Transient, theItem: Standard_Transient): Standard_Transient; + /** + * Contains. + */ + Contains(theKey1: Standard_Transient): boolean; + /** + * Substitute. + */ + Substitute(theIndex: number, theKey1: Standard_Transient, theItem: Standard_Transient): void; + /** + * Swaps two elements with the given indices. + */ + Swap(theIndex1: number, theIndex2: number): void; + /** + * RemoveLast. + */ + RemoveLast(): void; + /** + * Remove the key of the given index. Caution! The index of the last key can be changed. + */ + RemoveFromIndex(theIndex: number): void; + /** + * Remove the given key. Caution! The index of the last key can be changed. + */ + RemoveKey(theKey1: Standard_Transient): void; + /** + * FindKey. + */ + FindKey(theIndex: number): Standard_Transient; + /** + * FindFromIndex. + */ + FindFromIndex(theIndex: number): Standard_Transient; + /** + * ChangeFromIndex. + */ + ChangeFromIndex(theIndex: number): Standard_Transient; + /** + * FindIndex. + */ + FindIndex(theKey1: Standard_Transient): number; + /** + * ChangeFromKey. + */ + ChangeFromKey(theKey1: Standard_Transient): Standard_Transient; + /** + * Seek returns pointer to Item by Key. Returns NULL if Key was not found. + */ + Seek(theKey1: Standard_Transient): Standard_Transient; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL if Key was not found. + */ + ChangeSeek(theKey1: Standard_Transient): Standard_Transient; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_2 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_3 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_4 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_5 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_6 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient_7 extends NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: string): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: string): string; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: string): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: string): string; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): string; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): string; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): string; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_2 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_3 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_4 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_5 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_6 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_unsignedchar_7 extends NCollection_DataMap_TCollection_ExtendedString_unsignedchar { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +export declare class ReplicadEdgeMeshExtractor { + constructor(); + static extract(shape: TopoDS_Shape, tolerance: number, angularTolerance: number): ReplicadEdgeMeshData; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The class Array2 represents bi-dimensional arrays of fixed size known at run time. The ranges of indices are user defined. + * + * Class allocates one 1D array storing full data (all Rows and Columns) and extra 1D array storing pointers to each Row. + * + * Warning: Programs clients of such class must be independent of the range of the first element. Then, a C++ for loop must be written like this + * + * for (i = A.LowerRow(); i <= A.UpperRow(); i++) for (j = A.LowerCol(); j <= A.UpperCol(); j++) + * + * Zero-based (size_t) construction mode: `NCollection_Array2(size_t theNbRows, size_t theNbCols)` creates a zero-based array (`LowerRow()`==0, `LowerCol()`==0). In this mode `At()`/ChangeAt() and STL iterators are the preferred access path - they address elements directly without any offset subtraction. Buffer-reuse variant `NCollection_Array2(pointer, size_t, size_t)` wraps an existing flat row-major buffer and does NOT own the memory. + */ +export declare class NCollection_Array2_double { + /** + * Empty constructor; should be used with caution. + * @see `Resize()` + * @see `Move()` + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Array2_double); + /** + * Zero-based constructor: allocates theNbRows x theNbCols elements with lower bounds 0. Use `At()`/ChangeAt() or STL iterators for optimal access (no offset subtraction). + */ + constructor(theNbRows: number, theNbCols: number); + /** + * Constructor. + */ + constructor(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number); + /** + * C array-based constructor. + */ + constructor(theBegin: number, theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number); + static BeginPosition(theRowLower: number, argNo1: number, theColLower: number, theColUpper: number): number; + static LastPosition(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number): number; + /** + * Size (number of items). + */ + Size(): number; + /** + * Length (legacy int-returning API). + */ + Length(): number; + /** + * Returns number of rows. + */ + NbRows(): number; + /** + * Returns number of columns. + */ + NbColumns(): number; + /** + * Returns length of the row, i.e. number of columns. + */ + RowLength(): number; + /** + * Returns length of the column, i.e. number of rows. + */ + ColLength(): number; + /** + * LowerRow. + */ + LowerRow(): number; + /** + * UpperRow. + */ + UpperRow(): number; + /** + * LowerCol. + */ + LowerCol(): number; + /** + * UpperCol. + */ + UpperCol(): number; + /** + * Updates lower row. + */ + UpdateLowerRow(theLowerRow: number): void; + /** + * Updates lower column. + */ + UpdateLowerCol(theLowerCol: number): void; + /** + * Updates upper row. + */ + UpdateUpperRow(theUpperRow: number): void; + /** + * Updates upper column. + */ + UpdateUpperCol(theUpperCol: number): void; + /** + * Replaces this array by a copy of theOther array. Row and column bounds are copied from theOther. + */ + Assign(theOther: NCollection_Array2_double): NCollection_Array2_double; + /** + * Replaces this array by a copy of theOther array. Row and column bounds are copied from theOther. + */ + Assign(theOther: unknown): unknown; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same dimensions as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: NCollection_Array2_double): NCollection_Array2_double; + /** + * Copies values from theOther array without changing this array bounds. This array should be pre-allocated and have the same dimensions as theOther; otherwise exception Standard_DimensionMismatch is thrown. + */ + CopyValues(theOther: unknown): unknown; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will be left uninitialized and should not be used anymore. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: NCollection_Array2_double): NCollection_Array2_double; + /** + * Move assignment. This array will borrow all the data from theOther. The moved object will be left uninitialized and should not be used anymore. + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Move(theOther: unknown): unknown; + /** + * SetValue. + */ + SetValue(theRow: number, theCol: number, theItem: number): void; + /** + * SetValue. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * Resizes the array to specified bounds. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies elements in linear (row-major) order. No re-allocation is done if dimensions are unchanged. + * @param theRowLower new lower Row of array + * @param theRowUpper new upper Row of array + * @param theColLower new lower Column of array + * @param theColUpper new upper Column of array + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number, theToCopyData: boolean): void; + /** + * Zero-based Resize: resizes to theNbRows x theNbCols, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theNbRows new number of rows + * @param theNbCols new number of columns + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theNbRows: number, theNbCols: number, theToCopyData: boolean): void; + /** + * Zero-based Resize: resizes to theNbRows x theNbCols, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theLower: number, theUpper: number, theToCopyData: boolean): void; + /** + * Resizes the array to specified bounds. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies elements in linear (row-major) order. No re-allocation is done if dimensions are unchanged. + * @param theToCopyData flag to copy existing data into new array + */ + Resize(theSize: number, theToCopyData: boolean): void; + /** + * Resizes the array preserving 2D element layout. When theToCopyData is false, the array is re-allocated without preserving data. When theToCopyData is true, copies min(oldNbRows,newNbRows) x min(oldNbCols,newNbCols) elements from the top-left corner of the old array to the top-left corner of the new, preserving relative (row, col) offsets from lower bounds. Trimming or growing as needed. No re-allocation is done if dimensions are unchanged. + * @param theRowLower new lower Row of array + * @param theRowUpper new upper Row of array + * @param theColLower new lower Column of array + * @param theColUpper new upper Column of array + * @param theToCopyData flag to copy existing data into new array + */ + ResizeWithTrim(theRowLower: number, theRowUpper: number, theColLower: number, theColUpper: number, theToCopyData: boolean): void; + /** + * Zero-based ResizeWithTrim: resizes preserving 2D layout, keeping lower bounds unchanged. No re-allocation is done if dimensions are unchanged. + * @param theNbRows new number of rows + * @param theNbCols new number of columns + * @param theToCopyData flag to copy existing data into new array + */ + ResizeWithTrim(theNbRows: number, theNbCols: number, theToCopyData: boolean): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Template class for Handle-managed 1D arrays. Inherits from both `NCollection_Array1` and {@link Standard_Transient | `Standard_Transient`}, providing reference-counted array functionality. + */ +export declare class NCollection_HArray1_int { + /** + * Default constructor. + */ + constructor(); + /** + * Copy constructor from array. + * @param theOther the array to copy from + */ + constructor(theOther: any); + /** + * Constructor with bounds. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + */ + constructor(theLower: number, theUpper: number); + /** + * Constructor with bounds and initial value. + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theValue initial value for all elements + */ + constructor(theLower: number, theUpper: number, theValue: number); + /** + * Constructor from C array. + * @param theBegin reference to the first element of a C array + * @param theLower lower bound of the array + * @param theUpper upper bound of the array + * @param theUseBuffer flag indicating whether to use external buffer (must be explicit) + */ + constructor(theBegin: number, theLower: number, theUpper: number, theUseBuffer: boolean); + /** + * Returns const reference to the underlying array. + */ + Array1(): any; + /** + * Returns mutable reference to the underlying array. + */ + ChangeArray1(): any; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TDF_Label, theItem: TDF_Label): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TDF_Label, theItem: TDF_Label): TDF_Label; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TDF_Label, theItem: TDF_Label): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TDF_Label, theItem: TDF_Label): TDF_Label; + /** + * IsBound. + */ + IsBound(theKey: TDF_Label): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TDF_Label): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TDF_Label): TDF_Label; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TDF_Label): TDF_Label; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TDF_Label): TDF_Label; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_2 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_3 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_4 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_5 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_6 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TDF_Label_TDF_Label_7 extends NCollection_DataMap_TDF_Label_TDF_Label { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_handle_Geom_Curve { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_handle_Geom_Curve); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_handle_Geom_Curve): NCollection_Sequence_handle_Geom_Curve; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: Geom_Curve): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_handle_Geom_Curve): void; + /** + * Prepend one item. + */ + Prepend(theItem: Geom_Curve): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_handle_Geom_Curve): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: Geom_Curve): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_handle_Geom_Curve): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_handle_Geom_Curve): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: Geom_Curve): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_handle_Geom_Curve): void; + /** + * First item access. + */ + First(): Geom_Curve; + /** + * First item access. + */ + ChangeFirst(): Geom_Curve; + /** + * Last item access. + */ + Last(): Geom_Curve; + /** + * Last item access. + */ + ChangeLast(): Geom_Curve; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): Geom_Curve; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): Geom_Curve; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: Geom_Curve): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): Geom_Curve; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): Geom_Curve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: TCollection_ExtendedString): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: TCollection_ExtendedString): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): TCollection_ExtendedString; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_2 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_3 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_4 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_5 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_6 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString_7 extends NCollection_DataMap_TCollection_ExtendedString_TCollection_ExtendedString { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: The DataMap is a Map to store keys with associated Items. See Map from NCollection for a discussion about the number of buckets. + * + * The DataMap can be seen as an extended array where the Keys are the indices. For this reason the operator () is defined on DataMap to fetch an Item from a Key. So the following syntax can be used : + * + * anItem = aMap(aKey); aMap(aKey) = anItem; + * + * This analogy has its limit. aMap(aKey) = anItem can be done only if aKey was previously bound to an item in the map. + */ +export declare class NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Empty Constructor. + */ + constructor(); + /** + * Copy constructor. + */ + constructor(theOther: unknown); + /** + * Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! + * @param theOther Mutated in place; read the updated value from this argument after the call. + */ + Exchange(theOther: unknown): void; + /** + * Returns const reference to the hasher. + */ + GetHasher(): unknown; + /** + * Assignment. This method does not change the internal allocator. + */ + Assign(theOther: unknown): unknown; + /** + * ReSize. + */ + ReSize(N: number): void; + /** + * Bind binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns true if Key was not bound already + */ + Bind(theKey: TCollection_ExtendedString, theItem: number): boolean; + /** + * Bound binds Item to Key in map. + * @param theKey key to add/update + * @param theItem new item; overrides value previously bound to the key (uses destroy+reconstruct) + * @returns pointer to modifiable Item + */ + Bound(theKey: TCollection_ExtendedString, theItem: number): number; + /** + * TryBind binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns true if Key was newly bound, false if Key already existed (no replacement) + */ + TryBind(theKey: TCollection_ExtendedString, theItem: number): boolean; + /** + * TryBound binds Item to Key in map only if Key is not yet bound. + * @param theKey key to add + * @param theItem item to bind if Key is not yet bound + * @returns reference to existing or newly bound Item + */ + TryBound(theKey: TCollection_ExtendedString, theItem: number): number; + /** + * IsBound. + */ + IsBound(theKey: TCollection_ExtendedString): boolean; + /** + * UnBind removes Item Key pair from map. + */ + UnBind(theKey: TCollection_ExtendedString): boolean; + /** + * Seek returns pointer to Item by Key. Returns NULL is Key was not bound. + */ + Seek(theKey: TCollection_ExtendedString): number; + /** + * ChangeSeek returns modifiable pointer to Item by Key. Returns NULL is Key was not bound. + */ + ChangeSeek(theKey: TCollection_ExtendedString): number; + /** + * ChangeFind returns modifiable Item by Key. Raises if Key was not bound. + */ + ChangeFind(theKey: TCollection_ExtendedString): number; + /** + * Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. + */ + Clear(doReleaseMemory: boolean): void; + /** + * Clear data and reset allocator. + */ + Clear(theAllocator: unknown): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + + /** + * Constructor. + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_2 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor. + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor (legacy int-taking). + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_3 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor (legacy int-taking). + */ + constructor(theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_4 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor with custom hasher (copy). + * @param theHasher custom hasher instance + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_5 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_6 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + export declare class NCollection_DataMap_TCollection_ExtendedString_double_7 extends NCollection_DataMap_TCollection_ExtendedString_double { + /** + * Constructor with custom hasher (move). + * @param theHasher custom hasher instance (moved) + * @param theNbBuckets initial number of buckets + * @param theAllocator custom memory allocator + */ + constructor(theHasher: unknown, theNbBuckets: number, theAllocator: unknown); + } + +/** + * Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n + */ +export declare class NCollection_Sequence_HLRBRep_ShapeBounds { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor. + */ + constructor(theAllocator: unknown); + /** + * Copy constructor. + */ + constructor(theOther: NCollection_Sequence_HLRBRep_ShapeBounds); + // dropped: delNode param 0 resolves to excluded type NCollection_SeqNode + /** + * Method for consistency with other collections. + * @returns Lower bound (inclusive) for iteration. + */ + static Lower(): number; + /** + * Method for consistency with other collections. + * @returns Upper bound (inclusive) for iteration. + */ + Upper(): number; + /** + * Empty query. + */ + IsEmpty(): boolean; + /** + * Reverse sequence. + */ + Reverse(): void; + /** + * Exchange two members. + */ + Exchange(I: number, J: number): void; + /** + * Clear the items out, take a new allocator if non null. + */ + Clear(theAllocator?: unknown): void; + /** + * Replace this sequence by the items of theOther. This method does not change the internal allocator. + */ + Assign(theOther: NCollection_Sequence_HLRBRep_ShapeBounds): NCollection_Sequence_HLRBRep_ShapeBounds; + /** + * Remove one item. + */ + Remove(theIndex: number): void; + /** + * Remove range of items. + */ + Remove(theFromIndex: number, theToIndex: number): void; + /** + * Append one item. + */ + Append(theItem: unknown): void; + /** + * Append one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Append(theSeq: NCollection_Sequence_HLRBRep_ShapeBounds): void; + /** + * Prepend one item. + */ + Prepend(theItem: unknown): void; + /** + * Prepend one item. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Prepend(theSeq: NCollection_Sequence_HLRBRep_ShapeBounds): void; + /** + * InsertBefore theIndex theItem. + */ + InsertBefore(theIndex: number, theItem: unknown): void; + InsertBefore(theIndex: number, theSeq: NCollection_Sequence_HLRBRep_ShapeBounds): void; + /** + * InsertAfter the position of iterator. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + InsertAfter(theIndex: number, theSeq: NCollection_Sequence_HLRBRep_ShapeBounds): void; + /** + * InsertAfter the position of iterator. + */ + InsertAfter(theIndex: number, theItem: unknown): void; + /** + * Split in two sequences. + * @param theSeq Mutated in place; read the updated value from this argument after the call. + */ + Split(theIndex: number, theSeq: NCollection_Sequence_HLRBRep_ShapeBounds): void; + /** + * First item access. + */ + First(): unknown; + /** + * First item access. + */ + ChangeFirst(): unknown; + /** + * Last item access. + */ + Last(): unknown; + /** + * Last item access. + */ + ChangeLast(): unknown; + /** + * Constant item access by theIndex. + */ + Value(theIndex: number): unknown; + /** + * Variable item access by theIndex. + */ + ChangeValue(theIndex: number): unknown; + /** + * Set item value by theIndex. + */ + SetValue(theIndex: number, theItem: unknown): void; + /** + * 0-based checked access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + At(theIndex: number): unknown; + /** + * 0-based checked mutable access independent of `Lower()`/Upper(). + * @param theIndex 0-based index in [0, `Size()`-1] + */ + ChangeAt(theIndex: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type BRepFill_TypeOfContact = typeof BRepFill_TypeOfContact[keyof typeof BRepFill_TypeOfContact]; +/** + * A pair of bound shapes with the result. + */ +export declare const BRepFill_TypeOfContact: { + readonly BRepFill_NoContact: 'BRepFill_NoContact'; + readonly BRepFill_Contact: 'BRepFill_Contact'; + readonly BRepFill_ContactOnBorder: 'BRepFill_ContactOnBorder'; +}; + +export type BOPAlgo_GlueEnum = typeof BOPAlgo_GlueEnum[keyof typeof BOPAlgo_GlueEnum]; +/** + * The Enumeration describes an additional option for the algorithms in the Boolean Component such as General Fuse, Boolean operations, Section, Maker Volume, Splitter and Cells Builder algorithms. + * + * The Gluing options have been designed to speed up the computation of the interference among arguments of the operations on special cases, in which the arguments may be overlapping but do not have real intersections between their sub-shapes. + * + * This option cannot be used on the shapes having real intersections, like intersection vertex between edges, or intersection vertex between edge and a face or intersection line between faces. + * + * There are two possibilities of overlapping shapes: + * + * 1. The shapes can be partially coinciding - the faces do not have intersection curves, but overlapping. The faces of such arguments will be split during the operation; + * 2. The shapes can be fully coinciding - there should be no partial overlapping of the faces, thus no intersection of type EDGE/FACE at all. In such cases the faces will not be split during the operation. + * + * Even though there are no real intersections on such cases without Gluing options the algorithm will still intersect the sub-shapes of the arguments with interfering bounding boxes. + * + * The performance improvement in gluing mode is achieved by excluding the most time consuming computations according to the given Gluing parameter: + * + * 1. Computation of FACE/FACE intersections for partial coincidence; + * 2. And computation of VERTEX/FACE, EDGE/FACE and FACE/FACE intersections for full coincidence. + * + * By setting the Gluing option for the operation user should guarantee that the arguments are really coinciding. The algorithms do not check this itself. Setting inappropriate option for the operation is likely to lead to incorrect result. + * + * There are following items in the enumeration: **BOPAlgo_GlueOff** - default value for the algorithms, Gluing is switched off; **BOPAlgo_GlueShift** - Glue option for shapes with partial coincidence; **BOPAlgo_GlueFull** - Glue option for shapes with full coincidence. + */ +export declare const BOPAlgo_GlueEnum: { + readonly BOPAlgo_GlueOff: 'BOPAlgo_GlueOff'; + readonly BOPAlgo_GlueShift: 'BOPAlgo_GlueShift'; + readonly BOPAlgo_GlueFull: 'BOPAlgo_GlueFull'; +}; + +/** + * The class provides the following options for the algorithms in Boolean Component: + * + * - *Memory allocation tool* - tool for memory allocations; + * - *Error and warning reporting* - allows recording warnings and errors occurred during the operation. Error means that the algorithm has failed. + * - *Parallel processing mode* - provides the possibility to perform operation in parallel mode; + * - *Fuzzy tolerance* - additional tolerance for the operation to detect touching or coinciding cases; + * - *Using the Oriented Bounding Boxes* - Allows using the Oriented Bounding Boxes of the shapes for filtering the intersections. + */ +export declare class BOPAlgo_Options { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor with allocator. + */ + constructor(theAllocator: unknown); + /** + * Returns allocator. + */ + Allocator(): unknown; + /** + * Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared. + */ + Clear(): void; + AddError(theAlert: unknown): void; + AddWarning(theAlert: unknown): void; + HasErrors(): boolean; + HasError(theType: unknown): boolean; + HasWarnings(): boolean; + HasWarning(theType: unknown): boolean; + GetReport(): unknown; + ClearWarnings(): void; + static GetParallelMode(): boolean; + static SetParallelMode(theNewMode: boolean): void; + SetRunParallel(theFlag: boolean): void; + RunParallel(): boolean; + SetFuzzyValue(theFuzz: number): void; + FuzzyValue(): number; + SetUseOBB(theUseOBB: boolean): void; + UseOBB(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class Cut provides Boolean cut operation between arguments and tools (Boolean Subtraction). + */ +export declare class BRepAlgoAPI_Cut extends BRepAlgoAPI_BooleanOperation { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor with two shapes -argument -tool - the type of the operation Obsolete. + */ + constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange?: Message_ProgressRange); + // dropped: BRepAlgoAPI_Cut param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: BRepAlgoAPI_Cut param 2 resolves to excluded type BOPAlgo_PaveFiller + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class contains API level of the General Fuse algorithm. + * + * Additionally to the options defined in the base class, the algorithm has the following options: + * + * - *Safe processing mode* - allows to avoid modification of the input shapes during the operation (by default it is off); + * - *Gluing options* - allows to speed up the calculation of the intersections on the special cases, in which some sub-shapes are coinciding. + * - *Disabling the check for inverted solids* - Disables/Enables the check of the input solids for inverted status (holes in the space). The default value is TRUE, i.e. the check is performed. Setting this flag to FALSE for inverted solids, most likely will lead to incorrect results. + * - *Disabling history collection* - allows disabling the collection of the history of shapes modifications during the operation. + * + * It returns the following Error statuses: + * + * - 0 - in case of success; + * - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the operation; + * - *BOPAlgo_AlertIntersectionFailed* - in case the intersection of the arguments has failed; + * - *BOPAlgo_AlertBuilderFailed* - in case building of the result shape has failed. + * + * Warnings statuses from underlying DS Filler and Builder algorithms are collected in the report. + * + * The class provides possibility to simplify the resulting shape by unification of the tangential edges and faces. It is performed by the method *SimplifyResult*. See description of this method for more details. + */ +export declare class BRepAlgoAPI_BuilderAlgo extends BRepAlgoAPI_Algo { + constructor(); + // dropped: BRepAlgoAPI_BuilderAlgo param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: DSFiller return resolves to excluded type BOPAlgo_PaveFiller + SetArguments(theLS: NCollection_List_TopoDS_Shape): void; + Arguments(): NCollection_List_TopoDS_Shape; + SetNonDestructive(theFlag: boolean): void; + NonDestructive(): boolean; + SetGlue(theGlue: BOPAlgo_GlueEnum): void; + Glue(): BOPAlgo_GlueEnum; + SetCheckInverted(theCheck: boolean): void; + CheckInverted(): boolean; + Build(theRange?: Message_ProgressRange): void; + SimplifyResult(theUnifyEdges?: boolean, theUnifyFaces?: boolean, theAngularTol?: number): void; + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + IsDeleted(S: TopoDS_Shape): boolean; + HasModified(): boolean; + HasGenerated(): boolean; + HasDeleted(): boolean; + SetToFillHistory(theHistFlag: boolean): void; + HasHistory(): boolean; + SectionEdges(): NCollection_List_TopoDS_Shape; + Builder(): unknown; + History(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class provides Boolean common operation between arguments and tools (Boolean Intersection). + */ +export declare class BRepAlgoAPI_Common extends BRepAlgoAPI_BooleanOperation { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor with two shapes -argument -tool - the type of the operation Obsolete. + */ + constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange?: Message_ProgressRange); + // dropped: BRepAlgoAPI_Common param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: BRepAlgoAPI_Common param 2 resolves to excluded type BOPAlgo_PaveFiller + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The algorithm is to build a Section operation between arguments and tools. The result of Section operation consists of vertices and edges. The result of Section operation contains: + * + * 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences + * 2. vertices that are subjects of V/E, V/F interferences + * 3. new edges that are subjects of F/F interferences + * 4. edges that are Common Blocks + */ +export declare class BRepAlgoAPI_Section extends BRepAlgoAPI_BooleanOperation { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor with two shapes -argument -tool - the flag: if =True - the algorithm is performed immediately Obsolete. + */ + constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, PerformNow?: boolean); + /** + * Constructor with two shapes - argument - tool - the flag: if =True - the algorithm is performed immediately Obsolete. + */ + constructor(S1: TopoDS_Shape, Pl: gp_Pln, PerformNow?: boolean); + /** + * Constructor with two shapes - argument - tool - the flag: if =True - the algorithm is performed immediately Obsolete. + */ + constructor(S1: TopoDS_Shape, Sf: Geom_Surface, PerformNow?: boolean); + /** + * Constructor with two shapes - argument - tool - the flag: if =True - the algorithm is performed immediately Obsolete. + */ + constructor(Sf: Geom_Surface, S2: TopoDS_Shape, PerformNow?: boolean); + /** + * Constructor with two shapes - argument - tool - the flag: if =True - the algorithm is performed immediately Obsolete. + */ + constructor(Sf1: Geom_Surface, Sf2: Geom_Surface, PerformNow?: boolean); + // dropped: BRepAlgoAPI_Section param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: BRepAlgoAPI_Section param 2 resolves to excluded type BOPAlgo_PaveFiller + /** + * initialize the argument - argument Obsolete + */ + Init1(S1: TopoDS_Shape): void; + /** + * initialize the argument - argument Obsolete + */ + Init1(Pl: gp_Pln): void; + /** + * initialize the argument - argument Obsolete + */ + Init1(Sf: Geom_Surface): void; + /** + * initialize the tool - tool Obsolete + */ + Init2(S2: TopoDS_Shape): void; + /** + * initialize the tool - tool Obsolete + */ + Init2(Pl: gp_Pln): void; + /** + * initialize the tool - tool Obsolete + */ + Init2(Sf: Geom_Surface): void; + Approximation(B: boolean): void; + /** + * Indicates whether the P-Curve should be (or not) performed on the argument. By default, no parametric 2D curve (pcurve) is defined for the edges of the result. If ComputePCurve1 equals true, further computations performed to attach an P-Curve in the parametric space of the argument to the constructed edges. Obsolete. + */ + ComputePCurveOn1(B: boolean): void; + /** + * Indicates whether the P-Curve should be (or not) performed on the tool. By default, no parametric 2D curve (pcurve) is defined for the edges of the result. If ComputePCurve1 equals true, further computations performed to attach an P-Curve in the parametric space of the tool to the constructed edges. Obsolete. + */ + ComputePCurveOn2(B: boolean): void; + /** + * Performs the algorithm Filling interference Data Structure (if it is necessary) Building the result of the operation. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * get the face of the first part giving section edge . Returns True on the 3 following conditions : 1/ is an edge returned by the `Shape()` metwod. 2/ First part of section performed is a shape. 3/ is built on a intersection curve (i.e is not the result of common edges) When False, F remains untouched. Obsolete + * @param F Mutated in place; read the updated value from this argument after the call. + */ + HasAncestorFaceOn1(E: TopoDS_Shape, F: TopoDS_Shape): boolean; + /** + * Identifies the ancestor faces of the intersection edge E resulting from the last computation performed in this framework, that is, the faces of the two original shapes on which the edge E lies: + * + * - HasAncestorFaceOn1 gives the ancestor face in the first shape, and + * - HasAncestorFaceOn2 gives the ancestor face in the second shape. These functions return true if an ancestor face F is found, or false if not. An ancestor face is identifiable for the edge E if the following conditions are satisfied: + * - the first part on which this algorithm performed its last computation is a shape, that is, it was not given as a surface or a plane at the time of construction of this algorithm or at a later time by the Init1 function, + * - E is one of the elementary edges built by the last computation of this section algorithm. To use these functions properly, you have to test the returned Boolean value before using the ancestor face: F is significant only if the returned Boolean value equals true. Obsolete + * @param F Mutated in place; read the updated value from this argument after the call. + */ + HasAncestorFaceOn2(E: TopoDS_Shape, F: TopoDS_Shape): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides the root interface for the API algorithms. + */ +export declare class BRepAlgoAPI_Algo extends BRepBuilderAPI_MakeShape { + /** + * Returns a shape built by the shape construction algorithm. Does not check if the shape is built. + */ + Shape(): TopoDS_Shape; + /** + * Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared. + */ + Clear(): void; + ClearWarnings(): void; + FuzzyValue(): number; + GetReport(): unknown; + HasError(theType: unknown): boolean; + HasErrors(): boolean; + HasWarning(theType: unknown): boolean; + HasWarnings(): boolean; + RunParallel(): boolean; + SetFuzzyValue(theFuzz: number): void; + SetRunParallel(theFlag: boolean): void; + SetUseOBB(theUseOBB: boolean): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The root API class for performing Boolean Operations on arbitrary shapes. + * + * The arguments of the operation are divided in two groups - *Objects* and *Tools*. Each group can contain any number of shapes, but each shape should be valid in terms of *{@link BRepCheck_Analyzer | `BRepCheck_Analyzer`}* and *{@link BOPAlgo_ArgumentAnalyzer | `BOPAlgo_ArgumentAnalyzer`}*. The algorithm builds the splits of the given arguments using the intersection results and combines the result of Boolean Operation of given type: + * + * - *FUSE* - union of two groups of objects; + * - *COMMON* - intersection of two groups of objects; + * - *CUT* - subtraction of one group from the other; + * - *SECTION* - section edges and vertices of all arguments; + * + * The rules for the arguments and type of the operation are the following: + * + * - For Boolean operation *FUSE* all arguments should have equal dimensions; + * - For Boolean operation *CUT* the minimal dimension of *Tools* should not be less than the maximal dimension of *Objects*; + * - For Boolean operation *COMMON* the arguments can have any dimension. + * - For Boolean operation *SECTION* the arguments can be of any type. + * + * Additionally to the errors of the base class the algorithm returns the following Errors: + * + * - *BOPAlgo_AlertBOPNotSet* - in case the type of Boolean Operation is not set. + */ +export declare class BRepAlgoAPI_BooleanOperation extends BRepAlgoAPI_BuilderAlgo { + constructor(); + // dropped: BRepAlgoAPI_BooleanOperation param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: BRepAlgoAPI_BooleanOperation param 2 resolves to excluded type BOPAlgo_PaveFiller + Shape1(): TopoDS_Shape; + Shape2(): TopoDS_Shape; + SetTools(theLS: NCollection_List_TopoDS_Shape): void; + Tools(): NCollection_List_TopoDS_Shape; + SetOperation(theBOP: unknown): void; + Operation(): unknown; + Build(theRange?: Message_ProgressRange): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The class provides Boolean fusion operation between arguments and tools (Boolean Union). + */ +export declare class BRepAlgoAPI_Fuse extends BRepAlgoAPI_BooleanOperation { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor with two shapes -argument -tool - the type of the operation Obsolete. + */ + constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange?: Message_ProgressRange); + // dropped: BRepAlgoAPI_Fuse param 0 resolves to excluded type BOPAlgo_PaveFiller + // dropped: BRepAlgoAPI_Fuse param 2 resolves to excluded type BOPAlgo_PaveFiller + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Loi composite constituee d une liste de lois de ranges consecutifs. Cette implementation un peu lourde permet de reunir en une seule loi des portions de loi construites de facon independantes (par exemple en interactif) et de lancer le walking d un coup a l echelle d une ElSpine. CET OBJET REPOND DONC A UN PROBLEME D IMPLEMENTATION SPECIFIQUE AUX CONGES!!! + */ +export declare class Law_Composite extends Law_Function { + /** + * Construct an empty {@link Law | `Law`}. + */ + constructor(); + /** + * Construct an empty, trimmed {@link Law | `Law`}. + */ + constructor(First: number, Last: number, Tol: number); + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . The array must provide enough room to accommodate for the parameters, i.e. T.Length() > `NbIntervals()`. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the value at parameter X. + */ + Value(X: number): number; + /** + * Returns the value and the first derivative at parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + */ + D1(X: number, F: number, D: number): { F: number; D: number }; + /** + * Returns the value, first and second derivatives at parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + * - `D2`: updated value from the call. + */ + D2(X: number, F: number, D: number, D2: number): { F: number; D: number; D2: number }; + /** + * Returns a law equivalent of between parameters and . is used to test for 3d points confusion. It is usfule to determines the derivatives in these values and if the {@link Law | `Law`} is not Cn. + */ + Trim(PFirst: number, PLast: number, Tol: number): Law_Function; + /** + * Returns the parametric bounds of the function. + * @returns A result object with fields: + * - `PFirst`: updated value from the call. + * - `PLast`: updated value from the call. + */ + Bounds(PFirst: number, PLast: number): { PFirst: number; PLast: number }; + /** + * Returns the elementary function of the composite used to compute at parameter W. + */ + ChangeElementaryLaw(W: number): Law_Function; + ChangeLaws(): NCollection_List_handle_Law_Function; + IsPeriodic(): boolean; + SetPeriodic(): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides an evolution law that interpolates a set of parameter and value pairs (wi, radi). + */ +export declare class Law_Interpol extends Law_BSpFunc { + /** + * Constructs an empty interpolative evolution law. The function Set is used to define the law. + */ + constructor(); + /** + * Defines this evolution law by interpolating the set of 2D points ParAndRad. The Y coordinate of a point of ParAndRad is the value of the function at the parameter point given by its X coordinate. If Periodic is true, this function is assumed to be periodic. Warning. + * + * - The X coordinates of points in the table ParAndRad must be given in ascendant order. + * - If Periodic is true, the first and last Y coordinates of points in the table ParAndRad are assumed to be equal. In addition, with the second syntax, Dd and Df are also assumed to be equal. If this is not the case, Set uses the first value(s) as last value(s). + */ + Set(ParAndRad: NCollection_Array1_gp_Pnt2d, Periodic: boolean): void; + /** + * Defines this evolution law by interpolating the set of 2D points ParAndRad. The Y coordinate of a point of ParAndRad is the value of the function at the parameter point given by its X coordinate. If Periodic is true, this function is assumed to be periodic. In the second syntax, Dd and Df define the values of the first derivative of the function at its first and last points. Warning. + * + * - The X coordinates of points in the table ParAndRad must be given in ascendant order. + * - If Periodic is true, the first and last Y coordinates of points in the table ParAndRad are assumed to be equal. In addition, with the second syntax, Dd and Df are also assumed to be equal. If this is not the case, Set uses the first value(s) as last value(s). + */ + Set(ParAndRad: NCollection_Array1_gp_Pnt2d, Dd: number, Df: number, Periodic: boolean): void; + SetInRelative(ParAndRad: NCollection_Array1_gp_Pnt2d, Ud: number, Uf: number, Periodic: boolean): void; + SetInRelative(ParAndRad: NCollection_Array1_gp_Pnt2d, Ud: number, Uf: number, Dd: number, Df: number, Periodic: boolean): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * {@link Law | `Law`} Function based on a BSpline curve 1d. Package methods and classes are implemented in package {@link Law | `Law`} to construct the basis curve with several constraints. + */ +export declare class Law_BSpFunc extends Law_Function { + constructor(); + constructor(C: unknown, First: number, Last: number); + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . The array must provide enough room to accommodate for the parameters, i.e. T.Length() > `NbIntervals()`. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the value of the function at the point of parameter X. + */ + Value(X: number): number; + /** + * Returns the value F and the first derivative D of the function at the point of parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + */ + D1(X: number, F: number, D: number): { F: number; D: number }; + /** + * Returns the value, first and second derivatives at parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + * - `D2`: updated value from the call. + */ + D2(X: number, F: number, D: number, D2: number): { F: number; D: number; D2: number }; + /** + * Returns a law equivalent of between parameters and . is used to test for 3d points confusion. It is usfule to determines the derivatives in these values and if the {@link Law | `Law`} is not Cn. + */ + Trim(PFirst: number, PLast: number, Tol: number): Law_Function; + /** + * Returns the parametric bounds of the function. + * @returns A result object with fields: + * - `PFirst`: updated value from the call. + * - `PLast`: updated value from the call. + */ + Bounds(PFirst: number, PLast: number): { PFirst: number; PLast: number }; + Curve(): unknown; + SetCurve(C: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an "S" evolution law. + */ +export declare class Law_S extends Law_BSpFunc { + /** + * Constructs an empty "S" evolution law. + */ + constructor(); + /** + * Defines this S evolution law by assigning both: + * + * - the bounds Pdeb and Pfin of the parameter, and + * - the values Valdeb and Valfin of the function at these two parametric bounds. The function is assumed to have the first derivatives equal to 0 at the two parameter points Pdeb and Pfin. + */ + Set(Pdeb: number, Valdeb: number, Pfin: number, Valfin: number): void; + /** + * Defines this S evolution law by assigning. + * + * - the bounds Pdeb and Pfin of the parameter, + * - the values Valdeb and Valfin of the function at these two parametric bounds, and + * - the values Ddeb and Dfin of the first derivative of the function at these two parametric bounds. + */ + Set(Pdeb: number, Valdeb: number, Ddeb: number, Pfin: number, Valfin: number, Dfin: number): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an linear evolution law. + */ +export declare class Law_Linear extends Law_Function { + /** + * Constructs an empty linear evolution law. + */ + constructor(); + /** + * Defines this linear evolution law by assigning both: + * + * - the bounds Pdeb and Pfin of the parameter, and + * - the values Valdeb and Valfin of the function at these two parametric bounds. + */ + Set(Pdeb: number, Valdeb: number, Pfin: number, Valfin: number): void; + /** + * Returns GeomAbs_CN. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns 1. + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . The array must provide enough room to accommodate for the parameters, i.e. T.Length() > `NbIntervals()`. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the value of this function at the point of parameter X. + */ + Value(X: number): number; + /** + * Returns the value F and the first derivative D of this function at the point of parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + */ + D1(X: number, F: number, D: number): { F: number; D: number }; + /** + * Returns the value, first and second derivatives at parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + * - `D2`: updated value from the call. + */ + D2(X: number, F: number, D: number, D2: number): { F: number; D: number; D2: number }; + /** + * Returns a law equivalent of between parameters and . is used to test for 3d points confusion. It is usfule to determines the derivatives in these values and if the {@link Law | `Law`} is not Cn. + */ + Trim(PFirst: number, PLast: number, Tol: number): Law_Function; + /** + * Returns the parametric bounds of the function. + * @returns A result object with fields: + * - `PFirst`: updated value from the call. + * - `PLast`: updated value from the call. + */ + Bounds(PFirst: number, PLast: number): { PFirst: number; PLast: number }; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Root class for evolution laws. + */ +export declare class Law_Function extends Standard_Transient { + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . The array must provide enough room to accommodate for the parameters, i.e. T.Length() > `NbIntervals()`. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the value of the function at the point of parameter X. + */ + Value(X: number): number; + /** + * Returns the value F and the first derivative D of the function at the point of parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + */ + D1(X: number, F: number, D: number): { F: number; D: number }; + /** + * Returns the value, first and second derivatives at parameter X. + * @returns A result object with fields: + * - `F`: updated value from the call. + * - `D`: updated value from the call. + * - `D2`: updated value from the call. + */ + D2(X: number, F: number, D: number, D2: number): { F: number; D: number; D2: number }; + /** + * Returns a law equivalent of between parameters and . is used to test for 3d points confusion. It is usfule to determines the derivatives in these values and if the {@link Law | `Law`} is not Cn. + */ + Trim(PFirst: number, PLast: number, Tol: number): Law_Function; + /** + * Returns the parametric bounds of the function. + * @returns A result object with fields: + * - `PFirst`: updated value from the call. + * - `PLast`: updated value from the call. + */ + Bounds(PFirst: number, PLast: number): { PFirst: number; PLast: number }; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements methods for computing. + * + * - the intersections between two 2D curves, + * - the self-intersections of a 2D curve. Using the InterCurveCurve algorithm allows to get the following results: + * - intersection points in the case of cross intersections, + * - intersection segments in the case of tangential intersections, + * - nothing in the case of no intersections. + */ +export declare class Geom2dAPI_InterCurveCurve { + /** + * Create an empty intersector. Use the function Init for further initialization of the intersection algorithm by curves or curve. + */ + constructor(); + /** + * Creates an object and computes self-intersections of the curve C1. Tolerance value Tol, defaulted to 1.0e-6, defines the precision of computing the intersection points. In case of a tangential intersection, Tol also defines the size of intersection segments (limited portions of the curves) where the distance between all points from two curves (or a curve in case of self-intersection) is less than Tol. Warning Use functions NbPoints and NbSegments to obtain the number of solutions. If the algorithm finds no intersections NbPoints and NbSegments return 0. + */ + constructor(C1: Geom2d_Curve, Tol?: number); + /** + * Creates an object and computes the intersections between the curves C1 and C2. + */ + constructor(C1: Geom2d_Curve, C2: Geom2d_Curve, Tol?: number); + /** + * Initializes an algorithm with the given arguments and computes the intersections between the curves C1. and C2. + */ + Init(C1: Geom2d_Curve, C2: Geom2d_Curve, Tol: number): void; + /** + * Initializes an algorithm with the given arguments and computes the self-intersections of the curve C1. Tolerance value Tol, defaulted to 1.0e-6, defines the precision of computing the intersection points. In case of a tangential intersection, Tol also defines the size of intersection segments (limited portions of the curves) where the distance between all points from two curves (or a curve in case of self-intersection) is less than Tol. Warning Use functions NbPoints and NbSegments to obtain the number of solutions. If the algorithm finds no intersections NbPoints and NbSegments return 0. + */ + Init(C1: Geom2d_Curve, Tol: number): void; + /** + * Returns the number of intersection-points in case of cross intersections. NbPoints returns 0 if no intersections were found. + */ + NbPoints(): number; + /** + * Returns the intersection point of index Index. Intersection points are computed in case of cross intersections with a precision equal to the tolerance value assigned at the time of construction or in the function Init (this value is defaulted to 1.0e-6). Exceptions Standard_OutOfRange if index is not in the range [ 1,NbPoints ], where NbPoints is the number of computed intersection points. + */ + Point(Index: number): gp_Pnt2d; + /** + * Returns the number of tangential intersections. NbSegments returns 0 if no intersections were found. + */ + NbSegments(): number; + /** + * Use this syntax only to get solutions of tangential intersection between two curves. Output values Curve1 and Curve2 are the intersection segments on the first curve and on the second curve accordingly. Parameter Index defines a number of computed solution. An intersection segment is a portion of an initial curve limited by two points. + * The distance from each point of this segment to the other curve is less or equal to the tolerance value assigned at the time of construction or in function Init (this value is defaulted to 1.0e-6). + * Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbSegments ], where NbSegments is the number of computed tangential intersections. Standard_NullObject if the algorithm is initialized for the computing of self-intersections on a curve. + * @returns A result object with fields: + * - `Curve1`: owned by the returned envelope. + * - `Curve2`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + Segment(Index: number): { Curve1: Geom2d_Curve; Curve2: Geom2d_Curve; [Symbol.dispose](): void }; + /** + * return the algorithmic object from Intersection. + */ + Intersector(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements methods for computing all the orthogonal projections of a 2D point onto a 2D curve. + */ +export declare class Geom2dAPI_ProjectPointOnCurve { + /** + * Constructs an empty projector algorithm. Use an Init function to define the point and the curve on which it is going to work. + */ + constructor(); + /** + * Create the projection of a point. + * + * on a curve + */ + constructor(P: gp_Pnt2d, Curve: Geom2d_Curve); + /** + * Create the projection of a point. + * + * on a curve limited by the two points of parameter Umin and Usup. Warning Use the function NbPoints to obtain the number of solutions. If projection fails, NbPoints returns 0. + */ + constructor(P: gp_Pnt2d, Curve: Geom2d_Curve, Umin: number, Usup: number); + /** + * Initializes this algorithm with the given arguments, and computes the orthogonal projections of a point. + * + * on a curve + */ + Init(P: gp_Pnt2d, Curve: Geom2d_Curve): void; + /** + * Initializes this algorithm with the given arguments, and computes the orthogonal projections of the point P onto the portion of the curve Curve limited by the two points of parameter Umin and Usup. + */ + Init(P: gp_Pnt2d, Curve: Geom2d_Curve, Umin: number, Usup: number): void; + /** + * return the number of of computed orthogonal projectionn points. + */ + NbPoints(): number; + /** + * Returns the orthogonal projection on the curve. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + */ + Point(Index: number): gp_Pnt2d; + /** + * Returns the parameter on the curve of a point which is the orthogonal projection. Index is a number of a computed projected point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + */ + Parameter(Index: number): number; + /** + * Returns the parameter on the curve of a point which is the orthogonal projection. Index is a number of a computed projected point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + * @returns A result object with fields: + * - `U`: updated value from the call. + */ + Parameter(Index: number, U?: number): { U: number }; + /** + * Computes the distance between the point and its computed orthogonal projection on the curve. Index is a number of computed projected point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + */ + Distance(Index: number): number; + /** + * Returns the nearest orthogonal projection of the point on the curve. Exceptions StdFail_NotDone if this algorithm fails. + */ + NearestPoint(): gp_Pnt2d; + /** + * Returns the parameter on the curve of the nearest orthogonal projection of the point. Exceptions StdFail_NotDone if this algorithm fails. + */ + LowerDistanceParameter(): number; + /** + * Computes the distance between the point and its nearest orthogonal projection on the curve. Exceptions StdFail_NotDone if this algorithm fails. + */ + LowerDistance(): number; + /** + * return the algorithmic object from Extrema + */ + Extrema(): any; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions for computing all the extrema between two 2D curves. An ExtremaCurveCurve algorithm minimizes or maximizes the distance between a point on the first curve and a point on the second curve. Thus, it computes the start point and end point of perpendiculars common to the two curves (an intersection point is not an extremum except where the two curves are tangential at this point). Solutions consist of pairs of points, and an extremum is considered to be a segment joining the two points of a solution. An ExtremaCurveCurve object provides a framework for: + * + * - defining the construction of the extrema, + * - implementing the construction algorithm, and + * - consulting the results. Warning In some cases, the nearest points between two curves do not correspond to one of the computed extrema. Instead, they may be given by: + * - a limit point of one curve and one of the following: + * - its orthogonal projection on the other curve, + * - a limit point of the other curve; or + * - an intersection point between the two curves. + */ +export declare class Geom2dAPI_ExtremaCurveCurve { + /** + * Computes the extrema between. + * + * - the portion of the curve C1 limited by the two points of parameter (U1min,U1max), and + * - the portion of the curve C2 limited by the two points of parameter (U2min,U2max). Warning Use the function NbExtrema to obtain the number of solutions. If this algorithm fails, NbExtrema returns 0. + */ + constructor(C1: Geom2d_Curve, C2: Geom2d_Curve, U1min: number, U1max: number, U2min: number, U2max: number); + /** + * Returns the number of extrema computed by this algorithm. Note: if this algorithm fails, NbExtrema returns 0. + */ + NbExtrema(): number; + /** + * Returns the points P1 on the first curve and P2 on the second curve, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm. + * @param P1 Mutated in place; read the updated value from this argument after the call. + * @param P2 Mutated in place; read the updated value from this argument after the call. + */ + Points(Index: number, P1: gp_Pnt2d, P2: gp_Pnt2d): void; + /** + * Returns the parameters U1 of the point on the first curve and U2 of the point on the second curve, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + */ + Parameters(Index: number, U1?: number, U2?: number): { U1: number; U2: number }; + /** + * Computes the distance between the end points of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm. + */ + Distance(Index: number): number; + /** + * Returns the points P1 on the first curve and P2 on the second curve, which are the ends of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails. + * @param P1 Mutated in place; read the updated value from this argument after the call. + * @param P2 Mutated in place; read the updated value from this argument after the call. + */ + NearestPoints(P1: gp_Pnt2d, P2: gp_Pnt2d): void; + /** + * Returns the parameters U1 of the point on the first curve and U2 of the point on the second curve, which are the ends of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + */ + LowerDistanceParameters(U1?: number, U2?: number): { U1: number; U2: number }; + /** + * Computes the distance between the end points of the shortest extremum computed by this algorithm. Exceptions - StdFail_NotDone if this algorithm fails. + */ + LowerDistance(): number; + Extrema(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class is used to approximate a BsplineCurve passing through an array of points, with a given Continuity. Describes functions for building a 2D BSpline curve which approximates a set of points. A PointsToBSpline object provides a framework for: + * + * - defining the data of the BSpline curve to be built, + * - implementing the approximation algorithm, and + * - consulting the results + */ +export declare class Geom2dAPI_PointsToBSpline { + /** + * Constructs an empty approximation algorithm. Use an Init function to define and build the BSpline curve. + */ + constructor(); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + constructor(Points: NCollection_Array1_gp_Pnt2d, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol2D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + constructor(Points: NCollection_Array1_gp_Pnt2d, ParType: unknown, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol2D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array . The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + constructor(Points: NCollection_Array1_gp_Pnt2d, Parameters: NCollection_Array1_double, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol2D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point. Of coordinates : + * + * X = X0 + DX * (i-YValues.Lower()) Y = YValues(i) + * + * With i in the range YValues.Lower(), YValues.Upper() + * + * The BSpline will be parametrized from t = X0 to X0 + DX * (YValues.Upper() - YValues.Lower()) + * + * And will satisfy X(t) = t + * + * The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D + */ + constructor(YValues: NCollection_Array1_double, X0: number, DX: number, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol2D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion. + */ + constructor(Points: NCollection_Array1_gp_Pnt2d, Weight1: number, Weight2: number, Weight3: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol3D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + Init(Points: NCollection_Array1_gp_Pnt2d, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol2D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + Init(Points: NCollection_Array1_gp_Pnt2d, ParType: unknown, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol2D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array . The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D. + */ + Init(Points: NCollection_Array1_gp_Pnt2d, Parameters: NCollection_Array1_double, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol2D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point. Of coordinates : + * + * X = X0 + DX * (i-YValues.Lower()) Y = YValues(i) + * + * With i in the range YValues.Lower(), YValues.Upper() + * + * The BSpline will be parametrized from t = X0 to X0 + DX * (YValues.Upper() - YValues.Lower()) + * + * And will satisfy X(t) = t + * + * The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol2D + */ + Init(YValues: NCollection_Array1_double, X0: number, DX: number, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol2D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion. + */ + Init(Points: NCollection_Array1_gp_Pnt2d, Weight1: number, Weight2: number, Weight3: number, DegMax: number, Continuity: GeomAbs_Shape, Tol2D: number): void; + /** + * Returns the approximate BSpline Curve. + */ + Curve(): Geom2d_BSplineCurve; + IsDone(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class is used to approximate a BsplineCurve passing through an array of points, with a given Continuity. Describes functions for building a 3D BSpline curve which approximates a set of points. A PointsToBSpline object provides a framework for: + * + * - defining the data of the BSpline curve to be built, + * - implementing the approximation algorithm, and consulting the results. + */ +export declare class GeomAPI_PointsToBSpline { + /** + * Constructs an empty approximation algorithm. Use an Init function to define and build the BSpline curve. + */ + constructor(); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + constructor(Points: NCollection_Array1_gp_Pnt, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol3D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + constructor(Points: NCollection_Array1_gp_Pnt, ParType: unknown, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol3D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array . The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + constructor(Points: NCollection_Array1_gp_Pnt, Parameters: NCollection_Array1_double, DegMin?: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol3D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion. + */ + constructor(Points: NCollection_Array1_gp_Pnt, Weight1: number, Weight2: number, Weight3: number, DegMax?: number, Continuity?: GeomAbs_Shape, Tol3D?: number); + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + Init(Points: NCollection_Array1_gp_Pnt, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol3D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + Init(Points: NCollection_Array1_gp_Pnt, ParType: unknown, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol3D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array . The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least 3- the distance from the point to the BSpline will be lower to Tol3D. + */ + Init(Points: NCollection_Array1_gp_Pnt, Parameters: NCollection_Array1_double, DegMin: number, DegMax: number, Continuity: GeomAbs_Shape, Tol3D: number): void; + /** + * Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion. + */ + Init(Points: NCollection_Array1_gp_Pnt, Weight1: number, Weight2: number, Weight3: number, DegMax: number, Continuity: GeomAbs_Shape, Tol3D: number): void; + /** + * Returns the computed BSpline curve. Raises StdFail_NotDone if the curve is not built. + */ + Curve(): Geom_BSplineCurve; + IsDone(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements methods for computing all the orthogonal projections of a point onto a surface. + */ +export declare class GeomAPI_ProjectPointOnSurf { + /** + * Creates an empty object. Use the Init function for further initialization. + */ + constructor(); + /** + * Create the projection of a point. + * + * on a surface + */ + constructor(P: gp_Pnt, Surface: Geom_Surface, Algo?: Extrema_ExtAlgo); + /** + * Create the projection of a point. + * + * on a surface Create the projection of a point + * + * on a surface . The solution are computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface. + */ + constructor(P: gp_Pnt, Surface: Geom_Surface, Tolerance: number, Algo?: Extrema_ExtAlgo); + /** + * Init the projection of a point. + * + * on a surface + */ + constructor(P: gp_Pnt, Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Algo?: Extrema_ExtAlgo); + constructor(P: gp_Pnt, Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Tolerance: number, Algo?: Extrema_ExtAlgo); + /** + * Init the projection of a point. + * + * on a surface . The solution are computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface. + */ + Init(P: gp_Pnt, Surface: Geom_Surface, Algo: Extrema_ExtAlgo): void; + Init(P: gp_Pnt, Surface: Geom_Surface, Tolerance: number, Algo: Extrema_ExtAlgo): void; + Init(Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Algo: Extrema_ExtAlgo): void; + /** + * Init the projection for many points on a surface . The solutions will be computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface. + */ + Init(P: gp_Pnt, Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Algo: Extrema_ExtAlgo): void; + Init(Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Tolerance: number, Algo: Extrema_ExtAlgo): void; + Init(P: gp_Pnt, Surface: Geom_Surface, Umin: number, Usup: number, Vmin: number, Vsup: number, Tolerance: number, Algo: Extrema_ExtAlgo): void; + /** + * Sets the Extrema search algorithm - Grad or Tree. By default the Extrema is initialized with Grad algorithm. + */ + SetExtremaAlgo(theAlgo: Extrema_ExtAlgo): void; + /** + * Sets the Extrema search flag - MIN or MAX or MINMAX. By default the Extrema is set to search the MinMax solutions. + */ + SetExtremaFlag(theExtFlag: unknown): void; + /** + * Performs the projection of a point on the current surface. + */ + Perform(P: gp_Pnt): void; + IsDone(): boolean; + /** + * Returns the number of computed orthogonal projection points. Note: if projection fails, NbPoints returns 0. + */ + NbPoints(): number; + /** + * Returns the orthogonal projection on the surface. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + */ + Point(Index: number): gp_Pnt; + /** + * Returns the parameters (U,V) on the surface of the orthogonal projection. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + * @returns A result object with fields: + * - `U`: updated value from the call. + * - `V`: updated value from the call. + */ + Parameters(Index: number, U?: number, V?: number): { U: number; V: number }; + /** + * Computes the distance between the point and its orthogonal projection on the surface. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points. + */ + Distance(Index: number): number; + /** + * Returns the nearest orthogonal projection of the point on the surface. Exceptions StdFail_NotDone if projection fails. + */ + NearestPoint(): gp_Pnt; + /** + * Returns the parameters (U,V) on the surface of the nearest computed orthogonal projection of the point. Exceptions StdFail_NotDone if projection fails. + * @returns A result object with fields: + * - `U`: updated value from the call. + * - `V`: updated value from the call. + */ + LowerDistanceParameters(U?: number, V?: number): { U: number; V: number }; + /** + * Computes the distance between the point and its nearest orthogonal projection on the surface. Exceptions StdFail_NotDone if projection fails. + */ + LowerDistance(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build linear swept topologies, called prisms. A prism is defined by: + * + * - a basis shape, which is swept, and + * - a sweeping direction, which is: + * - a vector for finite prisms, or + * - a direction for infinite or semi-infinite prisms. The basis shape must not contain any solids. The profile generates objects according to the following rules: + * - Vertices generate Edges + * - Edges generate Faces. + * - Wires generate Shells. + * - Faces generate Solids. + * - Shells generate Composite Solids A MakePrism object provides a framework for: + * - defining the construction of a prism, + * - implementing the construction algorithm, and + * - consulting the result. + */ +export declare class BRepPrimAPI_MakePrism extends BRepPrimAPI_MakeSweep { + /** + * Builds the prism of base S and vector V. If C is true, S is copied. If Canonize is true then generated surfaces are attempted to be canonized in simple types. + */ + constructor(S: TopoDS_Shape, V: gp_Vec, Copy?: boolean, Canonize?: boolean); + /** + * Builds a semi-infinite or an infinite prism of base S. If Inf is true the prism is infinite, if Inf is false the prism is semi-infinite (in the direction D). If C is true S is copied (for semi-infinite prisms). If Canonize is true then generated surfaces are attempted to be canonized in simple types. + */ + constructor(S: TopoDS_Shape, D: gp_Dir, Inf?: boolean, Copy?: boolean, Canonize?: boolean); + /** + * Returns the internal sweeping algorithm. + */ + Prism(): unknown; + /** + * Builds the resulting shape (redefined from MakeShape). + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the `TopoDS` Shape of the bottom of the prism. + */ + FirstShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the bottom of the prism. generated with theShape (subShape of the generating shape). + */ + FirstShape(theShape: TopoDS_Shape): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the top of the prism. In the case of a finite prism, FirstShape returns the basis of the prism, in other words, S if Copy is false; otherwise, the copy of S belonging to the prism. LastShape returns the copy of S translated by V at the time of construction. + */ + LastShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the top of the prism. generated with theShape (subShape of the generating shape). + */ + LastShape(theShape: TopoDS_Shape): TopoDS_Shape; + /** + * Returns ListOfShape from {@link TopTools | `TopTools`}. + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build spheres or portions of spheres. A MakeSphere object provides a framework for: + * + * - defining the construction of a sphere, + * - implementing the construction algorithm, and + * - consulting the result. + */ +export declare class BRepPrimAPI_MakeSphere extends BRepPrimAPI_MakeOneAxis { + /** + * Make a sphere. + * @param R sphere radius + */ + constructor(R: number); + /** + * Make a sphere (spherical wedge). + * @param R sphere radius + * @param angle angle between the radii lying within the bounding semidisks + */ + constructor(R: number, angle: number); + /** + * Make a sphere. + * @param Center sphere center coordinates + * @param R sphere radius + */ + constructor(Center: gp_Pnt, R: number); + /** + * Make a sphere. + * @param Axis coordinate system for the construction of the sphere + * @param R sphere radius + */ + constructor(Axis: gp_Ax2, R: number); + /** + * Make a sphere (spherical segment). + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + */ + constructor(R: number, angle1: number, angle2: number); + /** + * Make a sphere (spherical wedge). + * @param Center sphere center coordinates + * @param R sphere radius + * @param angle angle between the radii lying within the bounding semidisks + */ + constructor(Center: gp_Pnt, R: number, angle: number); + /** + * Make a sphere (spherical wedge). + * @param Axis coordinate system for the construction of the sphere + * @param R sphere radius + * @param angle angle between the radii lying within the bounding semidisks + */ + constructor(Axis: gp_Ax2, R: number, angle: number); + /** + * Make a sphere (spherical segment). + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + * @param angle3 angle between the radii lying within the bounding semidisks + */ + constructor(R: number, angle1: number, angle2: number, angle3: number); + /** + * Make a sphere (spherical segment). + * @param Center sphere center coordinates + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + */ + constructor(Center: gp_Pnt, R: number, angle1: number, angle2: number); + /** + * Make a sphere (spherical segment). + * @param Axis coordinate system for the construction of the sphere + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + */ + constructor(Axis: gp_Ax2, R: number, angle1: number, angle2: number); + /** + * Make a sphere (spherical segment). + * @param Center sphere center coordinates + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + * @param angle3 angle between the radii lying within the bounding semidisks + */ + constructor(Center: gp_Pnt, R: number, angle1: number, angle2: number, angle3: number); + /** + * Make a sphere (spherical segment). + * @param R sphere radius + * @param angle1 first angle defining a spherical segment + * @param angle2 second angle defining a spherical segment + * @param angle3 angle between the radii lying within the bounding semidisks + */ + constructor(Axis: gp_Ax2, R: number, angle1: number, angle2: number, angle3: number); + /** + * Returns the algorithm. + */ + Sphere(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Class to make revolved sweep topologies. + * + * a revolved sweep is defined by : + * + * - A basis topology which is swept. + * + * The basis topology must not contain solids (neither composite solids.). + * + * The basis topology may be copied or shared in the result. + * + * - A rotation axis and angle : + * - The axis is an Ax1 from gp. + * - The angle is in [0, 2*Pi]. + * - The angle default value is 2*Pi. + * + * The result is a topology with a higher dimension : + * + * - Vertex -> Edge. + * - Edge -> Face. + * - Wire -> Shell. + * - Face -> Solid. + * - Shell -> CompSolid. + * + * Sweeping a Compound sweeps the elements of the compound and creates a compound with the results. + */ +export declare class BRepPrimAPI_MakeRevol extends BRepPrimAPI_MakeSweep { + /** + * Builds the Revol of base S, axis A and angle 2*Pi. If C is true, S is copied. + */ + constructor(S: TopoDS_Shape, A: gp_Ax1, Copy?: boolean); + /** + * Builds the Revol of base S, axis A and angle D. If C is true, S is copied. + */ + constructor(S: TopoDS_Shape, A: gp_Ax1, D: number, Copy?: boolean); + /** + * Returns the internal sweeping algorithm. + */ + Revol(): unknown; + /** + * Builds the resulting shape (redefined from MakeShape). + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the first shape of the revol (coinciding with the generating shape). + */ + FirstShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the beginning of the revolution, generated with theShape (subShape of the generating shape). + */ + FirstShape(theShape: TopoDS_Shape): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the end of the revol. + */ + LastShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the end of the revolution, generated with theShape (subShape of the generating shape). + */ + LastShape(theShape: TopoDS_Shape): TopoDS_Shape; + /** + * Returns list of shape generated from shape S Warning: shape S must be shape of type VERTEX, EDGE, FACE, SOLID. For shapes of other types method always returns empty list. + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** + * Check if there are degenerated edges in the result. + */ + HasDegenerated(): boolean; + /** + * Returns the list of degenerated edges. + */ + Degenerated(): NCollection_List_TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class MakeSweep is the root class of swept primitives. Sweeps are objects you obtain by sweeping a profile along a path. The profile can be any topology and the path is usually a curve or a wire. The profile generates objects according to the following rules: + * + * - Vertices generate Edges + * - Edges generate Faces. + * - Wires generate Shells. + * - Faces generate Solids. + * - Shells generate Composite Solids. You are not allowed to sweep Solids and Composite Solids. Two kinds of sweeps are implemented in the BRepPrimAPI package: + * - The linear sweep called a Prism + * - The rotational sweep called a Revol Swept constructions along complex profiles such as BSpline curves are also available in the BRepOffsetAPI package.. + */ +export declare class BRepPrimAPI_MakeSweep extends BRepBuilderAPI_MakeShape { + /** + * Returns the `TopoDS` Shape of the bottom of the sweep. + */ + FirstShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the top of the sweep. + */ + LastShape(): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build cylinders or portions of cylinders. A MakeCylinder object provides a framework for: + * + * - defining the construction of a cylinder, + * - implementing the construction algorithm, and + * - consulting the result. + */ +export declare class BRepPrimAPI_MakeCylinder extends BRepPrimAPI_MakeOneAxis { + /** + * Make a cylinder. + * @param R cylinder radius + * @param H cylinder height + */ + constructor(R: number, H: number); + /** + * Make a cylinder (part cylinder). + * @param R cylinder radius + * @param H cylinder height + * @param Angle defines the missing portion of the cylinder + */ + constructor(R: number, H: number, Angle: number); + /** + * Make a cylinder of radius R and length H. + * @param Axes coordinate system for the construction of the cylinder + * @param R cylinder radius + * @param H cylinder height + */ + constructor(Axes: gp_Ax2, R: number, H: number); + /** + * Make a cylinder of radius R and length H with angle H. Constructs. + * + * - a cylinder of radius R and height H, or + * - a portion of cylinder of radius R and height H, and of the angle Angle defining the missing portion of the cylinder. The cylinder is constructed about the "Z Axis" of either: + * - the global coordinate system, or + * - the local coordinate system Axes. It is limited in this coordinate system as follows: + * - in the v parametric direction (the Z axis), by the two parameter values 0 and H, + * - and in the u parametric direction (the rotation angle around the Z Axis), in the case of a portion of a cylinder, by the two parameter values 0 and Angle. Angle is given in radians. The resulting shape is composed of: + * - a lateral cylindrical face, + * - two planar faces in the planes z = 0 and z = H (in the case of a complete cylinder, these faces are circles), and + * - in case of a portion of a cylinder, two additional planar faces to close the shape.(two rectangles in the planes u = 0 and u = Angle). Exceptions Standard_DomainError if: + * - R is less than or equal to `Precision::Confusion()`, or + * - H is less than or equal to `Precision::Confusion()`. + */ + constructor(Axes: gp_Ax2, R: number, H: number, Angle: number); + /** + * Returns the algorithm. + */ + Cylinder(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class MakeOneAxis is the root class of algorithms used to construct rotational primitives. + */ +export declare class BRepPrimAPI_MakeOneAxis extends BRepBuilderAPI_MakeShape { + /** + * Stores the solid in myShape. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the lateral face of the rotational primitive. + */ + Face(): TopoDS_Face; + /** + * Returns the constructed rotational primitive as a shell. + */ + Shell(): TopoDS_Shell; + /** + * Returns the constructed rotational primitive as a solid. + */ + Solid(): TopoDS_Solid; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build parallelepiped boxes. A MakeBox object provides a framework for: + * + * - defining the construction of a box, + * - implementing the construction algorithm, and + * - consulting the result. Constructs a box such that its sides are parallel to the axes of + * - the global coordinate system, or + * - the local coordinate system Axis. and + * - with a corner at (0, 0, 0) and of size (dx, dy, dz), or + * - with a corner at point P and of size (dx, dy, dz), or + * - with corners at points P1 and P2. Exceptions Standard_DomainError if: dx, dy, dz are less than or equal to `Precision::Confusion()`, or + * - the vector joining the points P1 and P2 has a component projected onto the global coordinate system less than or equal to `Precision::Confusion()`. In these cases, the box would be flat. + */ +export declare class BRepPrimAPI_MakeBox extends BRepBuilderAPI_MakeShape { + /** + * Default constructor. + */ + constructor(); + /** + * Make a box with corners P1,P2. + */ + constructor(P1: gp_Pnt, P2: gp_Pnt); + /** + * Make a box with a corner at 0,0,0 and the other dx,dy,dz. + */ + constructor(dx: number, dy: number, dz: number); + /** + * Make a box with a corner at P and size dx, dy, dz. + */ + constructor(P: gp_Pnt, dx: number, dy: number, dz: number); + /** + * Make a box with Ax2 (the left corner and the axis) and size dx, dy, dz. + */ + constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number); + /** + * Init a box with corners thePnt1, thePnt2. + */ + Init(thePnt1: gp_Pnt, thePnt2: gp_Pnt): void; + /** + * Init a box with a corner at 0,0,0 and the other theDX, theDY, theDZ. + */ + Init(theDX: number, theDY: number, theDZ: number): void; + /** + * Init a box with a corner at thePnt and size theDX, theDY, theDZ. + */ + Init(thePnt: gp_Pnt, theDX: number, theDY: number, theDZ: number): void; + /** + * Init a box with Ax2 (the left corner and the theAxes) and size theDX, theDY, theDZ. + */ + Init(theAxes: gp_Ax2, theDX: number, theDY: number, theDZ: number): void; + /** + * Returns the internal algorithm. + */ + Wedge(): unknown; + /** + * Stores the solid in myShape. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the constructed box as a shell. + */ + Shell(): TopoDS_Shell; + /** + * Returns the constructed box as a solid. + */ + Solid(): TopoDS_Solid; + /** + * Returns ZMin face. + */ + BottomFace(): TopoDS_Face; + /** + * Returns XMin face. + */ + BackFace(): TopoDS_Face; + /** + * Returns XMax face. + */ + FrontFace(): TopoDS_Face; + /** + * Returns YMin face. + */ + LeftFace(): TopoDS_Face; + /** + * Returns YMax face. + */ + RightFace(): TopoDS_Face; + /** + * Returns ZMax face. + */ + TopFace(): TopoDS_Face; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class HLRBRep_InternalAlgo extends Standard_Transient { + constructor(); + constructor(A: HLRBRep_InternalAlgo); + // dropped: DataStructure return resolves to excluded type HLRBRep_Data + /** + * set the projector. + */ + Projector(P: HLRAlgo_Projector): void; + /** + * set the projector. + */ + Projector(): HLRAlgo_Projector; + /** + * update the DataStructure. + */ + Update(): void; + /** + * add the shape . + */ + Load(S: unknown, SData: Standard_Transient, nbIso: number): void; + /** + * add the shape . + */ + Load(S: unknown, nbIso: number): void; + /** + * return the index of the Shape and return 0 if the Shape is not found. + */ + Index(S: unknown): number; + /** + * remove the Shape of Index *.* + */ + Remove(I: number): void; + /** + * Change the Shape Data of the Shape of index *.* + */ + ShapeData(I: number, SData: Standard_Transient): void; + SeqOfShapeBounds(): NCollection_Sequence_HLRBRep_ShapeBounds; + NbShapes(): number; + ShapeBounds(I: number): unknown; + /** + * init the status of the selected edges depending of the back faces of a closed shell. + */ + InitEdgeStatus(): void; + /** + * select all the DataStructure. + */ + Select(): void; + /** + * select only the Shape of index *.* + */ + Select(I: number): void; + /** + * select only the edges of the Shape . + */ + SelectEdge(I: number): void; + /** + * select only the faces of the Shape . + */ + SelectFace(I: number): void; + /** + * set to visible all the edges. + */ + ShowAll(): void; + /** + * set to visible all the edges of the Shape . + */ + ShowAll(I: number): void; + /** + * set to hide all the edges. + */ + HideAll(): void; + /** + * set to hide all the edges of the Shape . + */ + HideAll(I: number): void; + /** + * own hiding of all the shapes of the DataStructure without hiding by each other. + */ + PartialHide(): void; + /** + * hide all the DataStructure. + */ + Hide(): void; + /** + * hide the Shape by itself. + */ + Hide(I: number): void; + /** + * hide the Shape by the shape . + */ + Hide(I: number, J: number): void; + Debug(deb: boolean): void; + Debug(): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Inherited from InternalAlgo to provide methods with Shape from `TopoDS`. A framework to compute a shape as seen in a projection plane. This is done by calculating the visible and the hidden parts of the shape. {@link HLRBRep_Algo | `HLRBRep_Algo`} works with three types of entity: + * + * - shapes to be visualized + * - edges in these shapes (these edges are the basic entities which will be visualized or hidden), and + * - faces in these shapes which hide the edges. {@link HLRBRep_Algo | `HLRBRep_Algo`} is based on the principle of comparing each edge of the shape to be visualized with each of its faces, and calculating the visible and the hidden parts of each edge. For a given projection, {@link HLRBRep_Algo | `HLRBRep_Algo`} calculates a set of lines characteristic of the object being represented. It is also used in conjunction with the {@link HLRBRep_HLRToShape | `HLRBRep_HLRToShape`} extraction utilities, which reconstruct a new, simplified shape from a selection of calculation results. + * This new shape is made up of edges, which represent the shape visualized in the projection. {@link HLRBRep_Algo | `HLRBRep_Algo`} takes the shape itself into account whereas {@link HLRBRep_PolyAlgo | `HLRBRep_PolyAlgo`} works with a polyhedral simplification of the shape. + * When you use {@link HLRBRep_Algo | `HLRBRep_Algo`}, you obtain an exact result, whereas, when you use {@link HLRBRep_PolyAlgo | `HLRBRep_PolyAlgo`}, you reduce computation time but obtain polygonal segments. In the case of complicated shapes, {@link HLRBRep_Algo | `HLRBRep_Algo`} may be time-consuming. An {@link HLRBRep_Algo | `HLRBRep_Algo`} object provides a framework for: + * - defining the point of view + * - identifying the shape or shapes to be visualized + * - calculating the outlines + * - calculating the visible and hidden lines of the shape. Warning + * - Superimposed lines are not eliminated by this algorithm. + * - There must be no unfinished objects inside the shape you wish to visualize. + * - Points are not treated. + * - Note that this is not the sort of algorithm used in generating shading, which calculates the visible and hidden parts of each face in a shape to be visualized by comparing each face in the shape with every other face in the same shape. + */ +export declare class HLRBRep_Algo extends HLRBRep_InternalAlgo { + /** + * Constructs an empty framework for the calculation of visible and hidden lines of a shape in a projection. Use the function: + * + * - Projector to define the point of view + * - Add to select the shape or shapes to be visualized + * - Update to compute the outlines of the shape, and + * - Hide to compute the visible and hidden lines of the shape. + */ + constructor(); + constructor(A: HLRBRep_Algo); + /** + * add the Shape . + */ + Add(S: TopoDS_Shape, SData: Standard_Transient, nbIso: number): void; + /** + * Adds the shape S to this framework, and specifies the number of isoparameters nbiso desired in visualizing S. You may add as many shapes as you wish. Use the function Add once for each shape. + */ + Add(S: TopoDS_Shape, nbIso: number): void; + /** + * return the index of the Shape and return 0 if the Shape is not found. + */ + Index(S: TopoDS_Shape): number; + /** + * return the index of the Shape and return 0 if the Shape is not found. + */ + Index(S: unknown): number; + /** + * nullify all the results of OutLiner from HLRTopoBRep. + */ + OutLinedShapeNullify(): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A framework for filtering the computation results of an {@link HLRBRep_Algo | `HLRBRep_Algo`} algorithm by extraction. From the results calculated by the algorithm on a shape, a filter returns the type of edge you want to identify. You can choose any of the following types of output: + * + * - visible sharp edges + * - hidden sharp edges + * - visible smooth edges + * - hidden smooth edges + * - visible sewn edges + * - hidden sewn edges + * - visible outline edges + * - hidden outline edges. + * - visible isoparameters and + * - hidden isoparameters. Sharp edges present a C0 continuity (non G1). Smooth edges present a G1 continuity (non G2). Sewn edges present a C2 continuity. The result is composed of 2D edges in the projection plane of the view which the algorithm has worked with. These 2D edges are not included in the data structure of the visualized shape. In order to obtain a complete image, you must combine the shapes given by each of the chosen filters. The construction of the shape does not call a new computation of the algorithm, but only reads its internal results. The methods of this shape are almost identic to those of the HLRBrep_PolyHLRToShape class. + */ +export declare class HLRBRep_HLRToShape { + /** + * Constructs a framework for filtering the results of the {@link HLRBRep_Algo | `HLRBRep_Algo`} algorithm, A. Use the extraction filters to obtain the results you want for A. + */ + constructor(A: HLRBRep_Algo); + // dropped: DrawFace param 3 resolves to excluded type HLRBRep_Data + /** + * Return visible sharp edges (of C0-continuity). + */ + VCompound(): TopoDS_Shape; + /** + * Return visible sharp edges (of C0-continuity) of specified shape. + */ + VCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return visible smooth edges (G1-continuity between two surfaces). + */ + Rg1LineVCompound(): TopoDS_Shape; + /** + * Return visible smooth edges (G1-continuity between two surfaces) of specified shape. + */ + Rg1LineVCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return visible sewn edges (of CN-continuity on one surface). + */ + RgNLineVCompound(): TopoDS_Shape; + /** + * Return visible sewn edges (of CN-continuity on one surface) of specified shape. + */ + RgNLineVCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return visible outline edges ("silhouette"). + */ + OutLineVCompound(): TopoDS_Shape; + /** + * Return visible outline edges ("silhouette") of specified shape. + */ + OutLineVCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return visible outline edges ("silhouette"). + */ + OutLineVCompound3d(): TopoDS_Shape; + /** + * Return visible isoparameters. + */ + IsoLineVCompound(): TopoDS_Shape; + /** + * Return visible isoparameters of specified shape. + */ + IsoLineVCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return hidden sharp edges (of C0-continuity). + */ + HCompound(): TopoDS_Shape; + /** + * Return hidden sharp edges (of C0-continuity) of specified shape. + */ + HCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return hidden smooth edges (G1-continuity between two surfaces). + */ + Rg1LineHCompound(): TopoDS_Shape; + /** + * Return hidden smooth edges (G1-continuity between two surfaces) of specified shape. + */ + Rg1LineHCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return hidden sewn edges (of CN-continuity on one surface). + */ + RgNLineHCompound(): TopoDS_Shape; + /** + * Return hidden sewn edges (of CN-continuity on one surface) of specified shape. + */ + RgNLineHCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return hidden outline edges ("silhouette"). + */ + OutLineHCompound(): TopoDS_Shape; + /** + * Return hidden outline edges ("silhouette") of specified shape. + */ + OutLineHCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Return hidden isoparameters. + */ + IsoLineHCompound(): TopoDS_Shape; + /** + * Return hidden isoparameters of specified shape. + */ + IsoLineHCompound(S: TopoDS_Shape): TopoDS_Shape; + /** + * Returns compound of resulting edges of required type and visibility, taking into account the kind of space (2d or 3d). + */ + CompoundOfEdges(type_: unknown, visible: boolean, In3d: boolean): TopoDS_Shape; + /** + * For specified shape returns compound of resulting edges of required type and visibility, taking into account the kind of space (2d or 3d). + */ + CompoundOfEdges(S: TopoDS_Shape, type_: unknown, visible: boolean, In3d: boolean): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Implements a projector object. To transform and project Points and Planes. This object is designed to be used in the removal of hidden lines and is returned by the Prs3d_Projector::Projector function. You define the projection of the selected shape by calling one of the following functions: + * + * - `HLRBRep_Algo::Projector`, or + * - `HLRBRep_PolyAlgo::Projector` The choice depends on the algorithm, which you are using. The parameters of the view are defined at the time of construction of a Prs3d_Projector object. + */ +export declare class HLRAlgo_Projector { + constructor(); + /** + * Creates an axonometric projector. is the viewing coordinate system. + */ + constructor(CS: gp_Ax2); + /** + * Creates a perspective projector. is the viewing coordinate system. + */ + constructor(CS: gp_Ax2, Focus: number); + /** + * build a Projector with automatic minmax directions. + */ + constructor(T: gp_Trsf, Persp: boolean, Focus: number); + /** + * build a Projector with given minmax directions. + */ + constructor(T: gp_Trsf, Persp: boolean, Focus: number, v1: gp_Vec2d, v2: gp_Vec2d, v3: gp_Vec2d); + Set(T: gp_Trsf, Persp: boolean, Focus: number): void; + Directions(D1: gp_Vec2d, D2: gp_Vec2d, D3: gp_Vec2d): void; + /** + * to compute with the given scale and translation. + */ + Scaled(On?: boolean): void; + /** + * Returns True if there is a perspective transformation. + */ + Perspective(): boolean; + /** + * Returns the active transformation. + */ + Transformation(): gp_Trsf; + /** + * Returns the active inverted transformation. + */ + InvertedTransformation(): gp_Trsf; + /** + * Returns the original transformation. + */ + FullTransformation(): gp_Trsf; + /** + * Returns the focal length. + */ + Focus(): number; + Transform(D: gp_Vec): void; + Transform(Pnt: gp_Pnt): void; + /** + * Transform and apply perspective if needed. + * @param Pout Mutated in place; read the updated value from this argument after the call. + */ + Project(P: gp_Pnt, Pout: gp_Pnt2d): void; + /** + * Transform and apply perspective if needed. + * @returns A result object with fields: + * - `X`: updated value from the call. + * - `Y`: updated value from the call. + * - `Z`: updated value from the call. + */ + Project(P: gp_Pnt, X: number, Y: number, Z: number): { X: number; Y: number; Z: number }; + /** + * Transform and apply perspective if needed. + * @param Pout Mutated in place; read the updated value from this argument after the call. + * @param D1out Mutated in place; read the updated value from this argument after the call. + */ + Project(P: gp_Pnt, D1: gp_Vec, Pout: gp_Pnt2d, D1out: gp_Vec2d): void; + /** + * return a line going through the eye towards the 2d point . + */ + Shoot(X: number, Y: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This is a common interface for meshing algorithms instantiated by Mesh Factory and implemented by plugins. + */ +export declare class BRepMesh_DiscretRoot extends Standard_Transient { + /** + * Set the shape to triangulate. + */ + SetShape(theShape: TopoDS_Shape): void; + Shape(): TopoDS_Shape; + /** + * Returns true if triangualtion was performed and has success. + */ + IsDone(): boolean; + /** + * Compute triangulation for set shape. + */ + Perform(theRange?: Message_ProgressRange): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Builds the mesh of a shape with respect of their correctly triangulated parts. + */ +export declare class BRepMesh_IncrementalMesh extends BRepMesh_DiscretRoot { + constructor(); + constructor(theShape: TopoDS_Shape, theParameters: unknown, theRange?: Message_ProgressRange); + constructor(theShape: TopoDS_Shape, theLinDeflection: number, isRelative?: boolean, theAngDeflection?: number, isInParallel?: boolean); + Perform(theRange: Message_ProgressRange): void; + Perform(theContext: unknown, theRange: Message_ProgressRange): void; + Parameters(): unknown; + ChangeParameters(): unknown; + IsModified(): boolean; + GetStatusFlags(): number; + static IsParallelDefault(): boolean; + static SetParallelDefault(isInParallel: boolean): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type BRepOffset_Mode = typeof BRepOffset_Mode[keyof typeof BRepOffset_Mode]; +/** + * Lists the offset modes. These are the following: + * + * - BRepOffset_Skin which describes the offset along the surface of a solid, used to obtain a manifold topological space, + * - BRepOffset_Pipe which describes the offset of a curve, used to obtain a pre-surface, + * - BRepOffset_RectoVerso which describes the offset of a given surface shell along both sides of the surface. + */ +export declare const BRepOffset_Mode: { + readonly BRepOffset_Skin: 'BRepOffset_Skin'; + readonly BRepOffset_Pipe: 'BRepOffset_Pipe'; + readonly BRepOffset_RectoVerso: 'BRepOffset_RectoVerso'; +}; + +/** + * Describes functions to build hollowed solids. A hollowed solid is built from an initial solid and a set of faces on this solid, which are to be removed. The remaining faces of the solid become the walls of the hollowed solid, their thickness defined at the time of construction. the solid is built from an initial solid and a set of faces {Fi} from , builds a solid composed by two shells closed by the {Fi}. First shell is composed by all the faces of expected {Fi}. Second shell is the offset shell of . A MakeThickSolid object provides a framework for: + * + * - defining the cross-section of a hollowed solid, + * - implementing the construction algorithm, and + * - consulting the result. + */ +export declare class BRepOffsetAPI_MakeThickSolid extends BRepOffsetAPI_MakeOffsetShape { + /** + * Constructor does nothing. + */ + constructor(); + /** + * Constructs solid using simple algorithm. According to its nature it is not possible to set list of the closing faces. This algorithm does not support faces removing. It is caused by fact that intersections are not computed during offset creation. Non-closed shell or face is expected as input. + */ + MakeThickSolidBySimple(theS: TopoDS_Shape, theOffsetValue: number): void; + /** + * Constructs a hollowed solid from the solid S by removing the set of faces ClosingFaces from S, where: Offset defines the thickness of the walls. Its sign indicates which side of the surface of the solid the hollowed shape is built on;. + * + * - Tol defines the tolerance criterion for coincidence in generated shapes; + * - Mode defines the construction type of parallels applied to free edges of shape S. Currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin; Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes: + * - if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes, + * - if Intersection is true, the intersection is calculated by taking account of all parallels generated; this computation method is more general as it avoids self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use; + * - SelfInter tells the algorithm whether a computation to eliminate self-intersections needs to be applied to the resulting shape. However, as this functionality is not yet implemented, you should use the default value (false); + * - Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: + * - if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on "images" of vertices; it is the default value, + * - if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. Warnings Since the algorithm of MakeThickSolid is based on MakeOffsetShape algorithm, the warnings are the same as for MakeOffsetShape. + */ + MakeThickSolidByJoin(S: TopoDS_Shape, ClosingFaces: NCollection_List_TopoDS_Shape, Offset: number, Tol: number, Mode?: BRepOffset_Mode, Intersection?: boolean, SelfInter?: boolean, Join?: GeomAbs_JoinType, RemoveIntEdges?: boolean, theRange?: Message_ProgressRange): void; + /** + * Does nothing. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * N-Side Filling This algorithm avoids to build a face from: + * + * - a set of edges defining the bounds of the face and some constraints the surface of the face has to satisfy + * - a set of edges and points defining some constraints the support surface has to satisfy + * - an initial surface to deform for satisfying the constraints + * - a set of parameters to control the constraints. + * + * The support surface of the face is computed by deformation of the initial surface in order to satisfy the given constraints. The set of bounding edges defines the wire of the face. + * + * If no initial surface is given, the algorithm computes it automatically. If the set of edges is not connected (Free constraint) missing edges are automatically computed. + * + * Limitations: + * + * - If some constraints are not compatible The algorithm does not take them into account. So the constraints will not be satisfyed in an area containing the incompatibilitries. + * - The constraints defining the bound of the face have to be entered in order to have a continuous wire. + * + * Other Applications: + * + * - Deformation of a face to satisfy internal constraints + * - Deformation of a face to improve Gi continuity with connected faces + */ +export declare class BRepOffsetAPI_MakeFilling extends BRepBuilderAPI_MakeShape { + /** + * Constructs a wire filling object defined by. + * + * - the energy minimizing criterion Degree + * - the number of points on the curve NbPntsOnCur + * - the number of iterations NbIter + * - the Boolean Anisotropie + * - the 2D tolerance Tol2d + * - the 3D tolerance Tol3d + * - the angular tolerance TolAng + * - the tolerance for curvature TolCur + * - the highest polynomial degree MaxDeg + * - the greatest number of segments MaxSeg. If the Boolean Anistropie is true, the algorithm's performance is better in cases where the ratio of the length U and the length V indicate a great difference between the two. In other words, when the surface is, for example, extremely long. + */ + constructor(Degree?: number, NbPtsOnCur?: number, NbIter?: number, Anisotropie?: boolean, Tol2d?: number, Tol3d?: number, TolAng?: number, TolCurv?: number, MaxDeg?: number, MaxSegments?: number); + /** + * Sets the values of Tolerances used to control the constraint. Tol2d: Tol3d: it is the maximum distance allowed between the support surface and the constraints TolAng: it is the maximum angle allowed between the normal of the surface and the constraints TolCurv: it is the maximum difference of curvature allowed between the surface and the constraint. + */ + SetConstrParam(Tol2d?: number, Tol3d?: number, TolAng?: number, TolCurv?: number): void; + /** + * Sets the parameters used for resolution. The default values of these parameters have been chosen for a good ratio quality/performance. Degree: it is the order of energy criterion to minimize for computing the deformation of the surface. The default value is 3 The recommended value is i+2 where i is the maximum order of the constraints. NbPtsOnCur: it is the average number of points for discretisation of the edges. NbIter: it is the maximum number of iterations of the process. For each iteration the number of discretisation points is increased. Anisotropie: + */ + SetResolParam(Degree?: number, NbPtsOnCur?: number, NbIter?: number, Anisotropie?: boolean): void; + /** + * Sets the parameters used to approximate the filling surface. These include: + * + * - MaxDeg - the highest degree which the polynomial defining the filling surface can have + * - MaxSegments - the greatest number of segments which the filling surface can have. + */ + SetApproxParam(MaxDeg?: number, MaxSegments?: number): void; + /** + * Loads the initial surface Surf to begin the construction of the surface. This optional function is useful if the surface resulting from construction for the algorithm is likely to be complex. + * The support surface of the face under construction is computed by a deformation of Surf which satisfies the given constraints. The set of bounding edges defines the wire of the face. If no initial surface is given, the algorithm computes it automatically. If the set of edges is not connected (Free constraint), missing edges are automatically computed. + * Important: the initial surface must have orthogonal local coordinates, i.e. partial derivatives dS/du and dS/dv must be orthogonal at each point of surface. If this condition breaks, distortions of resulting surface are possible. + */ + LoadInitSurface(Surf: TopoDS_Face): void; + /** + * Adds a punctual constraint. + */ + Add(Point: gp_Pnt): number; + /** + * Adds a free constraint on a face. The corresponding edge has to be automatically recomputed. It is always a bound. + */ + Add(Support: TopoDS_Face, Order: GeomAbs_Shape): number; + /** + * Adds a new constraint which also defines an edge of the wire of the face Order: Order of the constraint: GeomAbs_C0 : the surface has to pass by 3D representation of the edge GeomAbs_G1 : the surface has to pass by 3D representation of the edge and to respect tangency with the first face of the edge GeomAbs_G2 : the surface has to pass by 3D representation of the edge and to respect tangency and curvature with the first face of the edge. Raises ConstructionError if the edge has no representation on a face and Order is GeomAbs_G1 or GeomAbs_G2. + */ + Add(Constr: TopoDS_Edge, Order: GeomAbs_Shape, IsBound: boolean): number; + /** + * Adds a new constraint which also defines an edge of the wire of the face Order: Order of the constraint: GeomAbs_C0 : the surface has to pass by 3D representation of the edge GeomAbs_G1 : the surface has to pass by 3D representation of the edge and to respect tangency with the given face GeomAbs_G2 : the surface has to pass by 3D representation of the edge and to respect tangency and curvature with the given face. Raises ConstructionError if the edge has no 2d representation on the given face. + */ + Add(Constr: TopoDS_Edge, Support: TopoDS_Face, Order: GeomAbs_Shape, IsBound: boolean): number; + /** + * Adds a punctual constraint. + */ + Add(U: number, V: number, Support: TopoDS_Face, Order: GeomAbs_Shape): number; + /** + * Builds the resulting faces. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Tests whether computation of the filling plate has been completed. + */ + IsDone(): boolean; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the maximum distance between the result and the constraints. This is set at construction time. + */ + G0Error(): number; + /** + * Returns the maximum distance attained between the result and the constraint Index. This is set at construction time. + */ + G0Error(Index: number): number; + /** + * Returns the maximum angle between the result and the constraints. This is set at construction time. + */ + G1Error(): number; + /** + * Returns the maximum angle between the result and the constraints. This is set at construction time. + */ + G1Error(Index: number): number; + /** + * Returns the maximum angle between the result and the constraints. This is set at construction time. + */ + G2Error(): number; + /** + * Returns the greatest difference in curvature found between the result and the constraint Index. + */ + G2Error(Index: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build a shell out of a shape. The result is an unlooped shape parallel to the source shape. A MakeOffsetShape object provides a framework for: + * + * - defining the construction of a shell + * - implementing the construction algorithm + * - consulting the result. + */ +export declare class BRepOffsetAPI_MakeOffsetShape extends BRepBuilderAPI_MakeShape { + /** + * Constructor does nothing. + */ + constructor(); + // dropped: MakeOffset return resolves to excluded type BRepOffset_MakeOffset + /** + * Constructs offset shape for the given one using simple algorithm without intersections computation. + */ + PerformBySimple(theS: TopoDS_Shape, theOffsetValue: number): void; + /** + * Constructs a shape parallel to the shape S, where. + * + * - S may be a face, a shell, a solid or a compound of these shape kinds; + * - Offset is the offset value. The offset shape is constructed: + * - outside S, if Offset is positive, + * - inside S, if Offset is negative; + * - Tol defines the coincidence tolerance criterion for generated shapes; + * - Mode defines the construction type of parallels applied to the free edges of shape S; currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin; + * - Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes: + * - if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes, + * - if Intersection is true, the intersection is calculated by taking all generated parallels into account; this computation method is more general as it avoids some self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use; + * - SelfInter tells the algorithm whether a computation to eliminate self-intersections must be applied to the resulting shape; however, as this functionality is not yet implemented, it is recommended to use the default value (false); + * - Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: + * - if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on "images" of vertices; it is the default value, + * - if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. Warnings + * + * 1. All the faces of the shape S should be based on the surfaces with continuity at least C1. + * 2. The offset value should be sufficiently small to avoid self-intersections in resulting shape. Otherwise these self-intersections may appear inside an offset face if its initial surface is not plane or sphere or cylinder, also some non-adjacent offset faces may intersect each other. Also, some offset surfaces may "turn inside out". + * 3. The algorithm may fail if the shape S contains vertices where more than 3 edges converge. + * 4. Since 3d-offset algorithm involves intersection of surfaces, it is under limitations of surface intersection algorithm. + * 5. A result cannot be generated if the underlying geometry of S is BSpline with continuity C0. Exceptions Geom_UndefinedDerivative if the underlying geometry of S is BSpline with continuity C0. + */ + PerformByJoin(S: TopoDS_Shape, Offset: number, Tol: number, Mode?: BRepOffset_Mode, Intersection?: boolean, SelfInter?: boolean, Join?: GeomAbs_JoinType, RemoveIntEdges?: boolean, theRange?: Message_ProgressRange): void; + /** + * Does nothing. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes Modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape has been removed from the result. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** + * Returns offset join type. + */ + GetJoinType(): GeomAbs_JoinType; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build a loft. This is a shell or a solid passing through a set of sections in a given sequence. Usually sections are wires, but the first and the last sections may be vertices (punctual sections). + */ +export declare class BRepOffsetAPI_ThruSections extends BRepBuilderAPI_MakeShape { + /** + * Initializes an algorithm for building a shell or a solid passing through a set of sections, where: + * + * - isSolid is set to true if the construction algorithm is required to build a solid or to false if it is required to build a shell (the default value), + * - ruled is set to true if the faces generated between the edges of two consecutive wires are ruled surfaces or to false (the default value) if they are smoothed out by approximation, + * - pres3d defines the precision criterion used by the approximation algorithm; the default value is 1.0e-6. Use AddWire and AddVertex to define the successive sections of the shell or solid to be built. + */ + constructor(isSolid?: boolean, ruled?: boolean, pres3d?: number); + /** + * Initializes this algorithm for building a shell or a solid passing through a set of sections, where: + * + * - isSolid is set to true if this construction algorithm is required to build a solid or to false if it is required to build a shell. false is the default value; + * - ruled is set to true if the faces generated between the edges of two consecutive wires are ruled surfaces or to false (the default value) if they are smoothed out by approximation, + * - pres3d defines the precision criterion used by the approximation algorithm; the default value is 1.0e-6. Use AddWire and AddVertex to define the successive sections of the shell or solid to be built. + */ + Init(isSolid?: boolean, ruled?: boolean, pres3d?: number): void; + /** + * Adds the wire wire to the set of sections through which the shell or solid is built. Use the Build function to construct the shape. + */ + AddWire(wire: TopoDS_Wire): void; + /** + * Adds the vertex Vertex (punctual section) to the set of sections through which the shell or solid is built. A vertex may be added to the set of sections only as first or last section. At least one wire must be added to the set of sections by the method AddWire. Use the Build function to construct the shape. + */ + AddVertex(aVertex: TopoDS_Vertex): void; + /** + * Sets/unsets the option to compute origin and orientation on wires to avoid twisted results and update wires to have same number of edges. + */ + CheckCompatibility(check?: boolean): void; + /** + * Define the approximation algorithm. + */ + SetSmoothing(UseSmoothing: boolean): void; + /** + * Define the type of parametrization used in the approximation. + */ + SetParType(ParType: unknown): void; + /** + * Define the Continuity used in the approximation. + */ + SetContinuity(C: GeomAbs_Shape): void; + /** + * define the Weights associed to the criterium used in the optimization. + * + * if Wi <= 0 + */ + SetCriteriumWeight(W1: number, W2: number, W3: number): void; + /** + * Define the maximal U degree of result surface. + */ + SetMaxDegree(MaxDeg: number): void; + /** + * returns the type of parametrization used in the approximation + */ + ParType(): unknown; + /** + * returns the Continuity used in the approximation + */ + Continuity(): GeomAbs_Shape; + /** + * returns the maximal U degree of result surface + */ + MaxDegree(): number; + /** + * Define the approximation algorithm. + */ + UseSmoothing(): boolean; + /** + * returns the Weights associed to the criterium used in the optimization. + * @returns A result object with fields: + * - `W1`: updated value from the call. + * - `W2`: updated value from the call. + * - `W3`: updated value from the call. + */ + CriteriumWeight(W1?: number, W2?: number, W3?: number): { W1: number; W2: number; W3: number }; + /** + * This is called by `Shape()`. It does nothing but may be redefined. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns the `TopoDS` Shape of the bottom of the loft if solid. + */ + FirstShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the top of the loft if solid. + */ + LastShape(): TopoDS_Shape; + /** + * if Ruled Returns the Face generated by each edge except the last wire if smoothed Returns the Face generated by each edge of the first wire + */ + GeneratedFace(Edge: TopoDS_Shape): TopoDS_Shape; + /** + * Sets the mutable input state. If true then the input profile can be modified inside the thrusection operation. Default value is true. + */ + SetMutableInput(theIsMutableInput: boolean): void; + /** + * Returns a list of new shapes generated from the shape S by the shell-generating algorithm. This function is redefined from `BRepBuilderAPI_MakeShape::Generated`. S can be an edge or a vertex of a given Profile (see methods AddWire and AddVertex). + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of original wires. + */ + Wires(): NCollection_List_TopoDS_Shape; + /** + * Returns the current mutable input state. + */ + IsMutableInput(): boolean; + /** + * Returns the status of thrusection operation. + */ + GetStatus(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes algorithms for offsetting wires from a set of wires contained in a planar face. A MakeOffset object provides a framework for: + * + * - defining the construction of an offset, + * - implementing the construction algorithm, and + * - consulting the result. + */ +export declare class BRepOffsetAPI_MakeOffset extends BRepBuilderAPI_MakeShape { + /** + * Constructs an algorithm for creating an empty offset. + */ + constructor(); + /** + * Constructs an algorithm for creating an algorithm to build parallels to the spine Spine. + */ + constructor(Spine: TopoDS_Face, Join?: GeomAbs_JoinType, IsOpenResult?: boolean); + constructor(Spine: TopoDS_Wire, Join?: GeomAbs_JoinType, IsOpenResult?: boolean); + /** + * Initializes the algorithm to construct parallels to the spine Spine. Join defines the type of parallel generated by the salient vertices of the spine. The default type is GeomAbs_Arc where the vertices generate sections of a circle. If join type is GeomAbs_Intersection, the edges that intersect in a salient vertex generate the edges prolonged until intersection. + */ + Init(Spine: TopoDS_Face, Join: GeomAbs_JoinType, IsOpenResult: boolean): void; + /** + * Initialize the evaluation of Offsetting. + */ + Init(Join: GeomAbs_JoinType, IsOpenResult: boolean): void; + /** + * Set approximation flag for conversion input contours into ones consisting of 2D circular arcs and 2D linear segments only. + */ + SetApprox(ToApprox: boolean): void; + /** + * Initializes the algorithm to construct parallels to the wire Spine. + */ + AddWire(Spine: TopoDS_Wire): void; + /** + * Computes a parallel to the spine at distance Offset and at an altitude Alt from the plane of the spine in relation to the normal to the spine. Exceptions: StdFail_NotDone if the offset is not built. + */ + Perform(Offset: number, Alt?: number): void; + /** + * Builds the resulting shape (redefined from MakeShape). + */ + Build(theRange?: Message_ProgressRange): void; + /** + * returns a list of the created shapes from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Converts each wire of the face into contour consisting only of arcs and segments. New 3D curves are built too. + */ + static ConvertFace(theFace: TopoDS_Face, theAngleTolerance: number): TopoDS_Face; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Taper-adding transformations on a shape. The resulting shape is constructed by defining one face to be tapered after another one, as well as the geometric properties of their tapered transformation. Each tapered transformation is propagated along the series of faces which are tangential to one another and which contains the face to be tapered. This algorithm is useful in the construction of molds or dies. It facilitates the removal of the article being produced. A DraftAngle object provides a framework for: + * + * - initializing the construction algorithm with a given shape, + * - acquiring the data characterizing the faces to be tapered, + * - implementing the construction algorithm, and + * - consulting the results. Warning + * - This algorithm treats planar, cylindrical and conical faces. + * - Do not use shapes, which with a draft angle added to a face would modify the topology. This would, for example, involve creation of new vertices, edges or faces, or suppression of existing vertices, edges or faces. + * - Any face, which is continuous in tangency with the face to be tapered, will also be tapered. These connected faces must also respect the above criteria. + */ +export declare class BRepOffsetAPI_DraftAngle extends BRepBuilderAPI_ModifyShape { + /** + * Constructs an empty algorithm to perform taper-adding transformations on faces of a shape. Use the Init function to define the shape to be tapered. + */ + constructor(); + /** + * Initializes an algorithm to perform taper-adding transformations on faces of the shape S. S will be referred to as the initial shape of the algorithm. + */ + constructor(S: TopoDS_Shape); + /** + * Cancels the results of all taper-adding transformations performed by this algorithm on the initial shape. These results will have been defined by successive calls to the function Add. + */ + Clear(): void; + /** + * Initializes, or reinitializes this taper-adding algorithm with the shape S. S will be referred to as the initial shape of this algorithm. + */ + Init(S: TopoDS_Shape): void; + /** + * Adds the face F, the direction Direction, the angle Angle, the plane NeutralPlane, and the flag Flag to the framework created at construction time, and with this data, defines the taper-adding transformation. F is a face, which belongs to the initial shape of this algorithm or to the shape loaded by the function Init. Only planar, cylindrical or conical faces can be tapered: + * + * - If the face F is planar, it is tapered by inclining it through the angle Angle about the line of intersection between the plane NeutralPlane and F. Direction indicates the side of NeutralPlane from which matter is removed if Angle is positive or added if Angle is negative. + * - If F is cylindrical or conical, it is transformed in the same way on a single face, resulting in a conical face if F is cylindrical, and a conical or cylindrical face if it is already conical. The taper-adding transformation is propagated from the face F along the series of planar, cylindrical or conical faces containing F, which are tangential to one another. Use the function AddDone to check if this taper-adding transformation is successful. Warning Nothing is done if: + * - the face F does not belong to the initial shape of this algorithm, or + * - the face F is not planar, cylindrical or conical. Exceptions + * - Standard_NullObject if the initial shape is not defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function. + * - Standard_ConstructionError if the previous call to Add has failed. The function AddDone ought to have been used to check for this, and the function Remove to cancel the results of the unsuccessful taper-adding transformation and to retrieve the previous shape. + */ + Add(F: TopoDS_Face, Direction: gp_Dir, Angle: number, NeutralPlane: gp_Pln, Flag?: boolean): void; + /** + * Returns true if the previous taper-adding transformation performed by this algorithm in the last call to Add, was successful. If AddDone returns false: + * + * - the function ProblematicShape returns the face on which the error occurred, + * - the function Remove has to be used to cancel the results of the unsuccessful taper-adding transformation and to retrieve the previous shape. Exceptions Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the .Init function. + */ + AddDone(): boolean; + /** + * Cancels the taper-adding transformation previously performed by this algorithm on the face F and the series of tangential faces which contain F, and retrieves the shape before the last taper-adding transformation. Warning You will have to use this function if the previous call to Add fails. Use the function AddDone to check it. Exceptions. + * + * - Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function. + * - Standard_NoSuchObject if F has not been added or has already been removed. + */ + Remove(F: TopoDS_Face): void; + /** + * Returns the shape on which an error occurred after an unsuccessful call to Add or when IsDone returns false. Exceptions Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function. + */ + ProblematicShape(): TopoDS_Shape; + /** + * Returns an error status when an error has occurred (Face, Edge or Vertex recomputation problem). Otherwise returns Draft_NoError. The method may be called if AddDone returns false, or when IsDone returns false. + */ + Status(): unknown; + /** + * Returns all the faces which have been added together with the face . + */ + ConnectedFaces(F: TopoDS_Face): NCollection_List_TopoDS_Shape; + /** + * Returns all the faces on which a modification has been given. + */ + ModifiedFaces(): NCollection_List_TopoDS_Shape; + /** + * Builds the resulting shape (redefined from MakeShape). + */ + Build(theRange?: Message_ProgressRange): void; + CorrectWires(): void; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the modified shape corresponding to . S can correspond to the entire initial shape or to its subshape. Raises exceptions Standard_NoSuchObject if S is not the initial shape or a subshape of the initial shape to which the transformation has been applied. + */ + ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class provides for a framework to construct a shell or a solid along a spine consisting in a wire. To produce a solid, the initial wire must be closed. Two approaches are used: + * + * - definition by section + * - by a section and a scaling law + * - by addition of successive intermediary sections + * - definition by sweep mode. + * - pseudo-Frenet + * - constant + * - binormal constant + * - normal defined by a surface support + * - normal defined by a guiding contour. The two global approaches can also be combined. You can also close the surface later in order to form a solid. Warning: some limitations exist - Mode with auxiliary spine is incompatible with hometetic laws - Mode with auxiliary spine and keep contact produce only CO surface. + */ +export declare class BRepOffsetAPI_MakePipeShell extends BRepPrimAPI_MakeSweep { + /** + * Constructs the shell-generating framework defined by the wire Spine. Sets an sweep's mode If no mode are set, the mode use in MakePipe is used. + */ + constructor(Spine: TopoDS_Wire); + /** + * Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping If IsFrenet is false, a corrected Frenet trihedron is used. + */ + SetMode(IsFrenet: boolean): void; + /** + * Sets a fixed trihedron to perform the sweeping all sections will be parallel. + */ + SetMode(Axe: gp_Ax2): void; + /** + * Sets a fixed BiNormal direction to perform the sweeping. Angular relations between the section(s) and will be constant. + */ + SetMode(BiNormal: gp_Dir): void; + /** + * Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces. Warning: To be effective, Each edge of the must have a representation on one face of. + */ + SetMode(SpineSupport: TopoDS_Shape): boolean; + /** + * Sets an auxiliary spine to define the Normal For each Point of the Spine P, an Point Q is evaluated on If Q split with the same length ratio than P split . Else the plan define by P and the tangent to the intersect in Q. If equals BRepFill_NoContact: The Normal is defined by the vector PQ. + * If equals BRepFill_Contact: The Normal is defined to achieve that the sweeped section is in contact to the auxiliarySpine. The width of section is constant all along the path. In other words, the auxiliary spine lies on the swept surface, but not necessarily is a boundary of this surface. + * However, the auxiliary spine has to be close enough to the main spine to provide intersection with any section all along the path. + * If equals BRepFill_ContactOnBorder: The auxiliary spine becomes a boundary of the swept surface and the width of section varies along the path. Give section to sweep. Possibilities are: + * + * - Give one or several section + * - Give one profile and an homotetic law. + * - Automatic compute of correspondence between spine, and section on the sweeped shape + * - correspondence between spine, and section on the sweeped shape defined by a vertex of the spine + */ + SetMode(AuxiliarySpine: TopoDS_Wire, CurvilinearEquivalence: boolean, KeepContact: BRepFill_TypeOfContact): void; + /** + * Sets a Discrete trihedron to perform the sweeping. + */ + SetDiscreteMode(): void; + /** + * Adds the section Profile to this framework. First and last sections may be punctual, so the shape Profile may be both wire and vertex. Correspondent point on spine is computed automatically. If WithContact is true, the section is translated to be in contact with the spine. If WithCorrection is true, the section is rotated to be orthogonal to the spine?s tangent in the correspondent point. This option has no sense if the section is punctual (Profile is of type {@link TopoDS_Vertex | `TopoDS_Vertex`}). + */ + Add(Profile: TopoDS_Shape, WithContact: boolean, WithCorrection: boolean): void; + /** + * Adds the section Profile to this framework. Correspondent point on the spine is given by Location. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. + */ + Add(Profile: TopoDS_Shape, Location: TopoDS_Vertex, WithContact: boolean, WithCorrection: boolean): void; + /** + * Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. + */ + SetLaw(Profile: TopoDS_Shape, L: Law_Function, WithContact: boolean, WithCorrection: boolean): void; + /** + * Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. + */ + SetLaw(Profile: TopoDS_Shape, L: Law_Function, Location: TopoDS_Vertex, WithContact: boolean, WithCorrection: boolean): void; + /** + * Removes the section Profile from this framework. + */ + Delete(Profile: TopoDS_Shape): void; + /** + * Returns true if this tool object is ready to build the shape, i.e. has a definition for the wire section Profile. + */ + IsReady(): boolean; + /** + * Get a status, when Simulate or Build failed. It can be BRepBuilderAPI_PipeDone, BRepBuilderAPI_PipeNotDone, BRepBuilderAPI_PlaneNotIntersectGuide, BRepBuilderAPI_ImpossibleContact. + */ + GetStatus(): unknown; + /** + * Sets the following tolerance values. + * + * - 3D tolerance Tol3d + * - boundary tolerance BoundTol + * - angular tolerance TolAngular. + */ + SetTolerance(Tol3d?: number, BoundTol?: number, TolAngular?: number): void; + /** + * Define the maximum V degree of resulting surface. + */ + SetMaxDegree(NewMaxDegree: number): void; + /** + * Define the maximum number of spans in V-direction on resulting surface. + */ + SetMaxSegments(NewMaxSegments: number): void; + /** + * Set the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0. + */ + SetForceApproxC1(ForceApproxC1: boolean): void; + /** + * Sets the transition mode to manage discontinuities on the swept shape caused by fractures on the spine. The transition mode can be BRepBuilderAPI_Transformed (default value), BRepBuilderAPI_RightCorner, BRepBuilderAPI_RoundCorner: + * + * - RepBuilderAPI_Transformed: discontinuities are treated by modification of the sweeping mode. The pipe is "transformed" at the fractures of the spine. This mode assumes building a self-intersected shell. + * - BRepBuilderAPI_RightCorner: discontinuities are treated like right corner. Two pieces of the pipe corresponding to two adjacent segments of the spine are extended and intersected at a fracture of the spine. + * - BRepBuilderAPI_RoundCorner: discontinuities are treated like round corner. The corner is treated as rotation of the profile around an axis which passes through the point of the spine's fracture. This axis is based on cross product of directions tangent to the adjacent segments of the spine at their common point. + * Warnings The mode BRepBuilderAPI_RightCorner provides a valid result if intersection of two pieces of the pipe (corresponding to two adjacent segments of the spine) in the neighborhood of the spine?s fracture is connected and planar. This condition can be violated if the spine is non-linear in some neighborhood of the fracture or if the profile was set with a scaling law. The last mode, BRepBuilderAPI_RoundCorner, will assuredly provide a good result only if a profile was set with option WithCorrection = True, i.e. it is strictly orthogonal to the spine. + */ + SetTransitionMode(Mode?: BRepBuilderAPI_TransitionMode): void; + /** + * Simulates the resulting shape by calculating its cross-sections. The spine is divided by this cross-sections into (NumberOfSection - 1) equal parts, the number of cross-sections is NumberOfSection. The cross-sections are wires and they are returned in the list Result. This gives a rapid preview of the resulting shape, which will be obtained using the settings you have provided. Raises NotDone if it is not Ready. + * @param Result Mutated in place; read the updated value from this argument after the call. + */ + Simulate(NumberOfSection: number, Result: NCollection_List_TopoDS_Shape): void; + /** + * Builds the resulting shape (redefined from MakeShape). + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Transforms the sweeping Shell in Solid. If a propfile is not closed returns False. + */ + MakeSolid(): boolean; + /** + * Returns the `TopoDS` Shape of the bottom of the sweep. + */ + FirstShape(): TopoDS_Shape; + /** + * Returns the `TopoDS` Shape of the top of the sweep. + */ + LastShape(): TopoDS_Shape; + /** + * Returns a list of new shapes generated from the shape S by the shell-generating algorithm. This function is redefined from BRepOffsetAPI_MakeShape::Generated. S can be an edge or a vertex of a given Profile (see methods Add). + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + ErrorOnSurface(): number; + /** + * Sets the build history flag. If set to True, the pipe shell will store the history of the sections and the spine, which can be used for further modifications or analysis. + */ + SetIsBuildHistory(theIsBuildHistory: boolean): void; + /** + * Returns the build history flag. If True, the pipe shell stores the history of the sections and the spine. + */ + IsBuildHistory(): boolean; + /** + * Returns the list of original profiles. + * @param theProfiles Mutated in place; read the updated value from this argument after the call. + */ + Profiles(theProfiles: NCollection_List_TopoDS_Shape): void; + /** + * Returns the spine. + */ + Spine(): TopoDS_Wire; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class provides tools to compute minimum distance between two Shapes (Compound,CompSolid, Solid, Shell, Face, Wire, Edge, Vertex). + */ +export declare class BRepExtrema_DistShapeShape { + /** + * create empty tool + */ + constructor(); + /** + * create tool and computation of the minimum distance (value and pair of points) using default deflection in single thread mode. Default deflection value is `Precision::Confusion()`. + * @param Shape1 - the first shape for distance computation + * @param Shape2 - the second shape for distance computation + * @param F and + * @param A are not used in computation and are obsolete. + * @param theRange - the progress indicator of algorithm + */ + constructor(Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, F?: unknown, A?: Extrema_ExtAlgo, theRange?: Message_ProgressRange); + /** + * create tool and computation of the minimum distance (value and pair of points) in single thread mode. Default deflection value is `Precision::Confusion()`. + * @param Shape1 - the first shape for distance computation + * @param Shape2 - the second shape for distance computation + * @param theDeflection - the presition of distance computation + * @param F and + * @param A are not used in computation and are obsolete. + * @param theRange - the progress indicator of algorithm + */ + constructor(Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, theDeflection: number, F?: unknown, A?: Extrema_ExtAlgo, theRange?: Message_ProgressRange); + /** + * Sets deflection to computation of the minimum distance. + */ + SetDeflection(theDeflection: number): void; + /** + * load first shape into extrema + */ + LoadS1(Shape1: TopoDS_Shape): void; + /** + * load second shape into extrema + */ + LoadS2(Shape1: TopoDS_Shape): void; + /** + * computation of the minimum distance (value and couple of points). Parameter theDeflection is used to specify a maximum deviation of extreme distances from the minimum one. Returns IsDone status. theRange - the progress indicator of algorithm + */ + Perform(theRange?: Message_ProgressRange): boolean; + /** + * True if the minimum distance is found. + */ + IsDone(): boolean; + /** + * Returns the number of solutions satisfying the minimum distance. + */ + NbSolution(): number; + /** + * Returns the value of the minimum distance. + */ + Value(): number; + /** + * True if one of the shapes is a solid and the other shape is completely or partially inside the solid. + */ + InnerSolution(): boolean; + /** + * Returns the Point corresponding to the th solution on the first Shape. + */ + PointOnShape1(N: number): gp_Pnt; + /** + * Returns the Point corresponding to the th solution on the second Shape. + */ + PointOnShape2(N: number): gp_Pnt; + /** + * gives the type of the support where the Nth solution on the first shape is situated: IsVertex => the Nth solution on the first shape is a Vertex IsOnEdge => the Nth soluion on the first shape is on a Edge IsInFace => the Nth solution on the first shape is inside a face the corresponding support is obtained by the method SupportOnShape1 + */ + SupportTypeShape1(N: number): unknown; + /** + * gives the type of the support where the Nth solution on the second shape is situated: IsVertex => the Nth solution on the second shape is a Vertex IsOnEdge => the Nth soluion on the secondt shape is on a Edge IsInFace => the Nth solution on the second shape is inside a face the corresponding support is obtained by the method SupportOnShape2 + */ + SupportTypeShape2(N: number): unknown; + /** + * gives the support where the Nth solution on the first shape is situated. This support can be a Vertex, an Edge or a Face. + */ + SupportOnShape1(N: number): TopoDS_Shape; + /** + * gives the support where the Nth solution on the second shape is situated. This support can be a Vertex, an Edge or a Face. + */ + SupportOnShape2(N: number): TopoDS_Shape; + /** + * gives the corresponding parameter t if the Nth solution is situated on an Edge of the first shape + * @returns A result object with fields: + * - `t`: updated value from the call. + */ + ParOnEdgeS1(N: number, t?: number): { t: number }; + /** + * gives the corresponding parameter t if the Nth solution is situated on an Edge of the first shape + * @returns A result object with fields: + * - `t`: updated value from the call. + */ + ParOnEdgeS2(N: number, t?: number): { t: number }; + /** + * gives the corresponding parameters (U,V) if the Nth solution is situated on an face of the first shape + * @returns A result object with fields: + * - `u`: updated value from the call. + * - `v`: updated value from the call. + */ + ParOnFaceS1(N: number, u?: number, v?: number): { u: number; v: number }; + /** + * gives the corresponding parameters (U,V) if the Nth solution is situated on an Face of the second shape + * @returns A result object with fields: + * - `u`: updated value from the call. + * - `v`: updated value from the call. + */ + ParOnFaceS2(N: number, u?: number, v?: number): { u: number; v: number }; + /** + * Sets unused parameter Obsolete. + */ + SetFlag(F: unknown): void; + /** + * Sets unused parameter Obsolete. + */ + SetAlgo(A: Extrema_ExtAlgo): void; + /** + * If isMultiThread == true then computation will be performed in parallel. + */ + SetMultiThread(theIsMultiThread: boolean): void; + /** + * Returns true then computation will be performed in parallel Default value is false. + */ + IsMultiThread(): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This package provides the bounding boxes for curves and surfaces from BRepAdaptor. Functions to add a topological shape to a bounding box. + */ +export declare class BRepBndLib { + constructor(); + /** + * Adds the shape S to the bounding box B. More precisely are successively added to B: + * + * - each face of S; the triangulation of the face is used if it exists, + * - then each edge of S which does not belong to a face, the polygon of the edge is used if it exists + * - and last each vertex of S which does not belong to an edge. After each elementary operation, the bounding box B is enlarged by the tolerance value of the relative sub-shape. When working with the triangulation of a face this value of enlargement is the sum of the triangulation deflection and the face tolerance. When working with the polygon of an edge this value of enlargement is the sum of the polygon deflection and the edge tolerance. Warning + * - This algorithm is time consuming if triangulation has not been inserted inside the data structure of the shape S. + * - The resulting bounding box may be somewhat larger than the object. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static Add(S: TopoDS_Shape, B: Bnd_Box, useTriangulation: boolean): void; + /** + * Adds the shape S to the bounding box B. This is a quick algorithm but only works if the shape S is composed of polygonal planar faces, as is the case if S is an approached polyhedral representation of an exact shape. Pay particular attention to this because this condition is not checked and, if it not respected, an error may occur in the algorithm for which the bounding box is built. Note that the resulting bounding box is not enlarged by the tolerance value of the sub-shapes as is the case with the Add function. So the added part of the resulting bounding box is closer to the shape S. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddClose(S: TopoDS_Shape, B: Bnd_Box): void; + /** + * Adds the shape S to the bounding box B. This algorithm builds precise bounding box, which differs from exact geometry boundaries of shape only on shape entities tolerances Algorithm is the same as for method Add(..), but uses more precise methods for building boxes for geometry objects. If useShapeTolerance = True, bounding box is enlardged by shape tolerances and these tolerances are used for numerical methods of bounding box size calculations, otherwise bounding box is built according to sizes of uderlined geometrical entities, numerical calculation use tolerance `Precision::Confusion()`. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddOptimal(S: TopoDS_Shape, B: Bnd_Box, useTriangulation: boolean, useShapeTolerance: boolean): void; + /** + * Computes the Oriented Bounding box for the shape . Two independent methods of computation are implemented: first method based on set of points (so, it demands the triangulated shape or shape with planar faces and linear edges). The second method is based on use of inertia axes and is called if use of the first method is impossible. If theIsTriangulationUsed == FALSE then the triangulation will be ignored at all. + * If theIsShapeToleranceUsed == TRUE then resulting box will be extended on the tolerance of the shape. theIsOptimal flag defines whether to look for the more tight OBB for the cost of performance or not. + * @param theOBB Mutated in place; read the updated value from this argument after the call. + */ + static AddOBB(theS: TopoDS_Shape, theOBB: unknown, theIsTriangulationUsed: boolean, theIsOptimal: boolean, theIsShapeToleranceUsed: boolean): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type BRepBuilderAPI_WireError = typeof BRepBuilderAPI_WireError[keyof typeof BRepBuilderAPI_WireError]; +/** + * Indicates the outcome of wire construction, i.e. whether it is successful or not, as explained below: + * + * - BRepBuilderAPI_WireDone No error occurred. The wire is correctly built. + * - BRepBuilderAPI_EmptyWire No initialization of the algorithm. Only an empty constructor was used. + * - BRepBuilderAPI_DisconnectedWire The last edge which you attempted to add was not connected to the wire. + * - BRepBuilderAPI_NonManifoldWire The wire with some singularity. + */ +export declare const BRepBuilderAPI_WireError: { + readonly BRepBuilderAPI_WireDone: 'BRepBuilderAPI_WireDone'; + readonly BRepBuilderAPI_EmptyWire: 'BRepBuilderAPI_EmptyWire'; + readonly BRepBuilderAPI_DisconnectedWire: 'BRepBuilderAPI_DisconnectedWire'; + readonly BRepBuilderAPI_NonManifoldWire: 'BRepBuilderAPI_NonManifoldWire'; +}; + +/** + * Provides methods to build edges. + * + * The methods have the following syntax, where TheCurve is one of Lin, Circ, ... + * + * Create(C : TheCurve) + * + * Makes an edge on the whole curve. Add vertices on finite curves. + * + * Create(C : TheCurve; p1,p2 : Real) + * + * Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2. + * + * Create(C : TheCurve; P1, P2 : Pnt from gp) + * + * Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve. + * + * Create(C : TheCurve; V1, V2 : Vertex from `TopoDS`) + * + * Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction. + */ +export declare class BRepBuilderAPI_MakeEdge extends BRepBuilderAPI_MakeShape { + constructor(); + constructor(L: unknown); + constructor(L: gp_Circ); + constructor(L: gp_Elips); + constructor(L: unknown); + constructor(L: unknown); + constructor(L: Geom_Curve); + constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(P1: gp_Pnt, P2: gp_Pnt); + constructor(L: Geom2d_Curve, S: Geom_Surface); + constructor(L: unknown, p1: number, p2: number); + constructor(L: unknown, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: unknown, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: gp_Circ, p1: number, p2: number); + constructor(L: gp_Circ, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: gp_Circ, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: gp_Elips, p1: number, p2: number); + constructor(L: gp_Elips, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: gp_Elips, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: unknown, p1: number, p2: number); + constructor(L: unknown, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: unknown, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: unknown, p1: number, p2: number); + constructor(L: unknown, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: unknown, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: Geom_Curve, p1: number, p2: number); + constructor(L: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: Geom2d_Curve, S: Geom_Surface, p1: number, p2: number); + constructor(L: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt); + constructor(L: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex); + constructor(L: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number); + constructor(L: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number); + constructor(L: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number); + /** + * The general method to directly create an edge is to give. + * + * - a 3D curve C as the support (geometric domain) of the edge, + * - two vertices V1 and V2 to limit the curve (definition of the restriction of the edge), and + * - two real values p1 and p2 which are the parameters for the vertices V1 and V2 on the curve. The curve may be defined as a 2d curve in the parametric space of a surface: a pcurve. The surface on which the edge is built is then kept at the level of the edge. The default tolerance will be associated with this edge. Rules applied to the arguments: For the curve: + * - The curve must not be a 'null handle'. + * - If the curve is a trimmed curve the basis curve is used. For the vertices: + * - Vertices may be null shapes. When V1 or V2 is null the edge is open in the corresponding direction and the parameter value p1 or p2 must be infinite (remember that `Precision::Infinite()` defines an infinite value). + * - The two vertices must be identical if they have the same 3D location. Identical vertices are used in particular when the curve is closed. For the parameters: + * - The parameters must be in the parametric range of the curve (or the basis curve if the curve is trimmed). If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_ParameterOutOfRange. + * - Parameter values must not be equal. If this condition is not satisfied (i.e. if | p1 - p2 | ) the edge is not built, and the Error function will return BRepAPI_LineThroughIdenticPoints. Parameter values are expected to be given in increasing order: C->FirstParameter() + * - If the parameter values are given in decreasing order the vertices are switched, i.e. the "first vertex" is on the point of parameter p2 and the "second vertex" is on the point of parameter p1. In such a case, to keep the original intent of the construction, the edge will be oriented "reversed". + * - On a periodic curve the parameter values p1 and p2 are adjusted by adding or subtracting the period to obtain p1 in the parametric range of the curve, and p2] such that [ p1 , where Period is the period of the curve. + * - A parameter value may be infinite. The edge is open in the corresponding direction. However the corresponding vertex must be a null shape. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_PointWithInfiniteParameter. + * - The distance between the vertex and the point evaluated on the curve with the parameter, must be lower than the precision of the vertex. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_DifferentsPointAndParameter. Other edge constructions + * - The parameter values can be omitted, they will be computed by projecting the vertices on the curve. Note that projection is the only way to evaluate the parameter values of the vertices on the curve: vertices must be given on the curve, i.e. the distance from a vertex to the curve must be less than or equal to the precision of the vertex. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_PointProjectionFailed. + * - 3D points can be given in place of vertices. Vertices will be created from the points (with the default topological precision `Precision::Confusion()`). Note: + * - Giving vertices is useful when creating a connected edge. + * - If the parameter values correspond to the extremities of a closed curve, points must be identical, or at least coincident. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_DifferentPointsOnClosedCurve. + * - The vertices or points can be omitted if the parameter values are given. The points will be computed from the parameters on the curve. The vertices or points and the parameter values can be omitted. The first and last parameters of the curve will then be used. + * + * Auxiliary methods + */ + constructor(L: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number); + Init(C: Geom_Curve): void; + Init(C: Geom2d_Curve, S: Geom_Surface): void; + Init(C: Geom_Curve, p1: number, p2: number): void; + Init(C: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt): void; + Init(C: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): void; + Init(C: Geom2d_Curve, S: Geom_Surface, p1: number, p2: number): void; + Init(C: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt): void; + Init(C: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex): void; + Init(C: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): void; + Init(C: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): void; + Init(C: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): void; + /** + * Defines or redefines the arguments for the construction of an edge. This function is currently used after the empty constructor BRepAPI_MakeEdge(). + */ + Init(C: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): void; + /** + * Returns true if the edge is built. + */ + IsDone(): boolean; + /** + * Returns the construction status. + * + * - BRepBuilderAPI_EdgeDone if the edge is built, or + * - another value of the `BRepBuilderAPI_EdgeError` enumeration indicating the reason of construction failure. + */ + Error(): unknown; + /** + * Returns the constructed edge. Exceptions StdFail_NotDone if the edge is not built. + */ + Edge(): TopoDS_Edge; + /** + * Returns the first vertex of the edge. May be Null. + */ + Vertex1(): TopoDS_Vertex; + /** + * Returns the second vertex of the edge. May be Null. + * + * Warning The returned vertex in each function corresponds respectively to + * + * - the lowest, or + * - the highest parameter on the curve along which the edge is built. It does not correspond to the first or second vertex given at the time of the construction, if the edge is oriented reversed. Exceptions StdFail_NotDone if the edge is not built. + */ + Vertex2(): TopoDS_Vertex; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type BRepBuilderAPI_TransitionMode = typeof BRepBuilderAPI_TransitionMode[keyof typeof BRepBuilderAPI_TransitionMode]; +/** + * Option to manage discontinuities in Sweep. + */ +export declare const BRepBuilderAPI_TransitionMode: { + readonly BRepBuilderAPI_Transformed: 'BRepBuilderAPI_Transformed'; + readonly BRepBuilderAPI_RightCorner: 'BRepBuilderAPI_RightCorner'; + readonly BRepBuilderAPI_RoundCorner: 'BRepBuilderAPI_RoundCorner'; +}; + +/** + * Implements the methods of MakeShape for the constant topology modifications. The methods are implemented when the modification uses a Modifier from {@link BRepTools | `BRepTools`}. Some of them have to be redefined if the modification is implemented with another tool (see Transform from {@link BRepBuilderAPI | `BRepBuilderAPI`} for example). The {@link BRepBuilderAPI | `BRepBuilderAPI`} package provides the following frameworks to perform modifications of this sort: + * + * - {@link BRepBuilderAPI_Copy | `BRepBuilderAPI_Copy`} to produce the copy of a shape, + * - {@link BRepBuilderAPI_Transform | `BRepBuilderAPI_Transform`} and {@link BRepBuilderAPI_GTransform | `BRepBuilderAPI_GTransform`} to apply a geometric transformation to a shape, + * - {@link BRepBuilderAPI_NurbsConvert | `BRepBuilderAPI_NurbsConvert`} to convert the whole geometry of a shape into NURBS geometry, + * - {@link BRepOffsetAPI_DraftAngle | `BRepOffsetAPI_DraftAngle`} to build a tapered shape. + */ +export declare class BRepBuilderAPI_ModifyShape extends BRepBuilderAPI_MakeShape { + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the modified shape corresponding to . S can correspond to the entire initial shape or to its subshape. Exceptions Standard_NoSuchObject if S is not the initial shape or a subshape of the initial shape to which the transformation has been applied. Raises NoSuchObject from {@link Standard | `Standard`} if S is not the initial shape or a sub-shape of the initial shape. + */ + ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides methods to. + * + * - identify possible contiguous boundaries (for control afterwards (of continuity: C0, C1, ...)) + * - assemble contiguous shapes into one shape. Only manifold shapes will be found. Sewing will not be done in case of multiple edges. + * + * For sewing, use this function as following: + * + * - create an empty object + * - default tolerance 1.E-06 + * - with face analysis on + * - with sewing operation on + * - set the cutting option as you need (default True) + * - define a tolerance + * - add shapes to be sewed -> Add + * - compute -> Perform + * - output the resulted shapes + * - output free edges if necessary + * - output multiple edges if necessary + * - output the problems if any + */ +export declare class BRepBuilderAPI_Sewing extends Standard_Transient { + /** + * Creates an object with tolerance of connexity option for sewing (if false only control) option for analysis of degenerated shapes option for cutting of free edges. option for non manifold processing. + */ + constructor(tolerance?: number, option1?: boolean, option2?: boolean, option3?: boolean, option4?: boolean); + /** + * initialize the parameters if necessary + */ + Init(tolerance?: number, option1?: boolean, option2?: boolean, option3?: boolean, option4?: boolean): void; + /** + * Loads the context shape. + */ + Load(shape: TopoDS_Shape): void; + /** + * Defines the shapes to be sewed or controlled. + */ + Add(shape: TopoDS_Shape): void; + /** + * Computing theProgress - progress indicator of algorithm. + */ + Perform(theProgress?: Message_ProgressRange): void; + /** + * Gives the sewed shape a null shape if nothing constructed may be a face, a shell, a solid or a compound. + */ + SewedShape(): TopoDS_Shape; + /** + * set context + */ + SetContext(theContext: unknown): void; + /** + * return context + */ + GetContext(): unknown; + /** + * Gives the number of free edges (edge shared by one face). + */ + NbFreeEdges(): number; + /** + * Gives each free edge. + */ + FreeEdge(index: number): TopoDS_Edge; + /** + * Gives the number of multiple edges (edge shared by more than two faces). + */ + NbMultipleEdges(): number; + /** + * Gives each multiple edge. + */ + MultipleEdge(index: number): TopoDS_Edge; + /** + * Gives the number of contiguous edges (edge shared by two faces). + */ + NbContigousEdges(): number; + /** + * Gives each contiguous edge. + */ + ContigousEdge(index: number): TopoDS_Edge; + /** + * Gives the sections (edge) belonging to a contiguous edge. + */ + ContigousEdgeCouple(index: number): NCollection_List_TopoDS_Shape; + /** + * Indicates if a section is bound (before use SectionToBoundary). + */ + IsSectionBound(section: TopoDS_Edge): boolean; + /** + * Gives the original edge (free boundary) which becomes the the section. Remember that sections constitute common edges. This information is important for control because with original edge we can find the surface to which the section is attached. + */ + SectionToBoundary(section: TopoDS_Edge): TopoDS_Edge; + /** + * Gives the number of degenerated shapes. + */ + NbDegeneratedShapes(): number; + /** + * Gives each degenerated shape. + */ + DegeneratedShape(index: number): TopoDS_Shape; + /** + * Indicates if a input shape is degenerated. + */ + IsDegenerated(shape: TopoDS_Shape): boolean; + /** + * Indicates if a input shape has been modified. + */ + IsModified(shape: TopoDS_Shape): boolean; + /** + * Gives a modifieded shape. + */ + Modified(shape: TopoDS_Shape): TopoDS_Shape; + /** + * Indicates if a input subshape has been modified. + */ + IsModifiedSubShape(shape: TopoDS_Shape): boolean; + /** + * Gives a modifieded subshape. + */ + ModifiedSubShape(shape: TopoDS_Shape): TopoDS_Shape; + /** + * print the information + */ + Dump(): void; + /** + * Gives the number of deleted faces (faces smallest than tolerance). + */ + NbDeletedFaces(): number; + /** + * Gives each deleted face. + */ + DeletedFace(index: number): TopoDS_Face; + /** + * Gives a modified shape. + */ + WhichFace(theEdg: TopoDS_Edge, index?: number): TopoDS_Face; + /** + * Gets same parameter mode. + */ + SameParameterMode(): boolean; + /** + * Sets same parameter mode. + */ + SetSameParameterMode(SameParameterMode: boolean): void; + /** + * Gives set tolerance. + */ + Tolerance(): number; + /** + * Sets tolerance. + */ + SetTolerance(theToler: number): void; + /** + * Gives set min tolerance. + */ + MinTolerance(): number; + /** + * Sets min tolerance. + */ + SetMinTolerance(theMinToler: number): void; + /** + * Gives set max tolerance. + */ + MaxTolerance(): number; + /** + * Sets max tolerance. + */ + SetMaxTolerance(theMaxToler: number): void; + /** + * Returns mode for sewing faces By default - true. + */ + FaceMode(): boolean; + /** + * Sets mode for sewing faces By default - true. + */ + SetFaceMode(theFaceMode: boolean): void; + /** + * Returns mode for sewing floating edges By default - false. + */ + FloatingEdgesMode(): boolean; + /** + * Sets mode for sewing floating edges By default - false. Returns mode for cutting floating edges By default - false. Sets mode for cutting floating edges By default - false. + */ + SetFloatingEdgesMode(theFloatingEdgesMode: boolean): void; + /** + * Returns mode for accounting of local tolerances of edges and vertices during of merging. + */ + LocalTolerancesMode(): boolean; + /** + * Sets mode for accounting of local tolerances of edges and vertices during of merging in this case WorkTolerance = myTolerance + tolEdge1+ tolEdg2;. + */ + SetLocalTolerancesMode(theLocalTolerancesMode: boolean): void; + /** + * Sets mode for non-manifold sewing. + */ + SetNonManifoldMode(theNonManifoldMode: boolean): void; + /** + * Gets mode for non-manifold sewing. + * + * INTERNAL FUNCTIONS -- + */ + NonManifoldMode(): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides methods to build faces. + * + * A face may be built: + * + * - From a surface. + * - Elementary surface from gp. + * - Surface from Geom. + * - From a surface and U,V values. + * - From a wire. + * - Find the surface automatically if possible. + * - From a surface and a wire. + * - A flag Inside is given, when this flag is True the wire is oriented to bound a finite area on the surface. + * - From a face and a wire. + * - The new wire is a perforation. + */ +export declare class BRepBuilderAPI_MakeFace extends BRepBuilderAPI_MakeShape { + /** + * Not done. + */ + constructor(); + /** + * Load a face. useful to add wires. + */ + constructor(F: TopoDS_Face); + /** + * Make a face from a plane. + */ + constructor(P: gp_Pln); + /** + * Make a face from a cylinder. + */ + constructor(C: gp_Cylinder); + /** + * Make a face from a cone. + */ + constructor(C: unknown); + /** + * Make a face from a sphere. + */ + constructor(S: gp_Sphere); + /** + * Make a face from a torus. + */ + constructor(C: unknown); + /** + * Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges. + */ + constructor(S: Geom_Surface, TolDegen: number); + /** + * Find a surface from the wire and make a face. if is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. + */ + constructor(W: TopoDS_Wire, OnlyPlane?: boolean); + /** + * Adds the wire in the face A general method to create a face is to give. + * + * - a surface S as the support (the geometric domain) of the face, + * - and a wire W to bound it. + * The bounds of the face can also be defined by four parameter values umin, umax, vmin, vmax which determine isoparametric limitations on the parametric space of the surface. In this way, a patch is defined. The parameter values are optional. If they are omitted, the natural bounds of the surface are used. A wire is automatically built using the defined bounds. + * Up to four edges and four vertices are created with this wire (no edge is created when the corresponding parameter value is infinite). Wires can then be added using the function Add to define other restrictions on the face. These restrictions represent holes. + * More than one wire may be added by this way, provided that the wires do not cross each other and that they define only one area on the surface. (Be careful, however, as this is not checked). + * Forbidden addition of wires Note that in this schema, the third case is valid if edges of the wire W are declared internal to the face. As a result, these edges are no longer bounds of the face. + * A default tolerance (`Precision::Confusion()`) is given to the face, this tolerance may be increased during construction of the face using various algorithms. Rules applied to the arguments For the surface: + * - The surface must not be a 'null handle'. + * - If the surface is a trimmed surface, the basis surface is used. + * - For the wire: the wire is composed of connected edges, each edge having a parametric curve description in the parametric domain of the surface; in other words, as a pcurve. For the parameters: + * - The parameter values must be in the parametric range of the surface (or the basis surface, if the surface is trimmed). If this condition is not satisfied, the face is not built, and the Error function will return BRepBuilderAPI_ParametersOutOfRange. + * - The bounding parameters p1 and p2 are adjusted on a periodic surface in a given parametric direction by adding or subtracting the period to obtain p1 in the parametric range of the surface and such p2, that p2 - p1 <= Period, where Period is the period of the surface in this parametric direction. + * - A parameter value may be infinite. There will be no edge and no vertex in the corresponding direction. + */ + constructor(F: TopoDS_Face, W: TopoDS_Wire); + /** + * Make a face from a plane and a wire. + */ + constructor(P: gp_Pln, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a cylinder and a wire. + */ + constructor(C: gp_Cylinder, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a cone and a wire. + */ + constructor(C: unknown, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a sphere and a wire. + */ + constructor(S: gp_Sphere, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a torus and a wire. + */ + constructor(C: unknown, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a Surface and a wire. If the surface S is not plane, it must contain pcurves for all edges in W, otherwise the wrong shape will be created. + */ + constructor(S: Geom_Surface, W: TopoDS_Wire, Inside?: boolean); + /** + * Make a face from a plane. + */ + constructor(P: gp_Pln, UMin: number, UMax: number, VMin: number, VMax: number); + /** + * Make a face from a cylinder. + */ + constructor(C: gp_Cylinder, UMin: number, UMax: number, VMin: number, VMax: number); + /** + * Make a face from a cone. + */ + constructor(C: unknown, UMin: number, UMax: number, VMin: number, VMax: number); + /** + * Make a face from a sphere. + */ + constructor(S: gp_Sphere, UMin: number, UMax: number, VMin: number, VMax: number); + /** + * Make a face from a torus. + */ + constructor(C: unknown, UMin: number, UMax: number, VMin: number, VMax: number); + /** + * Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges. + */ + constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number); + /** + * Initializes (or reinitializes) the construction of a face by creating a new object which is a copy of the face F, in order to add wires to it, using the function Add. Note: this complete copy of the geometry is only required if you want to work on the geometries of the two faces independently. + */ + Init(F: TopoDS_Face): void; + /** + * Initializes (or reinitializes) the construction of a face on the surface S. If Bound is true, a wire is automatically created from the natural bounds of the surface S and added to the face in order to bound it. If Bound is false, no wire is added. This option is used when real bounds are known. These will be added to the face after this initialization, using the function Add. TolDegen parameter is used for resolution of degenerated edges if calculation of natural bounds is turned on. + */ + Init(S: Geom_Surface, Bound: boolean, TolDegen: number): void; + /** + * Initializes (or reinitializes) the construction of a face on the surface S, limited in the u parametric direction by the two parameter values UMin and UMax and in the v parametric direction by the two parameter values VMin and VMax. Warning Error returns: + * + * - BRepBuilderAPI_ParametersOutOfRange when the parameters given are outside the bounds of the surface or the basis surface of a trimmed surface. TolDegen parameter is used for resolution of degenerated edges. + */ + Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): void; + /** + * Adds the wire W to the constructed face as a hole. Warning W must not cross the other bounds of the face, and all the bounds must define only one area on the surface. (Be careful, however, as this is not checked.) Example // a cylinder {@link gp_Cylinder | `gp_Cylinder`} C = ..; // a wire {@link TopoDS_Wire | `TopoDS_Wire`} W = ...; {@link BRepBuilderAPI_MakeFace | `BRepBuilderAPI_MakeFace`} MF(C); MF.Add(W); {@link TopoDS_Face | `TopoDS_Face`} F = MF;. + */ + Add(W: TopoDS_Wire): void; + /** + * Returns true if this algorithm has a valid face. + */ + IsDone(): boolean; + /** + * Returns the construction status BRepBuilderAPI_FaceDone if the face is built, or. + * + * - another value of the `BRepBuilderAPI_FaceError` enumeration indicating why the construction failed, in particular when the given parameters are outside the bounds of the surface. + */ + Error(): unknown; + /** + * Returns the constructed face. Exceptions StdFail_NotDone if no face is built. + */ + Face(): TopoDS_Face; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Geometric transformation on a shape. The transformation to be applied is defined as a {@link gp_Trsf | `gp_Trsf`} transformation, i.e. a transformation which does not modify the underlying geometry of shapes. The transformation is applied to: + * + * - all curves which support edges of a shape, and + * - all surfaces which support its faces. A Transform object provides a framework for: + * - defining the geometric transformation to be applied, + * - implementing the transformation algorithm, and + * - consulting the results. + */ +export declare class BRepBuilderAPI_Transform extends BRepBuilderAPI_ModifyShape { + /** + * Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform. + */ + constructor(T: gp_Trsf); + /** + * Creates a transformation from the {@link gp_Trsf | `gp_Trsf`} , and applies it to the shape . If the transformation is direct and isometric (determinant = 1) and = false, the resulting shape is on which a new location has been set. Otherwise, the transformation is applied on a duplication of . If is true, the triangulation will be copied, and the copy will be assigned to the result shape. + */ + constructor(theShape: TopoDS_Shape, theTrsf: gp_Trsf, theCopyGeom?: boolean, theCopyMesh?: boolean); + /** + * Applies the geometric transformation defined at the time of construction of this framework to the shape S. + * + * - If the transformation T is direct and isometric, in other words, if the determinant of the vectorial part of T is equal to 1., and if theCopyGeom equals false (the default value), the resulting shape is the same as the original but with a new location assigned to it. + * - In all other cases, the transformation is applied to a duplicate of theShape. + * - If theCopyMesh is true, the triangulation will be copied, and the copy will be assigned to the result shape. Use the function Shape to access the result. Note: this framework can be reused to apply the same geometric transformation to other shapes. You only need to specify them by calling the function Perform again. + */ + Perform(theShape: TopoDS_Shape, theCopyGeom?: boolean, theCopyMesh?: boolean): void; + /** + * Returns the modified shape corresponding to . + */ + ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build BRepBuilder vertices directly from 3D geometric points. A vertex built using a MakeVertex object is only composed of a 3D point and a default precision value (`Precision::Confusion()`). Later on, 2D representations can be added, for example, when inserting a vertex in an edge. A MakeVertex object provides a framework for: + * + * - defining and implementing the construction of a vertex, and + * - consulting the result. + */ +export declare class BRepBuilderAPI_MakeVertex extends BRepBuilderAPI_MakeShape { + /** + * Constructs a vertex from point P. Example create a vertex from a 3D point. {@link gp_Pnt | `gp_Pnt`} P(0,0,10); {@link TopoDS_Vertex | `TopoDS_Vertex`} V = `BRepBuilderAPI_MakeVertex(P)`;. + */ + constructor(P: gp_Pnt); + /** + * Returns the constructed vertex. + */ + Vertex(): TopoDS_Vertex; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This is the root class for all shape constructions. It stores the result. + * + * It provides deferred methods to trace the history of sub-shapes. + */ +export declare class BRepBuilderAPI_MakeShape extends BRepBuilderAPI_Command { + /** + * This is called by `Shape()`. It does nothing but may be redefined. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built. + */ + Shape(): TopoDS_Shape; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build wires from edges. A wire can be built from any number of edges. To build a wire you first initialize the construction, then add edges in sequence. An unlimited number of edges can be added. The initialization of construction is done with: + * + * - no edge (an empty wire), or + * - edges of an existing wire, or + * - up to four connectable edges. In order to be added to a wire under construction, an edge (unless it is the first one) must satisfy the following condition: one of its vertices must be geometrically coincident with one of the vertices of the wire (provided that the highest tolerance factor is assigned to the two vertices). It could also be the same vertex. + * - The given edge is shared by the wire if it contains: + * - two vertices, identical to two vertices of the wire under construction (a general case of the wire closure), or + * - one vertex, identical to a vertex of the wire under construction; the other vertex not being geometrically coincident with another vertex of the wire. + * - In other cases, when one of the vertices of the edge is simply geometrically coincident with a vertex of the wire under construction (provided that the highest tolerance factor is assigned to the two vertices), the given edge is first copied and the coincident vertex is replaced in this new edge, by the coincident vertex of the wire. Note: it is possible to build non manifold wires using this construction tool. A MakeWire object provides a framework for: + * - initializing the construction of a wire, + * - adding edges to the wire under construction, and + * - consulting the result. + */ +export declare class BRepBuilderAPI_MakeWire extends BRepBuilderAPI_MakeShape { + /** + * Constructs an empty wire framework, to which edges are added using the Add function. As soon as the wire contains one edge, it can return with the use of the function Wire. Warning The function Error will return BRepBuilderAPI_EmptyWire if it is called before at least one edge is added to the wire under construction. + */ + constructor(); + /** + * Make a Wire from an edge. + */ + constructor(E: TopoDS_Edge); + /** + * Make a Wire from a Wire. useful for adding later. + */ + constructor(W: TopoDS_Wire); + /** + * Make a Wire from two edges. + */ + constructor(E1: TopoDS_Edge, E2: TopoDS_Edge); + /** + * Add an edge to a wire. + */ + constructor(W: TopoDS_Wire, E: TopoDS_Edge); + /** + * Make a Wire from three edges. + */ + constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge); + /** + * Make a Wire from four edges. Constructs a wire. + * + * - from the {@link TopoDS_Wire | `TopoDS_Wire`} W composed of the edge E, or + * - from edge E, or + * - from two edges E1 and E2, or + * - from three edges E1, E2 and E3, or + * - from four edges E1, E2, E3 and E4. Further edges can be added using the function Add. Given edges are added in a sequence. + * Each of them must be connectable to the wire under construction, and so must satisfy the following condition (unless it is the first edge of the wire): one of its vertices must be geometrically coincident with one of the vertices of the wire (provided that the highest tolerance factor is assigned to the two vertices). It could also be the same vertex. Warning If an edge is not connectable to the wire under construction it is not added. + * The function Error will return BRepBuilderAPI_DisconnectedWire, the function IsDone will return false and the function Wire will raise an error, until a new connectable edge is added. + */ + constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge, E4: TopoDS_Edge); + /** + * Adds the edge E to the wire under construction. + * E must be connectable to the wire under construction, and, unless it is the first edge of the wire, must satisfy the following condition: one of its vertices must be geometrically coincident with one of the vertices of the wire (provided that the highest tolerance factor is assigned to the two vertices). It could also be the same vertex. Warning If E is not connectable to the wire under construction it is not added. + * The function Error will return BRepBuilderAPI_DisconnectedWire, the function IsDone will return false and the function Wire will raise an error, until a new connectable edge is added. + */ + Add(E: TopoDS_Edge): void; + /** + * Add the edges of to the current wire. + */ + Add(W: TopoDS_Wire): void; + /** + * Adds the edges of to the current wire. The edges are not to be consecutive. But they are to be all connected geometrically or topologically. If some of them are not connected the Status give DisconnectedWire but the "Maker" is `Done()` and you can get the partial result. (i.e. connected to the first edgeof the list ). + */ + Add(L: NCollection_List_TopoDS_Shape): void; + /** + * Returns true if this algorithm contains a valid wire. IsDone returns false if: + * + * - there are no edges in the wire, or + * - the last edge which you tried to add was not connectable. + */ + IsDone(): boolean; + /** + * Returns the construction status. + * + * - BRepBuilderAPI_WireDone if the wire is built, or + * - another value of the `BRepBuilderAPI_WireError` enumeration indicating why the construction failed. + */ + Error(): BRepBuilderAPI_WireError; + /** + * Returns the constructed wire; or the part of the wire under construction already built. Exceptions StdFail_NotDone if a wire is not built. + */ + Wire(): TopoDS_Wire; + /** + * Returns the last edge added to the wire under construction. Warning. + * + * - This edge can be different from the original one (the argument of the function Add, for instance,) + * - A null edge is returned if there are no edges in the wire under construction, or if the last edge which you tried to add was not connectable.. + */ + Edge(): TopoDS_Edge; + /** + * Returns the last vertex of the last edge added to the wire under construction. Warning A null vertex is returned if there are no edges in the wire under construction, or if the last edge which you tried to add was not connectableR. + */ + Vertex(): TopoDS_Vertex; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build a shape corresponding to the skin of a surface. Note that the term shell in the class name has the same definition as that of a shell in STEP, in other words the skin of a shape, and not a solid model defined by surface and thickness. If you want to build the second sort of shell, you must use {@link BRepOffsetAPI_MakeOffsetShape | `BRepOffsetAPI_MakeOffsetShape`}. A shell is made of a series of faces connected by their common edges. + * If the underlying surface of a face is not C2 continuous and the flag Segment is True, MakeShell breaks the surface down into several faces which are all C2 continuous and which are connected along the non-regular curves on the surface. The resulting shell contains all these faces. Construction of a Shell from a non-C2 continuous Surface A MakeShell object provides a framework for: + * + * - defining the construction of a shell, + * - implementing the construction algorithm, and + * - consulting the result. Warning The connected C2 faces in the shell resulting from a decomposition of the surface are not sewn. For a sewn result, you need to use `BRepOffsetAPI_Sewing`. For a shell with thickness, you need to use {@link BRepOffsetAPI_MakeOffsetShape | `BRepOffsetAPI_MakeOffsetShape`}. + */ +export declare class BRepBuilderAPI_MakeShell extends BRepBuilderAPI_MakeShape { + /** + * Constructs an empty shell framework. The Init function is used to define the construction arguments. Warning The function Error will return BRepBuilderAPI_EmptyShell if it is called before the function Init. + */ + constructor(); + /** + * Constructs a shell from the surface S. + */ + constructor(S: Geom_Surface, Segment?: boolean); + /** + * Constructs a shell from the surface S, limited in the u parametric direction by the two parameter values UMin and UMax, and limited in the v parametric direction by the two parameter values VMin and VMax. + */ + constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean); + /** + * Defines or redefines the arguments for the construction of a shell. The construction is initialized with the surface S, limited in the u parametric direction by the two parameter values UMin and UMax, and in the v parametric direction by the two parameter values VMin and VMax. Warning The function Error returns: + * + * - BRepBuilderAPI_ShellParametersOutOfRange when the given parameters are outside the bounds of the surface or the basis surface if S is trimmed + */ + Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean): void; + /** + * Returns true if the shell is built. + */ + IsDone(): boolean; + /** + * Returns the construction status: + * + * - BRepBuilderAPI_ShellDone if the shell is built, or + * - another value of the `BRepBuilderAPI_ShellError` enumeration indicating why the construction failed. This is frequently BRepBuilderAPI_ShellParametersOutOfRange indicating that the given parameters are outside the bounds of the surface. + */ + Error(): unknown; + /** + * Returns the new Shell. + */ + Shell(): TopoDS_Shell; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build a solid from shells. A solid is made of one shell, or a series of shells, which do not intersect each other. One of these shells constitutes the outside skin of the solid. It may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in these previous ones. Each must bound a closed volume. A MakeSolid object provides a framework for: + * + * - defining and implementing the construction of a solid, and + * - consulting the result. + */ +export declare class BRepBuilderAPI_MakeSolid extends BRepBuilderAPI_MakeShape { + /** + * Initializes the construction of a solid. An empty solid is considered to cover the whole space. The Add function is used to define shells to bound it. + */ + constructor(); + /** + * Make a solid from a CompSolid. + */ + constructor(S: TopoDS_CompSolid); + /** + * Make a solid from a shell. + */ + constructor(S: TopoDS_Shell); + /** + * Make a solid from a solid. useful for adding later. + */ + constructor(So: TopoDS_Solid); + /** + * Make a solid from two shells. + */ + constructor(S1: TopoDS_Shell, S2: TopoDS_Shell); + /** + * Add a shell to a solid. + * + * Constructs a solid: + * + * - from the solid So, to which shells can be added, or + * - by adding the shell S to the solid So. Warning No check is done to verify the conditions of coherence of the resulting solid. In particular S must not intersect the solid S0. Besides, after all shells have been added using the Add function, one of these shells should constitute the outside skin of the solid. It may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in the previous ones. Each must bound a closed volume. + */ + constructor(So: TopoDS_Solid, S: TopoDS_Shell); + /** + * Make a solid from three shells. Constructs a solid. + * + * - covering the whole space, or + * - from shell S, or + * - from two shells S1 and S2, or + * - from three shells S1, S2 and S3, or Warning No check is done to verify the conditions of coherence of the resulting solid. In particular, S1, S2 (and S3) must not intersect each other. Besides, after all shells have been added using the Add function, one of these shells should constitute the outside skin of the solid; it may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in these previous ones. Each must bound a closed volume. + */ + constructor(S1: TopoDS_Shell, S2: TopoDS_Shell, S3: TopoDS_Shell); + /** + * Adds the shell to the current solid. Warning No check is done to verify the conditions of coherence of the resulting solid. In particular, S must not intersect other shells of the solid under construction. Besides, after all shells have been added, one of these shells should constitute the outside skin of the solid. It may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in these previous ones. Each must bound a closed volume. + */ + Add(S: TopoDS_Shell): void; + /** + * Returns true if the solid is built. For this class, a solid under construction is always valid. If no shell has been added, it could be a whole-space solid. However, no check was done to verify the conditions of coherence of the resulting solid. + */ + IsDone(): boolean; + /** + * Returns the new Solid. + */ + Solid(): TopoDS_Solid; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Root class for all commands in {@link BRepBuilderAPI | `BRepBuilderAPI`}. + * + * Provides : + * + * - Managements of the notDone flag. + * - Catching of exceptions (not implemented). + * - Logging (not implemented). + */ +export declare class BRepBuilderAPI_Command { + IsDone(): boolean; + /** + * Raises NotDone if done is false. + */ + Check(): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The {@link BRepLib | `BRepLib`} package provides general utilities for BRep. + * + * - FindSurface : Class to compute a surface through a set of edges. + * - Compute missing 3d curve on an edge. + */ +export declare class BRepLib { + constructor(); + /** + * Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current {@link Precision | `Precision`} is returned. + */ + static Precision(P: number): void; + /** + * Returns the default precision. + */ + static Precision(): number; + /** + * Sets the current plane to P. + */ + static Plane(P: unknown): void; + /** + * Returns the current plane. + */ + static Plane(): unknown; + /** + * checks if the Edge is same range IGNORING the same range flag of the edge Confusion argument is to compare real numbers idenpendently of any model space tolerance + */ + static CheckSameRange(E: TopoDS_Edge, Confusion?: number): boolean; + /** + * will make all the curve representation have the same range domain for the parameters. This will IGNORE the same range flag value to proceed. If there is a 3D curve there it will the range of that curve. If not the first curve representation encountered in the list will give its range to the all the other curves. + */ + static SameRange(E: TopoDS_Edge, Tolerance?: number): void; + /** + * Computes the 3d curve for the edge if it does not exist. Returns True if the curve was computed or existed. Returns False if there is no planar pcurve or the computation failed. >= 30 in approximation. + */ + static BuildCurve3d(E: TopoDS_Edge, Tolerance?: number, Continuity?: GeomAbs_Shape, MaxDegree?: number, MaxSegment?: number): boolean; + /** + * Computes the 3d curves for all the edges of return False if one of the computation failed. >= 30 in approximation. + */ + static BuildCurves3d(S: TopoDS_Shape, Tolerance: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegment: number): boolean; + /** + * Computes the 3d curves for all the edges of return False if one of the computation failed. + */ + static BuildCurves3d(S: TopoDS_Shape): boolean; + /** + * Builds pcurve of edge on face if the surface is plane, and updates the edge. + */ + static BuildPCurveForEdgeOnPlane(theE: TopoDS_Edge, theF: TopoDS_Face): void; + /** + * Builds pcurve of edge on face if the surface is plane, but does not update the edge. The output are the pcurve and the flag telling that pcurve was built. + * @returns A result object with fields: + * - `aC2D`: owned by the returned envelope. + * - `bToUpdate`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static BuildPCurveForEdgeOnPlane(theE: TopoDS_Edge, theF: TopoDS_Face, bToUpdate?: boolean): { aC2D: Geom2d_Curve; bToUpdate: boolean; [Symbol.dispose](): void }; + /** + * Checks if the edge has a Tolerance smaller than MaxToleranceToCheck if so it will compute the radius of the cylindrical pipe surface that MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5 contains all the curve representation of the edge returns True if the Edge tolerance had to be updated. + */ + static UpdateEdgeTol(E: TopoDS_Edge, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean; + /** + * Checks all the edges of the shape whose Tolerance is smaller than MaxToleranceToCheck Returns True if at least one edge was updated MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5. + * + * Warning: The method is very slow as it checks all. Use only in interfaces or processing assimilate batch + */ + static UpdateEdgeTolerance(S: TopoDS_Shape, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean; + /** + * Computes new 2d curve(s) for the edge to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge. + */ + static SameParameter(theEdge: TopoDS_Edge, Tolerance: number): void; + /** + * Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge. + */ + static SameParameter(S: TopoDS_Shape, Tolerance: number, forced: boolean): void; + /** + * Computes new 2d curve(s) for the edge to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge. theNewTol is a new tolerance of vertices of the input edge (not applied inside the algorithm, but pre-computed). If IsUseOldEdge is true then the input edge will be modified, otherwise the new copy of input edge will be created. Returns the new edge as a result, can be ignored if IsUseOldEdge is true. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `theNewTol`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static SameParameter(theEdge: TopoDS_Edge, theTolerance: number, theNewTol: number, IsUseOldEdge: boolean): { returnValue: TopoDS_Edge; theNewTol: number; [Symbol.dispose](): void }; + /** + * Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge. theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions. + * @param theReshaper Mutated in place; read the updated value from this argument after the call. + */ + static SameParameter(S: TopoDS_Shape, theReshaper: unknown, Tolerance: number, forced: boolean): void; + /** + * Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in). + */ + static UpdateTolerances(S: TopoDS_Shape, verifyFaceTolerance: boolean): void; + /** + * Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in) theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions. + * @param theReshaper Mutated in place; read the updated value from this argument after the call. + */ + static UpdateTolerances(S: TopoDS_Shape, theReshaper: unknown, verifyFaceTolerance: boolean): void; + /** + * Checks tolerances of edges (including inner points) and vertices of a shape and updates them to satisfy "SameParameter" condition. + */ + static UpdateInnerTolerances(S: TopoDS_Shape): void; + /** + * Orients the solid forward and the shell with the orientation to have matter in the solid. Returns False if the solid is unOrientable (open or incoherent). + * @param solid Mutated in place; read the updated value from this argument after the call. + */ + static OrientClosedSolid(solid: TopoDS_Solid): boolean; + /** + * Returns the order of continuity between two faces connected by an edge. + */ + static ContinuityOfFaces(theEdge: TopoDS_Edge, theFace1: TopoDS_Face, theFace2: TopoDS_Face, theAngleTol: number): GeomAbs_Shape; + /** + * Encodes the Regularity of edges on a Shape. Warning: is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done. + */ + static EncodeRegularity(S: TopoDS_Shape, TolAng: number): void; + /** + * Encodes the Regularity of edges in list on the shape Warning: is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done. + */ + static EncodeRegularity(S: TopoDS_Shape, LE: NCollection_List_TopoDS_Shape, TolAng: number): void; + /** + * Encodes the Regularity between and by Warning: is an angular tolerance, expressed in Rad. Warning: If the edge's regularity is coded before, nothing is done. + * @param E Mutated in place; read the updated value from this argument after the call. + */ + static EncodeRegularity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, TolAng: number): void; + /** + * Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other). + * @param LF Mutated in place; read the updated value from this argument after the call. + */ + static SortFaces(S: TopoDS_Shape, LF: NCollection_List_TopoDS_Shape): void; + /** + * Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane). + * @param LF Mutated in place; read the updated value from this argument after the call. + */ + static ReverseSortFaces(S: TopoDS_Shape, LF: NCollection_List_TopoDS_Shape): void; + /** + * Corrects the normals in {@link Poly_Triangulation | `Poly_Triangulation`} of faces, in such way that normals at nodes lying along smooth edges have the same value on both adjacent triangulations. Returns TRUE if any correction is done. + */ + static EnsureNormalConsistency(S: TopoDS_Shape, theAngTol?: number, ForceComputeNormals?: boolean): boolean; + /** + * Updates value of deflection in {@link Poly_Triangulation | `Poly_Triangulation`} of faces by the maximum deviation measured on existing triangulation. + */ + static UpdateDeflection(S: TopoDS_Shape): void; + /** + * Calculates the bounding sphere around the set of vertexes from the theLV list. Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. This can be used to construct the new vertex which covers the given set of other vertices. + * @param theNewCenter Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `theNewTol`: updated value from the call. + */ + static BoundingVertex(theLV: NCollection_List_TopoDS_Shape, theNewCenter: gp_Pnt, theNewTol?: number): { theNewTol: number }; + /** + * For an edge defined by 3d curve and tolerance and vertices defined by points, parameters on curve and tolerances, finds a range of curve between vertices not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `theFirst`: updated value from the call. + * - `theLast`: updated value from the call. + */ + static FindValidRange(theCurve: Adaptor3d_Curve, theTolE: number, theParV1: number, thePntV1: gp_Pnt, theTolV1: number, theParV2: number, thePntV2: gp_Pnt, theTolV2: number, theFirst?: number, theLast?: number): { returnValue: boolean; theFirst: number; theLast: number }; + /** + * Finds a range of 3d curve of the edge not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `theFirst`: updated value from the call. + * - `theLast`: updated value from the call. + */ + static FindValidRange(theEdge: TopoDS_Edge, theFirst?: number, theLast?: number): { returnValue: boolean; theFirst: number; theLast: number }; + /** + * Enlarges the face on the given value. + * @param theF The face to extend + * @param theExtVal The extension value + * @param theExtUMin Defines whether to extend the face in UMin direction + * @param theExtUMax Defines whether to extend the face in UMax direction + * @param theExtVMin Defines whether to extend the face in VMin direction + * @param theExtVMax Defines whether to extend the face in VMax direction + * @param theFExtended The extended face Mutated in place; read the updated value from this argument after the call. + */ + static ExtendFace(theF: TopoDS_Face, theExtVal: number, theExtUMin: boolean, theExtUMax: boolean, theExtVMin: boolean, theExtVMax: boolean, theFExtended: TopoDS_Face): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides global functions to compute a shape's global properties for lines, surfaces or volumes, and bring them together with the global properties already computed for a geometric system. The global properties computed for a system are : + * + * - its mass, + * - its center of mass, + * - its matrix of inertia, + * - its moment about an axis, + * - its radius of gyration about an axis, + * - and its principal properties of inertia such as principal axis, principal moments, principal radius of gyration. + */ +export declare class BRepGProp { + constructor(); + /** + * Computes the linear global properties of the shape S, i.e. the global properties induced by each edge of the shape S, and brings them together with the global properties still retained by the framework LProps. If the current system of LProps was empty, its global properties become equal to the linear global properties of S. For this computation no linear density is attached to the edges. So, for example, the added mass corresponds to the sum of the lengths of the edges of S. + * The density of the composed systems, i.e. that of each component of the current system of LProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. + * You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework LProps. + * Note: if your programming ensures that the framework LProps retains only linear global properties (brought together for example, by the function LinearProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total length of edges of the system analysed by LProps. Warning No check is performed to verify that the shape S retains truly linear properties. If S is simply a vertex, it is not considered to present any additional global properties. SkipShared is a special flag, which allows taking in calculation shared topological entities or not. For ex., if SkipShared = True, edges, shared by two or more faces, are taken into calculation only once. If we have cube with sizes 1, 1, 1, its linear properties = 12 for SkipEdges = true and 24 for SkipEdges = false. UseTriangulation is a special flag, which defines preferable source of geometry data. + * If UseTriangulation = false, exact geometry objects (curves) are used, otherwise polygons of triangulation are used first. + * @param LProps Mutated in place; read the updated value from this argument after the call. + */ + static LinearProperties(S: TopoDS_Shape, LProps: GProp_GProps, SkipShared: boolean, UseTriangulation: boolean): void; + /** + * Computes the surface global properties of the shape S, i.e. the global properties induced by each face of the shape S, and brings them together with the global properties still retained by the framework SProps. If the current system of SProps was empty, its global properties become equal to the surface global properties of S. For this computation, no surface density is attached to the faces. Consequently, the added mass corresponds to the sum of the areas of the faces of S. + * The density of the component systems, i.e. that of each component of the current system of SProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. + * You are advised to use a framework for each different value of density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework SProps. + * Note : if your programming ensures that the framework SProps retains only surface global properties, brought together, for example, by the function SurfaceProperties, for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total area of faces of the system analysed by SProps. Warning No check is performed to verify that the shape S retains truly surface properties. If S is simply a vertex, an edge or a wire, it is not considered to present any additional global properties. SkipShared is a special flag, which allows taking in calculation shared topological entities or not. For ex., if SkipShared = True, faces, shared by two or more shells, are taken into calculation only once. UseTriangulation is a special flag, which defines preferable source of geometry data. If UseTriangulation = false, exact geometry objects (surfaces) are used, otherwise face triangulations are used first. + * @param SProps Mutated in place; read the updated value from this argument after the call. + */ + static SurfaceProperties(S: TopoDS_Shape, SProps: GProp_GProps, SkipShared: boolean, UseTriangulation: boolean): void; + /** + * Updates with the shape , that contains its principal properties. The surface properties of all the faces in are computed. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (area) for each face. Error is calculated as std::abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. + * SkipShared is a special flag, which allows taking in calculation shared topological entities or not For ex., if SkipShared = True, faces, shared by two or more shells, are taken into calculation only once. + * @param SProps Mutated in place; read the updated value from this argument after the call. + */ + static SurfaceProperties(S: TopoDS_Shape, SProps: GProp_GProps, Eps: number, SkipShared: boolean): number; + /** + * Computes the global volume properties of the solid S, and brings them together with the global properties still retained by the framework VProps. If the current system of VProps was empty, its global properties become equal to the global properties of S for volume. For this computation, no volume density is attached to the solid. Consequently, the added mass corresponds to the volume of S. + * The density of the component systems, i.e. that of each component of the current system of VProps, and that of S which is considered to be equal to 1, must be coherent to each other. Note that this coherence cannot be checked. + * You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework VProps. + * Note: if your programming ensures that the framework VProps retains only global properties of volume (brought together for example, by the function VolumeProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total volume of the solids of the system analysed by VProps. Warning The shape S must represent an object whose global volume properties can be computed. It may be a finite solid, or a series of finite solids all oriented in a coherent way. Nonetheless, S must be exempt of any free boundary. + * Note that these conditions of coherence are not checked by this algorithm, and results will be false if they are not respected. SkipShared a is special flag, which allows taking in calculation shared topological entities or not. + * For ex., if SkipShared = True, the volumes formed by the equal (the same TShape, location and orientation) faces are taken into calculation only once. UseTriangulation is a special flag, which defines preferable source of geometry data. If UseTriangulation = false, exact geometry objects (surfaces) are used, otherwise face triangulations are used first. + * @param VProps Mutated in place; read the updated value from this argument after the call. + */ + static VolumeProperties(S: TopoDS_Shape, VProps: GProp_GProps, OnlyClosed: boolean, SkipShared: boolean, UseTriangulation: boolean): void; + /** + * Updates with the shape , that contains its principal properties. The volume properties of all the FORWARD and REVERSED faces in are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for each face. + * Error is calculated as std::abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. SkipShared is a special flag, which allows taking in calculation shared topological entities or not. + * For ex., if SkipShared = True, the volumes formed by the equal (the same TShape, location and orientation) faces are taken into calculation only once. + * @param VProps Mutated in place; read the updated value from this argument after the call. + */ + static VolumeProperties(S: TopoDS_Shape, VProps: GProp_GProps, Eps: number, OnlyClosed: boolean, SkipShared: boolean): number; + /** + * Updates with the shape , that contains its principal properties. The volume properties of all the FORWARD and REVERSED faces in are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter IsUseSpan says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Parameter Eps sets maximal relative error of computed property for each face. + * Error is delivered by the adaptive Gauss-Kronrod method of integral computation that is used for properties computation. Method returns estimation of relative error reached for whole shape. Returns negative value if the computation is failed. SkipShared is a special flag, which allows taking in calculation shared topological entities or not. + * For ex., if SkipShared = True, the volumes formed by the equal (the same TShape, location and orientation) faces are taken into calculation only once. + * @param VProps Mutated in place; read the updated value from this argument after the call. + */ + static VolumePropertiesGK(S: TopoDS_Shape, VProps: GProp_GProps, Eps: number, OnlyClosed: boolean, IsUseSpan: boolean, CGFlag: boolean, IFlag: boolean, SkipShared: boolean): number; + static VolumePropertiesGK(S: TopoDS_Shape, VProps: GProp_GProps, thePln: gp_Pln, Eps: number, OnlyClosed: boolean, IsUseSpan: boolean, CGFlag: boolean, IFlag: boolean, SkipShared: boolean): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export declare class BRepGProp_Face { + /** + * Constructor. Initializes the object with a flag IsUseSpan that says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Spans are returned by the methods GetUKnots and GetTKnots. + */ + constructor(IsUseSpan?: boolean); + /** + * Constructor. Initializes the object with the face and the flag IsUseSpan that says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Spans are returned by the methods GetUKnots and GetTKnots. + */ + constructor(F: TopoDS_Face, IsUseSpan?: boolean); + Load(F: TopoDS_Face): void; + /** + * Loading the boundary arc. Returns FALSE if edge has no P-Curve. + */ + Load(E: TopoDS_Edge): boolean; + /** + * Loading the boundary arc. This arc is either a top, bottom, left or right bound of a UV rectangle in which the parameters of surface are defined. If IsFirstParam is equal to true, the face is initialized by either left of bottom bound. Otherwise it is initialized by the top or right one. If theIsoType is equal to GeomAbs_IsoU, the face is initialized with either left or right bound. Otherwise - with either top or bottom one. + */ + Load(IsFirstParam: boolean, theIsoType: unknown): void; + VIntegrationOrder(): number; + /** + * Returns true if the face is not trimmed. + */ + NaturalRestriction(): boolean; + /** + * Returns the `TopoDS` face. + */ + GetFace(): TopoDS_Face; + /** + * Returns the value of the boundary curve of the face. + */ + Value2d(U: number): gp_Pnt2d; + SIntOrder(Eps: number): number; + SVIntSubs(): number; + SUIntSubs(): number; + UKnots(Knots: NCollection_Array1_double): void; + VKnots(Knots: NCollection_Array1_double): void; + LIntOrder(Eps: number): number; + LIntSubs(): number; + LKnots(Knots: NCollection_Array1_double): void; + /** + * Returns the number of points required to do the integration in the U parametric direction with a good accuracy. + */ + UIntegrationOrder(): number; + /** + * Returns the parametric bounds of the Face. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + * - `V1`: updated value from the call. + * - `V2`: updated value from the call. + */ + Bounds(U1?: number, U2?: number, V1?: number, V2?: number): { U1: number; U2: number; V1: number; V2: number }; + /** + * Computes the point of parameter U, V on the Face and the normal to the face at this point. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param VNor Mutated in place; read the updated value from this argument after the call. + */ + Normal(U: number, V: number, P: gp_Pnt, VNor: gp_Vec): void; + /** + * Returns the parametric value of the start point of the current arc of curve. + */ + FirstParameter(): number; + /** + * Returns the parametric value of the end point of the current arc of curve. + */ + LastParameter(): number; + /** + * Returns the number of points required to do the integration along the parameter of curve. + */ + IntegrationOrder(): number; + /** + * Returns the point of parameter U and the first derivative at this point of a boundary curve. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + */ + D12d(U: number, P: gp_Pnt2d, V1: gp_Vec2d): void; + /** + * Returns an array of U knots of the face. The first and last elements of the array will be theUMin and theUMax. The middle elements will be the U Knots of the face greater then theUMin and lower then theUMax in increasing order. If the face is not a BSpline, the array initialized with theUMin and theUMax only. + * @param theUMin lower U bound + * @param theUMax upper U bound + * @returns array of U knot values + */ + GetUKnots(theUMin: number, theUMax: number): NCollection_HArray1_double; + /** + * Returns an array of U knots of the face. The first and last elements of the array will be theUMin and theUMax. The middle elements will be the U Knots of the face greater then theUMin and lower then theUMax in increasing order. If the face is not a BSpline, the array initialized with theUMin and theUMax only. + * @param theUMin lower U bound + * @param theUMax upper U bound + * @returns array of U knot values + */ + GetUKnots_1(theUMin: number, theUMax: number): NCollection_HArray1_double; + /** + * @returns A result object with fields: + * - `theUKnots`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + * @deprecated + */ + GetUKnots_2(theUMin: number, theUMax: number): { theUKnots: NCollection_HArray1_double; [Symbol.dispose](): void }; + /** + * Returns an array of combination of T knots of the arc and V knots of the face. The first and last elements of the array will be theTMin and theTMax. The middle elements will be the Knots of the arc and the values of parameters of arc on which the value points have V coordinates close to V knots of face. All the parameter will be greater then theTMin and lower then theTMax in increasing order. If the face is not a BSpline, the array initialized with theTMin and theTMax only. + * @param theTMin lower T bound + * @param theTMax upper T bound + * @returns array of T knot values + */ + GetTKnots(theTMin: number, theTMax: number): NCollection_HArray1_double; + /** + * Returns an array of combination of T knots of the arc and V knots of the face. The first and last elements of the array will be theTMin and theTMax. The middle elements will be the Knots of the arc and the values of parameters of arc on which the value points have V coordinates close to V knots of face. All the parameter will be greater then theTMin and lower then theTMax in increasing order. If the face is not a BSpline, the array initialized with theTMin and theTMax only. + * @param theTMin lower T bound + * @param theTMax upper T bound + * @returns array of T knot values + */ + GetTKnots_1(theTMin: number, theTMax: number): NCollection_HArray1_double; + /** + * @returns A result object with fields: + * - `theTKnots`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + * @deprecated + */ + GetTKnots_2(theTMin: number, theTMax: number): { theTKnots: NCollection_HArray1_double; [Symbol.dispose](): void }; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type ChFi3d_FilletShape = typeof ChFi3d_FilletShape[keyof typeof ChFi3d_FilletShape]; +/** + * Lists the types of fillet shapes. These include the following: + * + * - ChFi3d_Rational (default value), which is the standard NURBS representation of circles, + * - ChFi3d_QuasiAngular, which is a NURBS representation of circles where the parameters match those of the circle, + * - ChFi3d_Polynomial, which corresponds to a polynomial approximation of circles. This type facilitates the implementation of the construction algorithm. + */ +export declare const ChFi3d_FilletShape: { + readonly ChFi3d_Rational: 'ChFi3d_Rational'; + readonly ChFi3d_QuasiAngular: 'ChFi3d_QuasiAngular'; + readonly ChFi3d_Polynomial: 'ChFi3d_Polynomial'; +}; + +export type ChFiDS_ChamfMode = typeof ChFiDS_ChamfMode[keyof typeof ChFiDS_ChamfMode]; +/** + * this enumeration defines several modes of chamfer + */ +export declare const ChFiDS_ChamfMode: { + /** + * chamfer with constant distance from spine to one of the two surfaces + */ + readonly ChFiDS_ClassicChamfer: 'ChFiDS_ClassicChamfer'; + /** + * symmetric chamfer with constant throat that is the height of isosceles triangle in section + */ + readonly ChFiDS_ConstThroatChamfer: 'ChFiDS_ConstThroatChamfer'; + /** + * chamfer with constant throat: the section of chamfer is right-angled triangle, the first of two surfaces (where is the top of the chamfer) is virtually moved inside the solid by offset operation, the apex of the section is on the intersection curve between moved surface and second surface, right angle is at the top of the chamfer, the length of the leg from apex to top is constant - it is throat + */ + readonly ChFiDS_ConstThroatWithPenetrationChamfer: 'ChFiDS_ConstThroatWithPenetrationChamfer'; +}; + +/** + * Describes functions to build chamfers on edges of a shell or solid. Chamfered Edge of a Shell or Solid A MakeChamfer object provides a framework for: + * + * - initializing the construction algorithm with a given shape, + * - acquiring the data characterizing the chamfers, + * - building the chamfers and constructing the resulting shape, and + * - consulting the result. + */ +export declare class BRepFilletAPI_MakeChamfer extends BRepFilletAPI_LocalOperation { + /** + * Initializes an algorithm for computing chamfers on the shape S. The edges on which chamfers are built are defined using the Add function. + */ + constructor(S: TopoDS_Shape); + /** + * Adds edge E to the table of edges used by this algorithm to build chamfers, where the parameters of the chamfer must be set after the. + */ + Add(E: TopoDS_Edge): void; + /** + * Adds edge E to the table of edges used by this algorithm to build chamfers, where the parameters of the chamfer are given by the distance Dis (symmetric chamfer). The Add function results in a contour being built by propagation from the edge E (i.e. the contour contains at least this edge). This contour is composed of edges of the shape which are tangential to one another and which delimit two series of tangential faces, with one series of faces being located on either side of the contour. Warning Nothing is done if edge E or the face F does not belong to the initial shape. + */ + Add(Dis: number, E: TopoDS_Edge): void; + /** + * Adds edge E to the table of edges used by this algorithm to build chamfers, where the parameters of the chamfer are given by the two distances Dis1 and Dis2; the face F identifies the side where Dis1 is measured. The Add function results in a contour being built by propagation from the edge E (i.e. the contour contains at least this edge). + * This contour is composed of edges of the shape which are tangential to one another and which delimit two series of tangential faces, with one series of faces being located on either side of the contour. Warning Nothing is done if edge E or the face F does not belong to the initial shape. + */ + Add(Dis1: number, Dis2: number, E: TopoDS_Edge, F: TopoDS_Face): void; + /** + * Sets the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC generated using the Add function in the internal data structure of this algorithm. The face F identifies the side where Dis1 is measured. Warning Nothing is done if either the edge E or the face F does not belong to the initial shape. + */ + SetDist(Dis: number, IC: number, F: TopoDS_Face): void; + GetDist(IC: number, Dis?: number): { Dis: number }; + /** + * Sets the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC generated using the Add function in the internal data structure of this algorithm. The face F identifies the side where Dis1 is measured. Warning Nothing is done if either the edge E or the face F does not belong to the initial shape. + */ + SetDists(Dis1: number, Dis2: number, IC: number, F: TopoDS_Face): void; + /** + * Returns the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC in the internal data structure of this algorithm. Warning -1. is returned if IC is outside the bounds of the table of contours. + * @returns A result object with fields: + * - `Dis1`: updated value from the call. + * - `Dis2`: updated value from the call. + */ + Dists(IC: number, Dis1?: number, Dis2?: number): { Dis1: number; Dis2: number }; + /** + * Adds a fillet contour in the builder (builds a contour of tangent edges to and sets the distance and angle ( parameters of the chamfer ) ). + */ + AddDA(Dis: number, Angle: number, E: TopoDS_Edge, F: TopoDS_Face): void; + /** + * set the distance and of the fillet contour of index in the DS with on . if the face is not one of common faces of an edge of the contour + */ + SetDistAngle(Dis: number, Angle: number, IC: number, F: TopoDS_Face): void; + /** + * gives the distances and of the fillet contour of index in the DS + * @returns A result object with fields: + * - `Dis`: updated value from the call. + * - `Angle`: updated value from the call. + */ + GetDistAngle(IC: number, Dis?: number, Angle?: number): { Dis: number; Angle: number }; + /** + * Sets the mode of chamfer. + */ + SetMode(theMode: ChFiDS_ChamfMode): void; + /** + * return True if chamfer symmetric false else. + */ + IsSymetric(IC: number): boolean; + /** + * return True if chamfer is made with two distances false else. + */ + IsTwoDistances(IC: number): boolean; + /** + * return True if chamfer is made with distance and angle false else. + */ + IsDistanceAngle(IC: number): boolean; + /** + * Erases the chamfer parameters on the contour of index IC in the internal data structure of this algorithm. Use the SetDists function to reset this data. Warning Nothing is done if IC is outside the bounds of the table of contours. + */ + ResetContour(IC: number): void; + /** + * Returns the number of contours generated using the Add function in the internal data structure of this algorithm. + */ + NbContours(): number; + /** + * Returns the index of the contour in the internal data structure of this algorithm, which contains the edge E of the shape. This function returns 0 if the edge E does not belong to any contour. Warning This index can change if a contour is removed from the internal data structure of this algorithm using the function Remove. + */ + Contour(E: TopoDS_Edge): number; + /** + * Returns the number of edges in the contour of index I in the internal data structure of this algorithm. Warning Returns 0 if I is outside the bounds of the table of contours. + */ + NbEdges(I: number): number; + /** + * Returns the edge of index J in the contour of index I in the internal data structure of this algorithm. Warning Returns a null shape if: + * + * - I is outside the bounds of the table of contours, or + * - J is outside the bounds of the table of edges of the contour of index I. + */ + Edge(I: number, J: number): TopoDS_Edge; + /** + * Removes the contour in the internal data structure of this algorithm which contains the edge E of the shape. Warning Nothing is done if the edge E does not belong to the contour in the internal data structure of this algorithm. + */ + Remove(E: TopoDS_Edge): void; + /** + * Returns the length of the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if IC is outside the bounds of the table of contours. + */ + Length(IC: number): number; + /** + * Returns the first vertex of the contour of index IC in the internal data structure of this algorithm. Warning Returns a null shape if IC is outside the bounds of the table of contours. + */ + FirstVertex(IC: number): TopoDS_Vertex; + /** + * Returns the last vertex of the contour of index IC in the internal data structure of this algorithm. Warning Returns a null shape if IC is outside the bounds of the table of contours. + */ + LastVertex(IC: number): TopoDS_Vertex; + /** + * Returns the curvilinear abscissa of the vertex V on the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if: + * + * - IC is outside the bounds of the table of contours, or + * - V is not on the contour of index IC. + */ + Abscissa(IC: number, V: TopoDS_Vertex): number; + /** + * Returns the relative curvilinear abscissa (i.e. between 0 and 1) of the vertex V on the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if: + * + * - IC is outside the bounds of the table of contours, or + * - V is not on the contour of index IC. + */ + RelativeAbscissa(IC: number, V: TopoDS_Vertex): number; + /** + * eturns true if the contour of index IC in the internal data structure of this algorithm is closed and tangential at the point of closure. Warning Returns false if IC is outside the bounds of the table of contours. + */ + ClosedAndTangent(IC: number): boolean; + /** + * Returns true if the contour of index IC in the internal data structure of this algorithm is closed. Warning Returns false if IC is outside the bounds of the table of contours. + */ + Closed(IC: number): boolean; + /** + * Builds the chamfers on all the contours in the internal data structure of this algorithm and constructs the resulting shape. Use the function IsDone to verify that the chamfered shape is built. Use the function Shape to retrieve the chamfered shape. Warning The construction of chamfers implements highly complex construction algorithms. + * Consequently, there may be instances where the algorithm fails, for example if the data defining the parameters of the chamfer is not compatible with the geometry of the initial shape. There is no initial analysis of errors and these only become evident at the construction stage. Additionally, in the current software release, the following cases are not handled: + * + * - the end point of the contour is the point of intersection of 4 or more edges of the shape, or + * - the intersection of the chamfer with a face which limits the contour is not fully contained in this face. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Reinitializes this algorithm, thus canceling the effects of the Build function. This function allows modifications to be made to the contours and chamfer parameters in order to rebuild the shape. + */ + Reset(): void; + /** + * Returns the internal filleting algorithm. + */ + Builder(): unknown; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + Simulate(IC: number): void; + NbSurf(IC: number): number; + Sect(IC: number, IS: number): NCollection_HArray1_ChFiDS_CircSection; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build fillets on the broken edges of a shell or solid. A MakeFillet object provides a framework for: + * + * - initializing the construction algorithm with a given shape, + * - acquiring the data characterizing the fillets, + * - building the fillets and constructing the resulting shape, and + * - consulting the result. + */ +export declare class BRepFilletAPI_MakeFillet extends BRepFilletAPI_LocalOperation { + /** + * Initializes the computation of the fillets. sets the type of fillet surface. The default value is ChFi3d_Rational (classical nurbs representation of circles). ChFi3d_QuasiAngular corresponds to a nurbs representation of circles which parameterisation matches the circle one. ChFi3d_Polynomial corresponds to a polynomial representation of circles. + */ + constructor(S: TopoDS_Shape, FShape?: ChFi3d_FilletShape); + SetParams(Tang: number, Tesp: number, T2d: number, TApp3d: number, TolApp2d: number, Fleche: number): void; + /** + * Changes the parameters of continiuity InternalContinuity to produce fillet'surfaces with an continuity Ci (i=0,1 or 2). By defaultInternalContinuity = GeomAbs_C1. AngularTolerance is the G1 tolerance between fillet and support'faces. + */ + SetContinuity(InternalContinuity: GeomAbs_Shape, AngularTolerance: number): void; + /** + * Adds a fillet contour in the builder (builds a contour of tangent edges). The Radius must be set after. + */ + Add(E: TopoDS_Edge): void; + /** + * Adds a fillet description in the builder. + * + * - builds a contour of tangent edges, + * - sets the radius. + */ + Add(Radius: number, E: TopoDS_Edge): void; + /** + * Adds a fillet description in the builder. + * + * - builds a contour of tangent edges, + * - sest the radius evolution law. + */ + Add(L: Law_Function, E: TopoDS_Edge): void; + /** + * Adds a fillet description in the builder. + * + * - builds a contour of tangent edges, + * - sets the radius evolution law interpolating the values given in the array UandR : + * + * p2d.X() = relative parameter on the spine [0,1] p2d.Y() = value of the radius. + */ + Add(UandR: NCollection_Array1_gp_Pnt2d, E: TopoDS_Edge): void; + /** + * Adds a fillet description in the builder. + * + * - builds a contour of tangent edges, + * - sets a linear radius evolution law between the first and last vertex of the spine. + */ + Add(R1: number, R2: number, E: TopoDS_Edge): void; + /** + * Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where Radius is the radius of the fillet. + */ + SetRadius(Radius: number, IC: number, IinC: number): void; + /** + * Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to the evolution law L, between the first and last vertices of the contour of index IC. + */ + SetRadius(L: Law_Function, IC: number, IinC: number): void; + /** + * Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to the evolution law which interpolates the set of parameter and radius pairs given in the array UandR as follows: + * + * - the X coordinate of a point in UandR defines a relative parameter on the contour (i.e. a parameter between 0 and 1), + * - the Y coordinate of a point in UandR gives the corresponding value of the radius, and the radius evolves between the first and last vertices of the contour of index IC. + */ + SetRadius(UandR: NCollection_Array1_gp_Pnt2d, IC: number, IinC: number): void; + /** + * Assigns Radius as the radius of the fillet on the edge E. + */ + SetRadius(Radius: number, IC: number, E: TopoDS_Edge): void; + SetRadius(Radius: number, IC: number, V: TopoDS_Vertex): void; + /** + * Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to a linear evolution law defined from R1 to R2, between the first and last vertices of the contour of index IC. + */ + SetRadius(R1: number, R2: number, IC: number, IinC: number): void; + /** + * Erases the radius information on the contour of index IC in the internal data structure of this algorithm. Use the SetRadius function to reset this data. Warning Nothing is done if IC is outside the bounds of the table of contours. + */ + ResetContour(IC: number): void; + /** + * Returns true if the radius of the fillet along the contour of index IC in the internal data structure of this algorithm is constant, Warning False is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC. + */ + IsConstant(IC: number): boolean; + /** + * Returns true if the radius of the fillet along the edge E of the contour of index IC in the internal data structure of this algorithm is constant. Warning False is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC. + */ + IsConstant(IC: number, E: TopoDS_Edge): boolean; + /** + * Returns the radius of the fillet along the contour of index IC in the internal data structure of this algorithm Warning. + * + * - Use this function only if the radius is constant. + * - -1. is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC. + */ + Radius(IC: number): number; + /** + * Returns the radius of the fillet along the edge E of the contour of index IC in the internal data structure of this algorithm. Warning. + * + * - Use this function only if the radius is constant. + * - -1 is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC. + */ + Radius(IC: number, E: TopoDS_Edge): number; + GetBounds(IC: number, E: TopoDS_Edge, F?: number, L?: number): { returnValue: boolean; F: number; L: number }; + GetLaw(IC: number, E: TopoDS_Edge): Law_Function; + SetLaw(IC: number, E: TopoDS_Edge, L: Law_Function): void; + /** + * Assigns FShape as the type of fillet shape built by this algorithm. + */ + SetFilletShape(FShape: ChFi3d_FilletShape): void; + /** + * Returns the type of fillet shape built by this algorithm. + */ + GetFilletShape(): ChFi3d_FilletShape; + /** + * Returns the number of contours generated using the Add function in the internal data structure of this algorithm. + */ + NbContours(): number; + /** + * Returns the index of the contour in the internal data structure of this algorithm which contains the edge E of the shape. This function returns 0 if the edge E does not belong to any contour. Warning This index can change if a contour is removed from the internal data structure of this algorithm using the function Remove. + */ + Contour(E: TopoDS_Edge): number; + /** + * Returns the number of edges in the contour of index I in the internal data structure of this algorithm. Warning Returns 0 if I is outside the bounds of the table of contours. + */ + NbEdges(I: number): number; + /** + * Returns the edge of index J in the contour of index I in the internal data structure of this algorithm. Warning Returns a null shape if: + * + * - I is outside the bounds of the table of contours, or + * - J is outside the bounds of the table of edges of the index I contour. + */ + Edge(I: number, J: number): TopoDS_Edge; + /** + * Removes the contour in the internal data structure of this algorithm which contains the edge E of the shape. Warning Nothing is done if the edge E does not belong to the contour in the internal data structure of this algorithm. + */ + Remove(E: TopoDS_Edge): void; + /** + * Returns the length of the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if IC is outside the bounds of the table of contours. + */ + Length(IC: number): number; + /** + * Returns the first vertex of the contour of index IC in the internal data structure of this algorithm. Warning Returns a null shape if IC is outside the bounds of the table of contours. + */ + FirstVertex(IC: number): TopoDS_Vertex; + /** + * Returns the last vertex of the contour of index IC in the internal data structure of this algorithm. Warning Returns a null shape if IC is outside the bounds of the table of contours. + */ + LastVertex(IC: number): TopoDS_Vertex; + /** + * Returns the curvilinear abscissa of the vertex V on the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if: + * + * - IC is outside the bounds of the table of contours, or + * - V is not on the contour of index IC. + */ + Abscissa(IC: number, V: TopoDS_Vertex): number; + /** + * Returns the relative curvilinear abscissa (i.e. between 0 and 1) of the vertex V on the contour of index IC in the internal data structure of this algorithm. Warning Returns -1. if: + * + * - IC is outside the bounds of the table of contours, or + * - V is not on the contour of index IC. + */ + RelativeAbscissa(IC: number, V: TopoDS_Vertex): number; + /** + * Returns true if the contour of index IC in the internal data structure of this algorithm is closed and tangential at the point of closure. Warning Returns false if IC is outside the bounds of the table of contours. + */ + ClosedAndTangent(IC: number): boolean; + /** + * Returns true if the contour of index IC in the internal data structure of this algorithm is closed. Warning Returns false if IC is outside the bounds of the table of contours. + */ + Closed(IC: number): boolean; + /** + * Builds the fillets on all the contours in the internal data structure of this algorithm and constructs the resulting shape. Use the function IsDone to verify that the filleted shape is built. Use the function Shape to retrieve the filleted shape. Warning The construction of fillets implements highly complex construction algorithms. + * Consequently, there may be instances where the algorithm fails, for example if the data defining the radius of the fillet is not compatible with the geometry of the initial shape. There is no initial analysis of errors and they only become evident at the construction stage. Additionally, in the current software release, the following cases are not handled: + * + * - the end point of the contour is the point of intersection of 4 or more edges of the shape, or + * - the intersection of the fillet with a face which limits the contour is not fully contained in this face. + */ + Build(theRange?: Message_ProgressRange): void; + /** + * Reinitializes this algorithm, thus canceling the effects of the Build function. This function allows modifications to be made to the contours and fillet parameters in order to rebuild the shape. + */ + Reset(): void; + /** + * Returns the internal topology building algorithm. + */ + Builder(): unknown; + /** + * Returns the list of shapes generated from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes modified from the shape . + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** + * returns the number of surfaces after the shape creation. + */ + NbSurfaces(): number; + /** + * Return the faces created for surface *.* + */ + NewFaces(I: number): NCollection_List_TopoDS_Shape; + Simulate(IC: number): void; + NbSurf(IC: number): number; + Sect(IC: number, IS: number): NCollection_HArray1_ChFiDS_CircSection; + /** + * Returns the number of contours where the computation of the fillet failed. + */ + NbFaultyContours(): number; + /** + * for each I in [1.. NbFaultyContours] returns the index IC of the contour where the computation of the fillet failed. the method NbEdges(IC) gives the number of edges in the contour IC the method Edge(IC,ie) gives the edge number ie of the contour IC + */ + FaultyContour(I: number): number; + /** + * returns the number of surfaces which have been computed on the contour IC + */ + NbComputedSurfaces(IC: number): number; + /** + * returns the surface number IS concerning the contour IC + */ + ComputedSurface(IC: number, IS: number): Geom_Surface; + /** + * returns the number of vertices where the computation failed + */ + NbFaultyVertices(): number; + /** + * returns the vertex where the computation failed + */ + FaultyVertex(IV: number): TopoDS_Vertex; + /** + * returns true if a part of the result has been computed if the filling in a corner failed a shape with a hole is returned + */ + HasResult(): boolean; + /** + * if (`HasResult()`) returns the partial result + */ + BadShape(): TopoDS_Shape; + /** + * returns the status concerning the contour IC in case of error ChFiDS_Ok : the computation is Ok ChFiDS_StartsolFailure : the computation can't start, perhaps the the radius is too big ChFiDS_TwistedSurface : the computation failed because of a twisted surface ChFiDS_WalkingFailure : there is a problem in the walking ChFiDS_Error: other error different from above + */ + StripeStatus(IC: number): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Construction of fillets on the edges of a Shell. + */ +export declare class BRepFilletAPI_LocalOperation extends BRepBuilderAPI_MakeShape { + /** + * Adds a contour in the builder (builds a contour of tangent edges). + */ + Add(E: TopoDS_Edge): void; + /** + * Reset the contour of index IC, there is nomore information in the contour. + */ + ResetContour(IC: number): void; + /** + * Number of contours. + */ + NbContours(): number; + /** + * Returns the index of the contour containing the edge E, returns 0 if E doesn't belong to any contour. + */ + Contour(E: TopoDS_Edge): number; + /** + * Number of Edges in the contour I. + */ + NbEdges(I: number): number; + /** + * Returns the Edge J in the contour I. + */ + Edge(I: number, J: number): TopoDS_Edge; + /** + * remove the contour containing the Edge E. + */ + Remove(E: TopoDS_Edge): void; + /** + * returns the length the contour of index IC. + */ + Length(IC: number): number; + /** + * Returns the first Vertex of the contour of index IC. + */ + FirstVertex(IC: number): TopoDS_Vertex; + /** + * Returns the last Vertex of the contour of index IC. + */ + LastVertex(IC: number): TopoDS_Vertex; + /** + * returns the abscissa of the vertex V on the contour of index IC. + */ + Abscissa(IC: number, V: TopoDS_Vertex): number; + /** + * returns the relative abscissa([0.,1.]) of the vertex V on the contour of index IC. + */ + RelativeAbscissa(IC: number, V: TopoDS_Vertex): number; + /** + * returns true if the contour of index IC is closed an tangent. + */ + ClosedAndTangent(IC: number): boolean; + /** + * returns true if the contour of index IC is closed + */ + Closed(IC: number): boolean; + /** + * Reset all the fields updated by Build operation and leave the algorithm in the same state than before build call. It allows contours and radius modifications to build the result another time. + */ + Reset(): void; + Simulate(IC: number): void; + NbSurf(IC: number): number; + Sect(IC: number, IS: number): NCollection_HArray1_ChFiDS_CircSection; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class provides a set of tools for repairing a wire. + * + * These are methods Fix...(), organised in two levels: + * + * Level 1: Advanced - each method in this level fixes one separate problem, usually dealing with either single edge or connection of the two adjacent edges. These methods should be used carefully and called in right sequence, because some of them depend on others. + * + * Level 2: Public (API) - methods which group several methods of level 1 and call them in a proper sequence in order to make some consistent set of fixes for a whole wire. It is possible to control calls to methods of the advanced level from methods of the public level by use of flags Fix..Mode() (see below). + * + * Fixes can be made in three ways: + * + * 1. Increasing tolerance of an edge or a vertex + * 2. Changing topology (adding/removing/replacing edge in the wire and/or replacing the vertex in the edge) + * 3. Changing geometry (shifting vertex or adjusting ends of edge curve to vertices, or recomputing curves of the edge) + * + * When fix can be made in more than one way (e.g., either by increasing tolerance or shifting a vertex), it is chosen according to the flags: ModifyTopologyMode - allows modification of the topology. This flag can be set when fixing a wire on the separate (free) face, and should be unset for face which is part of shell. ModifyGeometryMode - allows modification of the geometry. + * + * The order of descriptions of Fix() methods in this CDL approximately corresponds to the optimal order of calls. + * + * NOTE: most of fixing methods expect edges in the {@link ShapeExtend_WireData | `ShapeExtend_WireData`} to be ordered, so it is necessary to make call to `FixReorder()` before any other fixes + * + * {@link ShapeFix_Wire | `ShapeFix_Wire`} should be initialized prior to any fix by the following data: a) Wire (ether {@link TopoDS_Wire | `TopoDS_Wire`} or ShapeExtend_Wire) b) Face or surface c) {@link Precision | `Precision`} d) Maximal tail angle and width This can be done either by calling corresponding methods (LoadWire, SetFace or SetSurface, SetPrecision, SetMaxTailAngle and SetMaxTailWidth), or by loading already filled ShapeAnalisis_Wire with method Load + */ +export declare class ShapeFix_Wire extends ShapeFix_Root { + /** + * Empty Constructor, creates clear object with default flags. + */ + constructor(); + /** + * Create new object with default flags and prepare it for use (Loads analyzer with all the data for the wire and face). + */ + constructor(wire: TopoDS_Wire, face: TopoDS_Face, prec: number); + /** + * Sets all modes to default. + */ + ClearModes(): void; + /** + * Clears all statuses. + */ + ClearStatuses(): void; + /** + * Load analyzer with all the data for the wire and face and drops all fixing statuses. + */ + Init(wire: TopoDS_Wire, face: TopoDS_Face, prec: number): void; + /** + * Load analyzer with all the data already prepared and drops all fixing statuses If analyzer contains face, there is no need to set it by SetFace or SetSurface. + */ + Init(saw: unknown): void; + /** + * Load data for the wire, and drops all fixing statuses. + */ + Load(wire: TopoDS_Wire): void; + /** + * Load data for the wire, and drops all fixing statuses. + */ + Load(sbwd: unknown): void; + /** + * Set working face for the wire. + */ + SetFace(face: TopoDS_Face): void; + /** + * Set working face for the wire and surface analysis object. + */ + SetFace(theFace: TopoDS_Face, theSurfaceAnalysis: unknown): void; + /** + * Set surface analysis for the wire. + */ + SetSurface(theSurfaceAnalysis: unknown): void; + /** + * Set surface for the wire. + */ + SetSurface(surf: Geom_Surface): void; + /** + * Set surface for the wire. + */ + SetSurface(surf: Geom_Surface, loc: TopLoc_Location): void; + /** + * Set working precision (to root and to analyzer). + */ + SetPrecision(preci: number): void; + /** + * Sets the maximal allowed angle of the tails in radians. + */ + SetMaxTailAngle(theMaxTailAngle: number): void; + /** + * Sets the maximal allowed width of the tails. + */ + SetMaxTailWidth(theMaxTailWidth: number): void; + /** + * Tells if the wire is loaded. + */ + IsLoaded(): boolean; + /** + * Tells if the wire and face are loaded. + */ + IsReady(): boolean; + /** + * returns number of edges in the working wire + */ + NbEdges(): number; + /** + * Makes the resulting Wire (by basic Brep_Builder). + */ + Wire(): TopoDS_Wire; + /** + * Makes the resulting Wire (by BRepAPI_MakeWire). + */ + WireAPIMake(): TopoDS_Wire; + /** + * returns field Analyzer (working tool) + */ + Analyzer(): unknown; + /** + * returns working wire + */ + WireData(): unknown; + /** + * returns working face (Analyzer.Face()) + */ + Face(): TopoDS_Face; + /** + * Returns (modifiable) the flag which defines whether it is allowed to modify topology of the wire during fixing (adding/removing edges etc.). + */ + ModifyTopologyMode(): boolean; + /** + * Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify geometry of the edges and vertices. + */ + ModifyGeometryMode(): boolean; + /** + * Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify RemoveLoop of the edges. + */ + ModifyRemoveLoopMode(): number; + /** + * Returns (modifiable) the flag which defines whether the wire is to be closed (by calling methods like `FixDegenerated()` and `FixConnected()` for last and first edges). + */ + ClosedWireMode(): boolean; + /** + * Returns (modifiable) the flag which defines whether the 2d (True) representation of the wire is preferable over 3d one (in the case of ambiguity in FixEdgeCurves). + */ + PreferencePCurveMode(): boolean; + /** + * Returns (modifiable) the flag which defines whether tool tries to fix gaps first by changing curves ranges (i.e. using intersection, extrema, projections) or not. + */ + FixGapsByRangesMode(): boolean; + FixReorderMode(): number; + FixSmallMode(): number; + FixConnectedMode(): number; + FixEdgeCurvesMode(): number; + FixDegeneratedMode(): number; + FixSelfIntersectionMode(): number; + FixLackingMode(): number; + FixGaps3dMode(): number; + /** + * Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the method APIFix(): -1 default 1 method will be called 0 method will not be called. + */ + FixGaps2dMode(): number; + FixReversed2dMode(): number; + FixRemovePCurveMode(): number; + FixAddPCurveMode(): number; + FixRemoveCurve3dMode(): number; + FixAddCurve3dMode(): number; + FixSeamMode(): number; + FixShiftedMode(): number; + FixSameParameterMode(): number; + FixVertexToleranceMode(): number; + FixNotchedEdgesMode(): number; + FixSelfIntersectingEdgeMode(): number; + FixIntersectingEdgesMode(): number; + /** + * Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the corresponding Fix..() method of the public level: -1 default 1 method will be called 0 method will not be called. + */ + FixNonAdjacentIntersectingEdgesMode(): number; + FixTailMode(): number; + /** + * This method performs all the available fixes. If some fix is turned on or off explicitly by the Fix..Mode() flag, this fix is either called or not depending on that flag. Else (i.e. if flag is default) fix is called depending on the situation: some fixes are not called or are limited if order of edges in the wire is not OK, or depending on modes. + * + * The order of the fixes and default behaviour of `Perform()` are: FixReorder FixSmall (with lockvtx true if ! TopoMode or if wire is not ordered) FixConnected (if wire is ordered) FixEdgeCurves (without FixShifted if wire is not ordered) FixDegenerated (if wire is ordered) FixSelfIntersection (if wire is ordered and ClosedMode is True) FixLacking (if wire is ordered) + */ + Perform(theProgress?: Message_ProgressRange): boolean; + /** + * Performs an analysis and reorders edges in the wire using class WireOrder. Flag determines the use of miscible mode if necessary. + */ + FixReorder(theModeBoth: boolean): boolean; + /** + * Reorder edges in the wire as determined by WireOrder that should be filled and computed before. + */ + FixReorder(wi: unknown): boolean; + /** + * Applies FixSmall(num) to all edges in the wire. + */ + FixSmall(lockvtx: boolean, precsmall: number): number; + /** + * Fixes Null Length Edge to be removed If an Edge has Null Length (regarding preci, or . + * + * - what is smaller), it should be removed It can be with no problem if its two vertices are the same Else, if lockvtx is False, it is removed and its end vertex is put on the preceding edge But if lockvtx is True, this edge must be kept ... + */ + FixSmall(num: number, lockvtx: boolean, precsmall: number): boolean; + /** + * Applies FixConnected(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If is -1 then `MaxTolerance()` is taken. + */ + FixConnected(prec: number): boolean; + /** + * Fixes connected edges (preceding and current) Forces Vertices (end of preceding-begin of current) to be the same one Tests with starting preci or, if given greater, If is -1 then `MaxTolerance()` is taken. If is true, synchronizes wire data with context replacements. + */ + FixConnected(num: number, prec: number, theUpdateWire: boolean): boolean; + /** + * Groups the fixes dealing with 3d and pcurves of the edges. The order of the fixes and the default behaviour are: `ShapeFix_Edge::FixReversed2d` `ShapeFix_Edge::FixRemovePCurve` (only if forced) `ShapeFix_Edge::FixAddPCurve` `ShapeFix_Edge::FixRemoveCurve3d` (only if forced) `ShapeFix_Edge::FixAddCurve3d` FixSeam, FixShifted, `ShapeFix_Edge::FixSameParameter`. + */ + FixEdgeCurves(): boolean; + /** + * Applies FixDegenerated(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True. + */ + FixDegenerated(): boolean; + /** + * Fixes Degenerated Edge Checks an edge or a point between th-1 and th edges for a singularity on a supporting surface. If singularity is detected, either adds new degenerated edge (before th), or makes th edge to be degenerated. + */ + FixDegenerated(num: number): boolean; + /** + * Applies FixSelfIntersectingEdge(num) and FixIntersectingEdges(num) to all edges in the wire and FixIntersectingEdges(num1, num2) for all pairs num1 and num2 such that num2 >= num1 + 2 and removes wrong edges if any. + */ + FixSelfIntersection(): boolean; + /** + * Applies FixLacking(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If is False (default), test for connectness is done with precision of vertex between edges, else it is done with minimal value of vertex tolerance and Analyzer.Precision(). Hence, will lead to inserting lacking edges in replacement of vertices which have big tolerances. + */ + FixLacking(force: boolean): boolean; + /** + * Fixes Lacking Edge Test if two adjucent edges are disconnected in 2d (while connected in 3d), and in that case either increase tolerance of the vertex or add a new edge (straight in 2d space), in order to close wire in 2d. Returns True if edge was added or tolerance was increased. + */ + FixLacking(num: number, force: boolean): boolean; + /** + * Fixes a wire to be well closed It performs FixConnected, FixDegenerated and FixLacking between last and first edges (independingly on flag ClosedMode and modes for these fixings) If is -1 then `MaxTolerance()` is taken. + */ + FixClosed(prec?: number): boolean; + /** + * Fixes gaps between ends of 3d curves on adjacent edges myPrecision is used to detect the gaps. + */ + FixGaps3d(): boolean; + /** + * Fixes gaps between ends of pcurves on adjacent edges myPrecision is used to detect the gaps. + */ + FixGaps2d(): boolean; + /** + * Fixes a seam edge A Seam edge has two pcurves, one for forward. one for reversed The forward pcurve must be set as first. + * + * NOTE that correct order of pcurves in the seam edge depends on its orientation (i.e., on orientation of the wire, method of exploration of edges etc.). Since wire represented by the {@link ShapeExtend_WireData | `ShapeExtend_WireData`} is always forward (orientation is accounted by edges), it will work correct if: + * + * 1. Wire created from {@link ShapeExtend_WireData | `ShapeExtend_WireData`} with methods `ShapeExtend_WireData::Wire`..() is added into the FORWARD face (orientation can be applied later) + * 2. Wire is extracted from the face with orientation not composed with orientation of the face + */ + FixSeam(num: number): boolean; + /** + * Fixes edges which have pcurves shifted by whole parameter range on the closed surface (the case may occur if pcurve of edge was computed by projecting 3d curve, which goes along the seam). + * It compares each two consequent edges and tries to connect them if distance between ends is near to range of the surface. It also can detect and fix the case if all pcurves are connected, but lie out of parametric bounds of the surface. + * In addition to FixShifted from {@link ShapeFix_Wire | `ShapeFix_Wire`}, more sophisticated check of degenerate points is performed, and special cases like sphere given by two meridians are treated. + */ + FixShifted(): boolean; + FixNotchedEdges(): boolean; + /** + * Fixes gap between ends of 3d curves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts curves to bsplines to bend. + */ + FixGap3d(num: number, convert?: boolean): boolean; + /** + * Fixes gap between ends of pcurves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts pcurves to bsplines to bend. + */ + FixGap2d(num: number, convert?: boolean): boolean; + FixTails(): boolean; + StatusReorder(status: unknown): boolean; + StatusSmall(status: unknown): boolean; + StatusConnected(status: unknown): boolean; + StatusEdgeCurves(status: unknown): boolean; + StatusDegenerated(status: unknown): boolean; + StatusSelfIntersection(status: unknown): boolean; + StatusLacking(status: unknown): boolean; + StatusClosed(status: unknown): boolean; + StatusGaps3d(status: unknown): boolean; + StatusGaps2d(status: unknown): boolean; + StatusNotches(status: unknown): boolean; + /** + * Querying the status of performed API fixing procedures Each Status..() methods gives information about the last call to the corresponding Fix..() method of API level: OK : no problems detected; nothing done DONE: some problem(s) was(were) detected and successfully fixed FAIL: some problem(s) cannot be fixed. + */ + StatusRemovedSegment(): boolean; + StatusFixTails(status: unknown): boolean; + /** + * Queries the status of last call to methods Fix... of advanced level For details see corresponding methods; universal statuses are: OK : problem not detected; nothing done DONE: problem was detected and successfully fixed FAIL: problem cannot be fixed. + */ + LastFixStatus(status: unknown): boolean; + /** + * Returns tool for fixing wires. + */ + FixEdgeTool(): unknown; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides method to build a solid from a shells and orients them in order to have a valid solid with finite volume. + */ +export declare class ShapeFix_Solid extends ShapeFix_Root { + /** + * Empty constructor;. + */ + constructor(); + /** + * Initializes by solid. + */ + constructor(solid: TopoDS_Solid); + /** + * Initializes by solid . + */ + Init(solid: TopoDS_Solid): void; + /** + * Iterates on shells and performs fixes (calls {@link ShapeFix_Shell | `ShapeFix_Shell`} for each subshell). The passed progress indicator allows user to consult the current progress stage and abort algorithm if needed. + */ + Perform(theProgress?: Message_ProgressRange): boolean; + /** + * Calls MakeSolid and orients the solid to be "not infinite". + */ + SolidFromShell(shell: TopoDS_Shell): TopoDS_Solid; + /** + * Returns the status of the last Fix. + */ + Status(status: unknown): boolean; + /** + * Returns resulting solid. + */ + Solid(): TopoDS_Shape; + /** + * Returns tool for fixing shells. + */ + FixShellTool(): unknown; + /** + * Sets message registrator. + */ + SetMsgRegistrator(msgreg: unknown): void; + /** + * Sets basic precision value (also to FixShellTool). + */ + SetPrecision(preci: number): void; + /** + * Sets minimal allowed tolerance (also to FixShellTool). + */ + SetMinTolerance(mintol: number): void; + /** + * Sets maximal allowed tolerance (also to FixShellTool). + */ + SetMaxTolerance(maxtol: number): void; + /** + * Returns (modifiable) the mode for applying fixes of {@link ShapeFix_Shell | `ShapeFix_Shell`}, by default True. + */ + FixShellMode(): number; + /** + * Returns (modifiable) the mode for applying analysis and fixes of orientation of shells in the solid; by default True. + */ + FixShellOrientationMode(): number; + /** + * Returns (modifiable) the mode for creation of solids. If mode myCreateOpenSolidMode is equal to true solids are created from open shells else solids are created from closed shells only. {@link ShapeFix_Shell | `ShapeFix_Shell`}, by default False. + */ + CreateOpenSolidMode(): boolean; + /** + * In case of multiconnexity returns compound of fixed solids else returns one solid. + */ + Shape(): TopoDS_Shape; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Root class for fixing operations Provides context for recording changes (optional), basic precision value and limit (minimal and maximal) values for tolerances, and message registrator. + */ +export declare class ShapeFix_Root extends Standard_Transient { + /** + * Empty Constructor (no context is created). + */ + constructor(); + /** + * Copy all fields from another Root object. + */ + Set(Root: ShapeFix_Root): void; + /** + * Sets context. + */ + SetContext(context: unknown): void; + /** + * Returns context. + */ + Context(): unknown; + /** + * Sets message registrator. + */ + SetMsgRegistrator(msgreg: unknown): void; + /** + * Returns message registrator. + */ + MsgRegistrator(): unknown; + /** + * Sets basic precision value. + */ + SetPrecision(preci: number): void; + /** + * Returns basic precision value. + */ + Precision(): number; + /** + * Sets minimal allowed tolerance. + */ + SetMinTolerance(mintol: number): void; + /** + * Returns minimal allowed tolerance. + */ + MinTolerance(): number; + /** + * Sets maximal allowed tolerance. + */ + SetMaxTolerance(maxtol: number): void; + /** + * Returns maximal allowed tolerance. + */ + MaxTolerance(): number; + /** + * Returns tolerance limited by [myMinTol,myMaxTol]. + */ + LimitTolerance(toler: number): number; + /** + * Sends a message to be attached to the shape. Calls corresponding message of message registrator. + */ + SendMsg(shape: TopoDS_Shape, message: unknown, gravity: unknown): void; + /** + * Sends a message to be attached to myShape. Calls previous method. + */ + SendMsg(message: unknown, gravity: unknown): void; + /** + * Sends a warning to be attached to the shape. Calls SendMsg with gravity set to Message_Warning. + */ + SendWarning(shape: TopoDS_Shape, message: unknown): void; + /** + * Calls previous method for myShape. + */ + SendWarning(message: unknown): void; + /** + * Sends a fail to be attached to the shape. Calls SendMsg with gravity set to Message_Fail. + */ + SendFail(shape: TopoDS_Shape, message: unknown): void; + /** + * Calls previous method for myShape. + */ + SendFail(message: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This operator allows to perform various fixes on face and its wires: fixes provided by {@link ShapeFix_Wire | `ShapeFix_Wire`}, fixing orientation of wires, addition of natural bounds, fixing of missing seam edge, and detection and removal of null-area wires. + */ +export declare class ShapeFix_Face extends ShapeFix_Root { + /** + * Creates an empty tool. + */ + constructor(); + /** + * Creates a tool and loads a face. + */ + constructor(face: TopoDS_Face); + /** + * Sets all modes to default. + */ + ClearModes(): void; + /** + * Loads a whole face already created, with its wires, sense and location. + */ + Init(face: TopoDS_Face): void; + /** + * Starts the creation of the face By default it will be FORWARD, or REVERSED if is False. + */ + Init(surf: Geom_Surface, preci: number, fwd: boolean): void; + /** + * Starts the creation of the face By default it will be FORWARD, or REVERSED if is False. + */ + Init(surf: unknown, preci: number, fwd: boolean): void; + /** + * Sets message registrator. + */ + SetMsgRegistrator(msgreg: unknown): void; + /** + * Sets basic precision value (also to FixWireTool). + */ + SetPrecision(preci: number): void; + /** + * Sets minimal allowed tolerance (also to FixWireTool). + */ + SetMinTolerance(mintol: number): void; + /** + * Sets maximal allowed tolerance (also to FixWireTool). + */ + SetMaxTolerance(maxtol: number): void; + /** + * Returns (modifiable) the mode for applying fixes of {@link ShapeFix_Wire | `ShapeFix_Wire`}, by default True. + */ + FixWireMode(): number; + /** + * Returns (modifiable) the fix orientation mode, by default True. If True, wires oriented to border limited square. + */ + FixOrientationMode(): number; + /** + * Returns (modifiable) the add natural bound mode. If true, natural boundary is added on faces that miss them. Default is False for faces with single wire (they are handled by FixOrientation in that case) and True for others. + */ + FixAddNaturalBoundMode(): number; + /** + * Returns (modifiable) the fix missing seam mode, by default True. If True, tries to insert seam is missed. + */ + FixMissingSeamMode(): number; + /** + * Returns (modifiable) the fix small area wire mode, by default False. If True, drops small wires. + */ + FixSmallAreaWireMode(): number; + /** + * Returns (modifiable) the remove face with small area, by default False. If True, drops faces with small outer wires. + */ + RemoveSmallAreaFaceMode(): number; + /** + * Returns (modifiable) the fix intersecting wires mode by default True. + */ + FixIntersectingWiresMode(): number; + /** + * Returns (modifiable) the fix loop wires mode by default True. + */ + FixLoopWiresMode(): number; + /** + * Returns (modifiable) the fix split face mode by default True. + */ + FixSplitFaceMode(): number; + /** + * Returns (modifiable) the auto-correct precision mode by default False. + */ + AutoCorrectPrecisionMode(): number; + /** + * Returns (modifiable) the activation flag for periodic degenerated fix. False by default. + */ + FixPeriodicDegeneratedMode(): number; + /** + * Returns a face which corresponds to the current state Warning: The finally produced face may be another one ... but with the same support. + */ + Face(): TopoDS_Face; + /** + * Returns resulting shape (Face or Shell if split) To be used instead of `Face()` if FixMissingSeam involved. + */ + Result(): TopoDS_Shape; + /** + * Add a wire to current face using {@link BRep_Builder | `BRep_Builder`}. Wire is added without taking into account orientation of face (as if face were FORWARD). + */ + Add(wire: TopoDS_Wire): void; + /** + * Performs all the fixes, depending on modes Function Status returns the status of last call to `Perform()` ShapeExtend_OK : face was OK, nothing done ShapeExtend_DONE1: some wires are fixed ShapeExtend_DONE2: orientation of wires fixed ShapeExtend_DONE3: missing seam added ShapeExtend_DONE4: small area wire removed ShapeExtend_DONE5: natural bounds added ShapeExtend_FAIL1: some fails during fixing wires ShapeExtend_FAIL2: cannot fix orientation of wires ShapeExtend_FAIL3: cannot add missing seam ShapeExtend_FAIL4: cannot remove small area wire. + */ + Perform(theProgress?: Message_ProgressRange): boolean; + /** + * Fixes orientation of wires on the face It tries to make all wires lie outside all others (according to orientation) by reversing orientation of some of them. If face lying on sphere or torus has single wire and AddNaturalBoundMode is True, that wire is not reversed in any case (supposing that natural bound will be added). Returns True if wires were reversed. + */ + FixOrientation(): boolean; + /** + * Fixes orientation of wires on the face It tries to make all wires lie outside all others (according to orientation) by reversing orientation of some of them. If face lying on sphere or torus has single wire and AddNaturalBoundMode is True, that wire is not reversed in any case (supposing that natural bound will be added). Returns True if wires were reversed OutWires return information about out wires + list of internal wires for each (for performing split face). + * @param MapWires Mutated in place; read the updated value from this argument after the call. + */ + FixOrientation(MapWires: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Adds natural boundary on face if it is missing. Two cases are supported: + * + * - face has no wires + * - face lies on geometrically double-closed surface (sphere or torus) and none of wires is left-oriented Returns True if natural boundary was added + */ + FixAddNaturalBound(): boolean; + /** + * Detects and fixes the special case when face on a closed surface is given by two wires closed in 3d but with gap in 2d. In that case it creates a new wire from the two, and adds a missing seam edge Returns True if missing seam was added. + */ + FixMissingSeam(): boolean; + /** + * Detects wires with small area (that is less than 100*Precision::PConfusion(). Removes these wires if they are internal. Returns : True if at least one small wire removed, False if does nothing. + */ + FixSmallAreaWire(theIsRemoveSmallFace: boolean): boolean; + /** + * Detects if wire has a loop and fixes this situation by splitting on the few parts. if wire has a loops and it was split Status was set to value ShapeExtend_DONE6. + * @param aResWires Mutated in place; read the updated value from this argument after the call. + */ + FixLoopWire(aResWires: NCollection_Sequence_TopoDS_Shape): boolean; + /** + * Detects and fixes the special case when face has more than one wire and this wires have intersection point. + */ + FixIntersectingWires(): boolean; + /** + * If wire contains two coincidence edges it must be removed Queries on status after `Perform()`. + */ + FixWiresTwoCoincEdges(): boolean; + /** + * Split face if there are more than one out wire using inrormation after `FixOrientation()`. + */ + FixSplitFace(MapWires: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher): boolean; + /** + * Fixes topology for a specific case when face is composed by a single wire belting a periodic surface. In that case a degenerated edge is reconstructed in the degenerated pole of the surface. Initial wire gets consistent orientation. Must be used in couple and before FixMissingSeam routine. + */ + FixPeriodicDegenerated(): boolean; + /** + * Returns the status of last call to `Perform()` ShapeExtend_OK : face was OK, nothing done ShapeExtend_DONE1: some wires are fixed ShapeExtend_DONE2: orientation of wires fixed ShapeExtend_DONE3: missing seam added ShapeExtend_DONE4: small area wire removed ShapeExtend_DONE5: natural bounds added ShapeExtend_DONE8: face may be splited ShapeExtend_FAIL1: some fails during fixing wires ShapeExtend_FAIL2: cannot fix orientation of wires ShapeExtend_FAIL3: cannot add missing seam ShapeExtend_FAIL4: cannot remove small area wire. + */ + Status(status: unknown): boolean; + /** + * Returns tool for fixing wires. + */ + FixWireTool(): ShapeFix_Wire; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This tool tries to unify faces and edges of the shape which lie on the same geometry. Faces/edges are considering as 'same-domain' if a group of neighbouring faces/edges are lying on coincident surfaces/curves. + * In this case these faces/edges can be unified into one face/edge. {@link ShapeUpgrade_UnifySameDomain | `ShapeUpgrade_UnifySameDomain`} is initialized by a shape and the next optional parameters: UnifyFaces - tries to unify all possible faces UnifyEdges - tries to unify all possible edges ConcatBSplines - if this flag is set to true then all neighbouring edges, which lay on BSpline or Bezier curves with C1 continuity on their common vertices, will be merged into one common edge. + * + * The input shape can be of any type containing faces or edges - compsolid, solid, shell, wire, compound of any kind of shapes. The algorithm preserves the structure of compsolids, solids, shells and wires. E.g., if two shells have a common edge and the faces sharing this edge lie on the same surface the algorithm will not unify these faces, otherwise the structure of shells would be broken. However, if such faces belong to different compounds of faces they will be unified. + * + * The output result of the tool is the unified shape. + * + * All the modifications of initial shape are recorded during unifying. Methods History are intended to: + * + * - set a place holder for the history of modifications of sub-shapes of the initial shape; + * - get the collected history. The algorithm provides a place holder for the history and collects the history by default. To avoid collecting of the history the place holder should be set to null handle. + */ +export declare class ShapeUpgrade_UnifySameDomain extends Standard_Transient { + /** + * Empty constructor. + */ + constructor(); + /** + * Constructor defining input shape and necessary flags. It does not perform unification. + */ + constructor(aShape: TopoDS_Shape, UnifyEdges?: boolean, UnifyFaces?: boolean, ConcatBSplines?: boolean); + /** + * Initializes with a shape and necessary flags. It does not perform unification. If you intend to nullify the History place holder do it after initialization. + */ + Initialize(aShape: TopoDS_Shape, UnifyEdges?: boolean, UnifyFaces?: boolean, ConcatBSplines?: boolean): void; + /** + * Sets the flag defining whether it is allowed to create internal edges inside merged faces in the case of non-manifold topology. Without this flag merging through multi connected edge is forbidden. Default value is false. + */ + AllowInternalEdges(theValue: boolean): void; + /** + * Sets the shape for avoid merging of the faces/edges. This shape can be vertex or edge. If the shape is a vertex it forbids merging of connected edges. If the shape is a edge it forbids merging of connected faces. This method can be called several times to keep several shapes. + */ + KeepShape(theShape: TopoDS_Shape): void; + /** + * Sets the map of shapes for avoid merging of the faces/edges. It allows passing a ready to use map instead of calling many times the method KeepShape. + */ + KeepShapes(theShapes: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Sets the flag defining the behavior of the algorithm regarding modification of input shape. If this flag is equal to True then the input (original) shape can't be modified during modification process. Default value is true. + */ + SetSafeInputMode(theValue: boolean): void; + /** + * Sets the linear tolerance. It plays the role of chord error when taking decision about merging of shapes. Default value is `Precision::Confusion()`. + */ + SetLinearTolerance(theValue: number): void; + /** + * Sets the angular tolerance. If two shapes form a connection angle greater than this value they will not be merged. Default value is `Precision::Angular()`. + */ + SetAngularTolerance(theValue: number): void; + /** + * Performs unification and builds the resulting shape. + */ + Build(): void; + /** + * Gives the resulting shape. + */ + Shape(): TopoDS_Shape; + /** + * Returns the history of the processed shapes. + */ + History(): unknown; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides general functions to build form features. Form features can be depressions or protrusions and include the following types: + * + * - Cylinder + * - {@link Draft | `Draft`} Prism + * - Prism + * - Revolved feature + * - Pipe In each case, you have a choice of operation type between the following: + * - removing matter (a Boolean cut: Fuse setting 0) + * - adding matter (Boolean fusion: Fuse setting 1) The semantics of form feature creation is based on the construction of shapes: + * - along a length + * - up to a limiting face + * - from a limiting face to a height + * - above and/or below a plane The shape defining construction of the feature can be either the supporting edge or the concerned area of a face. In case of the supporting edge, this contour can be attached to a face of the basis shape by binding. + * When the contour is bound to this face, the information that the contour will slide on the face becomes available to the relevant class methods. + * In case of the concerned area of a face, you could, for example, cut it out and move it to a different height which will define the limiting face of a protrusion or depression. + * Topological definition with local operations of this sort makes calculations simpler and faster than a global operation. The latter would entail a second phase of removing unwanted matter to get the same result. + */ +export declare class BRepFeat_Form extends BRepBuilderAPI_MakeShape { + /** + * returns the list of generated Faces. + */ + Modified(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * returns a list of the created faces from the shape . + */ + Generated(S: TopoDS_Shape): NCollection_List_TopoDS_Shape; + /** + * Returns true if the shape S has been deleted. + */ + IsDeleted(S: TopoDS_Shape): boolean; + /** + * Returns the list of shapes created at the bottom of the created form. It may be an empty list. + */ + FirstShape(): NCollection_List_TopoDS_Shape; + /** + * Returns the list of shapes created at the top of the created form. It may be an empty list. + */ + LastShape(): NCollection_List_TopoDS_Shape; + /** + * Returns a list of the limiting and glueing edges generated by the feature. These edges did not originally exist in the basis shape. The list provides the information necessary for subsequent addition of fillets. It may be an empty list. + */ + NewEdges(): NCollection_List_TopoDS_Shape; + /** + * Returns a list of the tangent edges among the limiting and glueing edges generated by the feature. These edges did not originally exist in the basis shape and are tangent to the face against which the feature is built. The list provides the information necessary for subsequent addition of fillets. It may be an empty list. If an edge is tangent, no fillet is possible, and the edge must subsequently be removed if you want to add a fillet. + */ + TgtEdges(): NCollection_List_TopoDS_Shape; + /** + * Initializes the topological construction if the basis shape is present. + */ + BasisShapeValid(): void; + /** + * Initializes the topological construction if the generated shape S is present. + */ + GeneratedShapeValid(): void; + /** + * Initializes the topological construction if the shape is present from the specified integer on. + */ + ShapeFromValid(): void; + /** + * Initializes the topological construction if the shape is present until the specified integer. + */ + ShapeUntilValid(): void; + /** + * Initializes the topological construction if the glued face is present. + */ + GluedFacesValid(): void; + /** + * Initializes the topological construction if the sketch face is present. If the sketch face is inside the basis shape, local operations such as glueing can be performed. + */ + SketchFaceValid(): void; + /** + * Initializes the topological construction if the selected face is present. + */ + PerfSelectionValid(): void; + Curves(S: NCollection_Sequence_handle_Geom_Curve): void; + BarycCurve(): Geom_Curve; + CurrentStatusError(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes functions to build draft prism topologies from basis shape surfaces. These can be depressions or protrusions. The semantics of draft prism feature creation is based on the construction of shapes: + * + * - along a length + * - up to a limiting face + * - from a limiting face to a height. The shape defining construction of the draft prism feature can be either the supporting edge or the concerned area of a face. In case of the supporting edge, this contour can be attached to a face of the basis shape by binding. When the contour is bound to this face, the information that the contour will slide on the face becomes available to the relevant class methods. In case of the concerned area of a face, you could, for example, cut it out and move it to a different height which will define the limiting face of a protrusion or depression. + */ +export declare class BRepFeat_MakeDPrism extends BRepFeat_Form { + constructor(); + /** + * A face Pbase is selected in the shape Sbase to serve as the basis for the draft prism. The draft will be defined by the angle Angle and Fuse offers a choice between: + * + * - removing matter with a Boolean cut using the setting 0 + * - adding matter with Boolean fusion using the setting 1. The sketch face Skface serves to determine the type of operation. If it is inside the basis shape, a local operation such as glueing can be performed. Initializes the draft prism class + */ + constructor(Sbase: TopoDS_Shape, Pbase: TopoDS_Face, Skface: TopoDS_Face, Angle: number, Fuse: number, Modify: boolean); + /** + * Initializes this algorithm for building draft prisms along surfaces. A face Pbase is selected in the basis shape Sbase to serve as the basis from the draft prism. The draft will be defined by the angle Angle and Fuse offers a choice between: + * + * - removing matter with a Boolean cut using the setting 0 + * - adding matter with Boolean fusion using the setting 1. The sketch face Skface serves to determine the type of operation. If it is inside the basis shape, a local operation such as glueing can be performed. + */ + Init(Sbase: TopoDS_Shape, Pbase: TopoDS_Face, Skface: TopoDS_Face, Angle: number, Fuse: number, Modify: boolean): void; + /** + * Indicates that the edge will slide on the face . Raises ConstructionError if the face does not belong to the basis shape, or the edge to the prismed shape. + */ + Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; + Perform(Height: number): void; + Perform(Until: TopoDS_Shape): void; + /** + * Assigns one of the following semantics. + * + * - to a height Height + * - to a face Until + * - from a face From to a height Until. Reconstructs the feature topologically according to the semantic option chosen. + */ + Perform(From: TopoDS_Shape, Until: TopoDS_Shape): void; + /** + * Realizes a semi-infinite prism, limited by the position of the prism base. + */ + PerformUntilEnd(): void; + /** + * Realizes a semi-infinite prism, limited by the face Funtil. + */ + PerformFromEnd(FUntil: TopoDS_Shape): void; + /** + * Builds an infinite prism. The infinite descendants will not be kept in the result. + */ + PerformThruAll(): void; + /** + * Assigns both a limiting shape, Until from {@link TopoDS_Shape | `TopoDS_Shape`}, and a height, Height at which to stop generation of the prism feature. + */ + PerformUntilHeight(Until: TopoDS_Shape, Height: number): void; + Curves(S: NCollection_Sequence_handle_Geom_Curve): void; + BarycCurve(): Geom_Curve; + /** + * Determination of TopEdges and LatEdges. sig = 1 -> TopEdges = FirstShape of the DPrism sig = 2 -> TOpEdges = LastShape of the DPrism. + */ + BossEdges(sig: number): void; + /** + * Returns the list of `TopoDS` Edges of the top of the boss. + */ + TopEdges(): NCollection_List_TopoDS_Shape; + /** + * Returns the list of `TopoDS` Edges of the bottom of the boss. + */ + LatEdges(): NCollection_List_TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Root class for 3D curves on which geometric algorithms work. An adapted curve is an interface between the services provided by a curve and those required of the curve by algorithms which use it. Two derived concrete classes are provided: + * + * - {@link GeomAdaptor_Curve | `GeomAdaptor_Curve`} for a curve from the Geom package + * - {@link Adaptor3d_CurveOnSurface | `Adaptor3d_CurveOnSurface`} for a curve lying on a surface from the Geom package. + * + * Polynomial coefficients of BSpline curves used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented. + */ +export declare class Adaptor3d_Curve extends Standard_Transient { + constructor(); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Curve; + FirstParameter(): number; + LastParameter(): number; + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . + * + * The array must provide enough room to accommodate for the parameters. i.e. T.Length() > `NbIntervals()` + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + Trim(First: number, Last: number, Tol: number): Adaptor3d_Curve; + IsClosed(): boolean; + IsPeriodic(): boolean; + Period(): number; + /** + * Computes the point of parameter U on the curve. + */ + Value(theU: number): gp_Pnt; + /** + * Computes the point of parameter U on the curve. + * @param theP Mutated in place; read the updated value from this argument after the call. + */ + D0(theU: number, theP: gp_Pnt): void; + /** + * Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theV Mutated in place; read the updated value from this argument after the call. + */ + D1(theU: number, theP: gp_Pnt, theV: gp_Vec): void; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theV1 Mutated in place; read the updated value from this argument after the call. + * @param theV2 Mutated in place; read the updated value from this argument after the call. + */ + D2(theU: number, theP: gp_Pnt, theV1: gp_Vec, theV2: gp_Vec): void; + /** + * Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theV1 Mutated in place; read the updated value from this argument after the call. + * @param theV2 Mutated in place; read the updated value from this argument after the call. + * @param theV3 Mutated in place; read the updated value from this argument after the call. + */ + D3(theU: number, theP: gp_Pnt, theV1: gp_Vec, theV2: gp_Vec, theV3: gp_Vec): void; + /** + * The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1. + */ + DN(theU: number, theN: number): gp_Vec; + /** + * Returns the parametric resolution corresponding to the real space resolution . + */ + Resolution(R3d: number): number; + /** + * Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve. + */ + GetType(): GeomAbs_CurveType; + Line(): unknown; + Circle(): gp_Circ; + Ellipse(): gp_Elips; + Hyperbola(): unknown; + Parabola(): unknown; + Degree(): number; + IsRational(): boolean; + NbPoles(): number; + NbKnots(): number; + Bezier(): Geom_BezierCurve; + BSpline(): Geom_BSplineCurve; + OffsetCurve(): unknown; + /** + * Computes the point of parameter U on the curve. Raises an exception on failure. + */ + EvalD0(theU: number): gp_Pnt; + /** + * Computes the point and first derivative at parameter U. Raises an exception on failure. + */ + EvalD1(theU: number): Geom_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception on failure. + */ + EvalD2(theU: number): Geom_Curve_ResD2; + /** + * Computes the point and first three derivatives at parameter U. Raises an exception on failure. + */ + EvalD3(theU: number): Geom_Curve_ResD3; + /** + * Computes the Nth derivative at parameter U. Raises an exception on failure. + */ + EvalDN(theU: number, theN: number): gp_Vec; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Root class for surfaces on which geometric algorithms work. An adapted surface is an interface between the services provided by a surface and those required of the surface by algorithms which use it. A derived concrete class is provided: {@link GeomAdaptor_Surface | `GeomAdaptor_Surface`} for a surface from the Geom package. The Surface class describes the standard behaviour of a surface for generic algorithms. + * + * The Surface can be decomposed in intervals of any continuity in U and V using the method NbIntervals. A current interval can be set. Most of the methods apply to the current interval. Warning: All the methods are virtual and implemented with a raise to allow to redefined only the methods really used. + * + * Polynomial coefficients of BSpline surfaces used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented. + */ +export declare class Adaptor3d_Surface extends Standard_Transient { + constructor(); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Surface; + FirstUParameter(): number; + LastUParameter(): number; + FirstVParameter(): number; + LastVParameter(): number; + UContinuity(): GeomAbs_Shape; + VContinuity(): GeomAbs_Shape; + /** + * Returns the number of U intervals for continuity . May be one if UContinuity(me) >= . + */ + NbUIntervals(S: GeomAbs_Shape): number; + /** + * Returns the number of V intervals for continuity . May be one if VContinuity(me) >= . + */ + NbVIntervals(S: GeomAbs_Shape): number; + /** + * Returns the intervals with the requested continuity in the U direction. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + UIntervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the intervals with the requested continuity in the V direction. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + VIntervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a surface trimmed in the U direction equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + UTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface; + /** + * Returns a surface trimmed in the V direction between parameters and . is used to test for 3d points confusion. If >= . + */ + VTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface; + IsUClosed(): boolean; + IsVClosed(): boolean; + IsUPeriodic(): boolean; + UPeriod(): number; + IsVPeriodic(): boolean; + VPeriod(): number; + /** + * Computes the point of parameters U,V on the surface. Tip: use `GeomLib::NormEstim()` to calculate surface normal at specified (U, V) point. + */ + Value(theU: number, theV: number): gp_Pnt; + /** + * Computes the point of parameters U,V on the surface. + * @param theP Mutated in place; read the updated value from this argument after the call. + */ + D0(theU: number, theV: number, theP: gp_Pnt): void; + /** + * Computes the point and the first derivatives on the surface. Raised if the continuity of the current intervals is not C1. + * + * Tip: use `GeomLib::NormEstim()` to calculate surface normal at specified (U, V) point. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theD1U Mutated in place; read the updated value from this argument after the call. + * @param theD1V Mutated in place; read the updated value from this argument after the call. + */ + D1(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec): void; + /** + * Computes the point, the first and second derivatives on the surface. Raised if the continuity of the current intervals is not C2. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theD1U Mutated in place; read the updated value from this argument after the call. + * @param theD1V Mutated in place; read the updated value from this argument after the call. + * @param theD2U Mutated in place; read the updated value from this argument after the call. + * @param theD2V Mutated in place; read the updated value from this argument after the call. + * @param theD2UV Mutated in place; read the updated value from this argument after the call. + */ + D2(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec, theD2U: gp_Vec, theD2V: gp_Vec, theD2UV: gp_Vec): void; + /** + * Computes the point, the first, second and third derivatives on the surface. Raised if the continuity of the current intervals is not C3. + * @param theP Mutated in place; read the updated value from this argument after the call. + * @param theD1U Mutated in place; read the updated value from this argument after the call. + * @param theD1V Mutated in place; read the updated value from this argument after the call. + * @param theD2U Mutated in place; read the updated value from this argument after the call. + * @param theD2V Mutated in place; read the updated value from this argument after the call. + * @param theD2UV Mutated in place; read the updated value from this argument after the call. + * @param theD3U Mutated in place; read the updated value from this argument after the call. + * @param theD3V Mutated in place; read the updated value from this argument after the call. + * @param theD3UUV Mutated in place; read the updated value from this argument after the call. + * @param theD3UVV Mutated in place; read the updated value from this argument after the call. + */ + D3(theU: number, theV: number, theP: gp_Pnt, theD1U: gp_Vec, theD1V: gp_Vec, theD2U: gp_Vec, theD2V: gp_Vec, theD2UV: gp_Vec, theD3U: gp_Vec, theD3V: gp_Vec, theD3UUV: gp_Vec, theD3UVV: gp_Vec): void; + /** + * Computes the derivative of order Nu in the direction U and Nv in the direction V at the point P(U, V). Raised if the current U interval is not not CNu and the current V interval is not CNv. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. + */ + DN(theU: number, theV: number, theNu: number, theNv: number): gp_Vec; + /** + * Returns the parametric U resolution corresponding to the real space resolution . + */ + UResolution(R3d: number): number; + /** + * Returns the parametric V resolution corresponding to the real space resolution . + */ + VResolution(R3d: number): number; + /** + * Returns the type of the surface: Plane, Cylinder, Cone, Sphere, Torus, BezierSurface, BSplineSurface, SurfaceOfRevolution, SurfaceOfExtrusion, OtherSurface. + */ + GetType(): GeomAbs_SurfaceType; + Plane(): gp_Pln; + Cylinder(): gp_Cylinder; + Cone(): unknown; + Sphere(): gp_Sphere; + Torus(): unknown; + UDegree(): number; + NbUPoles(): number; + VDegree(): number; + NbVPoles(): number; + NbUKnots(): number; + NbVKnots(): number; + IsURational(): boolean; + IsVRational(): boolean; + Bezier(): unknown; + BSpline(): Geom_BSplineSurface; + AxeOfRevolution(): gp_Ax1; + Direction(): gp_Dir; + BasisCurve(): Adaptor3d_Curve; + BasisSurface(): Adaptor3d_Surface; + OffsetValue(): number; + /** + * Computes the point of parameters (U, V) on the surface. Raises an exception on failure. + */ + EvalD0(theU: number, theV: number): gp_Pnt; + /** + * Computes the point and first partial derivatives at (U, V). Raises an exception on failure. + */ + EvalD1(theU: number, theV: number): Geom_Surface_ResD1; + /** + * Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception on failure. + */ + EvalD2(theU: number, theV: number): Geom_Surface_ResD2; + /** + * Computes the point and partial derivatives up to 3rd order at (U, V). Raises an exception on failure. + */ + EvalD3(theU: number, theV: number): Geom_Surface_ResD3; + /** + * Computes the derivative of order Nu in U and Nv in V at (U, V). Raises an exception on failure. + */ + EvalDN(theU: number, theV: number, theNu: number, theNv: number): gp_Vec; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An adaptor for surfaces with an applied transformation. + * + * This class wraps a {@link GeomAdaptor_Surface | `GeomAdaptor_Surface`} and applies a {@link gp_Trsf | `gp_Trsf`} transformation to all point and derivative evaluations. It serves as a base class for {@link BRepAdaptor_Surface | `BRepAdaptor_Surface`} and allows batch evaluation with transformations in `GeomGridEval_Surface`. + * + * The evaluation methods (Value, D0, D1, D2, D3, DN) are marked final to enable optimizations in grid evaluation. + */ +export declare class GeomAdaptor_TransformedSurface extends Adaptor3d_Surface { + /** + * Creates an undefined surface with identity transformation. + */ + constructor(); + /** + * Creates a surface adaptor with transformation. + * @param theSurface underlying geometry + * @param theTrsf transformation to apply + */ + constructor(theSurface: Geom_Surface, theTrsf: gp_Trsf); + /** + * Creates a surface adaptor with transformation and parameter bounds. + * @param theSurface underlying geometry + * @param theUFirst minimum U parameter + * @param theULast maximum U parameter + * @param theVFirst minimum V parameter + * @param theVLast maximum V parameter + * @param theTrsf transformation to apply + * @param theTolU tolerance in U direction + * @param theTolV tolerance in V direction + */ + constructor(theSurface: Geom_Surface, theUFirst: number, theULast: number, theVFirst: number, theVLast: number, theTrsf: gp_Trsf, theTolU?: number, theTolV?: number); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Surface; + /** + * Loads the surface geometry. + * @param theSurface underlying geometry + * @param theTrsf transformation to apply + */ + Load(theSurface: Geom_Surface, theTrsf: gp_Trsf): void; + /** + * Loads the surface geometry with parameter bounds. + * @param theSurface underlying geometry + * @param theUFirst minimum U parameter + * @param theULast maximum U parameter + * @param theVFirst minimum V parameter + * @param theVLast maximum V parameter + * @param theTrsf transformation to apply + * @param theTolU tolerance in U direction + * @param theTolV tolerance in V direction + */ + Load(theSurface: Geom_Surface, theUFirst: number, theULast: number, theVFirst: number, theVLast: number, theTrsf: gp_Trsf, theTolU: number, theTolV: number): void; + /** + * Sets the transformation. + * @param theTrsf transformation to apply + */ + SetTrsf(theTrsf: gp_Trsf): void; + /** + * Returns true if non-identity transformation is applied. + */ + HasTrsf(): boolean; + /** + * Returns the transformation. + */ + Trsf(): gp_Trsf; + Surface(): unknown; + /** + * Returns the underlying {@link GeomAdaptor_Surface | `GeomAdaptor_Surface`}. + * @deprecated + */ + AdaptorSurfaceOriginal(): unknown; + /** + * Returns an adaptor for the transformed surface state. Uses the original adaptor for identity transformation to preserve existing trimming. + */ + AdaptorSurfaceTransformed(): unknown; + /** + * Returns the underlying original {@link Geom_Surface | `Geom_Surface`} without transformation applied. + */ + GeomSurfaceOriginal(): Geom_Surface; + /** + * Returns the transformed {@link Geom_Surface | `Geom_Surface`} cached for current state. + */ + GeomSurfaceTransformed(): Geom_Surface; + /** + * Returns the underlying {@link Geom_Surface | `Geom_Surface`}. + * @deprecated + */ + GeomSurface(): Geom_Surface; + FirstUParameter(): number; + LastUParameter(): number; + FirstVParameter(): number; + LastVParameter(): number; + UContinuity(): GeomAbs_Shape; + VContinuity(): GeomAbs_Shape; + /** + * Returns the number of U intervals for continuity . May be one if UContinuity(me) >= . + */ + NbUIntervals(S: GeomAbs_Shape): number; + /** + * Returns the number of V intervals for continuity . May be one if VContinuity(me) >= . + */ + NbVIntervals(S: GeomAbs_Shape): number; + /** + * Returns the intervals with the requested continuity in the U direction. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + UIntervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns the intervals with the requested continuity in the V direction. + * @param T Mutated in place; read the updated value from this argument after the call. + */ + VIntervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a surface trimmed in the U direction equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + UTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface; + /** + * Returns a surface trimmed in the V direction between parameters and . is used to test for 3d points confusion. If >= . + */ + VTrim(First: number, Last: number, Tol: number): Adaptor3d_Surface; + IsUClosed(): boolean; + IsVClosed(): boolean; + IsUPeriodic(): boolean; + UPeriod(): number; + IsVPeriodic(): boolean; + VPeriod(): number; + /** + * Returns tolerance in U direction. + */ + ToleranceU(): number; + /** + * Returns tolerance in V direction. + */ + ToleranceV(): number; + /** + * Point evaluation. Applies transformation after evaluation. + */ + EvalD0(theU: number, theV: number): gp_Pnt; + /** + * D1 evaluation. Applies transformation after evaluation. + */ + EvalD1(theU: number, theV: number): Geom_Surface_ResD1; + /** + * D2 evaluation. Applies transformation after evaluation. + */ + EvalD2(theU: number, theV: number): Geom_Surface_ResD2; + /** + * D3 evaluation. Applies transformation after evaluation. + */ + EvalD3(theU: number, theV: number): Geom_Surface_ResD3; + /** + * DN evaluation. Applies transformation after evaluation. + */ + EvalDN(theU: number, theV: number, theNu: number, theNv: number): gp_Vec; + /** + * Returns the parametric U resolution corresponding to the real space resolution . + */ + UResolution(R3d: number): number; + /** + * Returns the parametric V resolution corresponding to the real space resolution . + */ + VResolution(R3d: number): number; + /** + * Returns the type of the surface: Plane, Cylinder, Cone, Sphere, Torus, BezierSurface, BSplineSurface, SurfaceOfRevolution, SurfaceOfExtrusion, OtherSurface. + */ + GetType(): GeomAbs_SurfaceType; + Plane(): gp_Pln; + Cylinder(): gp_Cylinder; + Cone(): unknown; + Sphere(): gp_Sphere; + Torus(): unknown; + UDegree(): number; + NbUPoles(): number; + VDegree(): number; + NbVPoles(): number; + NbUKnots(): number; + NbVKnots(): number; + IsURational(): boolean; + IsVRational(): boolean; + Bezier(): unknown; + BSpline(): Geom_BSplineSurface; + AxeOfRevolution(): gp_Ax1; + Direction(): gp_Dir; + BasisCurve(): Adaptor3d_Curve; + BasisSurface(): Adaptor3d_Surface; + OffsetValue(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type GeomEval_RepSurfaceDesc_Base = unknown; + +/** + * An adaptor for curves with an applied transformation. + * + * This class wraps a {@link GeomAdaptor_Curve | `GeomAdaptor_Curve`} (or an {@link Adaptor3d_CurveOnSurface | `Adaptor3d_CurveOnSurface`}) and applies a {@link gp_Trsf | `gp_Trsf`} transformation to all point and derivative evaluations. It serves as a base class for {@link BRepAdaptor_Curve | `BRepAdaptor_Curve`} and allows batch evaluation with transformations in `GeomGridEval_Curve`. + * + * The evaluation methods (Value, D0, D1, D2, D3, DN) are marked final to enable optimizations in grid evaluation. + */ +export declare class GeomAdaptor_TransformedCurve extends Adaptor3d_Curve { + /** + * Creates an undefined curve with identity transformation. + */ + constructor(); + /** + * Creates a curve adaptor with transformation. + * @param theCurve underlying geometry + * @param theTrsf transformation to apply + */ + constructor(theCurve: Geom_Curve, theTrsf: gp_Trsf); + /** + * Creates a curve adaptor with transformation and parameter bounds. + * @param theCurve underlying geometry + * @param theFirst minimum parameter + * @param theLast maximum parameter + * @param theTrsf transformation to apply + */ + constructor(theCurve: Geom_Curve, theFirst: number, theLast: number, theTrsf: gp_Trsf); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Curve; + /** + * Loads the curve geometry. + * @param theCurve underlying geometry + */ + Load(theCurve: Geom_Curve): void; + /** + * Loads the curve geometry with parameter bounds. + * @param theCurve underlying geometry + * @param theFirst minimum parameter + * @param theLast maximum parameter + */ + Load(theCurve: Geom_Curve, theFirst: number, theLast: number): void; + /** + * Sets the curve on surface adaptor. + * @param theConSurf curve on surface adaptor + */ + LoadCurveOnSurface(theConSurf: unknown): void; + /** + * Sets the transformation. + * @param theTrsf transformation to apply + */ + SetTrsf(theTrsf: gp_Trsf): void; + /** + * Returns the transformation. + */ + Trsf(): gp_Trsf; + /** + * Returns true if the geometry is a 3D curve (not curve on surface). + */ + Is3DCurve(): boolean; + /** + * Returns true if the geometry is a curve on surface. + */ + IsCurveOnSurface(): boolean; + /** + * Returns the underlying {@link GeomAdaptor_Curve | `GeomAdaptor_Curve`}. + */ + Curve(): unknown; + /** + * Returns the underlying {@link GeomAdaptor_Curve | `GeomAdaptor_Curve`} for modification. + */ + ChangeCurve(): unknown; + /** + * Returns the CurveOnSurface adaptor. + */ + CurveOnSurface(): unknown; + /** + * Returns the underlying {@link Geom_Curve | `Geom_Curve`}. + */ + GeomCurve(): Geom_Curve; + FirstParameter(): number; + LastParameter(): number; + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . + * + * The array must provide enough room to accommodate for the parameters. i.e. T.Length() > `NbIntervals()` + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + Trim(First: number, Last: number, Tol: number): Adaptor3d_Curve; + IsClosed(): boolean; + IsPeriodic(): boolean; + Period(): number; + /** + * Point evaluation. Applies transformation after evaluation. + */ + EvalD0(theU: number): gp_Pnt; + /** + * D1 evaluation. Applies transformation after evaluation. + */ + EvalD1(theU: number): Geom_Curve_ResD1; + /** + * D2 evaluation. Applies transformation after evaluation. + */ + EvalD2(theU: number): Geom_Curve_ResD2; + /** + * D3 evaluation. Applies transformation after evaluation. + */ + EvalD3(theU: number): Geom_Curve_ResD3; + /** + * DN evaluation. Applies transformation after evaluation. + */ + EvalDN(theU: number, theN: number): gp_Vec; + /** + * Returns the parametric resolution corresponding to the real space resolution . + */ + Resolution(R3d: number): number; + /** + * Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve. + */ + GetType(): GeomAbs_CurveType; + Line(): unknown; + Circle(): gp_Circ; + Ellipse(): gp_Elips; + Hyperbola(): unknown; + Parabola(): unknown; + Degree(): number; + IsRational(): boolean; + NbPoles(): number; + NbKnots(): number; + Bezier(): Geom_BezierCurve; + BSpline(): Geom_BSplineCurve; + OffsetCurve(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type GeomEval_RepCurveDesc_Base = unknown; + +export type TopAbs_ShapeEnum = typeof TopAbs_ShapeEnum[keyof typeof TopAbs_ShapeEnum]; +/** + * Identifies various topological shapes. This enumeration allows you to use dynamic typing of shapes. The values are listed in order of complexity, from the most complex to the most simple i.e. COMPOUND > COMPSOLID > SOLID > .... > VERTEX > SHAPE. Any shape can contain simpler shapes in its definition. Abstract topological data structure describes a basic entity, the shape (present in this enumeration as the SHAPE value), which can be divided into the following component topologies: + * + * - COMPOUND: A group of any of the shapes below. + * - COMPSOLID: A set of solids connected by their faces. This expands the notions of WIRE and SHELL to solids. + * - SOLID: A part of 3D space bounded by shells. + * - SHELL: A set of faces connected by some of the edges of their wire boundaries. A shell can be open or closed. + * - FACE: Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a closed wire. Its geometry is constrained (trimmed) by contours. + * - WIRE: A sequence of edges connected by their vertices. It can be open or closed depending on whether the edges are linked or not. + * - EDGE: A single dimensional shape corresponding to a curve, and bound by a vertex at each extremity. + * - VERTEX: A zero-dimensional shape corresponding to a point in geometry. + */ +export declare const TopAbs_ShapeEnum: { + readonly TopAbs_COMPOUND: 'TopAbs_COMPOUND'; + readonly TopAbs_COMPSOLID: 'TopAbs_COMPSOLID'; + readonly TopAbs_SOLID: 'TopAbs_SOLID'; + readonly TopAbs_SHELL: 'TopAbs_SHELL'; + readonly TopAbs_FACE: 'TopAbs_FACE'; + readonly TopAbs_WIRE: 'TopAbs_WIRE'; + readonly TopAbs_EDGE: 'TopAbs_EDGE'; + readonly TopAbs_VERTEX: 'TopAbs_VERTEX'; + readonly TopAbs_SHAPE: 'TopAbs_SHAPE'; +}; + +export type TopAbs_Orientation = typeof TopAbs_Orientation[keyof typeof TopAbs_Orientation]; +/** + * Identifies the orientation of a topological shape. Orientation can represent a relation between two entities, or it can apply to a shape in its own right. + * When used to describe a relation between two shapes, orientation allows you to use the underlying entity in either direction. + * For example on a curve which is oriented FORWARD (say from left to right) you can have both a FORWARD and a REVERSED edge. The FORWARD edge will be oriented from left to right, and the REVERSED edge from right to left. In this way, you share the underlying entity. In other words, two faces of a cube can share an edge, and can also be used to build compound shapes. + * For each case in which an element is used as the boundary of a geometric domain of a higher dimension, this element defines two local regions of which one is arbitrarily considered as the default region. A change in orientation implies a switch of default region. This allows you to apply changes of orientation to the shape as a whole. + */ +export declare const TopAbs_Orientation: { + readonly TopAbs_FORWARD: 'TopAbs_FORWARD'; + readonly TopAbs_REVERSED: 'TopAbs_REVERSED'; + readonly TopAbs_INTERNAL: 'TopAbs_INTERNAL'; + readonly TopAbs_EXTERNAL: 'TopAbs_EXTERNAL'; +}; + +/** + * Describes a portion of a curve (termed the "basis curve") limited by two parameter values inside the parametric domain of the basis curve. The trimmed curve is defined by: + * + * - the basis curve, and + * - the two parameter values which limit it. The trimmed curve can either have the same orientation as the basis curve or the opposite orientation. + */ +export declare class Geom_TrimmedCurve extends Geom_BoundedCurve { + /** + * Constructs a trimmed curve from the basis curve C which is limited between parameter values U1 and U2. Note: - U1 can be greater or less than U2; in both cases, the returned curve is oriented from U1 to U2. + * + * - If the basis curve C is periodic, there is an ambiguity because two parts are available. In this case, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. + * - If the curve is closed but not periodic, it is not possible to keep the part of the curve which includes the junction point (except if the junction point is at the beginning or at the end of the trimmed curve). If you tried to do this, you could alter the fundamental characteristics of the basis curve, which are used, for example, to compute the derivatives of the trimmed curve. The rules for a closed curve are therefore the same as those for an open curve. Warning: The trimmed curve is built from a copy of curve C. Therefore, when C is modified, the trimmed curve is not modified. + * - If the basis curve is periodic and theAdjustPeriodic is True, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. When theAdjustPeriodic is False, parameters U1 and U2 will be the same, without adjustment into the first period. Exceptions Standard_ConstructionError if: + * - C is not periodic and U1 or U2 is outside the bounds of C, or + * - U1 is equal to U2. + */ + constructor(C: Geom_Curve, U1: number, U2: number, Sense?: boolean, theAdjustPeriodic?: boolean); + /** + * Changes the orientation of this trimmed curve. As a result: + * + * - the basis curve is reversed, + * - the start point of the initial curve becomes the end point of the reversed curve, + * - the end point of the initial curve becomes the start point of the reversed curve, + * - the first and last parameters are recomputed. If the trimmed curve was defined by: + * - a basis curve whose parameter range is [ 0., 1. ], + * - the two trim values U1 (first parameter) and U2 (last parameter), the reversed trimmed curve is defined by: + * - the reversed basis curve, whose parameter range is still [ 0., 1. ], + * - the two trim values 1. - U2 (first parameter) and 1. - U1 (last parameter). + */ + Reverse(): void; + /** + * Computes the parameter on the reversed curve for the point of parameter U on this trimmed curve. + */ + ReversedParameter(U: number): number; + /** + * Changes this trimmed curve, by redefining the parameter values U1 and U2 which limit its basis curve. Note: If the basis curve is periodic, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. + * Warning If the basis curve is periodic and theAdjustPeriodic is True, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. When theAdjustPeriodic is False, parameters U1 and U2 will be the same, without adjustment into the first period. Exceptions Standard_ConstructionError if: + * + * - the basis curve is not periodic, and either U1 or U2 are outside the bounds of the basis curve, or + * - U1 is equal to U2. + */ + SetTrim(U1: number, U2: number, Sense?: boolean, theAdjustPeriodic?: boolean): void; + /** + * Returns the basis curve. Warning This function does not return a constant reference. Consequently, any modification of the returned value directly modifies the trimmed curve. + */ + BasisCurve(): Geom_Curve; + /** + * Returns the continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, CN : the order of continuity is infinite. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns true if the degree of continuity of the basis curve of this trimmed curve is at least N. A trimmed curve is at least "C0" continuous. Warnings : The continuity of the trimmed curve can be greater than the continuity of the basis curve because you consider only a part of the basis curve. Raised if N < 0. + */ + IsCN(N: number): boolean; + /** + * Returns the end point of . This point is the evaluation of the curve for the "LastParameter". + */ + EndPoint(): gp_Pnt; + /** + * Returns the value of the first parameter of . The first parameter is the parameter of the "StartPoint" of the trimmed curve. + */ + FirstParameter(): number; + /** + * Returns TRUE if the basis curve is periodic and the trim spans exactly one full period, or if the distance between the StartPoint and the EndPoint is within computational precision. + */ + IsClosed(): boolean; + /** + * Returns TRUE if the basis curve is periodic and the trim spans exactly one full period. Returns FALSE otherwise. + */ + IsPeriodic(): boolean; + /** + * Returns the period of the basis curve of this trimmed curve. Exceptions Standard_NoSuchObject if the basis curve is not periodic. + */ + Period(): number; + /** + * Returns the value of the last parameter of . The last parameter is the parameter of the "EndPoint" of the trimmed curve. + */ + LastParameter(): number; + /** + * Returns the start point of . This point is the evaluation of the curve from the "FirstParameter". value and derivatives Warnings : The returned derivatives have the same orientation as the derivatives of the basis curve even if the trimmed curve has not the same orientation as the basis curve. + */ + StartPoint(): gp_Pnt; + /** + * Returns the point of parameter U. + * + * If the basis curve is an OffsetCurve sometimes it is not possible to do the evaluation of the curve at the parameter U (see class OffsetCurve). + */ + EvalD0(U: number): gp_Pnt; + /** + * Raised if the continuity of the curve is not C1. + */ + EvalD1(U: number): Geom_Curve_ResD1; + /** + * Raised if the continuity of the curve is not C2. + */ + EvalD2(U: number): Geom_Curve_ResD2; + /** + * Raised if the continuity of the curve is not C3. + */ + EvalD3(U: number): Geom_Curve_ResD3; + /** + * N is the order of derivation. Raised if the continuity of the curve is not CN. Raised if N < 1. geometric transformations. + */ + EvalDN(U: number, N: number): gp_Vec; + /** + * Applies the transformation T to this trimmed curve. Warning The basis curve is also modified. + */ + Transform(T: gp_Trsf): void; + /** + * Returns the parameter on the transformed curve for the transform of the point of parameter U on . + * + * me->Transformed(T)->Value(me->TransformedParameter(U,T)) + * + * is the same point as + * + * me->Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + TransformedParameter(U: number, T: gp_Trsf): number; + /** + * Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on . + * + * Transformed(T)->Value(U * ParametricTransformation(T)) + * + * is the same point as + * + * Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + ParametricTransformation(T: gp_Trsf): number; + /** + * Creates a new object which is a copy of this trimmed curve. + */ + Copy(): Geom_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class BoundedCurve describes the common behavior of bounded curves in 3D space. A bounded curve is limited by two finite values of the parameter, termed respectively "first parameter" and "last parameter". The "first parameter" gives the "start point" of the bounded curve, and the "last parameter" gives the "end point" of the bounded curve. The length of a bounded curve is finite. The Geom package provides three concrete classes of bounded curves: + * + * - two frequently used mathematical formulations of complex curves: + * - {@link Geom_BezierCurve | `Geom_BezierCurve`}, + * - {@link Geom_BSplineCurve | `Geom_BSplineCurve`}, and + * - {@link Geom_TrimmedCurve | `Geom_TrimmedCurve`} to trim a curve, i.e. to only take part of the curve limited by two values of the parameter of the basis curve. + */ +export declare class Geom_BoundedCurve extends Geom_Curve { + /** + * Returns the end point of the curve. + */ + EndPoint(): gp_Pnt; + /** + * Returns the start point of the curve. + */ + StartPoint(): gp_Pnt; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a BSpline surface. In each parametric direction, a BSpline surface can be: + * + * - uniform or non-uniform, + * - rational or non-rational, + * - periodic or non-periodic. A BSpline surface is defined by: + * - its degrees, in the u and v parametric directions, + * - its periodic characteristic, in the u and v parametric directions, + * - a table of poles, also called control points (together with the associated weights if the surface is rational), and + * - a table of knots, together with the associated multiplicities. The degree of a {@link Geom_BSplineSurface | `Geom_BSplineSurface`} is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree. Poles and Weights Poles and Weights are manipulated using two associative double arrays: + * - the poles table, which is a double array of {@link gp_Pnt | `gp_Pnt`} points, and + * - the weights table, which is a double array of reals. The bounds of the poles and weights arrays are: + * - 1 and NbUPoles for the row bounds (provided that the BSpline surface is not periodic in the u parametric direction), where NbUPoles is the number of poles of the surface in the u parametric direction, and + * - 1 and NbVPoles for the column bounds (provided that the BSpline surface is not periodic in the v parametric direction), where NbVPoles is the number of poles of the surface in the v parametric direction. The poles of the surface are the points used to shape and reshape the surface. They comprise a rectangular network. If the surface is not periodic: + * - The points (1, 1), (NbUPoles, 1), (1, NbVPoles), and (NbUPoles, NbVPoles) are the four parametric "corners" of the surface. + * - The first column of poles and the last column of poles define two BSpline curves which delimit the surface in the v parametric direction. These are the v isoparametric curves corresponding to the two bounds of the v parameter. + * - The first row of poles and the last row of poles define two BSpline curves which delimit the surface in the u parametric direction. These are the u isoparametric curves corresponding to the two bounds of the u parameter. If the surface is periodic, these geometric properties are not verified. It is more difficult to define a geometrical significance for the weights. However they are useful for representing a quadric surface precisely. + * Moreover, if the weights of all the poles are equal, the surface has a polynomial equation, and hence is a "non-rational surface". The non-rational surface is a special, but frequently used, case, where all poles have identical weights. The weights are defined and used only in the case of a rational surface. The rational characteristic is defined in each parametric direction. A surface can be rational in the u parametric direction, and non-rational in the v parametric direction. + * Knots and Multiplicities For a {@link Geom_BSplineSurface | `Geom_BSplineSurface`} the table of knots is made up of two increasing sequences of reals, without repetition, one for each parametric direction. The multiplicities define the repetition of the knots. A BSpline surface comprises multiple contiguous patches, which are themselves polynomial or rational surfaces. The knots are the parameters of the isoparametric curves which limit these contiguous patches. + * The multiplicity of a knot on a BSpline surface (in a given parametric direction) is related to the degree of continuity of the surface at that knot in that parametric direction: Degree of continuity at knot(i) = Degree - Multi(i) where: + * - Degree is the degree of the BSpline surface in the given parametric direction, and + * - Multi(i) is the multiplicity of knot number i in the given parametric direction. There are some special cases, where the knots are regularly spaced in one parametric direction (i.e. the difference between two consecutive knots is a constant). + * - "Uniform": all the multiplicities are equal to 1. + * - "Quasi-uniform": all the multiplicities are equal to 1, except for the first and last knots in this parametric direction, and these are equal to Degree + 1. + * - "Piecewise Bezier": all the multiplicities are equal to Degree except for the first and last knots, which are equal to Degree + 1. This surface is a concatenation of Bezier patches in the given parametric direction. If the BSpline surface is not periodic in a given parametric direction, the bounds of the knots and multiplicities tables are 1 and NbKnots, where NbKnots is the number of knots of the BSpline surface in that parametric direction. If the BSpline surface is periodic in a given parametric direction, and there are k periodic knots and p periodic poles in that parametric direction: + * - the period is such that: period = Knot(k+1) - Knot(1), and + * - the poles and knots tables in that parametric direction can be considered as infinite tables, such that: Knot(i+k) = Knot(i) + period, and Pole(i+p) = Pole(i) Note: The data structure tables for a periodic BSpline surface are more complex than those of a non-periodic one. References : . A survey of curve and surface methods in CADG Wolfgang BOHM CAGD 1 (1984) . On de Boor-like algorithms and blossoming Wolfgang BOEHM cagd 5 (1988) . Blossoming and knot insertion algorithms for B-spline curves Ronald N. GOLDMAN . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA . Curves and Surfaces for Computer Aided Geometric Design, a practical guide Gerald Farin + */ +export declare class Geom_BSplineSurface extends Geom_BoundedSurface { + /** + * Copy constructor for optimized copying without validation. + * @param theOther the BSpline surface to copy from + */ + constructor(theOther: Geom_BSplineSurface); + /** + * Creates a non-rational b-spline surface (weights default value is 1.). The following conditions must be verified. 0 < UDegree <= MaxDegree. UKnots.Length() == UMults.Length() >= 2 UKnots(i) < UKnots(i+1) (Knots are increasing) 1 <= UMults(i) <= UDegree On a non uperiodic surface the first and last umultiplicities may be UDegree+1 (this is even recommended if you want the curve to start and finish on the first and last pole). + * On a uperiodic surface the first and the last umultiplicities must be the same. on non-uperiodic surfaces Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2 on uperiodic surfaces Poles.ColLength() == Sum(UMults(i)) except the first or last The previous conditions for U holds also for V, with the RowLength of the poles. + */ + constructor(Poles: NCollection_Array2_gp_Pnt, UKnots: NCollection_Array1_double, VKnots: NCollection_Array1_double, UMults: NCollection_Array1_int, VMults: NCollection_Array1_int, UDegree: number, VDegree: number, UPeriodic?: boolean, VPeriodic?: boolean); + /** + * Creates a non-rational b-spline surface (weights default value is 1.). + * + * The following conditions must be verified. 0 < UDegree <= MaxDegree. + * + * UKnots.Length() == UMults.Length() >= 2 + * + * UKnots(i) < UKnots(i+1) (Knots are increasing) 1 <= UMults(i) <= UDegree + * + * On a non uperiodic surface the first and last umultiplicities may be UDegree+1 (this is even recommended if you want the curve to start and finish on the first and last pole). + * + * On a uperiodic surface the first and the last umultiplicities must be the same. + * + * on non-uperiodic surfaces + * + * Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2 + * + * on uperiodic surfaces + * + * Poles.ColLength() == Sum(UMults(i)) except the first or last + * + * The previous conditions for U holds also for V, with the RowLength of the poles. + */ + constructor(Poles: NCollection_Array2_gp_Pnt, Weights: NCollection_Array2_double, UKnots: NCollection_Array1_double, VKnots: NCollection_Array1_double, UMults: NCollection_Array1_int, VMults: NCollection_Array1_int, UDegree: number, VDegree: number, UPeriodic?: boolean, VPeriodic?: boolean); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): GeomEval_RepSurfaceDesc_Base; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: GeomEval_RepSurfaceDesc_Base): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Exchanges the u and v parametric directions on this BSpline surface. As a consequence: + * + * - the poles and weights tables are transposed, + * - the knots and multiplicities tables are exchanged, + * - degrees of continuity, and rational, periodic and uniform characteristics are exchanged, and + * - the orientation of the surface is inverted. + */ + ExchangeUV(): void; + /** + * Sets the surface U periodic. Modifies this surface to be periodic in the U parametric direction. To become periodic in a given parametric direction a surface must be closed in that parametric direction, and the knot sequence relative to that direction must be periodic. To generate this periodic sequence of knots, the functions FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2. + * These are the indexes, in the knot array associated with the given parametric direction, of the knots that correspond to the first and last parameters of this BSpline surface in the given parametric direction. Hence the period is: Knots(I1) - Knots(I2) As a result, the knots and poles tables are modified. Exceptions Standard_ConstructionError if the surface is not closed in the given parametric direction. + */ + SetUPeriodic(): void; + /** + * Sets the surface V periodic. Modifies this surface to be periodic in the V parametric direction. To become periodic in a given parametric direction a surface must be closed in that parametric direction, and the knot sequence relative to that direction must be periodic. To generate this periodic sequence of knots, the functions FirstVKnotIndex and LastVKnotIndex are used to compute I1 and I2. + * These are the indexes, in the knot array associated with the given parametric direction, of the knots that correspond to the first and last parameters of this BSpline surface in the given parametric direction. Hence the period is: Knots(I1) - Knots(I2) As a result, the knots and poles tables are modified. Exceptions Standard_ConstructionError if the surface is not closed in the given parametric direction. + */ + SetVPeriodic(): void; + /** + * returns the parameter normalized within the period if the surface is periodic : otherwise does not do anything + * @returns A result object with fields: + * - `U`: updated value from the call. + * - `V`: updated value from the call. + */ + PeriodicNormalization(U?: number, V?: number): { U: number; V: number }; + /** + * Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction. + */ + SetUOrigin(Index: number): void; + /** + * Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction. + */ + SetVOrigin(Index: number): void; + /** + * Sets the surface U not periodic. Changes this BSpline surface into a non-periodic surface along U direction. If this surface is already non-periodic, it is not modified. Note: the poles and knots tables are modified. + */ + SetUNotPeriodic(): void; + /** + * Sets the surface V not periodic. Changes this BSpline surface into a non-periodic surface along V direction. If this surface is already non-periodic, it is not modified. Note: the poles and knots tables are modified. + */ + SetVNotPeriodic(): void; + /** + * Changes the orientation of this BSpline surface in the U parametric direction. The bounds of the surface are not changed but the given parametric direction is reversed. Hence the orientation of the surface is reversed. The knots and poles tables are modified. + */ + UReverse(): void; + /** + * Changes the orientation of this BSpline surface in the V parametric direction. The bounds of the surface are not changed but the given parametric direction is reversed. Hence the orientation of the surface is reversed. The knots and poles tables are modified. + */ + VReverse(): void; + /** + * Computes the u parameter on the modified surface, produced by reversing its U parametric direction, for the point of u parameter U, on this BSpline surface. For a BSpline surface, these functions return respectively: + * + * - UFirst + ULast - U, where UFirst, ULast are the values of the first and last parameters of this BSpline surface, in the u parametric directions. + */ + UReversedParameter(U: number): number; + /** + * Computes the v parameter on the modified surface, produced by reversing its V parametric direction, for the point of v parameter V on this BSpline surface. For a BSpline surface, these functions return respectively: + * + * - VFirst + VLast - V, VFirst and VLast are the values of the first and last parameters of this BSpline surface, in the v pametric directions. + */ + VReversedParameter(V: number): number; + /** + * Increases the degrees of this BSpline surface to UDegree and VDegree in the u and v parametric directions respectively. As a result, the tables of poles, weights and multiplicities are modified. The tables of knots is not changed. Note: Nothing is done if the given degree is less than or equal to the current degree in the corresponding parametric direction. Exceptions Standard_ConstructionError if UDegree or VDegree is greater than `Geom_BSplineSurface::MaxDegree()`. + */ + IncreaseDegree(UDegree: number, VDegree: number): void; + /** + * Inserts into the knots table for the U parametric direction of this BSpline surface: + * + * - the values of the array Knots, with their respective multiplicities, Mults. If the knot value to insert already exists in the table, its multiplicity is: + * - increased by M, if Add is true (the default), or + * - increased to M, if Add is false. The tolerance criterion used to check the equality of the knots is the larger of the values ParametricTolerance and double::Epsilon(val), where val is the knot value to be inserted. Warning + * - If a given multiplicity coefficient is null, or negative, nothing is done. + * - The new multiplicity of a knot is limited to the degree of this BSpline surface in the corresponding parametric direction. Exceptions Standard_ConstructionError if a knot value to insert is outside the bounds of this BSpline surface in the specified parametric direction. The comparison uses the precision criterion ParametricTolerance. + */ + InsertUKnots(Knots: NCollection_Array1_double, Mults: NCollection_Array1_int, ParametricTolerance?: number, Add?: boolean): void; + /** + * Inserts into the knots table for the V parametric direction of this BSpline surface: + * + * - the values of the array Knots, with their respective multiplicities, Mults. If the knot value to insert already exists in the table, its multiplicity is: + * - increased by M, if Add is true (the default), or + * - increased to M, if Add is false. The tolerance criterion used to check the equality of the knots is the larger of the values ParametricTolerance and double::Epsilon(val), where val is the knot value to be inserted. Warning + * - If a given multiplicity coefficient is null, or negative, nothing is done. + * - The new multiplicity of a knot is limited to the degree of this BSpline surface in the corresponding parametric direction. Exceptions Standard_ConstructionError if a knot value to insert is outside the bounds of this BSpline surface in the specified parametric direction. The comparison uses the precision criterion ParametricTolerance. + */ + InsertVKnots(Knots: NCollection_Array1_double, Mults: NCollection_Array1_int, ParametricTolerance?: number, Add?: boolean): void; + /** + * Reduces to M the multiplicity of the knot of index Index in the U parametric direction. If M is 0, the knot is removed. With a modification of this type, the table of poles is also modified. Two different algorithms are used systematically to compute the new poles of the surface. + * For each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is checked. If this distance is less than Tolerance it ensures that the surface is not modified by more than Tolerance. Under these conditions, the function returns true; otherwise, it returns false. A low tolerance prevents modification of the surface. A high tolerance "smoothes" the surface. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of this BSpline surface. + */ + RemoveUKnot(Index: number, M: number, Tolerance: number): boolean; + /** + * Reduces to M the multiplicity of the knot of index Index in the V parametric direction. If M is 0, the knot is removed. With a modification of this type, the table of poles is also modified. Two different algorithms are used systematically to compute the new poles of the surface. + * For each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is checked. If this distance is less than Tolerance it ensures that the surface is not modified by more than Tolerance. Under these conditions, the function returns true; otherwise, it returns false. A low tolerance prevents modification of the surface. A high tolerance "smoothes" the surface. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of this BSpline surface. + */ + RemoveVKnot(Index: number, M: number, Tolerance: number): boolean; + /** + * Increases the multiplicity of the knot of range UIndex in the UKnots sequence. M is the new multiplicity. M must be greater than the previous multiplicity and lower or equal to the degree of the surface in the U parametric direction. Raised if M is not in the range [1, UDegree]. + * + * Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name. + */ + IncreaseUMultiplicity(UIndex: number, M: number): void; + /** + * Increases until order M the multiplicity of the set of knots FromI1,...., ToI2 in the U direction. This method can be used to make a B_spline surface into a PiecewiseBezier B_spline surface. If was uniform, it can become non uniform. + * + * Raised if FromI1 or ToI2 is out of the range [FirstUKnotIndex, LastUKnotIndex]. + * + * M should be greater than the previous multiplicity of the all the knots FromI1,..., ToI2 and lower or equal to the Degree of the surface in the U parametric direction. + */ + IncreaseUMultiplicity(FromI1: number, ToI2: number, M: number): void; + /** + * Increments the multiplicity of the consecutives uknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,.....,ToI2 must be lower or equal to the UDegree of the B_spline. + * + * Raised if FromI1 or ToI2 is not in the range [FirstUKnotIndex, LastUKnotIndex] + * + * Raised if one knot has a multiplicity greater than UDegree. + */ + IncrementUMultiplicity(FromI1: number, ToI2: number, Step: number): void; + /** + * Increases the multiplicity of a knot in the V direction. M is the new multiplicity. + * + * M should be greater than the previous multiplicity and lower than the degree of the surface in the V parametric direction. + * + * Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. + */ + IncreaseVMultiplicity(VIndex: number, M: number): void; + /** + * Increases until order M the multiplicity of the set of knots FromI1,...., ToI2 in the V direction. This method can be used to make a BSplineSurface into a PiecewiseBezier B_spline surface. If was uniform, it can become non-uniform. + * + * Raised if FromI1 or ToI2 is out of the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. + * + * M should be greater than the previous multiplicity of the all the knots FromI1,..., ToI2 and lower or equal to the Degree of the surface in the V parametric direction. + */ + IncreaseVMultiplicity(FromI1: number, ToI2: number, M: number): void; + /** + * Increments the multiplicity of the consecutives vknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,.....,ToI2 must be lower or equal to the VDegree of the B_spline. + * + * Raised if FromI1 or ToI2 is not in the range [FirstVKnotIndex, LastVKnotIndex] + * + * Raised if one knot has a multiplicity greater than VDegree. + */ + IncrementVMultiplicity(FromI1: number, ToI2: number, Step: number): void; + /** + * Inserts a knot value in the sequence of UKnots. If U is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M else it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. + * + * Raised if U is out of the bounds [U1, U2] given by the methods Bounds, the criterion ParametricTolerance is used. Raised if M is not in the range [1, UDegree]. + */ + InsertUKnot(U: number, M: number, ParametricTolerance: number, Add?: boolean): void; + /** + * Inserts a knot value in the sequence of VKnots. If V is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M otherwise it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. + * + * raises if V is out of the Bounds [V1, V2] given by the methods Bounds, the criterion ParametricTolerance is used. raises if M is not in the range [1, VDegree]. + */ + InsertVKnot(V: number, M: number, ParametricTolerance: number, Add?: boolean): void; + /** + * Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. The control points are modified, the first and the last point are not the same. + * + * Parameters theUTolerance, theVTolerance define the possible proximity along the corresponding direction of the segment boundaries and B-spline knots to treat them as equal. + * + * Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface or if the surface makes loop. raises if U2 < U1 or V2 < V1. Standard_DomainError if U2 - U1 exceeds the uperiod for uperiodic surfaces. i.e. ((U2 - U1) - UPeriod) > `Precision::PConfusion()`. Standard_DomainError if V2 - V1 exceeds the vperiod for vperiodic surfaces. i.e. ((V2 - V1) - VPeriod) > `Precision::PConfusion()`). + */ + Segment(U1: number, U2: number, V1: number, V2: number, theUTolerance?: number, theVTolerance?: number): void; + /** + * Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. + * + * same as Segment but do nothing if U1 and U2 (resp. V1 and V2) are equal to the bounds in U (resp. in V) of . For example, if is periodic in V, it will be always periodic in V after the segmentation if the bounds in V are unchanged + * + * Parameters theUTolerance, theVTolerance define the possible proximity along the corresponding direction of the segment boundaries and B-spline knots to treat them as equal. + * + * Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface or if the surface makes loop. raises if U2 < U1 or V2 < V1. Standard_DomainError if U2 - U1 exceeds the uperiod for uperiodic surfaces. i.e. ((U2 - U1) - UPeriod) > `Precision::PConfusion()`. Standard_DomainError if V2 - V1 exceeds the vperiod for vperiodic surfaces. i.e. ((V2 - V1) - VPeriod) > `Precision::PConfusion()`). + */ + CheckAndSegment(U1: number, U2: number, V1: number, V2: number, theUTolerance?: number, theVTolerance?: number): void; + /** + * Substitutes the UKnots of range UIndex with K. + * + * Raised if UIndex < 1 or UIndex > NbUKnots + * + * Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1) + */ + SetUKnot(UIndex: number, K: number): void; + /** + * Changes the value of the UKnots of range UIndex and increases its multiplicity. + * + * Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name. + * + * Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1) M must be lower than UDegree and greater than the previous multiplicity of the knot of range UIndex. + */ + SetUKnot(UIndex: number, K: number, M: number): void; + /** + * Changes all the U-knots of the surface. The multiplicity of the knots are not modified. + * + * Raised if there is an index such that UK (Index+1) <= UK (Index). + * + * Raised if UK.Lower() < 1 or UK.Upper() > NbUKnots + */ + SetUKnots(UK: NCollection_Array1_double): void; + /** + * Substitutes the VKnots of range VIndex with K. + * + * Raised if VIndex < 1 or VIndex > NbVKnots + * + * Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1) + */ + SetVKnot(VIndex: number, K: number): void; + /** + * Changes the value of the VKnots of range VIndex and increases its multiplicity. + * + * Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. + * + * Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1) M must be lower than VDegree and greater than the previous multiplicity of the knot of range VIndex. + */ + SetVKnot(VIndex: number, K: number, M: number): void; + /** + * Changes all the V-knots of the surface. The multiplicity of the knots are not modified. + * + * Raised if there is an index such that VK (Index+1) <= VK (Index). + * + * Raised if VK.Lower() < 1 or VK.Upper() > NbVKnots + */ + SetVKnots(VK: NCollection_Array1_double): void; + /** + * Locates the parametric value U in the sequence of UKnots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. UKnots (I1) <= U <= UKnots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < UKnots(1) - std::abs(ParametricTolerance) . if I2 > NbUKnots => U > UKnots(NbUKnots)+std::abs(ParametricTolerance). + * @returns A result object with fields: + * - `I1`: updated value from the call. + * - `I2`: updated value from the call. + */ + LocateU(U: number, ParametricTolerance: number, I1: number, I2: number, WithKnotRepetition: boolean): { I1: number; I2: number }; + /** + * Locates the parametric value V in the sequence of knots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. + * VKnots (I1) <= V <= VKnots (I2) . if I1 = I2 V is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => V < VKnots(1) - std::abs(ParametricTolerance) . if I2 > NbVKnots => V > VKnots(NbVKnots)+std::abs(ParametricTolerance) poles insertion and removing The following methods are available only if the surface is Uniform or QuasiUniform in the considered direction The knot repartition is modified. + * @returns A result object with fields: + * - `I1`: updated value from the call. + * - `I2`: updated value from the call. + */ + LocateV(V: number, ParametricTolerance: number, I1: number, I2: number, WithKnotRepetition: boolean): { I1: number; I2: number }; + /** + * Substitutes the pole of range (UIndex, VIndex) with P. If the surface is rational the weight of range (UIndex, VIndex) is not modified. + * + * Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. + */ + SetPole(UIndex: number, VIndex: number, P: gp_Pnt): void; + /** + * Substitutes the pole and the weight of range (UIndex, VIndex) with P and W. + * + * Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp. + */ + SetPole(UIndex: number, VIndex: number, P: gp_Pnt, Weight: number): void; + /** + * Changes a column of poles or a part of this column. Raised if Vindex < 1 or VIndex > NbVPoles. + * + * Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles. + */ + SetPoleCol(VIndex: number, CPoles: NCollection_Array1_gp_Pnt): void; + /** + * Changes a column of poles or a part of this column with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. Raised if Vindex < 1 or VIndex > NbVPoles. + * + * Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles Raised if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp. + */ + SetPoleCol(VIndex: number, CPoles: NCollection_Array1_gp_Pnt, CPoleWeights: NCollection_Array1_double): void; + /** + * Changes a row of poles or a part of this row with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. Raised if Uindex < 1 or UIndex > NbUPoles. + * + * Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles raises if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp. + */ + SetPoleRow(UIndex: number, CPoles: NCollection_Array1_gp_Pnt, CPoleWeights: NCollection_Array1_double): void; + /** + * Changes a row of poles or a part of this row. Raised if Uindex < 1 or UIndex > NbUPoles. + * + * Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles. + */ + SetPoleRow(UIndex: number, CPoles: NCollection_Array1_gp_Pnt): void; + /** + * Changes the weight of the pole of range UIndex, VIndex. If the surface was non rational it can become rational. If the surface was rational it can become non rational. + * + * Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles + * + * Raised if weight is lower or equal to Resolution from package gp + */ + SetWeight(UIndex: number, VIndex: number, Weight: number): void; + /** + * Changes a column of weights of a part of this column. + * + * Raised if VIndex < 1 or VIndex > NbVPoles + * + * Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbUPoles. Raised if a weight value is lower or equal to Resolution from package gp. + */ + SetWeightCol(VIndex: number, CPoleWeights: NCollection_Array1_double): void; + /** + * Changes a row of weights or a part of this row. + * + * Raised if UIndex < 1 or UIndex > NbUPoles + * + * Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbVPoles. Raised if a weight value is lower or equal to Resolution from package gp. + */ + SetWeightRow(UIndex: number, CPoleWeights: NCollection_Array1_double): void; + /** + * Move a point with parameter U and V to P. given u,v as parameters) to reach a new position UIndex1, UIndex2, VIndex1, VIndex2: indicates the poles which can be moved if Problem in BSplineBasis calculation, no change for the curve and UFirstIndex, VLastIndex = 0 VFirstIndex, VLastIndex = 0. + * + * Raised if UIndex1 < UIndex2 or VIndex1 < VIndex2 or UIndex1 < 1 || UIndex1 > NbUPoles or UIndex2 < 1 || UIndex2 > NbUPoles VIndex1 < 1 || VIndex1 > NbVPoles or VIndex2 < 1 || VIndex2 > NbVPoles characteristics of the surface + * @returns A result object with fields: + * - `UFirstIndex`: updated value from the call. + * - `ULastIndex`: updated value from the call. + * - `VFirstIndex`: updated value from the call. + * - `VLastIndex`: updated value from the call. + */ + MovePoint(U: number, V: number, P: gp_Pnt, UIndex1: number, UIndex2: number, VIndex1: number, VIndex2: number, UFirstIndex?: number, ULastIndex?: number, VFirstIndex?: number, VLastIndex?: number): { UFirstIndex: number; ULastIndex: number; VFirstIndex: number; VLastIndex: number }; + /** + * Returns true if the first control points row and the last control points row are identical. The tolerance criterion is Resolution from package gp. + */ + IsUClosed(): boolean; + /** + * Returns true if the first control points column and the last last control points column are identical. The tolerance criterion is Resolution from package gp. + */ + IsVClosed(): boolean; + /** + * Returns True if the order of continuity of the surface in the U direction is N. Raised if N < 0. + */ + IsCNu(N: number): boolean; + /** + * Returns True if the order of continuity of the surface in the V direction is N. Raised if N < 0. + */ + IsCNv(N: number): boolean; + /** + * Returns True if the surface is closed in the U direction and if the B-spline has been turned into a periodic surface using the function SetUPeriodic. + */ + IsUPeriodic(): boolean; + /** + * Returns False if for each row of weights all the weights are identical. The tolerance criterion is resolution from package gp. Example : |1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|. + */ + IsURational(): boolean; + /** + * Returns True if the surface is closed in the V direction and if the B-spline has been turned into a periodic surface using the function SetVPeriodic. + */ + IsVPeriodic(): boolean; + /** + * Returns False if for each column of weights all the weights are identical. The tolerance criterion is resolution from package gp. Examples : |1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|. + */ + IsVRational(): boolean; + /** + * Returns the parametric bounds of the surface. Warnings : These parametric values are the bounds of the array of knots UKnots and VKnots only if the first knots and the last knots have a multiplicity equal to UDegree + 1 or VDegree + 1. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + * - `V1`: updated value from the call. + * - `V2`: updated value from the call. + */ + Bounds(U1: number, U2: number, V1: number, V2: number): { U1: number; U2: number; V1: number; V2: number }; + /** + * Returns the continuity of the surface : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Surface, C2 : continuity of the second derivative all along the Surface, C3 : continuity of the third derivative all along the Surface, CN : the order of continuity is infinite. + * A B-spline surface is infinitely continuously differentiable for the couple of parameters U, V such that U != UKnots(i) and V != VKnots(i). The continuity of the surface at a knot value depends on the multiplicity of this knot. Example : If the surface is C1 in the V direction and C2 in the U direction this function returns Shape = C1. + */ + Continuity(): GeomAbs_Shape; + /** + * Computes the Index of the UKnots which gives the first parametric value of the surface in the U direction. The UIso curve corresponding to this value is a boundary curve of the surface. + */ + FirstUKnotIndex(): number; + /** + * Computes the Index of the VKnots which gives the first parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface. + */ + FirstVKnotIndex(): number; + /** + * Computes the Index of the UKnots which gives the last parametric value of the surface in the U direction. The UIso curve corresponding to this knot is a boundary curve of the surface. + */ + LastUKnotIndex(): number; + /** + * Computes the Index of the VKnots which gives the last parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface. + */ + LastVKnotIndex(): number; + /** + * Returns the number of knots in the U direction. + */ + NbUKnots(): number; + /** + * Returns number of poles in the U direction. + */ + NbUPoles(): number; + /** + * Returns the number of knots in the V direction. + */ + NbVKnots(): number; + /** + * Returns the number of poles in the V direction. + */ + NbVPoles(): number; + /** + * Returns the pole of range (UIndex, VIndex). + * + * Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. + */ + Pole(UIndex: number, VIndex: number): gp_Pnt; + /** + * Returns the poles of the B-spline surface. + * + * Raised if the length of P in the U and V direction is not equal to NbUpoles and NbVPoles. + * @param P Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Poles(P: NCollection_Array2_gp_Pnt): void; + /** + * Returns the poles of the B-spline surface. + */ + Poles(): NCollection_Array2_gp_Pnt; + /** + * Returns the degree of the normalized B-splines Ni,n in the U direction. + */ + UDegree(): number; + /** + * Returns the Knot value of range UIndex. Raised if UIndex < 1 or UIndex > NbUKnots. + */ + UKnot(UIndex: number): number; + /** + * Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the U direction the B-spline surface can be : + * + * - Uniform if all the knots are of multiplicity 1, + * - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, + * - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the U direction The tolerance criterion is Resolution from package gp. + */ + UKnotDistribution(): unknown; + /** + * Returns the knots in the U direction. + * + * Raised if the length of Ku is not equal to the number of knots in the U direction. + * @param Ku Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + UKnots(Ku: NCollection_Array1_double): void; + /** + * Returns the knots in the U direction. + */ + UKnots(): NCollection_Array1_double; + /** + * Returns the uknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + * + * Raised if the length of Ku is not equal to NbUPoles + UDegree + 1 + * @param Ku Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + UKnotSequence(Ku: NCollection_Array1_double): void; + /** + * Returns the uknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + */ + UKnotSequence(): NCollection_Array1_double; + /** + * Returns the multiplicity value of knot of range UIndex in the u direction. Raised if UIndex < 1 or UIndex > NbUKnots. + */ + UMultiplicity(UIndex: number): number; + /** + * Returns the multiplicities of the knots in the U direction. + * + * Raised if the length of Mu is not equal to the number of knots in the U direction. + * @param Mu Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + UMultiplicities(Mu: NCollection_Array1_int): void; + /** + * Returns the multiplicities of the knots in the U direction. + */ + UMultiplicities(): NCollection_Array1_int; + /** + * Returns the degree of the normalized B-splines Ni,d in the V direction. + */ + VDegree(): number; + /** + * Returns the Knot value of range VIndex. Raised if VIndex < 1 or VIndex > NbVKnots. + */ + VKnot(VIndex: number): number; + /** + * Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the V direction the B-spline surface can be : + * + * - Uniform if all the knots are of multiplicity 1, + * - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, + * - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the V direction. The tolerance criterion is Resolution from package gp. + */ + VKnotDistribution(): unknown; + /** + * Returns the knots in the V direction. + * + * Raised if the length of Kv is not equal to the number of knots in the V direction. + * @param Kv Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + VKnots(Kv: NCollection_Array1_double): void; + /** + * Returns the knots in the V direction. + */ + VKnots(): NCollection_Array1_double; + /** + * Returns the vknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Kv = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + * + * Raised if the length of Kv is not equal to NbVPoles + VDegree + 1 + * @param Kv Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + VKnotSequence(Kv: NCollection_Array1_double): void; + /** + * Returns the vknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + */ + VKnotSequence(): NCollection_Array1_double; + /** + * Returns the multiplicity value of knot of range VIndex in the v direction. Raised if VIndex < 1 or VIndex > NbVKnots. + */ + VMultiplicity(VIndex: number): number; + /** + * Returns the multiplicities of the knots in the V direction. + * + * Raised if the length of Mv is not equal to the number of knots in the V direction. + * @param Mv Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + VMultiplicities(Mv: NCollection_Array1_int): void; + /** + * Returns the multiplicities of the knots in the V direction. + */ + VMultiplicities(): NCollection_Array1_int; + /** + * Returns the weight value of range UIndex, VIndex. + * + * Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. + */ + Weight(UIndex: number, VIndex: number): number; + /** + * Returns the weights of the B-spline surface. + * + * Raised if the length of W in the U and V direction is not equal to NbUPoles and NbVPoles. + * @param W Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Weights(W: NCollection_Array2_double): void; + /** + * Returns the weights of the B-spline surface. value and derivatives computation. + */ + Weights(): NCollection_Array2_double; + /** + * Returns a const reference to the weights array. For rational surfaces: the internal owning weights array. For non-rational surfaces: a non-owning view of unit weights from {@link BSplSLib | `BSplSLib`}. The array is always sized to match `NbUPoles()` x `NbVPoles()`. + * @remarks **Warning:** Do NOT modify elements through the returned reference. + */ + WeightsArray(): NCollection_Array2_double; + /** + * Computes the point of parameter (U, V) on the surface. Raises an exception on failure. + */ + EvalD0(U: number, V: number): gp_Pnt; + /** + * Computes the point and first partial derivatives at (U, V). Raises an exception if the surface continuity is not C1. + */ + EvalD1(U: number, V: number): Geom_Surface_ResD1; + /** + * Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception if the surface continuity is not C2. + */ + EvalD2(U: number, V: number): Geom_Surface_ResD2; + /** + * Computes the point and partial derivatives up to 3rd order at (U, V). Raises an exception if the surface continuity is not C3. + */ + EvalD3(U: number, V: number): Geom_Surface_ResD3; + /** + * Computes the derivative of order Nu in U and Nv in V at (U, V). Raises an exception on failure. + * + * Raised if the continuity of the surface is not CNu in the U direction and CNv in the V direction. + * + * Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. + * + * The following functions computes the point for the parametric values (U, V) and the derivatives at this point on the B-spline surface patch delimited with the knots FromUK1, FromVK1 and the knots ToUK2, ToVK2. (U, V) can be out of these parametric bounds but for the computation we only use the definition of the surface between these knots. + * This method is useful to compute local derivative, if the order of continuity of the whole surface is not greater enough. + * Inside the parametric knot's domain previously defined the evaluations are the same as if we consider the whole definition of the surface. Of course the evaluations are different outside this parametric domain. + */ + EvalDN(U: number, V: number, Nu: number, Nv: number): gp_Vec; + /** + * Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + LocalD0(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, P: gp_Pnt): void; + /** + * Raised if the local continuity of the surface is not C1 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + */ + LocalD1(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; + /** + * Raised if the local continuity of the surface is not C2 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + * @param D2U Mutated in place; read the updated value from this argument after the call. + * @param D2V Mutated in place; read the updated value from this argument after the call. + * @param D2UV Mutated in place; read the updated value from this argument after the call. + */ + LocalD2(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; + /** + * Raised if the local continuity of the surface is not C3 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + * @param D2U Mutated in place; read the updated value from this argument after the call. + * @param D2V Mutated in place; read the updated value from this argument after the call. + * @param D2UV Mutated in place; read the updated value from this argument after the call. + * @param D3U Mutated in place; read the updated value from this argument after the call. + * @param D3V Mutated in place; read the updated value from this argument after the call. + * @param D3UUV Mutated in place; read the updated value from this argument after the call. + * @param D3UVV Mutated in place; read the updated value from this argument after the call. + */ + LocalD3(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec): void; + /** + * Raised if the local continuity of the surface is not CNu between the knots FromUK1, ToUK2 and CNv between the knots FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. + */ + LocalDN(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, Nu: number, Nv: number): gp_Vec; + /** + * Computes the point of parameter U, V on the BSpline surface patch defines between the knots UK1 UK2, VK1, VK2. U can be out of the bounds [Knot UK1, Knot UK2] and V can be outof the bounds [Knot VK1, Knot VK2] but for the computation we only use the definition of the surface between these knot values. Raises if FromUK1 = ToUK2 or FromVK1 = ToVK2. + */ + LocalValue(U: number, V: number, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number): gp_Pnt; + /** + * Computes the U isoparametric curve. A B-spline curve is returned. + */ + UIso(U: number): Geom_Curve; + /** + * Computes the U isoparametric curve. If CheckRational=False, no try to make it non-rational. A B-spline curve is returned. + */ + UIso(U: number, CheckRational: boolean): Geom_Curve; + /** + * Computes the V isoparametric curve. A B-spline curve is returned. + */ + VIso(V: number): Geom_Curve; + /** + * Computes the V isoparametric curve. If CheckRational=False, no try to make it non-rational. A B-spline curve is returned. transformations. + */ + VIso(V: number, CheckRational: boolean): Geom_Curve; + /** + * Applies the transformation T to this BSpline surface. + */ + Transform(T: gp_Trsf): void; + /** + * Returns the value of the maximum degree of the normalized B-spline basis functions in the u and v directions. + */ + static MaxDegree(): number; + /** + * Computes two tolerance values for this BSpline surface, based on the given tolerance in 3D space Tolerance3D. The tolerances computed are: + * + * - UTolerance in the u parametric direction, and + * - VTolerance in the v parametric direction. If f(u,v) is the equation of this BSpline surface, UTolerance and VTolerance guarantee that : | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D + * @returns A result object with fields: + * - `UTolerance`: updated value from the call. + * - `VTolerance`: updated value from the call. + */ + Resolution(Tolerance3D: number, UTolerance?: number, VTolerance?: number): { UTolerance: number; VTolerance: number }; + /** + * Creates a new object which is a copy of this BSpline surface. + */ + Copy(): Geom_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Definition of the B_spline curve. A B-spline curve can be Uniform or non-uniform Rational or non-rational Periodic or non-periodic. + * + * a b-spline curve is defined by : its degree; the degree for a {@link Geom_BSplineCurve | `Geom_BSplineCurve`} is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree; + * + * - its periodic or non-periodic nature; + * - a table of poles (also called control points), with their associated weights if the BSpline curve is rational. The poles of the curve are "control points" used to deform the curve. If the curve is non-periodic, the first pole is the start point of the curve, and the last pole is the end point of the curve. + * The segment which joins the first pole to the second pole is the tangent to the curve at its start point, and the segment which joins the last pole to the second-from-last pole is the tangent to the curve at its end point. If the curve is periodic, these geometric properties are not verified. It is more difficult to give a geometric signification to the weights but are useful for providing exact representations of the arcs of a circle or ellipse. Moreover, if the weights of all the poles are equal, the curve has a polynomial equation; it is therefore a non-rational curve. + * - a table of knots with their multiplicities. For a {@link Geom_BSplineCurve | `Geom_BSplineCurve`}, the table of knots is an increasing sequence of reals without repetition; the multiplicities define the repetition of the knots. A BSpline curve is a piecewise polynomial or rational curve. The knots are the parameters of junction points between two pieces. + * The multiplicity Mult(i) of the knot Knot(i) of the BSpline curve is related to the degree of continuity of the curve at the knot Knot(i), which is equal to Degree - Mult(i) where Degree is the degree of the BSpline curve. If the knots are regularly spaced (i.e. the difference between two consecutive knots is a constant), three specific and frequently used cases of knot distribution can be identified: + * - "uniform" if all multiplicities are equal to 1, + * - "quasi-uniform" if all multiplicities are equal to 1, except the first and the last knot which have a multiplicity of Degree + 1, where Degree is the degree of the BSpline curve, + * - "Piecewise Bezier" if all multiplicities are equal to Degree except the first and last knot which have a multiplicity of Degree + 1, where Degree is the degree of the BSpline curve. A curve of this type is a concatenation of arcs of Bezier curves. If the BSpline curve is not periodic: + * - the bounds of the Poles and Weights tables are 1 and NbPoles, where NbPoles is the number of poles of the BSpline curve, + * - the bounds of the Knots and Multiplicities tables are 1 and NbKnots, where NbKnots is the number of knots of the BSpline curve. If the BSpline curve is periodic, and if there are k periodic knots and p periodic poles, the period is: period = Knot(k + 1) - Knot(1) and the poles and knots tables can be considered as infinite tables, verifying: + * - Knot(i+k) = Knot(i) + period + * - Pole(i+p) = Pole(i) Note: data structures of a periodic BSpline curve are more complex than those of a non-periodic one. Warning In this class, weight value is considered to be zero if the weight is less than or equal to `gp::Resolution()`. + * + * References : . A survey of curve and surface methods in CADG Wolfgang BOHM CAGD 1 (1984) . On de Boor-like algorithms and blossoming Wolfgang BOEHM cagd 5 (1988) . Blossoming and knot insertion algorithms for B-spline curves Ronald N. GOLDMAN . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA . Curves and Surfaces for Computer Aided Geometric Design, a practical guide Gerald Farin + */ +export declare class Geom_BSplineCurve extends Geom_BoundedCurve { + /** + * Copy constructor for optimized copying without validation. + * @param theOther the BSpline curve to copy from + */ + constructor(theOther: Geom_BSplineCurve); + /** + * Creates a non-rational B_spline curve on the basis of degree . + */ + constructor(Poles: NCollection_Array1_gp_Pnt, Knots: NCollection_Array1_double, Multiplicities: NCollection_Array1_int, Degree: number, Periodic?: boolean); + /** + * Creates a rational B_spline curve on the basis of degree . Raises ConstructionError subject to the following conditions 0 < Degree <= MaxDegree. + * + * Weights.Length() == Poles.Length() + * + * Knots.Length() == Mults.Length() >= 2 + * + * Knots(i) < Knots(i+1) (Knots are increasing) + * + * 1 <= Mults(i) <= Degree + * + * On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommended if you want the curve to start and finish on the first and last pole). + * + * On a periodic curve the first and the last multicities must be the same. + * + * on non-periodic curves + * + * Poles.Length() == Sum(Mults(i)) - Degree - 1 >= 2 + * + * on periodic curves + * + * Poles.Length() == Sum(Mults(i)) except the first or last + */ + constructor(Poles: NCollection_Array1_gp_Pnt, Weights: NCollection_Array1_double, Knots: NCollection_Array1_double, Multiplicities: NCollection_Array1_int, Degree: number, Periodic?: boolean, CheckRational?: boolean); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): GeomEval_RepCurveDesc_Base; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: GeomEval_RepCurveDesc_Base): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Increases the degree of this BSpline curve to Degree. As a result, the poles, weights and multiplicities tables are modified; the knots table is not changed. Nothing is done if Degree is less than or equal to the current degree. Exceptions Standard_ConstructionError if Degree is greater than `Geom_BSplineCurve::MaxDegree()`. + */ + IncreaseDegree(Degree: number): void; + /** + * Increases the multiplicity of the knot to . + * + * If is lower or equal to the current multiplicity nothing is done. If is higher than the degree, the degree is used. If is not in [FirstUKnotIndex, LastUKnotIndex] + */ + IncreaseMultiplicity(Index: number, M: number): void; + /** + * Increases the multiplicities of the knots in [I1,I2] to . + * + * For each knot if is lower or equal to the current multiplicity nothing is done. If is higher than the degree the degree is used. If are not in [FirstUKnotIndex, LastUKnotIndex] + */ + IncreaseMultiplicity(I1: number, I2: number, M: number): void; + /** + * Increment the multiplicities of the knots in [I1,I2] by . + * + * If is not positive nothing is done. + * + * For each knot the resulting multiplicity is limited to the Degree. If are not in [FirstUKnotIndex, LastUKnotIndex] + */ + IncrementMultiplicity(I1: number, I2: number, M: number): void; + /** + * Inserts a knot value in the sequence of knots. If is an existing knot the multiplicity is increased by . + * + * If U is not on the parameter range nothing is done. + * + * If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. + * + * The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance. + */ + InsertKnot(U: number, M?: number, ParametricTolerance?: number, Add?: boolean): void; + /** + * Inserts a set of knots values in the sequence of knots. + * + * For each U = Knots(i), M = Mults(i) + * + * If is an existing knot the multiplicity is increased by if is True, increased to if is False. + * + * If U is not on the parameter range nothing is done. + * + * If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. + * + * The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance. + */ + InsertKnots(Knots: NCollection_Array1_double, Mults: NCollection_Array1_int, ParametricTolerance?: number, Add?: boolean): void; + /** + * Reduces the multiplicity of the knot of index Index to M. If M is equal to 0, the knot is removed. With a modification of this type, the array of poles is also modified. Two different algorithms are systematically used to compute the new poles of the curve. + * If, for each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is less than Tolerance, this ensures that the curve is not modified by more than Tolerance. Under these conditions, true is returned; otherwise, false is returned. A low tolerance is used to prevent modification of the curve. A high tolerance is used to "smooth" the curve. + * Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table. pole insertion and pole removing this operation is limited to the Uniform or QuasiUniform BSplineCurve. The knot values are modified. If the BSpline is NonUniform or Piecewise Bezier an exception Construction error is raised. + */ + RemoveKnot(Index: number, M: number, Tolerance: number): boolean; + /** + * Changes the direction of parametrization of . The Knot sequence is modified, the FirstParameter and the LastParameter are not modified. The StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve. + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + * + * returns UFirst + ULast - U + */ + ReversedParameter(U: number): number; + /** + * Modifies this BSpline curve by segmenting it between U1 and U2. Either of these values can be outside the bounds of the curve, but U2 must be greater than U1. All data structure tables of this BSpline curve are modified, but the knots located between U1 and U2 are retained. The degree of the curve is not modified. + * + * Parameter theTolerance defines the possible proximity of the segment boundaries and B-spline knots to treat them as equal. + * + * Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve or if the curve makes loop. After the segmentation the length of a curve can be null. raises if U2 < U1. Standard_DomainError if U2 - U1 exceeds the period for periodic curves. i.e. ((U2 - U1) - Period) > `Precision::PConfusion()`. + */ + Segment(U1: number, U2: number, theTolerance?: number): void; + /** + * Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index - 1) < K < Knots(Index + 1) The second syntax allows you also to increase the multiplicity of the knot to M (but it is not possible to decrease the multiplicity of the knot with this function). Standard_ConstructionError if: + * + * - K is not such that: Knots(Index - 1) < K < Knots(Index + 1) + * - M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table. + */ + SetKnot(Index: number, K: number): void; + /** + * Changes the knot of range Index with its multiplicity. You can increase the multiplicity of a knot but it is not allowed to decrease the multiplicity of an existing knot. + * + * Raised if K >= Knots(Index+1) or K <= Knots(Index-1). Raised if M is greater than Degree or lower than the previous multiplicity of knot of range Index. Raised if Index < 1 || Index > NbKnots + */ + SetKnot(Index: number, K: number, M: number): void; + /** + * Modifies this BSpline curve by assigning the array K to its knots table. The multiplicity of the knots is not modified. Exceptions Standard_ConstructionError if the values in the array K are not in ascending order. Standard_OutOfRange if the bounds of the array K are not respectively 1 and the number of knots of this BSpline curve. + */ + SetKnots(K: NCollection_Array1_double): void; + /** + * returns the parameter normalized within the period if the curve is periodic : otherwise does not do anything + * @returns A result object with fields: + * - `U`: updated value from the call. + */ + PeriodicNormalization(U?: number): { U: number }; + /** + * Changes this BSpline curve into a periodic curve. To become periodic, the curve must first be closed. Next, the knot sequence must be periodic. For this, FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2, the indexes in the knots array of the knots corresponding to the first and last parameters of this BSpline curve. The period is therefore: Knots(I2) - Knots(I1). Consequently, the knots and poles tables are modified. Exceptions Standard_ConstructionError if this BSpline curve is not closed. + */ + SetPeriodic(): void; + /** + * Assigns the knot of index Index in the knots table as the origin of this periodic BSpline curve. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this curve is not periodic. Standard_DomainError if Index is outside the bounds of the knots table. + */ + SetOrigin(Index: number): void; + /** + * Set the origin of a periodic curve at Knot U. If U is not a knot of the BSpline a new knot is inserted. KnotVector and poles are modified. Raised if the curve is not periodic. + */ + SetOrigin(U: number, Tol: number): void; + /** + * Changes this BSpline curve into a non-periodic curve. If this curve is already non-periodic, it is not modified. Note: the poles and knots tables are modified. Warning If this curve is periodic, as the multiplicity of the first and last knots is not modified, and is not equal to Degree + 1, where Degree is the degree of this BSpline curve, the start and end points of the curve are not its first and last poles. + */ + SetNotPeriodic(): void; + /** + * Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null. + */ + SetPole(Index: number, P: gp_Pnt): void; + /** + * Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. This syntax also allows you to modify the weight of the modified pole, which becomes Weight. In this case, if this BSpline curve is non-rational, it can become rational and vice versa. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null. + */ + SetPole(Index: number, P: gp_Pnt, Weight: number): void; + /** + * Changes the weight for the pole of range Index. If the curve was non rational it can become rational. If the curve was rational it can become non rational. + * + * Raised if Index < 1 || Index > NbPoles Raised if Weight <= 0.0 + */ + SetWeight(Index: number, Weight: number): void; + /** + * Moves the point of parameter U of this BSpline curve to P. Index1 and Index2 are the indexes in the table of poles of this BSpline curve of the first and last poles designated to be moved. FirstModifiedPole and LastModifiedPole are the indexes of the first and last poles which are effectively modified. In the event of incompatibility between Index1, Index2 and the value U: + * + * - no change is made to this BSpline curve, and + * - the FirstModifiedPole and LastModifiedPole are returned null. Exceptions Standard_OutOfRange if: + * - Index1 is greater than or equal to Index2, or + * - Index1 or Index2 is less than 1 or greater than the number of poles of this BSpline curve. + * @returns A result object with fields: + * - `FirstModifiedPole`: updated value from the call. + * - `LastModifiedPole`: updated value from the call. + */ + MovePoint(U: number, P: gp_Pnt, Index1: number, Index2: number, FirstModifiedPole?: number, LastModifiedPole?: number): { FirstModifiedPole: number; LastModifiedPole: number }; + /** + * Move a point with parameter U to P. and makes it tangent at U be Tangent. StartingCondition = -1 means first can move EndingCondition = -1 means last point can move StartingCondition = 0 means the first point cannot move EndingCondition = 0 means the last point cannot move StartingCondition = 1 means the first point and tangent cannot move EndingCondition = 1 means the last point and tangent cannot move and so forth ErrorStatus != 0 means that there are not enough degree of freedom with the constrain to deform the curve accordingly. + * @returns A result object with fields: + * - `ErrorStatus`: updated value from the call. + */ + MovePointAndTangent(U: number, P: gp_Pnt, Tangent: gp_Vec, Tolerance: number, StartingCondition: number, EndingCondition: number, ErrorStatus?: number): { ErrorStatus: number }; + /** + * Returns the continuity of the curve, the curve is at least C0. Raised if N < 0. + */ + IsCN(N: number): boolean; + /** + * Check if curve has at least G1 continuity in interval [theTf, theTl] Returns true if IsCN(1) or angle between "left" and "right" first derivatives at knots with C0 continuity is less then theAngTol only knots in interval [theTf, theTl] is checked. + */ + IsG1(theTf: number, theTl: number, theAngTol: number): boolean; + /** + * Returns true if the distance between the first point and the last point of the curve is lower or equal to Resolution from package gp. Warnings : The first and the last point can be different from the first pole and the last pole of the curve. + */ + IsClosed(): boolean; + /** + * Returns True if the curve is periodic. + */ + IsPeriodic(): boolean; + /** + * Returns True if the weights are not identical. The tolerance criterion is Epsilon of the class Real. + */ + IsRational(): boolean; + /** + * Returns the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, CN : the order of continuity is infinite. For a B-spline curve of degree d if a knot Ui has a multiplicity p the B-spline curve is only Cd-p continuous at Ui. + * So the global continuity of the curve can't be greater than Cd-p where p is the maximum multiplicity of the interior Knots. In the interior of a knot span the curve is infinitely continuously differentiable. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns the degree of this BSpline curve. The degree of a {@link Geom_BSplineCurve | `Geom_BSplineCurve`} curve cannot be greater than `Geom_BSplineCurve::MaxDegree()`. Computation of value and derivatives. + */ + Degree(): number; + /** + * Returns the point of parameter U. + */ + EvalD0(U: number): gp_Pnt; + /** + * Raised if the continuity of the curve is not C1. + */ + EvalD1(U: number): Geom_Curve_ResD1; + /** + * Raised if the continuity of the curve is not C2. + */ + EvalD2(U: number): Geom_Curve_ResD2; + /** + * Raised if the continuity of the curve is not C3. + */ + EvalD3(U: number): Geom_Curve_ResD3; + /** + * For the point of parameter U of this BSpline curve, computes the vector corresponding to the Nth derivative. Warning On a point where the continuity of the curve is not the one requested, this function impacts the part defined by the parameter with a value greater than U, i.e. the part of the curve to the "right" of the singularity. Exceptions Standard_RangeError if N is less than 1. + * + * The following functions compute the point of parameter U and the derivatives at this point on the B-spline curve arc defined between the knot FromK1 and the knot ToK2. + * U can be out of bounds [Knot (FromK1), Knot (ToK2)] but for the computation we only use the definition of the curve between these two knots. This method is useful to compute local derivative, if the order of continuity of the whole curve is not greater enough. + * Inside the parametric domain Knot (FromK1), Knot (ToK2) the evaluations are the same as if we consider the whole definition of the curve. Of course the evaluations are different outside this parametric domain. + */ + EvalDN(U: number, N: number): gp_Vec; + /** + * Raised if FromK1 = ToK2. + */ + LocalValue(U: number, FromK1: number, ToK2: number): gp_Pnt; + /** + * Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + LocalD0(U: number, FromK1: number, ToK2: number, P: gp_Pnt): void; + /** + * Raised if the local continuity of the curve is not C1 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + */ + LocalD1(U: number, FromK1: number, ToK2: number, P: gp_Pnt, V1: gp_Vec): void; + /** + * Raised if the local continuity of the curve is not C2 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + LocalD2(U: number, FromK1: number, ToK2: number, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; + /** + * Raised if the local continuity of the curve is not C3 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + LocalD3(U: number, FromK1: number, ToK2: number, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; + /** + * Raised if the local continuity of the curve is not CN between the knot K1 and the knot K2. Raised if FromK1 = ToK2. Raised if N < 1. + */ + LocalDN(U: number, FromK1: number, ToK2: number, N: number): gp_Vec; + /** + * Returns the last point of the curve. Warnings : The last point of the curve is different from the last pole of the curve if the multiplicity of the last knot is lower than Degree. + */ + EndPoint(): gp_Pnt; + /** + * Returns the index in the knot array of the knot corresponding to the first or last parameter of this BSpline curve. For a BSpline curve, the first (or last) parameter (which gives the start (or end) point of the curve) is a knot value. However, if the multiplicity of the first (or last) knot is less than Degree + 1, where Degree is the degree of the curve, it is not the first (or last) knot of the curve. + */ + FirstUKnotIndex(): number; + /** + * Returns the value of the first parameter of this BSpline curve. This is a knot value. The first parameter is the one of the start point of the BSpline curve. + */ + FirstParameter(): number; + /** + * Returns the knot of range Index. When there is a knot with a multiplicity greater than 1 the knot is not repeated. The method Multiplicity can be used to get the multiplicity of the Knot. Raised if Index < 1 or Index > NbKnots. + */ + Knot(Index: number): number; + /** + * returns the knot values of the B-spline curve; Warning A knot with a multiplicity greater than 1 is not repeated in the knot table. The Multiplicity function can be used to obtain the multiplicity of each knot. + * + * Raised K.Lower() is less than number of first knot or K.Upper() is more than number of last knot. + * @param K Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Knots(K: NCollection_Array1_double): void; + /** + * returns the knot values of the B-spline curve; Warning A knot with a multiplicity greater than 1 is not repeated in the knot table. The Multiplicity function can be used to obtain the multiplicity of each knot. + */ + Knots(): NCollection_Array1_double; + /** + * Returns K, the knots sequence of this BSpline curve. In this sequence, knots with a multiplicity greater than 1 are repeated. + * In the case of a non-periodic curve the length of the sequence must be equal to the sum of the NbKnots multiplicities of the knots of the curve (where NbKnots is the number of knots of this BSpline curve). + * This sum is also equal to : NbPoles + Degree + 1 where NbPoles is the number of poles and Degree the degree of this BSpline curve. In the case of a periodic curve, if there are k periodic knots, the period is Knot(k+1) - Knot(1). + * The initial sequence is built by writing knots 1 to k+1, which are repeated according to their corresponding multiplicities. + * If Degree is the degree of the curve, the degree of continuity of the curve at the knot of index 1 (or k+1) is equal to c = Degree + 1 - Mult(1). c knots are then inserted at the beginning and end of the initial sequence: + * + * - the c values of knots preceding the first item Knot(k+1) in the initial sequence are inserted at the beginning; the period is subtracted from these c values; + * - the c values of knots following the last item Knot(1) in the initial sequence are inserted at the end; the period is added to these c values. The length of the sequence must therefore be equal to: NbPoles + 2*Degree - Mult(1) + 2. Example For a non-periodic BSpline curve of degree 2 where: + * - the array of knots is: { k1 k2 k3 k4 }, + * - with associated multiplicities: { 3 1 2 3 }, the knot sequence is: K = { k1 k1 k1 k2 k3 k3 k4 k4 k4 } For a periodic BSpline curve of degree 4 , which is "C1" continuous at the first knot, and where : + * - the periodic knots are: { k1 k2 k3 (k4) } (3 periodic knots: the points of parameter k1 and k4 are identical, the period is p = k4 - k1), + * - with associated multiplicities: { 3 1 2 (3) }, the degree of continuity at knots k1 and k4 is: Degree + 1 - Mult(i) = 2. 2 supplementary knots are added at the beginning and end of the sequence: + * - at the beginning: the 2 knots preceding k4 minus the period; in this example, this is k3 - p both times; + * - at the end: the 2 knots following k1 plus the period; in this example, this is k2 + p and k3 + p. The knot sequence is therefore: K = { k3-p k3-p k1 k1 k1 k2 k3 k3 k4 k4 k4 k2+p k3+p } Exceptions Raised if K.Lower() is less than number of first knot in knot sequence with repetitions or K.Upper() is more than number of last knot in knot sequence with repetitions. + * @param K Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + KnotSequence(K: NCollection_Array1_double): void; + /** + * returns the knots of the B-spline curve. Knots with multiplicit greater than 1 are repeated + */ + KnotSequence(): NCollection_Array1_double; + /** + * Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot the BSpline Curve can be : + * + * - Uniform if all the knots are of multiplicity 1, + * - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, + * - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree A piecewise Bezier with only two knots is a BezierCurve. else the curve is non uniform. The tolerance criterion is Epsilon from class Real. + */ + KnotDistribution(): unknown; + /** + * For a BSpline curve the last parameter (which gives the end point of the curve) is a knot value but if the multiplicity of the last knot index is lower than Degree + 1 it is not the last knot of the curve. This method computes the index of the knot corresponding to the last parameter. + */ + LastUKnotIndex(): number; + /** + * Computes the parametric value of the end point of the curve. It is a knot value. + */ + LastParameter(): number; + /** + * Locates the parametric value U in the sequence of knots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. Knots (I1) <= U <= Knots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < Knots (1) - std::abs(ParametricTolerance) . if I2 > NbKnots => U > Knots (NbKnots) + std::abs(ParametricTolerance). + * @returns A result object with fields: + * - `I1`: updated value from the call. + * - `I2`: updated value from the call. + */ + LocateU(U: number, ParametricTolerance: number, I1: number, I2: number, WithKnotRepetition: boolean): { I1: number; I2: number }; + /** + * Returns the multiplicity of the knots of range Index. Raised if Index < 1 or Index > NbKnots. + */ + Multiplicity(Index: number): number; + /** + * Returns the multiplicity of the knots of the curve. + * + * Raised if the length of M is not equal to NbKnots. + * @param M Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Multiplicities(M: NCollection_Array1_int): void; + /** + * returns the multiplicity of the knots of the curve. + */ + Multiplicities(): NCollection_Array1_int; + /** + * Returns the number of knots. This method returns the number of knot without repetition of multiple knots. + */ + NbKnots(): number; + /** + * Returns the number of poles. + */ + NbPoles(): number; + /** + * Returns the pole of range Index. Raised if Index < 1 or Index > NbPoles. + */ + Pole(Index: number): gp_Pnt; + /** + * Returns the poles of the B-spline curve;. + * + * Raised if the length of P is not equal to the number of poles. + * @param P Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Poles(P: NCollection_Array1_gp_Pnt): void; + /** + * Returns the poles of the B-spline curve;. + */ + Poles(): NCollection_Array1_gp_Pnt; + /** + * Returns the start point of the curve. Warnings : This point is different from the first pole of the curve if the multiplicity of the first knot is lower than Degree. + */ + StartPoint(): gp_Pnt; + /** + * Returns the weight of the pole of range Index . Raised if Index < 1 or Index > NbPoles. + */ + Weight(Index: number): number; + /** + * Returns the weights of the B-spline curve;. + * + * Raised if the length of W is not equal to NbPoles. + * @param W Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Weights(W: NCollection_Array1_double): void; + /** + * Returns the weights of the B-spline curve;. + */ + Weights(): NCollection_Array1_double; + /** + * Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from `BSplCLib`. The array is always sized to match `NbPoles()`. + * @remarks **Warning:** Do NOT modify elements through the returned reference. + */ + WeightsArray(): NCollection_Array1_double; + /** + * Applies the transformation T to this BSpline curve. + */ + Transform(T: gp_Trsf): void; + /** + * Returns the value of the maximum degree of the normalized B-spline basis functions in this package. + */ + static MaxDegree(): number; + /** + * Computes for this BSpline curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this BSpline curve, UTolerance ensures that: | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < Tolerance3D. + * @returns A result object with fields: + * - `UTolerance`: updated value from the call. + */ + Resolution(Tolerance3D: number, UTolerance?: number): { UTolerance: number }; + /** + * Creates a new object which is a copy of this BSpline curve. + */ + Copy(): Geom_Geometry; + /** + * Compare two Bspline curve on identity;. + */ + IsEqual(theOther: Geom_BSplineCurve, thePreci: number): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a sphere. A sphere is defined by its radius, and is positioned in space by a coordinate system (a {@link gp_Ax3 | `gp_Ax3`} object), the origin of which is the center of the sphere. This coordinate system is the "local coordinate system" of the sphere. The following apply: + * + * - Rotation around its "main Axis", in the trigonometric sense given by the "X Direction" and the "Y Direction", defines the u parametric direction. + * - Its "X Axis" gives the origin for the u parameter. + * - The "reference meridian" of the sphere is a half-circle, of radius equal to the radius of the sphere. It is located in the plane defined by the origin, "X Direction" and "main Direction", centered on the origin, and positioned on the positive side of the "X Axis". + * - Rotation around the "Y Axis" gives the v parameter on the reference meridian. + * - The "X Axis" gives the origin of the v parameter on the reference meridian. + * - The v parametric direction is oriented by the "main Direction", i.e. when v increases, the Z coordinate increases. (This implies that the "Y Direction" orients the reference meridian only when the local coordinate system is indirect.) + * - The u isoparametric curve is a half-circle obtained by rotating the reference meridian of the sphere through an angle u around the "main Axis", in the trigonometric sense defined by the "X Direction" and the "Y Direction". The parametric equation of the sphere is: P(u,v) = O + R*cos(v)*(cos(u)*XDir + sin(u)*YDir)+R*sin(v)*ZDir where: + * - O, XDir, YDir and ZDir are respectively the origin, the "X Direction", the "Y Direction" and the "Z Direction" of its local coordinate system, and + * - R is the radius of the sphere. The parametric range of the two parameters is: + * - [ 0, 2.*Pi ] for u, and + * - [ - Pi/2., + Pi/2. ] for v. + */ +export declare class Geom_SphericalSurface extends Geom_ElementarySurface { + /** + * Creates a SphericalSurface from a non persistent Sphere from package gp. + */ + constructor(S: gp_Sphere); + /** + * A3 is the local coordinate system of the surface. At the creation the parametrization of the surface is defined such as the normal Vector (N = D1U ^ D1V) is directed away from the center of the sphere. The direction of increasing parametric value V is defined by the rotation around the "YDirection" of A2 in the trigonometric sense and the orientation of increasing parametric value U is defined by the rotation around the main direction of A2 in the trigonometric sense. Warnings : It is not forbidden to create a spherical surface with Radius = 0.0 Raised if Radius < 0.0. + */ + constructor(A3: gp_Ax3, Radius: number); + /** + * Assigns the value R to the radius of this sphere. Exceptions Standard_ConstructionError if R is less than 0.0. + */ + SetRadius(R: number): void; + /** + * Converts the {@link gp_Sphere | `gp_Sphere`} S into this sphere. + */ + SetSphere(S: gp_Sphere): void; + /** + * Returns a non persistent sphere with the same geometric properties as . + */ + Sphere(): gp_Sphere; + /** + * Computes the u parameter on the modified surface, when reversing its u parametric direction, for any point of u parameter U on this sphere. In the case of a sphere, these functions returns 2.PI - U. + */ + UReversedParameter(U: number): number; + /** + * Computes the v parameter on the modified surface, when reversing its v parametric direction, for any point of v parameter V on this sphere. In the case of a sphere, these functions returns -U. + */ + VReversedParameter(V: number): number; + /** + * Computes the area of the spherical surface. + */ + Area(): number; + /** + * Returns the parametric bounds U1, U2, V1 and V2 of this sphere. For a sphere: U1 = 0, U2 = 2*PI, V1 = -PI/2, V2 = PI/2. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + * - `V1`: updated value from the call. + * - `V2`: updated value from the call. + */ + Bounds(U1: number, U2: number, V1: number, V2: number): { U1: number; U2: number; V1: number; V2: number }; + /** + * Returns the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : These coefficients are normalized. A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0. + * @returns A result object with fields: + * - `A1`: updated value from the call. + * - `A2`: updated value from the call. + * - `A3`: updated value from the call. + * - `B1`: updated value from the call. + * - `B2`: updated value from the call. + * - `B3`: updated value from the call. + * - `C1`: updated value from the call. + * - `C2`: updated value from the call. + * - `C3`: updated value from the call. + * - `D`: updated value from the call. + */ + Coefficients(A1?: number, A2?: number, A3?: number, B1?: number, B2?: number, B3?: number, C1?: number, C2?: number, C3?: number, D?: number): { A1: number; A2: number; A3: number; B1: number; B2: number; B3: number; C1: number; C2: number; C3: number; D: number }; + /** + * Computes the coefficients of the implicit equation of this quadric in the absolute Cartesian coordinate system: A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0 An implicit normalization is applied (i.e. A1 = A2 = 1. in the local coordinate system of this sphere). + */ + Radius(): number; + /** + * Computes the volume of the spherical surface. + */ + Volume(): number; + /** + * Returns True. + */ + IsUClosed(): boolean; + /** + * Returns False. + */ + IsVClosed(): boolean; + /** + * Returns True. + */ + IsUPeriodic(): boolean; + /** + * Returns False. + */ + IsVPeriodic(): boolean; + /** + * Computes the U isoparametric curve. The U isoparametric curves of the surface are defined by the section of the spherical surface with plane obtained by rotation of the plane (Location, XAxis, ZAxis) around ZAxis. This plane defines the origin of parametrization u. For a SphericalSurface the UIso curve is a Circle. Warnings : The radius of this circle can be zero. + */ + UIso(U: number): Geom_Curve; + /** + * Computes the V isoparametric curve. The V isoparametric curves of the surface are defined by the section of the spherical surface with plane parallel to the plane (Location, XAxis, YAxis). This plane defines the origin of parametrization V. Be careful if V is close to PI/2 or 3*PI/2 the radius of the circle becomes tiny. It is not forbidden in this toolkit to create circle with radius = 0.0 For a SphericalSurface the VIso curve is a Circle. Warnings : The radius of this circle can be zero. + */ + VIso(V: number): Geom_Curve; + /** + * Computes the point P (U, V) on the surface. P (U, V) = Loc + Radius * Sin (V) * Zdir + Radius * Cos (V) * (cos (U) * XDir + sin (U) * YDir) where Loc is the origin of the placement plane (XAxis, YAxis) XDir is the direction of the XAxis and YDir the direction of the YAxis and ZDir the direction of the ZAxis. + */ + EvalD0(U: number, V: number): gp_Pnt; + /** + * Computes the current point and the first derivatives in the directions U and V. + */ + EvalD1(U: number, V: number): Geom_Surface_ResD1; + /** + * Computes the current point, the first and the second derivatives in the directions U and V. + */ + EvalD2(U: number, V: number): Geom_Surface_ResD2; + /** + * Computes the current point, the first,the second and the third derivatives in the directions U and V. + */ + EvalD3(U: number, V: number): Geom_Surface_ResD3; + /** + * Computes the derivative of order Nu in the direction u and Nv in the direction v. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. + */ + EvalDN(U: number, V: number, Nu: number, Nv: number): gp_Vec; + /** + * Applies the transformation T to this sphere. + */ + Transform(T: gp_Trsf): void; + /** + * Creates a new object which is a copy of this sphere. + */ + Copy(): Geom_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a rational or non-rational Bezier curve. + * + * - a non-rational Bezier curve is defined by a table of poles (also called control points), + * - a rational Bezier curve is defined by a table of poles with varying weights. These data are manipulated by two parallel arrays: + * - the poles table, which is an array of {@link gp_Pnt | `gp_Pnt`} points, and + * - the weights table, which is an array of reals. The bounds of these arrays are 1 and "the number of "poles" of the curve. The poles of the curve are "control points" used to deform the curve. The first pole is the start point of the curve, and the last pole is the end point of the curve. + * The segment that joins the first pole to the second pole is the tangent to the curve at its start point, and the segment that joins the last pole to the second-from-last pole is the tangent to the curve at its end point. + * It is more difficult to give a geometric signification to the weights but they are useful for providing the exact representations of arcs of a circle or ellipse. Moreover, if the weights of all poles are equal, the curve is polynomial; it is therefore a non-rational curve. The non-rational curve is a special and frequently used case. The weights are defined and used only in the case of a rational curve. The degree of a Bezier curve is equal to the number of poles, minus 1. It must be greater than or equal to + * + * 1. + * However, the degree of a {@link Geom_BezierCurve | `Geom_BezierCurve`} curve is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree. The parameter range for a Bezier curve is [ 0, 1 ]. If the first and last control points of the Bezier curve are the same point then the curve is closed. + * For example, to create a closed Bezier curve with four control points, you have to give the set of control points P1, P2, P3 and P1. The continuity of a Bezier curve is infinite. It is not possible to build a Bezier curve with negative weights. We consider that a weight value is zero if it is less than or equal to `gp::Resolution()`. We also consider that two weight values W1 and W2 are equal if: |W2 - W1| <= `gp::Resolution()`. Warning + * + * - When considering the continuity of a closed Bezier curve at the junction point, remember that a curve of this type is never periodic. This means that the derivatives for the parameter u = 0 have no reason to be the same as the derivatives for the parameter u = 1 even if the curve is closed. + * - The length of a Bezier curve can be null. + */ +export declare class Geom_BezierCurve extends Geom_BoundedCurve { + /** + * Creates a non rational Bezier curve with a set of poles CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2. + */ + constructor(CurvePoles: NCollection_Array1_gp_Pnt); + /** + * Copy constructor for optimized copying without validation. + * @param theOther the Bezier curve to copy from + */ + constructor(theOther: Geom_BezierCurve); + /** + * Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights. If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp. + */ + constructor(CurvePoles: NCollection_Array1_gp_Pnt, PoleWeights: NCollection_Array1_double); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): GeomEval_RepCurveDesc_Base; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: GeomEval_RepCurveDesc_Base): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Increases the degree of a bezier curve. Degree is the new degree of . Raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of . + */ + Increase(Degree: number): void; + /** + * Inserts a pole P after the pole of range Index. If the curve is rational the weight value for the new pole of range Index is 1.0. raised if Index is not in the range [1, NbPoles]. + * + * raised if the resulting number of poles is greater than MaxDegree + 1. + */ + InsertPoleAfter(Index: number, P: gp_Pnt): void; + /** + * Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles]. + * + * Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp. + */ + InsertPoleAfter(Index: number, P: gp_Pnt, Weight: number): void; + /** + * Inserts a pole P before the pole of range Index. If the curve is rational the weight value for the new pole of range Index is 1.0. Raised if Index is not in the range [1, NbPoles]. + * + * Raised if the resulting number of poles is greater than MaxDegree + 1. + */ + InsertPoleBefore(Index: number, P: gp_Pnt): void; + /** + * Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles]. + * + * Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp. + */ + InsertPoleBefore(Index: number, P: gp_Pnt, Weight: number): void; + /** + * Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles] Raised if Degree is lower than 2. + */ + RemovePole(Index: number): void; + /** + * Reverses the direction of parametrization of Value (NewU) = Value (1 - OldU). + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + * + * returns 1-U + */ + ReversedParameter(U: number): number; + /** + * Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve or if the curve makes loop. After the segmentation the length of a curve can be null. + */ + Segment(U1: number, U2: number): void; + /** + * Substitutes the pole of range index with P. If the curve is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles]. + */ + SetPole(Index: number, P: gp_Pnt): void; + /** + * Substitutes the pole and the weights of range Index. If the curve is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp. + */ + SetPole(Index: number, P: gp_Pnt, Weight: number): void; + /** + * Changes the weight of the pole of range Index. If the curve is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp. + */ + SetWeight(Index: number, Weight: number): void; + /** + * Returns True if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp. + */ + IsClosed(): boolean; + /** + * Continuity of the curve, returns True. + */ + IsCN(N: number): boolean; + /** + * Returns True if the parametrization of a curve is periodic. (P(u) = P(u + T) T = constante). + */ + IsPeriodic(): boolean; + /** + * Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp. + */ + IsRational(): boolean; + /** + * a Bezier curve is CN + */ + Continuity(): GeomAbs_Shape; + /** + * Returns the polynomial degree of the curve. it is the number of poles - 1 point P and derivatives (V1, V2, V3) computation The Bezier Curve has a Polynomial representation so the parameter U can be out of the bounds of the curve. + */ + Degree(): number; + /** + * Computes the point of parameter U. Raises an exception on failure (e.g. OffsetCurve at singular point). + */ + EvalD0(U: number): gp_Pnt; + /** + * Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1. + */ + EvalD1(U: number): Geom_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2. + */ + EvalD2(U: number): Geom_Curve_ResD2; + /** + * For this Bezier curve, computes. + * + * - the point P of parameter U, or + * - the point P and one or more of the following values: + * - V1, the first derivative vector, + * - V2, the second derivative vector, + * - V3, the third derivative vector. Note: the parameter U can be outside the bounds of the curve. + */ + EvalD3(U: number): Geom_Curve_ResD3; + /** + * For the point of parameter U of this Bezier curve, computes the vector corresponding to the Nth derivative. Note: the parameter U can be outside the bounds of the curve. Exceptions Standard_RangeError if N is less than 1. + */ + EvalDN(U: number, N: number): gp_Vec; + /** + * Returns Value (U=0.), it is the first control point of the curve. + */ + StartPoint(): gp_Pnt; + /** + * Returns Value (U=1.), it is the last control point of the Bezier curve. + */ + EndPoint(): gp_Pnt; + /** + * Returns the value of the first parameter of this Bezier curve. This is 0.0, which gives the start point of this Bezier curve. + */ + FirstParameter(): number; + /** + * Returns the value of the last parameter of this Bezier curve. This is 1.0, which gives the end point of this Bezier curve. + */ + LastParameter(): number; + /** + * Returns the number of poles of this Bezier curve. + */ + NbPoles(): number; + /** + * Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles]. + */ + Pole(Index: number): gp_Pnt; + /** + * Returns all the poles of the curve. + * + * Raised if the length of P is not equal to the number of poles. + * @param P Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Poles(P: NCollection_Array1_gp_Pnt): void; + /** + * Returns all the poles of the curve. + */ + Poles(): NCollection_Array1_gp_Pnt; + /** + * Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles]. + */ + Weight(Index: number): number; + /** + * Returns all the weights of the curve. + * + * Raised if the length of W is not equal to the number of poles. + * @param W Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Weights(W: NCollection_Array1_double): void; + /** + * Returns all the weights of the curve. + */ + Weights(): NCollection_Array1_double; + /** + * Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from `BSplCLib`. The array is always sized to match `NbPoles()`. + * @remarks **Warning:** Do NOT modify elements through the returned reference. + */ + WeightsArray(): NCollection_Array1_double; + /** + * Applies the transformation T to this Bezier curve. + */ + Transform(T: gp_Trsf): void; + /** + * Returns the value of the maximum polynomial degree of any {@link Geom_BezierCurve | `Geom_BezierCurve`} curve. This value is 25. + */ + static MaxDegree(): number; + /** + * Computes for this Bezier curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this Bezier curve, UTolerance ensures that: |t1-t0| < UTolerance ===> |f(t1)-f(t0)| < Tolerance3D. + * @returns A result object with fields: + * - `UTolerance`: updated value from the call. + */ + Resolution(Tolerance3D: number, UTolerance?: number): { UTolerance: number }; + /** + * Creates a new object which is a copy of this Bezier curve. + */ + Copy(): Geom_Geometry; + /** + * Returns Bezier knots {0.0, 1.0} as a static array. + */ + Knots(): NCollection_Array1_double; + /** + * Returns Bezier multiplicities for the current degree. + */ + Multiplicities(): NCollection_Array1_int; + /** + * Returns Bezier flat knots for the current degree. + */ + KnotSequence(): NCollection_Array1_double; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class Geometry for 3D space is the root class of all geometric objects from the Geom package. It describes the common behavior of these objects when: + * + * - applying geometric transformations to objects, and + * - constructing objects by geometric transformation (including copying). + * Warning Only transformations which do not modify the nature of the geometry can be applied to Geom objects: this is the case with translations, rotations, symmetries and scales; this is also the case with {@link gp_Trsf | `gp_Trsf`} composite transformations which are used to define the geometric transformations applied using the Transform or Transformed functions. + * Note: Geometry defines the "prototype" of the abstract method Transform which is defined for each concrete type of derived object. All other transformations are implemented using the Transform method. + */ +export declare class Geom_Geometry extends Standard_Transient { + /** + * Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry. + */ + Mirror(P: gp_Pnt): void; + /** + * Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry. + */ + Mirror(A1: gp_Ax1): void; + /** + * Performs the symmetrical transformation of a Geometry with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection). + */ + Mirror(A2: gp_Ax2): void; + /** + * Rotates a Geometry. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians. + */ + Rotate(A1: gp_Ax1, Ang: number): void; + /** + * Scales a Geometry. S is the scaling value. + */ + Scale(P: gp_Pnt, S: number): void; + /** + * Translates a Geometry. V is the vector of the translation. + */ + Translate(V: gp_Vec): void; + /** + * Translates a Geometry from the point P1 to the point P2. + */ + Translate(P1: gp_Pnt, P2: gp_Pnt): void; + /** + * Transformation of a geometric object. This transformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations. (see class Transformation of the package Geom). + */ + Transform(T: gp_Trsf): void; + Mirrored(P: gp_Pnt): Geom_Geometry; + Mirrored(A1: gp_Ax1): Geom_Geometry; + Mirrored(A2: gp_Ax2): Geom_Geometry; + Rotated(A1: gp_Ax1, Ang: number): Geom_Geometry; + Scaled(P: gp_Pnt, S: number): Geom_Geometry; + Transformed(T: gp_Trsf): Geom_Geometry; + Translated(V: gp_Vec): Geom_Geometry; + Translated(P1: gp_Pnt, P2: gp_Pnt): Geom_Geometry; + /** + * Creates a new object which is a copy of this geometric object. + */ + Copy(): Geom_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class defines the infinite cylindrical surface. + * + * Every cylindrical surface is set by the following equation: + * + * ``` + * S(U,V)=Location+R*cos(U)*XAxis+R*sin(U)*YAxis+V*ZAxis, + * ``` + * + * where R is cylinder radius. + * + * The local coordinate system of the CylindricalSurface is defined with an axis placement (see class ElementarySurface). + * + * The "ZAxis" is the symmetry axis of the CylindricalSurface, it gives the direction of increasing parametric value V. + * + * The parametrization range is : + * + * ``` + * U[0,2*PI],V]-infinite,+infinite[ + * ``` + * + * The "XAxis" and the "YAxis" define the placement plane of the surface (Z = 0, and parametric value V = 0) perpendicular to the symmetry axis. The "XAxis" defines the origin of the parameter U = 0. The trigonometric sense gives the positive orientation for the parameter U. + * + * When you create a CylindricalSurface the U and V directions of parametrization are such that at each point of the surface the normal is oriented towards the "outside region". + * + * The methods UReverse VReverse change the orientation of the surface. + */ +export declare class Geom_CylindricalSurface extends Geom_ElementarySurface { + /** + * Creates a CylindricalSurface from a non transient {@link gp_Cylinder | `gp_Cylinder`}. + */ + constructor(C: gp_Cylinder); + /** + * A3 defines the local coordinate system of the cylindrical surface. The "ZDirection" of A3 defines the direction of the surface's axis of symmetry. At the creation the parametrization of the surface is defined such that the normal Vector (N = D1U ^ D1V) is oriented towards the "outside region" of the surface. Warnings: It is not forbidden to create a cylindrical surface with Radius = 0.0 Raised if Radius < 0.0. + */ + constructor(A3: gp_Ax3, Radius: number); + /** + * Set so that has the same geometric properties as C. + */ + SetCylinder(C: gp_Cylinder): void; + /** + * Changes the radius of the cylinder. Raised if R < 0.0. + */ + SetRadius(R: number): void; + /** + * returns a non transient cylinder with the same geometric properties as . + */ + Cylinder(): gp_Cylinder; + /** + * Return the parameter on the Ureversed surface for the point of parameter U on . Return 2.PI - U. + */ + UReversedParameter(U: number): number; + /** + * Return the parameter on the Vreversed surface for the point of parameter V on . Return -V. + */ + VReversedParameter(V: number): number; + /** + * Computes the parameters on the transformed surface for the transform of the point of parameters U,V on . + * + * ``` + * me->Transformed(T)->Value(U',V') + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V).Transformed(T) + * ``` + * + * Where U',V' are the new values of U,V after calling + * + * ``` + * me->TransformParameters(U,V,T) + * ``` + * + * This method multiplies V by T.ScaleFactor() + * @returns A result object with fields: + * - `U`: updated value from the call. + * - `V`: updated value from the call. + */ + TransformParameters(U: number, V: number, T: gp_Trsf): { U: number; V: number }; + /** + * Returns a 2d transformation used to find the new parameters of a point on the transformed surface. + * + * ``` + * me->Transformed(T)->Value(U',V') + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V).Transformed(T) + * ``` + * + * Where U',V' are obtained by transforming U,V with the 2d transformation returned by + * + * ``` + * me->ParametricTransformation(T) + * ``` + * + * This method returns a scale centered on the U axis with T.ScaleFactor + */ + ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; + /** + * The CylindricalSurface is infinite in the V direction so V1 = Realfirst, V2 = RealLast from package {@link Standard | `Standard`}. U1 = 0 and U2 = 2*PI. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + * - `V1`: updated value from the call. + * - `V2`: updated value from the call. + */ + Bounds(U1: number, U2: number, V1: number, V2: number): { U1: number; U2: number; V1: number; V2: number }; + /** + * Returns the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate system : These coefficients are normalized. + * + * ``` + * A1.X**2+A2.Y**2+A3.Z**2+2.(B1.X.Y+B2.X.Z+B3.Y.Z)+2.(C1.X+C2.Y+C3.Z)+D=0.0 + * ``` + * @returns A result object with fields: + * - `A1`: updated value from the call. + * - `A2`: updated value from the call. + * - `A3`: updated value from the call. + * - `B1`: updated value from the call. + * - `B2`: updated value from the call. + * - `B3`: updated value from the call. + * - `C1`: updated value from the call. + * - `C2`: updated value from the call. + * - `C3`: updated value from the call. + * - `D`: updated value from the call. + */ + Coefficients(A1?: number, A2?: number, A3?: number, B1?: number, B2?: number, B3?: number, C1?: number, C2?: number, C3?: number, D?: number): { A1: number; A2: number; A3: number; B1: number; B2: number; B3: number; C1: number; C2: number; C3: number; D: number }; + /** + * Returns the radius of this cylinder. + */ + Radius(): number; + /** + * Returns True. + */ + IsUClosed(): boolean; + /** + * Returns False. + */ + IsVClosed(): boolean; + /** + * Returns True. + */ + IsUPeriodic(): boolean; + /** + * Returns False. + */ + IsVPeriodic(): boolean; + /** + * The UIso curve is a Line. The location point of this line is on the placement plane (XAxis, YAxis) of the surface. This line is parallel to the axis of symmetry of the surface. + */ + UIso(U: number): Geom_Curve; + /** + * The VIso curve is a circle. The start point of this circle (U = 0) is defined with the "XAxis" of the surface. The center of the circle is on the symmetry axis. + */ + VIso(V: number): Geom_Curve; + /** + * Computes the point P (U, V) on the surface. P (U, V) = Loc + Radius * (cos (U) * XDir + sin (U) * YDir) + V * ZDir where Loc is the origin of the placement plane (XAxis, YAxis) XDir is the direction of the XAxis and YDir the direction of the YAxis. + */ + EvalD0(U: number, V: number): gp_Pnt; + /** + * Computes the current point and the first derivatives in the directions U and V. + */ + EvalD1(U: number, V: number): Geom_Surface_ResD1; + /** + * Computes the current point, the first and the second derivatives in the directions U and V. + */ + EvalD2(U: number, V: number): Geom_Surface_ResD2; + /** + * Computes the current point, the first, the second and the third derivatives in the directions U and V. + */ + EvalD3(U: number, V: number): Geom_Surface_ResD3; + /** + * Computes the derivative of order Nu in the direction u and Nv in the direction v. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. + */ + EvalDN(U: number, V: number, Nu: number, Nv: number): gp_Vec; + /** + * Applies the transformation T to this cylinder. + */ + Transform(T: gp_Trsf): void; + /** + * Creates a new object which is a copy of this cylinder. + */ + Copy(): Geom_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes the common behavior of surfaces in 3D space. The Geom package provides many implementations of concrete derived surfaces, such as planes, cylinders, cones, spheres and tori, surfaces of linear extrusion, surfaces of revolution, Bezier and BSpline surfaces, and so on. The key characteristic of these surfaces is that they are parameterized. {@link Geom_Surface | `Geom_Surface`} demonstrates: + * + * - how to work with the parametric equation of a surface to compute the point of parameters (u, v), and, at this point, the 1st, 2nd ... Nth derivative; + * - how to find global information about a surface in each parametric direction (for example, level of continuity, whether the surface is closed, its periodicity, the bounds of the parameters and so on); + * - how the parameters change when geometric transformations are applied to the surface, or the orientation is modified. + * + * Note that all surfaces must have a geometric continuity, and any surface is at least "C0". Generally, continuity is checked at construction time or when the curve is edited. Where this is not the case, the documentation makes this explicit. + * + * Warning The Geom package does not prevent the construction of surfaces with null areas, or surfaces which self-intersect. + */ +export declare class Geom_Surface extends Geom_Geometry { + /** + * Reverses the U direction of parametrization of . The bounds of the surface are not modified. + */ + UReverse(): void; + /** + * Reverses the U direction of parametrization of . The bounds of the surface are not modified. A copy of is returned. + */ + UReversed(): Geom_Surface; + /** + * Returns the parameter on the Ureversed surface for the point of parameter U on . + * + * ``` + * me->UReversed()->Value(me->UReversedParameter(U),V) + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V) + * ``` + */ + UReversedParameter(U: number): number; + /** + * Reverses the V direction of parametrization of . The bounds of the surface are not modified. + */ + VReverse(): void; + /** + * Reverses the V direction of parametrization of . The bounds of the surface are not modified. A copy of is returned. + */ + VReversed(): Geom_Surface; + /** + * Returns the parameter on the Vreversed surface for the point of parameter V on . + * + * ``` + * me->VReversed()->Value(U,me->VReversedParameter(V)) + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V) + * ``` + */ + VReversedParameter(V: number): number; + /** + * Computes the parameters on the transformed surface for the transform of the point of parameters U,V on . + * + * ``` + * me->Transformed(T)->Value(U',V') + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V).Transformed(T) + * ``` + * + * Where U',V' are the new values of U,V after calling + * + * ``` + * me->TransformParameters(U,V,T) + * ``` + * + * This method does not change and + * + * It can be redefined. For example on the Plane, Cylinder, Cone, Revolved and Extruded surfaces. + * @returns A result object with fields: + * - `U`: updated value from the call. + * - `V`: updated value from the call. + */ + TransformParameters(U: number, V: number, T: gp_Trsf): { U: number; V: number }; + /** + * Returns a 2d transformation used to find the new parameters of a point on the transformed surface. + * + * ``` + * me->Transformed(T)->Value(U',V') + * ``` + * + * is the same point as + * + * ``` + * me->Value(U,V).Transformed(T) + * ``` + * + * Where U',V' are obtained by transforming U,V with the 2d transformation returned by + * + * ``` + * me->ParametricTransformation(T) + * ``` + * + * This method returns an identity transformation + * + * It can be redefined. For example on the Plane, Cylinder, Cone, Revolved and Extruded surfaces. + */ + ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; + /** + * Returns the parametric bounds U1, U2, V1 and V2 of this surface. If the surface is infinite, this function can return a value equal to `Precision::Infinite`: instead of double::LastReal. + * @returns A result object with fields: + * - `U1`: updated value from the call. + * - `U2`: updated value from the call. + * - `V1`: updated value from the call. + * - `V2`: updated value from the call. + */ + Bounds(U1: number, U2: number, V1: number, V2: number): { U1: number; U2: number; V1: number; V2: number }; + /** + * Checks whether this surface is closed in the u parametric direction. Returns true if, in the u parametric direction: taking uFirst and uLast as the parametric bounds in the u parametric direction, for each parameter v, the distance between the points P(uFirst, v) and P(uLast, v) is less than or equal to `gp::Resolution()`. + */ + IsUClosed(): boolean; + /** + * Checks whether this surface is closed in the u parametric direction. Returns true if, in the v parametric direction: taking vFirst and vLast as the parametric bounds in the v parametric direction, for each parameter u, the distance between the points P(u, vFirst) and P(u, vLast) is less than or equal to `gp::Resolution()`. + */ + IsVClosed(): boolean; + /** + * Checks if this surface is periodic in the u parametric direction. Returns true if: + * + * - this surface is closed in the u parametric direction, and + * - there is a constant T such that the distance between the points P (u, v) and P (u + T, v) (or the points P (u, v) and P (u, v + T)) is less than or equal to `gp::Resolution()`. + * + * Note: T is the parametric period in the u parametric direction. + */ + IsUPeriodic(): boolean; + /** + * Returns the period of this surface in the u parametric direction. Raises if the surface is not uperiodic. + */ + UPeriod(): number; + /** + * Checks if this surface is periodic in the v parametric direction. Returns true if: + * + * - this surface is closed in the v parametric direction, and + * - there is a constant T such that the distance between the points P (u, v) and P (u + T, v) (or the points P (u, v) and P (u, v + T)) is less than or equal to `gp::Resolution()`. + * + * Note: T is the parametric period in the v parametric direction. + */ + IsVPeriodic(): boolean; + /** + * Returns the period of this surface in the v parametric direction. raises if the surface is not vperiodic. + */ + VPeriod(): number; + /** + * Computes the U isoparametric curve. + */ + UIso(U: number): Geom_Curve; + /** + * Computes the V isoparametric curve. + */ + VIso(V: number): Geom_Curve; + /** + * Returns the Global Continuity of the surface in direction U and V : + * + * - C0: only geometric continuity, + * - C1: continuity of the first derivative all along the surface, + * - C2: continuity of the second derivative all along the surface, + * - C3: continuity of the third derivative all along the surface, + * - G1: tangency continuity all along the surface, + * - G2: curvature continuity all along the surface, + * - CN: the order of continuity is infinite. + * + * Example: If the surface is C1 in the V parametric direction and C2 in the U parametric direction Shape = C1. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns the order of continuity of the surface in the U parametric direction. Raised if N < 0. + */ + IsCNu(N: number): boolean; + /** + * Returns the order of continuity of the surface in the V parametric direction. Raised if N < 0. + */ + IsCNv(N: number): boolean; + /** + * Computes the point of parameter (U, V) on the surface. Raises an exception on failure. + */ + EvalD0(U: number, V: number): gp_Pnt; + /** + * Computes the point and first partial derivatives at (U, V). Raises an exception if the surface continuity is not C1. + */ + EvalD1(U: number, V: number): Geom_Surface_ResD1; + /** + * Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception if the surface continuity is not C2. + */ + EvalD2(U: number, V: number): Geom_Surface_ResD2; + /** + * Computes the point and partial derivatives up to 3rd order at (U, V). Raises an exception if the surface continuity is not C3. + */ + EvalD3(U: number, V: number): Geom_Surface_ResD3; + /** + * Computes the derivative of order Nu in U and Nv in V at the point (U, V). Raises an exception on failure. + */ + EvalDN(U: number, V: number, Nu: number, Nv: number): gp_Vec; + /** + * Computes the point of parameter (U, V). + * @param P Mutated in place; read the updated value from this argument after the call. + */ + D0(U: number, V: number, P: gp_Pnt): void; + /** + * Computes the point and first partial derivatives. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + */ + D1(U: number, V: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; + /** + * Computes the point and partial derivatives up to 2nd order. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + * @param D2U Mutated in place; read the updated value from this argument after the call. + * @param D2V Mutated in place; read the updated value from this argument after the call. + * @param D2UV Mutated in place; read the updated value from this argument after the call. + */ + D2(U: number, V: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; + /** + * Computes the point and partial derivatives up to 3rd order. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param D1U Mutated in place; read the updated value from this argument after the call. + * @param D1V Mutated in place; read the updated value from this argument after the call. + * @param D2U Mutated in place; read the updated value from this argument after the call. + * @param D2V Mutated in place; read the updated value from this argument after the call. + * @param D2UV Mutated in place; read the updated value from this argument after the call. + * @param D3U Mutated in place; read the updated value from this argument after the call. + * @param D3V Mutated in place; read the updated value from this argument after the call. + * @param D3UUV Mutated in place; read the updated value from this argument after the call. + * @param D3UVV Mutated in place; read the updated value from this argument after the call. + */ + D3(U: number, V: number, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec): void; + /** + * Computes the derivative of order Nu in U and Nv in V. + */ + DN(U: number, V: number, Nu: number, Nv: number): gp_Vec; + /** + * Computes the point of parameter (U, V) on the surface. + */ + Value(U: number, V: number): gp_Pnt; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Geom_Surface_ResD1 { + Point: gp_Pnt; + D1U: gp_Vec; + D1V: gp_Vec; +} + +export interface Geom_Surface_ResD2 { + Point: gp_Pnt; + D1U: gp_Vec; + D1V: gp_Vec; + D2U: gp_Vec; + D2V: gp_Vec; + D2UV: gp_Vec; +} + +export interface Geom_Surface_ResD3 { + Point: gp_Pnt; + D1U: gp_Vec; + D1V: gp_Vec; + D2U: gp_Vec; + D2V: gp_Vec; + D2UV: gp_Vec; + D3U: gp_Vec; + D3V: gp_Vec; + D3UUV: gp_Vec; + D3UVV: gp_Vec; +} + +/** + * Describes the common behavior of surfaces which have a simple parametric equation in a local coordinate system. The Geom package provides several implementations of concrete elementary surfaces: + * + * - the plane, and + * - four simple surfaces of revolution: the cylinder, the cone, the sphere and the torus. An elementary surface inherits the common behavior of {@link Geom_Surface | `Geom_Surface`} surfaces. + * Furthermore, it is located in 3D space by a coordinate system (a {@link gp_Ax3 | `gp_Ax3`} object) which is also its local coordinate system. + * Any elementary surface is oriented, i.e. the normal vector is always defined, and gives the same orientation to the surface, at any point on the surface. In topology this property is referred to as the "outside region of the surface". This orientation is related to the two parametric directions of the surface. + * Rotation of a surface around the "main Axis" of its coordinate system, in the trigonometric sense given by the "X Direction" and the "Y Direction" of the coordinate system, defines the u parametric direction of that elementary surface of revolution. This is the default construction mode. + * It is also possible, however, to change the orientation of a surface by reversing one of the two parametric directions: use the UReverse or VReverse functions to change the orientation of the normal at any point on the surface. Warning The local coordinate system of an elementary surface is not necessarily direct: + * - if it is direct, the trigonometric sense defined by its "main Direction" is the same as the trigonometric sense defined by its two vectors "X Direction" and "Y Direction": "main Direction" = "X Direction" ^ "Y Direction" + * - if it is indirect, the two definitions of trigonometric sense are opposite: "main Direction" = - "X Direction" ^ "Y Direction" + */ +export declare class Geom_ElementarySurface extends Geom_Surface { + /** + * Changes the main axis (ZAxis) of the elementary surface. + * + * Raised if the direction of A1 is parallel to the XAxis of the coordinate system of the surface. + */ + SetAxis(theA1: gp_Ax1): void; + /** + * Changes the location of the local coordinates system of the surface. + */ + SetLocation(theLoc: gp_Pnt): void; + /** + * Changes the local coordinates system of the surface. + */ + SetPosition(theAx3: gp_Ax3): void; + /** + * Returns the main axis of the surface (ZAxis). + */ + Axis(): gp_Ax1; + /** + * Returns the location point of the local coordinate system of the surface. + */ + Location(): gp_Pnt; + /** + * Returns the local coordinates system of the surface. + */ + Position(): gp_Ax3; + /** + * Reverses the U parametric direction of the surface. + */ + UReverse(): void; + /** + * Return the parameter on the Ureversed surface for the point of parameter U on . + * + * me->`UReversed()`->Value(me->UReversedParameter(U),V) is the same point as me->Value(U,V) + */ + UReversedParameter(U: number): number; + /** + * Reverses the V parametric direction of the surface. + */ + VReverse(): void; + /** + * Return the parameter on the Vreversed surface for the point of parameter V on . + * + * me->`VReversed()`->Value(U,me->VReversedParameter(V)) is the same point as me->Value(U,V) + */ + VReversedParameter(V: number): number; + /** + * Returns GeomAbs_CN, the global continuity of any elementary surface. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns True. + */ + IsCNu(N: number): boolean; + /** + * Returns True. + */ + IsCNv(N: number): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class Curve describes the common behavior of curves in 3D space. The Geom package provides numerous concrete classes of derived curves, including lines, circles, conics, Bezier or BSpline curves, etc. The main characteristic of these curves is that they are parameterized. The {@link Geom_Curve | `Geom_Curve`} class shows: + * + * - how to work with the parametric equation of a curve in order to calculate the point of parameter u, together with the vector tangent and the derivative vectors of order 2, 3,..., N at this point; + * - how to obtain general information about the curve (for example, level of continuity, closed characteristics, periodicity, bounds of the parameter field); + * - how the parameter changes when a geometric transformation is applied to the curve or when the orientation of the curve is inverted. All curves must have a geometric continuity: a curve is at least "C0". Generally, this property is checked at the time of construction or when the curve is edited. Where this is not the case, the documentation states so explicitly. Warning The Geom package does not prevent the construction of curves with null length or curves which self-intersect. + */ +export declare class Geom_Curve extends Geom_Geometry { + /** + * Changes the direction of parametrization of . The "FirstParameter" and the "LastParameter" are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve. + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + * + * me->`Reversed()`->Value(me->ReversedParameter(U)) + * + * is the same point as + * + * me->Value(U) + */ + ReversedParameter(U: number): number; + /** + * Returns the parameter on the transformed curve for the transform of the point of parameter U on . + * + * me->Transformed(T)->Value(me->TransformedParameter(U,T)) + * + * is the same point as + * + * me->Value(U).Transformed(T) + * + * This methods returns + * + * It can be redefined. For example on the Line. + */ + TransformedParameter(U: number, T: gp_Trsf): number; + /** + * Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on . + * + * Transformed(T)->Value(U * ParametricTransformation(T)) + * + * is the same point as + * + * Value(U).Transformed(T) + * + * This methods returns 1. + * + * It can be redefined. For example on the Line. + */ + ParametricTransformation(T: gp_Trsf): number; + /** + * Returns a copy of reversed. + */ + Reversed(): Geom_Curve; + /** + * Returns the value of the first parameter. Warnings : It can be RealFirst from package {@link Standard | `Standard`} if the curve is infinite. + */ + FirstParameter(): number; + /** + * Returns the value of the last parameter. Warnings : It can be RealLast from package {@link Standard | `Standard`} if the curve is infinite. + */ + LastParameter(): number; + /** + * Returns true if the curve is closed. Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp which is a fixed criterion independent of the application. + */ + IsClosed(): boolean; + /** + * Is the parametrization of the curve periodic ? It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve. + * The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic. + */ + IsPeriodic(): boolean; + /** + * Returns the period of this curve. Exceptions Standard_NoSuchObject if this curve is not periodic. + */ + Period(): number; + /** + * It is the global continuity of the curve C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns true if the degree of continuity of this curve is at least N. Exceptions - Standard_RangeError if N is less than 0. + */ + IsCN(N: number): boolean; + /** + * Computes the point of parameter U. Raises an exception on failure (e.g. OffsetCurve at singular point). + */ + EvalD0(U: number): gp_Pnt; + /** + * Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1. + */ + EvalD1(U: number): Geom_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2. + */ + EvalD2(U: number): Geom_Curve_ResD2; + /** + * Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3. + */ + EvalD3(U: number): Geom_Curve_ResD3; + /** + * Computes the Nth derivative at parameter U. Raises an exception if the curve continuity is not CN, or N < 1. + */ + EvalDN(U: number, N: number): gp_Vec; + /** + * Returns in P the point of parameter U. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + D0(U: number, P: gp_Pnt): void; + /** + * Returns the point P of parameter U and the first derivative V1. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + */ + D1(U: number, P: gp_Pnt, V1: gp_Vec): void; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + D2(U: number, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; + /** + * Returns the point P of parameter U, the first, the second and the third derivative. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + D3(U: number, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; + /** + * The returned vector gives the value of the derivative for the order of derivation N. + */ + DN(U: number, N: number): gp_Vec; + /** + * Computes the point of parameter U on . + */ + Value(U: number): gp_Pnt; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Geom_Curve_ResD1 { + Point: gp_Pnt; + D1: gp_Vec; +} + +export interface Geom_Curve_ResD2 { + Point: gp_Pnt; + D1: gp_Vec; + D2: gp_Vec; +} + +export interface Geom_Curve_ResD3 { + Point: gp_Pnt; + D1: gp_Vec; + D2: gp_Vec; + D3: gp_Vec; +} + +/** + * The root class for bounded surfaces in 3D space. A bounded surface is defined by a rectangle in its 2D parametric space, i.e. + * + * - its u parameter, which ranges between two finite values u0 and u1, referred to as "First u parameter" and "Last u parameter" respectively, and + * - its v parameter, which ranges between two finite values v0 and v1, referred to as "First v parameter" and the "Last v parameter" respectively. The surface is limited by four curves which are the boundaries of the surface: + * - its u0 and u1 isoparametric curves in the u parametric direction, and + * - its v0 and v1 isoparametric curves in the v parametric direction. A bounded surface is finite. The common behavior of all bounded surfaces is described by the {@link Geom_Surface | `Geom_Surface`} class. The Geom package provides three concrete implementations of bounded surfaces: + * - {@link Geom_BezierSurface | `Geom_BezierSurface`}, + * - {@link Geom_BSplineSurface | `Geom_BSplineSurface`}, and + * - {@link Geom_RectangularTrimmedSurface | `Geom_RectangularTrimmedSurface`}. The first two of these implement well known mathematical definitions of complex surfaces, the third trims a surface using four isoparametric curves, i.e. it limits the variation of its parameters to a rectangle in 2D parametric space. + */ +export declare class Geom_BoundedSurface extends Geom_Surface { + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a BSpline curve. A BSpline curve can be: + * + * - uniform or non-uniform, + * - rational or non-rational, + * - periodic or non-periodic. A BSpline curve is defined by: + * - its degree; the degree for a {@link Geom2d_BSplineCurve | `Geom2d_BSplineCurve`} is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree; + * - its periodic or non-periodic nature; + * - a table of poles (also called control points), with their associated weights if the BSpline curve is rational. The poles of the curve are "control points" used to deform the curve. If the curve is non-periodic, the first pole is the start point of the curve, and the last pole is the end point of the curve. + * The segment, which joins the first pole to the second pole, is the tangent to the curve at its start point, and the segment, which joins the last pole to the second-from-last pole, is the tangent to the curve at its end point. If the curve is periodic, these geometric properties are not verified. It is more difficult to give a geometric signification to the weights but they are useful for providing exact representations of the arcs of a circle or ellipse. Moreover, if the weights of all the poles are equal, the curve has a polynomial equation; it is therefore a non-rational curve. + * - a table of knots with their multiplicities. For a {@link Geom2d_BSplineCurve | `Geom2d_BSplineCurve`}, the table of knots is an increasing sequence of reals without repetition; the multiplicities define the repetition of the knots. A BSpline curve is a piecewise polynomial or rational curve. The knots are the parameters of junction points between two pieces. + * The multiplicity Mult(i) of the knot Knot(i) of the BSpline curve is related to the degree of continuity of the curve at the knot Knot(i), which is equal to Degree - Mult(i) where Degree is the degree of the BSpline curve. If the knots are regularly spaced (i.e. the difference between two consecutive knots is a constant), three specific and frequently used cases of knot distribution can be identified: + * - "uniform" if all multiplicities are equal to 1, + * - "quasi-uniform" if all multiplicities are equal to 1, except the first and the last knot which have a multiplicity of Degree + 1, where Degree is the degree of the BSpline curve, + * - "Piecewise Bezier" if all multiplicities are equal to Degree except the first and last knot which have a multiplicity of Degree + 1, where Degree is the degree of the BSpline curve. A curve of this type is a concatenation of arcs of Bezier curves. If the BSpline curve is not periodic: + * - the bounds of the Poles and Weights tables are 1 and NbPoles, where NbPoles is the number of poles of the BSpline curve, + * - the bounds of the Knots and Multiplicities tables are 1 and NbKnots, where NbKnots is the number of knots of the BSpline curve. If the BSpline curve is periodic, and if there are k periodic knots and p periodic poles, the period is: period = Knot(k + 1) - Knot(1) and the poles and knots tables can be considered as infinite tables, such that: + * - Knot(i+k) = Knot(i) + period + * - Pole(i+p) = Pole(i) Note: data structures of a periodic BSpline curve are more complex than those of a non-periodic one. Warnings: In this class we consider that a weight value is zero if Weight <= Resolution from package gp. For two parametric values (or two knot values) U1, U2 we consider that U1 = U2 if Abs (U2 - U1) <= Epsilon (U1). For two weights values W1, W2 we consider that W1 = W2 if Abs (W2 - W1) <= Epsilon (W1). The method Epsilon is defined in the class Real from package {@link Standard | `Standard`}. + * + * References : . A survey of curve and surface methods in CADG Wolfgang BOHM CAGD 1 (1984) . On de Boor-like algorithms and blossoming Wolfgang BOEHM cagd 5 (1988) . Blossoming and knot insertion algorithms for B-spline curves Ronald N. GOLDMAN . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA . Curves and Surfaces for Computer Aided Geometric Design, a practical guide Gerald Farin + */ +export declare class Geom2d_BSplineCurve extends Geom2d_BoundedCurve { + /** + * Copy constructor for optimized copying without validation. + */ + constructor(theOther: Geom2d_BSplineCurve); + /** + * Creates a non-rational B_spline curve on the basis of degree . The following conditions must be verified. 0 < Degree <= MaxDegree. + * + * Knots.Length() == Mults.Length() >= 2 + * + * Knots(i) < Knots(i+1) (Knots are increasing) + * + * 1 <= Mults(i) <= Degree + * + * On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommended if you want the curve to start and finish on the first and last pole). + * + * On a periodic curve the first and the last multicities must be the same. + * + * on non-periodic curves + * + * Poles.Length() == Sum(Mults(i)) - Degree - 1 >= 2 + * + * on periodic curves + * + * Poles.Length() == Sum(Mults(i)) except the first or last + */ + constructor(Poles: NCollection_Array1_gp_Pnt2d, Knots: NCollection_Array1_double, Multiplicities: NCollection_Array1_int, Degree: number, Periodic?: boolean); + /** + * Creates a rational B_spline curve on the basis of degree . The following conditions must be verified. 0 < Degree <= MaxDegree. + * + * Knots.Length() == Mults.Length() >= 2 + * + * Knots(i) < Knots(i+1) (Knots are increasing) + * + * 1 <= Mults(i) <= Degree + * + * On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommended if you want the curve to start and finish on the first and last pole). + * + * On a periodic curve the first and the last multicities must be the same. + * + * on non-periodic curves + * + * Poles.Length() == Sum(Mults(i)) - Degree - 1 >= 2 + * + * on periodic curves + * + * Poles.Length() == Sum(Mults(i)) except the first or last + */ + constructor(Poles: NCollection_Array1_gp_Pnt2d, Weights: NCollection_Array1_double, Knots: NCollection_Array1_double, Multiplicities: NCollection_Array1_int, Degree: number, Periodic?: boolean); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): unknown; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: unknown): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Increases the degree of this BSpline curve to Degree. As a result, the poles, weights and multiplicities tables are modified; the knots table is not changed. Nothing is done if Degree is less than or equal to the current degree. Exceptions Standard_ConstructionError if Degree is greater than `Geom2d_BSplineCurve::MaxDegree()`. + */ + IncreaseDegree(Degree: number): void; + /** + * Increases the multiplicity of the knot to . + * + * If is lower or equal to the current multiplicity nothing is done. If is higher than the degree, the degree is used. If is not in [FirstUKnotIndex, LastUKnotIndex] + */ + IncreaseMultiplicity(Index: number, M: number): void; + /** + * Increases the multiplicities of the knots in [I1,I2] to . + * + * For each knot if is lower or equal to the current multiplicity nothing is done. If is higher than the degree the degree is used. As a result, the poles and weights tables of this curve are modified. Warning It is forbidden to modify the multiplicity of the first or last knot of a non-periodic curve. Be careful as Geom2d does not protect against this. Exceptions Standard_OutOfRange if either Index, I1 or I2 is outside the bounds of the knots table. + */ + IncreaseMultiplicity(I1: number, I2: number, M: number): void; + /** + * Increases by M the multiplicity of the knots of indexes I1 to I2 in the knots table of this BSpline curve. For each knot, the resulting multiplicity is limited to the degree of this curve. If M is negative, nothing is done. As a result, the poles and weights tables of this BSpline curve are modified. Warning It is forbidden to modify the multiplicity of the first or last knot of a non-periodic curve. Be careful as Geom2d does not protect against this. Exceptions Standard_OutOfRange if I1 or I2 is outside the bounds of the knots table. + */ + IncrementMultiplicity(I1: number, I2: number, M: number): void; + /** + * Inserts a knot value in the sequence of knots. If is an existing knot the multiplicity is increased by . + * + * If U is not on the parameter range nothing is done. + * + * If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. + * + * The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance. Warning + * + * - If U is less than the first parameter or greater than the last parameter of this BSpline curve, nothing is done. + * - If M is negative or null, nothing is done. + * - The multiplicity of a knot is limited to the degree of this BSpline curve. + */ + InsertKnot(U: number, M?: number, ParametricTolerance?: number): void; + /** + * Inserts the values of the array Knots, with the respective multiplicities given by the array Mults, into the knots table of this BSpline curve. If a value of the array Knots is an existing knot, its multiplicity is: + * + * - increased by M, if Add is true, or + * - increased to M, if Add is false (default value). The tolerance criterion used for knot equality is the larger of the values ParametricTolerance (defaulted to 0.) and double::Epsilon(U), where U is the current knot value. Warning + * - For a value of the array Knots which is less than the first parameter or greater than the last parameter of this BSpline curve, nothing is done. + * - For a value of the array Mults which is negative or null, nothing is done. + * - The multiplicity of a knot is limited to the degree of this BSpline curve. + */ + InsertKnots(Knots: NCollection_Array1_double, Mults: NCollection_Array1_int, ParametricTolerance?: number, Add?: boolean): void; + /** + * Reduces the multiplicity of the knot of index Index to M. If M is equal to 0, the knot is removed. With a modification of this type, the array of poles is also modified. Two different algorithms are systematically used to compute the new poles of the curve. + * If, for each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is less than Tolerance, this ensures that the curve is not modified by more than Tolerance. Under these conditions, true is returned; otherwise, false is returned. A low tolerance is used to prevent modification of the curve. A high tolerance is used to "smooth" the curve. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table. + */ + RemoveKnot(Index: number, M: number, Tolerance: number): boolean; + /** + * The new pole is inserted after the pole of range Index. If the curve was non rational it can become rational. + * + * Raised if the B-spline is NonUniform or PiecewiseBezier or if Weight <= 0.0 Raised if Index is not in the range [1, Number of Poles] + */ + InsertPoleAfter(Index: number, P: gp_Pnt2d, Weight?: number): void; + /** + * The new pole is inserted before the pole of range Index. If the curve was non rational it can become rational. + * + * Raised if the B-spline is NonUniform or PiecewiseBezier or if Weight <= 0.0 Raised if Index is not in the range [1, Number of Poles] + */ + InsertPoleBefore(Index: number, P: gp_Pnt2d, Weight?: number): void; + /** + * Removes the pole of range Index If the curve was rational it can become non rational. + * + * Raised if the B-spline is NonUniform or PiecewiseBezier. Raised if the number of poles of the B-spline curve is lower or equal to 2 before removing. Raised if Index is not in the range [1, Number of Poles] + */ + RemovePole(Index: number): void; + /** + * Reverses the orientation of this BSpline curve. As a result. + * + * - the knots and poles tables are modified; + * - the start point of the initial curve becomes the end point of the reversed curve; + * - the end point of the initial curve becomes the start point of the reversed curve. + */ + Reverse(): void; + /** + * Computes the parameter on the reversed curve for the point of parameter U on this BSpline curve. The returned value is: UFirst + ULast - U, where UFirst and ULast are the values of the first and last parameters of this BSpline curve. + */ + ReversedParameter(U: number): number; + /** + * Modifies this BSpline curve by segmenting it between U1 and U2. Either of these values can be outside the bounds of the curve, but U2 must be greater than U1. All data structure tables of this BSpline curve are modified, but the knots located between U1 and U2 are retained. The degree of the curve is not modified. + * + * Parameter theTolerance defines the possible proximity of the segment boundaries and B-spline knots to treat them as equal. + * + * Warnings: Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve or if the curve makes loop. After the segmentation the length of a curve can be null. + * + * - The segmentation of a periodic curve over an interval corresponding to its period generates a non-periodic curve with equivalent geometry. Exceptions Standard_DomainError if U2 is less than U1. raises if U2 < U1. Standard_DomainError if U2 - U1 exceeds the period for periodic curves. i.e. ((U2 - U1) - Period) > `Precision::PConfusion()`. + */ + Segment(U1: number, U2: number, theTolerance?: number): void; + /** + * Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index - 1) < K < Knots(Index + 1) Exceptions Standard_ConstructionError if: + * + * - K is not such that: Knots(Index - 1) < K < Knots(Index + 1) + * - M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table. + */ + SetKnot(Index: number, K: number): void; + /** + * Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index - 1) < K < Knots(Index + 1) The second syntax allows you also to increase the multiplicity of the knot to M (but it is not possible to decrease the multiplicity of the knot with this function). Exceptions Standard_ConstructionError if: + * + * - K is not such that: Knots(Index - 1) < K < Knots(Index + 1) + * - M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table. + */ + SetKnot(Index: number, K: number, M: number): void; + /** + * Modifies this BSpline curve by assigning the array K to its knots table. The multiplicity of the knots is not modified. Exceptions Standard_ConstructionError if the values in the array K are not in ascending order. Standard_OutOfRange if the bounds of the array K are not respectively 1 and the number of knots of this BSpline curve. + */ + SetKnots(K: NCollection_Array1_double): void; + /** + * Computes the parameter normalized within the "first" period of this BSpline curve, if it is periodic: the returned value is in the range Param1 and Param1 + Period, where: + * + * - Param1 is the "first parameter", and + * - Period the period of this BSpline curve. Note: If this curve is not periodic, U is not modified. + * @returns A result object with fields: + * - `U`: updated value from the call. + */ + PeriodicNormalization(U?: number): { U: number }; + /** + * Changes this BSpline curve into a periodic curve. To become periodic, the curve must first be closed. Next, the knot sequence must be periodic. For this, FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2, the indexes in the knots array of the knots corresponding to the first and last parameters of this BSpline curve. The period is therefore Knot(I2) - Knot(I1). Consequently, the knots and poles tables are modified. Exceptions Standard_ConstructionError if this BSpline curve is not closed. + */ + SetPeriodic(): void; + /** + * Assigns the knot of index Index in the knots table as the origin of this periodic BSpline curve. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this curve is not periodic. Standard_DomainError if Index is outside the bounds of the knots table. + */ + SetOrigin(Index: number): void; + /** + * Changes this BSpline curve into a non-periodic curve. If this curve is already non-periodic, it is not modified. Note that the poles and knots tables are modified. Warning If this curve is periodic, as the multiplicity of the first and last knots is not modified, and is not equal to Degree + 1, where Degree is the degree of this BSpline curve, the start and end points of the curve are not its first and last poles. + */ + SetNotPeriodic(): void; + /** + * Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null. + */ + SetPole(Index: number, P: gp_Pnt2d): void; + /** + * Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. The second syntax also allows you to modify the weight of the modified pole, which becomes Weight. In this case, if this BSpline curve is non-rational, it can become rational and vice versa. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null. + */ + SetPole(Index: number, P: gp_Pnt2d, Weight: number): void; + /** + * Assigns the weight Weight to the pole of index Index of the poles table. If the curve was non rational it can become rational. If the curve was rational it can become non rational. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null. + */ + SetWeight(Index: number, Weight: number): void; + /** + * Moves the point of parameter U of this BSpline curve to P. Index1 and Index2 are the indexes in the table of poles of this BSpline curve of the first and last poles designated to be moved. FirstModifiedPole and LastModifiedPole are the indexes of the first and last poles, which are effectively modified. In the event of incompatibility between Index1, Index2 and the value U: + * + * - no change is made to this BSpline curve, and + * - the FirstModifiedPole and LastModifiedPole are returned null. Exceptions Standard_OutOfRange if: + * - Index1 is greater than or equal to Index2, or + * - Index1 or Index2 is less than 1 or greater than the number of poles of this BSpline curve. + * @returns A result object with fields: + * - `FirstModifiedPole`: updated value from the call. + * - `LastModifiedPole`: updated value from the call. + */ + MovePoint(U: number, P: gp_Pnt2d, Index1: number, Index2: number, FirstModifiedPole?: number, LastModifiedPole?: number): { FirstModifiedPole: number; LastModifiedPole: number }; + /** + * Move a point with parameter U to P. and makes it tangent at U be Tangent. StartingCondition = -1 means first can move EndingCondition = -1 means last point can move StartingCondition = 0 means the first point cannot move EndingCondition = 0 means the last point cannot move StartingCondition = 1 means the first point and tangent cannot move EndingCondition = 1 means the last point and tangent cannot move and so forth ErrorStatus != 0 means that there are not enough degree of freedom with the constrain to deform the curve accordingly. + * @returns A result object with fields: + * - `ErrorStatus`: updated value from the call. + */ + MovePointAndTangent(U: number, P: gp_Pnt2d, Tangent: gp_Vec2d, Tolerance: number, StartingCondition: number, EndingCondition: number, ErrorStatus?: number): { ErrorStatus: number }; + /** + * Returns true if the degree of continuity of this BSpline curve is at least N. A BSpline curve is at least GeomAbs_C0. Exceptions Standard_RangeError if N is negative. + */ + IsCN(N: number): boolean; + /** + * Check if curve has at least G1 continuity in interval [theTf, theTl] Returns true if IsCN(1) or angle between "left" and "right" first derivatives at knots with C0 continuity is less then theAngTol only knots in interval [theTf, theTl] is checked. + */ + IsG1(theTf: number, theTl: number, theAngTol: number): boolean; + /** + * Returns true if the distance between the first point and the last point of the curve is lower or equal to Resolution from package gp. Warnings : The first and the last point can be different from the first pole and the last pole of the curve. + */ + IsClosed(): boolean; + /** + * Returns True if the curve is periodic. + */ + IsPeriodic(): boolean; + /** + * Returns True if the weights are not identical. The tolerance criterion is Epsilon of the class Real. + */ + IsRational(): boolean; + /** + * Returns the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, CN : the order of continuity is infinite. For a B-spline curve of degree d if a knot Ui has a multiplicity p the B-spline curve is only Cd-p continuous at Ui. + * So the global continuity of the curve can't be greater than Cd-p where p is the maximum multiplicity of the interior Knots. In the interior of a knot span the curve is infinitely continuously differentiable. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns the degree of this BSpline curve. In this class the degree of the basis normalized B-spline functions cannot be greater than "MaxDegree" Computation of value and derivatives. + */ + Degree(): number; + /** + * Computes the point of parameter U. Raises an exception on failure. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Raised if the continuity of the curve is not C1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Raised if the continuity of the curve is not C2. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * For this BSpline curve, computes. + * + * - the point P of parameter U, or + * - the point P and one or more of the following values: + * - V1, the first derivative vector, + * - V2, the second derivative vector, + * - V3, the third derivative vector. Warning On a point where the continuity of the curve is not the one requested, these functions impact the part defined by the parameter with a value greater than U, i.e. the part of the curve to the "right" of the singularity. Raises UndefinedDerivative if the continuity of the curve is not C3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For the point of parameter U of this BSpline curve, computes the vector corresponding to the Nth derivative. + * Warning On a point where the continuity of the curve is not the one requested, this function impacts the part defined by the parameter with a value greater than U, i.e. the part of the curve to the "right" of the singularity. Raises UndefinedDerivative if the continuity of the curve is not CN. RangeError if N < 1. + * The following functions computes the point of parameter U and the derivatives at this point on the B-spline curve arc defined between the knot FromK1 and the knot ToK2. + * U can be out of bounds [Knot (FromK1), Knot (ToK2)] but for the computation we only use the definition of the curve between these two knots. This method is useful to compute local derivative, if the order of continuity of the whole curve is not greater enough. + * Inside the parametric domain Knot (FromK1), Knot (ToK2) the evaluations are the same as if we consider the whole definition of the curve. Of course the evaluations are different outside this parametric domain. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Raised if FromK1 = ToK2. + */ + LocalValue(U: number, FromK1: number, ToK2: number): gp_Pnt2d; + /** + * Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + LocalD0(U: number, FromK1: number, ToK2: number, P: gp_Pnt2d): void; + /** + * Raised if the local continuity of the curve is not C1 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + */ + LocalD1(U: number, FromK1: number, ToK2: number, P: gp_Pnt2d, V1: gp_Vec2d): void; + /** + * Raised if the local continuity of the curve is not C2 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + LocalD2(U: number, FromK1: number, ToK2: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void; + /** + * Raised if the local continuity of the curve is not C3 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + LocalD3(U: number, FromK1: number, ToK2: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d): void; + /** + * Raised if the local continuity of the curve is not CN between the knot K1 and the knot K2. Raised if FromK1 = ToK2. Raised if N < 1. + */ + LocalDN(U: number, FromK1: number, ToK2: number, N: number): gp_Vec2d; + /** + * Returns the last point of the curve. Warnings : The last point of the curve is different from the last pole of the curve if the multiplicity of the last knot is lower than Degree. + */ + EndPoint(): gp_Pnt2d; + /** + * For a B-spline curve the first parameter (which gives the start point of the curve) is a knot value but if the multiplicity of the first knot index is lower than Degree + 1 it is not the first knot of the curve. This method computes the index of the knot corresponding to the first parameter. + */ + FirstUKnotIndex(): number; + /** + * Computes the parametric value of the start point of the curve. It is a knot value. + */ + FirstParameter(): number; + /** + * Returns the knot of range Index. When there is a knot with a multiplicity greater than 1 the knot is not repeated. The method Multiplicity can be used to get the multiplicity of the Knot. Raised if Index < 1 or Index > NbKnots. + */ + Knot(Index: number): number; + /** + * returns the knot values of the B-spline curve; + * + * Raised K.Lower() is less than number of first knot or K.Upper() is more than number of last knot. + * @param K Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Knots(K: NCollection_Array1_double): void; + /** + * returns the knot values of the B-spline curve; + */ + Knots(): NCollection_Array1_double; + /** + * Returns the knots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : K = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + * + * Raised if K.Lower() is less than number of first knot in knot sequence with repetitions or K.Upper() is more than number of last knot in knot sequence with repetitions. + * @param K Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + KnotSequence(K: NCollection_Array1_double): void; + /** + * Returns the knots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : K = {k1, k1, k1, k2, k3, k3, k4, k4, k4}. + */ + KnotSequence(): NCollection_Array1_double; + /** + * Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot the BSpline Curve can be : + * + * - Uniform if all the knots are of multiplicity 1, + * - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, + * - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree A piecewise Bezier with only two knots is a BezierCurve. else the curve is non uniform. The tolerance criterion is Epsilon from class Real. + */ + KnotDistribution(): unknown; + /** + * For a BSpline curve the last parameter (which gives the end point of the curve) is a knot value but if the multiplicity of the last knot index is lower than Degree + 1 it is not the last knot of the curve. This method computes the index of the knot corresponding to the last parameter. + */ + LastUKnotIndex(): number; + /** + * Computes the parametric value of the end point of the curve. It is a knot value. + */ + LastParameter(): number; + /** + * Locates the parametric value U in the sequence of knots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. Knots (I1) <= U <= Knots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < Knots (1) - std::abs(ParametricTolerance) . if I2 > NbKnots => U > Knots (NbKnots) + std::abs(ParametricTolerance). + * @returns A result object with fields: + * - `I1`: updated value from the call. + * - `I2`: updated value from the call. + */ + LocateU(U: number, ParametricTolerance: number, I1: number, I2: number, WithKnotRepetition: boolean): { I1: number; I2: number }; + /** + * Returns the multiplicity of the knots of range Index. Raised if Index < 1 or Index > NbKnots. + */ + Multiplicity(Index: number): number; + /** + * Returns the multiplicity of the knots of the curve. + * + * Raised if the length of M is not equal to NbKnots. + * @param M Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Multiplicities(M: NCollection_Array1_int): void; + /** + * returns the multiplicity of the knots of the curve. + */ + Multiplicities(): NCollection_Array1_int; + /** + * Returns the number of knots. This method returns the number of knot without repetition of multiple knots. + */ + NbKnots(): number; + /** + * Returns the number of poles. + */ + NbPoles(): number; + /** + * Returns the pole of range Index. Raised if Index < 1 or Index > NbPoles. + */ + Pole(Index: number): gp_Pnt2d; + /** + * Returns the poles of the B-spline curve;. + * + * Raised if the length of P is not equal to the number of poles. + * @param P Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Poles(P: NCollection_Array1_gp_Pnt2d): void; + /** + * Returns the poles of the B-spline curve;. + */ + Poles(): NCollection_Array1_gp_Pnt2d; + /** + * Returns the start point of the curve. Warnings : This point is different from the first pole of the curve if the multiplicity of the first knot is lower than Degree. + */ + StartPoint(): gp_Pnt2d; + /** + * Returns the weight of the pole of range Index . Raised if Index < 1 or Index > NbPoles. + */ + Weight(Index: number): number; + /** + * Returns the weights of the B-spline curve;. + * + * Raised if the length of W is not equal to NbPoles. + * @param W Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Weights(W: NCollection_Array1_double): void; + /** + * Returns the weights of the B-spline curve;. + */ + Weights(): NCollection_Array1_double; + /** + * Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from `BSplCLib`. The array is always sized to match `NbPoles()`. + * @remarks **Warning:** Do NOT modify elements through the returned reference. + */ + WeightsArray(): NCollection_Array1_double; + /** + * Applies the transformation T to this BSpline curve. + */ + Transform(T: gp_Trsf2d): void; + /** + * Returns the value of the maximum degree of the normalized B-spline basis functions in this package. + */ + static MaxDegree(): number; + /** + * Computes for this BSpline curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this BSpline curve, UTolerance ensures that: | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < ToleranceUV. + * @returns A result object with fields: + * - `UTolerance`: updated value from the call. + */ + Resolution(ToleranceUV: number, UTolerance?: number): { UTolerance: number }; + /** + * Creates a new object which is a copy of this BSpline curve. + */ + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class BoundedCurve describes the common behavior of bounded curves in 2D space. A bounded curve is limited by two finite values of the parameter, termed respectively "first parameter" and "last parameter". The "first parameter" gives the "start point" of the bounded curve, and the "last parameter" gives the "end point" of the bounded curve. The length of a bounded curve is finite. The Geom2d package provides three concrete classes of bounded curves: + * + * - two frequently used mathematical formulations of complex curves: + * - {@link Geom2d_BezierCurve | `Geom2d_BezierCurve`}, + * - {@link Geom2d_BSplineCurve | `Geom2d_BSplineCurve`}, and + * - {@link Geom2d_TrimmedCurve | `Geom2d_TrimmedCurve`} to trim a curve, i.e. to only take part of the curve limited by two values of the parameter of the basis curve. + */ +export declare class Geom2d_BoundedCurve extends Geom2d_Curve { + /** + * Returns the end point of the curve. The end point is the value of the curve for the "LastParameter" of the curve. + */ + EndPoint(): gp_Pnt2d; + /** + * Returns the start point of the curve. The start point is the value of the curve for the "FirstParameter" of the curve. + */ + StartPoint(): gp_Pnt2d; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Defines a portion of a curve limited by two values of parameters inside the parametric domain of the curve. The trimmed curve is defined by: + * + * - the basis curve, and + * - the two parameter values which limit it. The trimmed curve can either have the same orientation as the basis curve or the opposite orientation. + */ +export declare class Geom2d_TrimmedCurve extends Geom2d_BoundedCurve { + /** + * Creates a trimmed curve from the basis curve C limited between U1 and U2. + * + * . U1 can be greater or lower than U2. . The returned curve is oriented from U1 to U2. . If the basis curve C is periodic there is an ambiguity because two parts are available. In this case by default the trimmed curve has the same orientation as the basis curve (Sense = True). If Sense = False then the orientation of the trimmed curve is opposite to the orientation of the basis curve C. + * If the curve is closed but not periodic it is not possible to keep the part of the curve including the junction point (except if the junction point is at the beginning or at the end of the trimmed curve) because you could lose the fundamental characteristics of the basis curve which are used for example to compute the derivatives of the trimmed curve. So for a closed curve the rules are the same as for a open curve. Warnings : In this package the entities are not shared. The TrimmedCurve is built with a copy of the curve C. + * So when C is modified the TrimmedCurve is not modified Warnings : If `is periodic and is True, parametrics bounds of the TrimmedCurve, can be different to [;}, if or are not in the principal period. Include : For more explanation see the scheme given with this class. Raises ConstructionError the C is not periodic and U1 or U2 are out of the bounds of C. Raised if U1 = U2.` + */ + constructor(C: Geom2d_Curve, U1: number, U2: number, Sense?: boolean, theAdjustPeriodic?: boolean); + /** + * Changes the direction of parametrization of . The first and the last parametric values are modified. The "StartPoint" of the initial curve becomes the "EndPoint" of the reversed curve and the "EndPoint" of the initial curve becomes the "StartPoint" of the reversed curve. Example - If the trimmed curve is defined by: + * + * - a basis curve whose parameter range is [ 0.,1. ], and + * - the two trim values U1 (first parameter) and U2 (last parameter), the reversed trimmed curve is defined by: + * - the reversed basis curve, whose parameter range is still [ 0.,1. ], and + * - the two trim values 1. - U2 (first parameter) and 1. - U1 (last parameter). + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + * + * returns UFirst + ULast - U + */ + ReversedParameter(U: number): number; + /** + * Changes this trimmed curve, by redefining the parameter values U1 and U2, which limit its basis curve. Note: If the basis curve is periodic, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. + * Warning If the basis curve is periodic and theAdjustPeriodic is True, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. If theAdjustPeriodic is False, parameters U1 and U2 will stay unchanged. Exceptions Standard_ConstructionError if: + * + * - the basis curve is not periodic, and either U1 or U2 are outside the bounds of the basis curve, or + * - U1 is equal to U2. + */ + SetTrim(U1: number, U2: number, Sense?: boolean, theAdjustPeriodic?: boolean): void; + /** + * Returns the basis curve. Warning This function does not return a constant reference. Consequently, any modification of the returned value directly modifies the trimmed curve. + */ + BasisCurve(): Geom2d_Curve; + /** + * Returns the global continuity of the basis curve of this trimmed curve. C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, CN : the order of continuity is infinite. + */ + Continuity(): GeomAbs_Shape; + /** + * -- Purpose Returns True if the order of continuity of the trimmed curve is N. A trimmed curve is at least "C0" continuous. Warnings : The continuity of the trimmed curve can be greater than the continuity of the basis curve because you consider only a part of the basis curve. Raised if N < 0. + */ + IsCN(N: number): boolean; + /** + * Returns the end point of . This point is the evaluation of the curve for the "LastParameter". + */ + EndPoint(): gp_Pnt2d; + /** + * Returns the value of the first parameter of . The first parameter is the parameter of the "StartPoint" of the trimmed curve. + */ + FirstParameter(): number; + /** + * Returns TRUE if the basis curve is periodic and the trim spans exactly one full period, or if the distance between the StartPoint and the EndPoint is within computational precision. + */ + IsClosed(): boolean; + /** + * Returns TRUE if the basis curve is periodic and the trim spans exactly one full period. Returns FALSE otherwise. + */ + IsPeriodic(): boolean; + /** + * Returns the period of the basis curve of this trimmed curve. Exceptions Standard_NoSuchObject if the basis curve is not periodic. + */ + Period(): number; + /** + * Returns the value of the last parameter of . The last parameter is the parameter of the "EndPoint" of the trimmed curve. + */ + LastParameter(): number; + /** + * Returns the start point of . This point is the evaluation of the curve from the "FirstParameter". value and derivatives Warnings : The returned derivatives have the same orientation as the derivatives of the basis curve. + */ + StartPoint(): gp_Pnt2d; + /** + * If the basis curve is an OffsetCurve sometimes it is not possible to do the evaluation of the curve at the parameter U (see class OffsetCurve). + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Raised if the continuity of the curve is not C1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Raised if the continuity of the curve is not C2. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Raised if the continuity of the curve is not C3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For the point of parameter U of this trimmed curve, computes the vector corresponding to the Nth derivative. Warning The returned derivative vector has the same orientation as the derivative vector of the basis curve, even if the trimmed curve does not have the same orientation as the basis curve. Exceptions Standard_RangeError if N is less than 1. geometric transformations. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Applies the transformation T to this trimmed curve. Warning The basis curve is also modified. + */ + Transform(T: gp_Trsf2d): void; + /** + * Returns the parameter on the transformed curve for the transform of the point of parameter U on . + * + * me->Transformed(T)->Value(me->TransformedParameter(U,T)) + * + * is the same point as + * + * me->Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + TransformedParameter(U: number, T: gp_Trsf2d): number; + /** + * Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on . + * + * Transformed(T)->Value(U * ParametricTransformation(T)) + * + * is the same point as + * + * Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + ParametricTransformation(T: gp_Trsf2d): number; + /** + * Creates a new object, which is a copy of this trimmed curve. + */ + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a circle in the plane (2D space). + * A circle is defined by its radius and, as with any conic curve, is positioned in the plane with a coordinate system ({@link gp_Ax22d | `gp_Ax22d`} object) where the origin is the center of the circle. The coordinate system is the local coordinate system of the circle. + * The orientation (direct or indirect) of the local coordinate system gives an explicit orientation to the circle, determining the direction in which the parameter increases along the circle. + * The {@link Geom2d_Circle | `Geom2d_Circle`} circle is parameterized by an angle: P(U) = O + R*std::cos(U)*XDir + R*Sin(U)*YDir where: + * + * - P is the point of parameter U, + * - O, XDir and YDir are respectively the origin, "X Direction" and "Y Direction" of its local coordinate system, + * - R is the radius of the circle. The "X Axis" of the local coordinate system therefore defines the origin of the parameter of the circle. The parameter is the angle with this "X Direction". A circle is a closed and periodic curve. The period is 2.*Pi and the parameter range is [ 0,2.*Pi [. See Also GCE2d_MakeCircle which provides functions for more complex circle constructions {@link gp_Ax22d | `gp_Ax22d`} and {@link gp_Circ2d | `gp_Circ2d`} for an equivalent, non-parameterized data structure. + */ +export declare class Geom2d_Circle extends Geom2d_Conic { + /** + * Constructs a circle by conversion of the {@link gp_Circ2d | `gp_Circ2d`} circle C. + */ + constructor(C: gp_Circ2d); + /** + * Constructs a circle of radius Radius, where the coordinate system A locates the circle and defines its orientation in the plane such that: + * + * - the center of the circle is the origin of A, + * - the orientation (direct or indirect) of A gives the orientation of the circle. + */ + constructor(A: gp_Ax22d, Radius: number); + /** + * Constructs a circle of radius Radius, whose center is the origin of axis A; A is the "X Axis" of the local coordinate system of the circle; this coordinate system is direct if Sense is true (default value) or indirect if Sense is false. Note: It is possible to create a circle where Radius is equal to 0.0. Exceptions Standard_ConstructionError if Radius is negative. + */ + constructor(A: gp_Ax2d, Radius: number, Sense?: boolean); + /** + * Converts the {@link gp_Circ2d | `gp_Circ2d`} circle C into this circle. + */ + SetCirc2d(C: gp_Circ2d): void; + SetRadius(R: number): void; + /** + * Returns the non persistent circle from gp with the same geometric properties as . + */ + Circ2d(): gp_Circ2d; + /** + * Returns the radius of this circle. + */ + Radius(): number; + /** + * Computes the parameter on the reversed circle for the point of parameter U on this circle. For a circle, the returned value is: 2.*Pi - U. + */ + ReversedParameter(U: number): number; + /** + * Returns 0., which is the eccentricity of any circle. + */ + Eccentricity(): number; + /** + * Returns 0.0. + */ + FirstParameter(): number; + /** + * Returns 2*PI. + */ + LastParameter(): number; + /** + * returns True. + */ + IsClosed(): boolean; + /** + * returns True. The period of a circle is 2.*Pi. + */ + IsPeriodic(): boolean; + /** + * Returns in P the point of parameter U. P = C + R * Cos (U) * XDir + R * Sin (U) * YDir where C is the center of the circle , XDir the XDirection and YDir the YDirection of the circle's local coordinate system. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Returns the point P of parameter U and the first derivative V1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Returns the point P of parameter u, the first second and third derivatives V1 V2 and V3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For the point of parameter U of this circle, computes the vector corresponding to the Nth derivative. Exceptions: Standard_RangeError if N is less than 1. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Applies the transformation T to this circle. + */ + Transform(T: gp_Trsf2d): void; + /** + * Creates a new object which is a copy of this circle. + */ + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an infinite line in the plane (2D space). A line is defined and positioned in the plane with an axis ({@link gp_Ax2d | `gp_Ax2d`} object) which gives it an origin and a unit vector. The {@link Geom2d_Line | `Geom2d_Line`} line is parameterized as follows: P (U) = O + U*Dir where: + * + * - P is the point of parameter U, + * - O is the origin and Dir the unit vector of its positioning axis. The parameter range is ] -infinite, +infinite [. The orientation of the line is given by the unit vector of its positioning axis. See Also GCE2d_MakeLine which provides functions for more complex line constructions {@link gp_Ax2d | `gp_Ax2d`} {@link gp_Lin2d | `gp_Lin2d`} for an equivalent, non-parameterized data structure. + */ +export declare class Geom2d_Line extends Geom2d_Curve { + /** + * Creates a line located in 2D space with the axis placement A. The Location of A is the origin of the line. + */ + constructor(A: gp_Ax2d); + /** + * Creates a line by conversion of the {@link gp_Lin2d | `gp_Lin2d`} line L. + */ + constructor(L: unknown); + /** + * Constructs a line passing through point P and parallel to vector V (P and V are, respectively, the origin and the unit vector of the positioning axis of the line). + */ + constructor(P: gp_Pnt2d, V: gp_Dir2d); + /** + * Set so that has the same geometric properties as L. + */ + SetLin2d(L: unknown): void; + /** + * changes the direction of the line. + */ + SetDirection(V: gp_Dir2d): void; + /** + * changes the direction of the line. + */ + Direction(): gp_Dir2d; + /** + * Changes the "Location" point (origin) of the line. + */ + SetLocation(P: gp_Pnt2d): void; + /** + * Changes the "Location" point (origin) of the line. + */ + Location(): gp_Pnt2d; + /** + * Changes the "Location" and a the "Direction" of . + */ + SetPosition(A: gp_Ax2d): void; + Position(): gp_Ax2d; + /** + * Returns non persistent line from gp with the same geometric properties as . + */ + Lin2d(): unknown; + /** + * Changes the orientation of this line. As a result, the unit vector of the positioning axis of this line is reversed. + */ + Reverse(): void; + /** + * Computes the parameter on the reversed line for the point of parameter U on this line. For a line, the returned value is -U. + */ + ReversedParameter(U: number): number; + /** + * Returns RealFirst from {@link Standard | `Standard`}. + */ + FirstParameter(): number; + /** + * Returns RealLast from {@link Standard | `Standard`}. + */ + LastParameter(): number; + /** + * Returns False. + */ + IsClosed(): boolean; + /** + * Returns False. + */ + IsPeriodic(): boolean; + /** + * Returns GeomAbs_CN, which is the global continuity of any line. + */ + Continuity(): GeomAbs_Shape; + /** + * Computes the distance between and the point P. + */ + Distance(P: gp_Pnt2d): number; + /** + * Returns True. + */ + IsCN(N: number): boolean; + /** + * Returns in P the point of parameter U. P (U) = O + U * Dir where O is the "Location" point of the line and Dir the direction of the line. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Returns the point P of parameter u and the first derivative V1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. V2 is a vector with null magnitude for a line. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * V2 and V3 are vectors with null magnitude for a line. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For the point of parameter U of this line, computes the vector corresponding to the Nth derivative. Note: if N is greater than or equal to 2, the result is a vector with null magnitude. Exceptions Standard_RangeError if N is less than 1. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Applies the transformation T to this line. + */ + Transform(T: gp_Trsf2d): void; + /** + * Computes the parameter on the line transformed by T for the point of parameter U on this line. For a line, the returned value is equal to U multiplied by the scale factor of transformation T. + */ + TransformedParameter(U: number, T: gp_Trsf2d): number; + /** + * Returns the coefficient required to compute the parametric transformation of this line when transformation T is applied. This coefficient is the ratio between the parameter of a point on this line and the parameter of the transformed point on the new line transformed by T. For a line, the returned value is the scale factor of the transformation T. + */ + ParametricTransformation(T: gp_Trsf2d): number; + /** + * Creates a new object, which is a copy of this line. + */ + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class Curve describes the common behavior of curves in 2D space. The Geom2d package provides numerous concrete classes of derived curves, including lines, circles, conics, Bezier or BSpline curves, etc. The main characteristic of these curves is that they are parameterized. The {@link Geom2d_Curve | `Geom2d_Curve`} class shows: + * + * - how to work with the parametric equation of a curve in order to calculate the point of parameter u, together with the vector tangent and the derivative vectors of order 2, 3,..., N at this point; + * - how to obtain general information about the curve (for example, level of continuity, closed characteristics, periodicity, bounds of the parameter field); + * - how the parameter changes when a geometric transformation is applied to the curve or when the orientation of the curve is inverted. All curves must have a geometric continuity: a curve is at least "C0". Generally, this property is checked at the time of construction or when the curve is edited. Where this is not the case, the documentation explicitly states so. Warning The Geom2d package does not prevent the construction of curves with null length or curves which self-intersect. + */ +export declare class Geom2d_Curve extends Geom2d_Geometry { + /** + * Changes the direction of parametrization of . The "FirstParameter" and the "LastParameter" are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve. + */ + Reverse(): void; + /** + * Computes the parameter on the reversed curve for the point of parameter U on this curve. Note: The point of parameter U on this curve is identical to the point of parameter ReversedParameter(U) on the reversed curve. + */ + ReversedParameter(U: number): number; + /** + * Computes the parameter on the curve transformed by T for the point of parameter U on this curve. Note: this function generally returns U but it can be redefined (for example, on a line). + */ + TransformedParameter(U: number, T: gp_Trsf2d): number; + /** + * Returns the coefficient required to compute the parametric transformation of this curve when transformation T is applied. This coefficient is the ratio between the parameter of a point on this curve and the parameter of the transformed point on the new curve transformed by T. Note: this function generally returns 1. but it can be redefined (for example, on a line). + */ + ParametricTransformation(T: gp_Trsf2d): number; + /** + * Creates a reversed duplicate Changes the orientation of this curve. The first and last parameters are not changed, but the parametric direction of the curve is reversed. If the curve is bounded: + * + * - the start point of the initial curve becomes the end point of the reversed curve, and + * - the end point of the initial curve becomes the start point of the reversed curve. + * - Reversed creates a new curve. + */ + Reversed(): Geom2d_Curve; + /** + * Returns the value of the first parameter. Warnings : It can be RealFirst or RealLast from package {@link Standard | `Standard`} if the curve is infinite. + */ + FirstParameter(): number; + /** + * Value of the last parameter. Warnings : It can be RealFirst or RealLast from package {@link Standard | `Standard`} if the curve is infinite. + */ + LastParameter(): number; + /** + * Returns true if the curve is closed. Examples : Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp which is a fixed criterion independent of the application. + */ + IsClosed(): boolean; + /** + * Returns true if the parameter of the curve is periodic. It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve. + * The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic. + */ + IsPeriodic(): boolean; + /** + * Returns the period of this curve. raises if the curve is not periodic. + */ + Period(): number; + /** + * It is the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns true if the degree of continuity of this curve is at least N. Exceptions Standard_RangeError if N is less than 0. + */ + IsCN(N: number): boolean; + /** + * Computes the point of parameter U. Raises an exception on failure. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * Computes the Nth derivative at parameter U. Raises an exception if the curve continuity is not CN, or N < 1. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Returns in P the point of parameter U. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + D0(U: number, P: gp_Pnt2d): void; + /** + * Returns the point P of parameter U and the first derivative V1. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + */ + D1(U: number, P: gp_Pnt2d, V1: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + D2(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first, the second and the third derivative. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + D3(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d): void; + /** + * Computes the Nth derivative vector. + */ + DN(U: number, N: number): gp_Vec2d; + /** + * Computes the point of parameter U on . Implemented with D0. + */ + Value(U: number): gp_Pnt2d; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Geom2d_Curve_ResD1 { + Point: gp_Pnt2d; + D1: gp_Vec2d; +} + +export interface Geom2d_Curve_ResD2 { + Point: gp_Pnt2d; + D1: gp_Vec2d; + D2: gp_Vec2d; +} + +export interface Geom2d_Curve_ResD3 { + Point: gp_Pnt2d; + D1: gp_Vec2d; + D2: gp_Vec2d; + D3: gp_Vec2d; +} + +/** + * This class implements the basis services for the creation, edition, modification and evaluation of planar offset curve. The offset curve is obtained by offsetting by distance along the normal to a basis curve defined in 2D space. The offset curve in this package can be a self intersecting curve even if the basis curve does not self-intersect. The self intersecting portions are not deleted at the construction time. + * An offset curve is a curve at constant distance (Offset) from a basis curve and the offset curve takes its parametrization from the basis curve. The Offset curve is in the direction of the normal to the basis curve N. + * The distance offset may be positive or negative to indicate the preferred side of the curve : . distance offset >0 => the curve is in the direction of N . distance offset >0 => the curve is in the direction of - N On the Offset curve : Value(u) = BasisCurve.Value(U) + (Offset * (T ^ Z)) / ||T ^ Z|| where T is the tangent vector to the basis curve and Z the direction of the normal vector to the plane of the curve, N = T ^ Z defines the offset direction and should not have null length. + * + * Warnings : In this package we suppose that the continuity of the offset curve is one degree less than the continuity of the basis curve and we don't check that at any point ||T^Z|| != 0.0 + * + * So to evaluate the curve it is better to check that the offset curve is well defined at any point because an exception could be raised. The check is not done in this package at the creation of the offset curve because the control needs the use of an algorithm which cannot be implemented in this package. The OffsetCurve is closed if the first point and the last point are the same (The distance between these two points is lower or equal to the Resolution sea package gp) . The OffsetCurve can be closed even if the basis curve is not closed. + */ +export declare class Geom2d_OffsetCurve extends Geom2d_Curve { + /** + * Copy constructor for optimized copying without validation. + */ + constructor(theOther: Geom2d_OffsetCurve); + /** + * Constructs a curve offset from the basis curve C, where Offset is the distance between the offset curve and the basis curve at any point. A point on the offset curve is built by measuring the offset value along a normal vector at a point on C. This normal vector is obtained by rotating the vector tangential to C at 90 degrees in the anti-trigonometric sense. + * The side of C on which the offset value is measured is indicated by this normal vector if Offset is positive, or in the inverse sense if Offset is negative. If isNotCheckC0 = TRUE checking if basis curve has C0-continuity is not made. Warnings : In this package the entities are not shared. The OffsetCurve is built with a copy of the curve C. + * So when C is modified the OffsetCurve is not modified Warning! if isNotCheckC0 = false, ConstructionError raised if the basis curve C is not at least C1. No check is done to know if ||V^Z|| != 0.0 at any point. + */ + constructor(C: Geom2d_Curve, Offset: number, isNotCheckC0?: boolean); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): unknown; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: unknown): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Changes the direction of parametrization of . As a result: + * + * - the basis curve is reversed, + * - the start point of the initial curve becomes the end point of the reversed curve, + * - the end point of the initial curve becomes the start point of the reversed curve, and + * - the first and last parameters are recomputed. + */ + Reverse(): void; + /** + * Computes the parameter on the reversed curve for the point of parameter U on this offset curve. + */ + ReversedParameter(U: number): number; + /** + * Changes this offset curve by assigning C as the basis curve from which it is built. If isNotCheckC0 = TRUE checking if basis curve has C0-continuity is not made. Exceptions if isNotCheckC0 = false, Standard_ConstructionError if the curve C is not at least "C1" continuous. + */ + SetBasisCurve(C: Geom2d_Curve, isNotCheckC0?: boolean): void; + /** + * Changes this offset curve by assigning D as the offset value. + */ + SetOffsetValue(D: number): void; + /** + * Returns the basis curve of this offset curve. The basis curve can be an offset curve. + */ + BasisCurve(): Geom2d_Curve; + /** + * Continuity of the Offset curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite. Warnings : Returns the continuity of the basis curve - 1. The offset curve must have a unique normal direction defined at any point. Value and derivatives. + * + * Warnings : The exception UndefinedValue or UndefinedDerivative is raised if it is not possible to compute a unique offset direction. If T is the first derivative with not null length and Z the direction normal to the plane of the curve, the relation ||T(U) ^ Z|| != 0 must be satisfied to evaluate the offset curve. No check is done at the creation time and we suppose in this package that the offset curve is well defined. + */ + Continuity(): GeomAbs_Shape; + /** + * Warning! this should not be called if the basis curve is not at least C1. Nevertheless if used on portion where the curve is C1, it is OK. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Warning! this should not be called if the continuity of the basis curve is not C2. Nevertheless, it's OK to use it on portion where the curve is C2. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Warning! This should not be called if the continuity of the basis curve is not C3. Nevertheless, it's OK to use it on portion where the curve is C3. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Warning! This should not be called if the continuity of the basis curve is not C4. Nevertheless, it's OK to use it on portion where the curve is C4. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * The returned vector gives the value of the derivative for the order of derivation N. Warning! this should not be called raises UndefunedDerivative if the continuity of the basis curve is not CN+1. Nevertheless, it's OK to use it on portion where the curve is CN+1 raises RangeError if N < 1. raises NotImplemented if N > 3. The following functions compute the value and derivatives on the offset curve and returns the derivatives on the basis curve too. + * The computation of the value and derivatives on the basis curve are used to evaluate the offset curve Warnings : The exception UndefinedValue or UndefinedDerivative is raised if it is not possible to compute a unique offset direction. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Returns the value of the first parameter of this offset curve. The first parameter corresponds to the start point of the curve. Note: the first and last parameters of this offset curve are also the ones of its basis curve. + */ + FirstParameter(): number; + /** + * Returns the value of the last parameter of this offset curve. The last parameter corresponds to the end point. Note: the first and last parameters of this offset curve are also the ones of its basis curve. + */ + LastParameter(): number; + /** + * Returns the offset value of this offset curve. + */ + Offset(): number; + /** + * Returns True if the distance between the start point and the end point of the curve is lower or equal to Resolution from package gp. + */ + IsClosed(): boolean; + /** + * Is the order of continuity of the curve N ? Warnings : This method answer True if the continuity of the basis curve is N + 1. We suppose in this class that a normal direction to the basis curve (used to compute the offset curve) is defined at any point on the basis curve. Raised if N < 0. + */ + IsCN(N: number): boolean; + /** + * Is the parametrization of a curve is periodic ? If the basis curve is a circle or an ellipse the corresponding OffsetCurve is periodic. If the basis curve can't be periodic (for example BezierCurve) the OffsetCurve can't be periodic. + */ + IsPeriodic(): boolean; + /** + * Returns the period of this offset curve, i.e. the period of the basis curve of this offset curve. Exceptions Standard_NoSuchObject if the basis curve is not periodic. + */ + Period(): number; + /** + * Applies the transformation T to this offset curve. Note: the basis curve is also modified. + */ + Transform(T: gp_Trsf2d): void; + /** + * Returns the parameter on the transformed curve for the transform of the point of parameter U on . + * + * me->Transformed(T)->Value(me->TransformedParameter(U,T)) + * + * is the same point as + * + * me->Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + TransformedParameter(U: number, T: gp_Trsf2d): number; + /** + * Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on . + * + * Transformed(T)->Value(U * ParametricTransformation(T)) + * + * is the same point as + * + * Value(U).Transformed(T) + * + * This methods calls the basis curve method. + */ + ParametricTransformation(T: gp_Trsf2d): number; + /** + * Creates a new object, which is a copy of this offset curve. + */ + Copy(): Geom2d_Geometry; + /** + * Returns continuity of the basis curve. + */ + GetBasisCurveContinuity(): GeomAbs_Shape; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a rational or non-rational Bezier curve. + * + * - a non-rational Bezier curve is defined by a table of poles (also called control points), + * - a rational Bezier curve is defined by a table of poles with varying weights. These data are manipulated by two parallel arrays: + * - the poles table, which is an array of {@link gp_Pnt2d | `gp_Pnt2d`} points, and + * - the weights table, which is an array of reals. The bounds of these arrays are 1 and "the number of poles" of the curve. The poles of the curve are "control points" used to deform the curve. The first pole is the start point of the curve, and the last pole is the end point of the curve. + * The segment which joins the first pole to the second pole is the tangent to the curve at its start point, and the segment which joins the last pole to the second-from-last pole is the tangent to the curve at its end point. + * It is more difficult to give a geometric signification to the weights but they are useful for providing exact representations of the arcs of a circle or ellipse. Moreover, if the weights of all the poles are equal, the curve is polynomial; it is therefore a non-rational curve. The non-rational curve is a special and frequently used case. The weights are defined and used only in case of a rational curve. The degree of a Bezier curve is equal to the number of poles, minus 1. It must be greater than or equal to 1. + * However, the degree of a {@link Geom2d_BezierCurve | `Geom2d_BezierCurve`} curve is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree. The parameter range for a Bezier curve is [ 0, 1 ]. If the first and last control points of the Bezier curve are the same point then the curve is closed. + * For example, to create a closed Bezier curve with four control points, you have to give a set of control points P1, P2, P3 and P1. The continuity of a Bezier curve is infinite. It is not possible to build a Bezier curve with negative weights. We consider that a weight value is zero if it is less than or equal to `gp::Resolution()`. We also consider that two weight values W1 and W2 are equal if: |W2 - W1| <= `gp::Resolution()`. Warning + * - When considering the continuity of a closed Bezier curve at the junction point, remember that a curve of this type is never periodic. This means that the derivatives for the parameter u = 0 have no reason to be the same as the derivatives for the parameter u = 1 even if the curve is closed. + * - The length of a Bezier curve can be null. + */ +export declare class Geom2d_BezierCurve extends Geom2d_BoundedCurve { + /** + * Creates a non rational Bezier curve with a set of poles : CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2. + */ + constructor(CurvePoles: NCollection_Array1_gp_Pnt2d); + /** + * Copy constructor for optimized copying without validation. + */ + constructor(theOther: Geom2d_BezierCurve); + /** + * Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights. If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp. + */ + constructor(CurvePoles: NCollection_Array1_gp_Pnt2d, PoleWeights: NCollection_Array1_double); + /** + * Returns true if an evaluation representation is attached. + */ + HasEvalRepresentation(): boolean; + /** + * Returns the current evaluation representation descriptor (may be null). + */ + EvalRepresentation(): unknown; + /** + * Sets a new evaluation representation. Validates descriptor data and ensures no circular references. + */ + SetEvalRepresentation(theDesc: unknown): void; + /** + * Removes the evaluation representation. + */ + ClearEvalRepresentation(): void; + /** + * Increases the degree of a bezier curve. Degree is the new degree of . raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of . + */ + Increase(Degree: number): void; + /** + * Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [0, NbPoles]. + * + * Raised if the resulting number of poles is greater than MaxDegree + 1. + */ + InsertPoleAfter(Index: number, P: gp_Pnt2d, Weight?: number): void; + /** + * Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles+1]. + * + * Raised if the resulting number of poles is greater than MaxDegree + 1. + */ + InsertPoleBefore(Index: number, P: gp_Pnt2d, Weight?: number): void; + /** + * Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles]. + */ + RemovePole(Index: number): void; + /** + * Reverses the direction of parametrization of Value (NewU) = Value (1 - OldU). + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + * + * returns 1-U + */ + ReversedParameter(U: number): number; + /** + * Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. Warnings: Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve or if the curve makes loop. After the segmentation the length of a curve can be null. + */ + Segment(U1: number, U2: number): void; + /** + * Substitutes the pole of range index with P. If the curve is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles]. + */ + SetPole(Index: number, P: gp_Pnt2d): void; + /** + * Substitutes the pole and the weights of range Index. If the curve is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp. + */ + SetPole(Index: number, P: gp_Pnt2d, Weight: number): void; + /** + * Changes the weight of the pole of range Index. If the curve is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp. + */ + SetWeight(Index: number, Weight: number): void; + /** + * Returns True if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp. + */ + IsClosed(): boolean; + /** + * Continuity of the curve, returns True. + */ + IsCN(N: number): boolean; + /** + * Returns False. A BezierCurve cannot be periodic in this package. + */ + IsPeriodic(): boolean; + /** + * Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp. + */ + IsRational(): boolean; + /** + * Returns GeomAbs_CN, which is the continuity of any Bezier curve. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns the polynomial degree of the curve. It is the number of poles less one. In this package the Degree of a Bezier curve cannot be greater than "MaxDegree". + */ + Degree(): number; + /** + * Computes the point of parameter U. Raises an exception on failure. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For this Bezier curve, computes. + * + * - the point P of parameter U, or + * - the point P and one or more of the following values: + * - V1, the first derivative vector, + * - V2, the second derivative vector, + * - V3, the third derivative vector. Note: the parameter U can be outside the bounds of the curve. Raises RangeError if N < 1. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Returns the end point or start point of this Bezier curve. + */ + EndPoint(): gp_Pnt2d; + /** + * Returns the value of the first parameter of this Bezier curve. This is 0.0, which gives the start point of this Bezier curve. + */ + FirstParameter(): number; + /** + * Returns the value of the last parameter of this Bezier curve. This is 1.0, which gives the end point of this Bezier curve. + */ + LastParameter(): number; + /** + * Returns the number of poles for this Bezier curve. + */ + NbPoles(): number; + /** + * Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles]. + */ + Pole(Index: number): gp_Pnt2d; + /** + * Returns all the poles of the curve. + * + * Raised if the length of P is not equal to the number of poles. + * @param P Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Poles(P: NCollection_Array1_gp_Pnt2d): void; + /** + * Returns all the poles of the curve. + */ + Poles(): NCollection_Array1_gp_Pnt2d; + /** + * Returns Value (U=1), it is the first control point of the curve. + */ + StartPoint(): gp_Pnt2d; + /** + * Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles]. + */ + Weight(Index: number): number; + /** + * Returns all the weights of the curve. + * + * Raised if the length of W is not equal to the number of poles. + * @param W Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + Weights(W: NCollection_Array1_double): void; + /** + * Returns all the weights of the curve. + */ + Weights(): NCollection_Array1_double; + /** + * Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from `BSplCLib`. The array is always sized to match `NbPoles()`. + * @remarks **Warning:** Do NOT modify elements through the returned reference. + */ + WeightsArray(): NCollection_Array1_double; + /** + * Applies the transformation T to this Bezier curve. + */ + Transform(T: gp_Trsf2d): void; + /** + * Returns the value of the maximum polynomial degree of a BezierCurve. This value is 25. + */ + static MaxDegree(): number; + /** + * Computes for this Bezier curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this Bezier curve, UTolerance ensures that | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < ToleranceUV. + * @returns A result object with fields: + * - `UTolerance`: updated value from the call. + */ + Resolution(ToleranceUV: number, UTolerance?: number): { UTolerance: number }; + /** + * Creates a new object which is a copy of this Bezier curve. + */ + Copy(): Geom2d_Geometry; + /** + * Returns Bezier knots {0.0, 1.0} as a static array. + */ + Knots(): NCollection_Array1_double; + /** + * Returns Bezier multiplicities for the current degree. + */ + Multiplicities(): NCollection_Array1_int; + /** + * Returns Bezier flat knots for the current degree. + */ + KnotSequence(): NCollection_Array1_double; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The abstract class Conic describes the common behavior of conic curves in 2D space and, in particular, their general characteristics. + * The Geom2d package provides four specific classes of conics: {@link Geom2d_Circle | `Geom2d_Circle`}, {@link Geom2d_Ellipse | `Geom2d_Ellipse`}, {@link Geom2d_Hyperbola | `Geom2d_Hyperbola`} and {@link Geom2d_Parabola | `Geom2d_Parabola`}. + * A conic is positioned in the plane with a coordinate system ({@link gp_Ax22d | `gp_Ax22d`} object), where the origin is the center of the conic (or the apex in case of a parabola). This coordinate system is the local coordinate system of the conic. It gives the conic an explicit orientation, determining the direction in which the parameter increases along the conic. The "X Axis" of the local coordinate system also defines the origin of the parameter of the conic. + */ +export declare class Geom2d_Conic extends Geom2d_Curve { + /** + * Modifies this conic, redefining its local coordinate system partially, by assigning theA as its axis. + */ + SetAxis(theA: gp_Ax22d): void; + /** + * Assigns the origin and unit vector of axis theA to the origin of the local coordinate system of this conic and X Direction. The other unit vector of the local coordinate system of this conic is recomputed normal to theA, without changing the orientation of the local coordinate system (right-handed or left-handed). + */ + SetXAxis(theAX: gp_Ax2d): void; + /** + * Assigns the origin and unit vector of axis theA to the origin of the local coordinate system of this conic and Y Direction. The other unit vector of the local coordinate system of this conic is recomputed normal to theA, without changing the orientation of the local coordinate system (right-handed or left-handed). + */ + SetYAxis(theAY: gp_Ax2d): void; + /** + * Modifies this conic, redefining its local coordinate system partially, by assigning theP as its origin. + */ + SetLocation(theP: gp_Pnt2d): void; + /** + * Returns the "XAxis" of the conic. This axis defines the origin of parametrization of the conic. This axis and the "Yaxis" define the local coordinate system of the conic. -C++: return const&. + */ + XAxis(): gp_Ax2d; + /** + * Returns the "YAxis" of the conic. The "YAxis" is perpendicular to the "Xaxis". + */ + YAxis(): gp_Ax2d; + /** + * returns the eccentricity value of the conic e. e = 0 for a circle 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius) e > 1 for a hyperbola e = 1 for a parabola + */ + Eccentricity(): number; + /** + * Returns the location point of the conic. For the circle, the ellipse and the hyperbola it is the center of the conic. For the parabola it is the vertex of the parabola. + */ + Location(): gp_Pnt2d; + /** + * Returns the local coordinates system of the conic. + */ + Position(): gp_Ax22d; + /** + * Reverses the direction of parameterization of . The local coordinate system of the conic is modified. + */ + Reverse(): void; + /** + * Returns the parameter on the reversed curve for the point of parameter U on . + */ + ReversedParameter(U: number): number; + /** + * Returns GeomAbs_CN which is the global continuity of any conic. + */ + Continuity(): GeomAbs_Shape; + /** + * Returns True, the order of continuity of a conic is infinite. + */ + IsCN(N: number): boolean; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The general abstract class Geometry in 2D space describes the common behaviour of all the geometric entities. + * + * All the objects derived from this class can be move with a geometric transformation. Only the transformations which doesn't modify the nature of the geometry are available in this package. The method Transform which defines a general transformation is deferred. The other specifics transformations used the method Transform. All the following transformations modify the object itself. + * Warning Only transformations which do not modify the nature of the geometry can be applied to Geom2d objects: this is the case with translations, rotations, symmetries and scales; this is also the case with {@link gp_Trsf2d | `gp_Trsf2d`} composite transformations which are used to define the geometric transformations applied using the Transform or Transformed functions. Note: Geometry defines the "prototype" of the abstract method Transform which is defined for each concrete type of derived object. All other transformations are implemented using the Transform method. + */ +export declare class Geom2d_Geometry extends Standard_Transient { + /** + * Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry and assigns the result to this geometric object. + */ + Mirror(P: gp_Pnt2d): void; + /** + * Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry. + */ + Mirror(A: gp_Ax2d): void; + /** + * Rotates a Geometry. P is the center of the rotation. Ang is the angular value of the rotation in radians. + */ + Rotate(P: gp_Pnt2d, Ang: number): void; + /** + * Scales a Geometry. S is the scaling value. + */ + Scale(P: gp_Pnt2d, S: number): void; + /** + * Translates a Geometry. V is the vector of the translation. + */ + Translate(V: gp_Vec2d): void; + /** + * Translates a Geometry from the point P1 to the point P2. + */ + Translate(P1: gp_Pnt2d, P2: gp_Pnt2d): void; + /** + * Transformation of a geometric object. This transformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations. (see class Transformation of the package Geom2d). The following transformations have the same properties as the previous ones but they don't modified the object itself. A copy of the object is returned. + */ + Transform(T: gp_Trsf2d): void; + Mirrored(P: gp_Pnt2d): Geom2d_Geometry; + Mirrored(A: gp_Ax2d): Geom2d_Geometry; + Rotated(P: gp_Pnt2d, Ang: number): Geom2d_Geometry; + Scaled(P: gp_Pnt2d, S: number): Geom2d_Geometry; + Transformed(T: gp_Trsf2d): Geom2d_Geometry; + Translated(V: gp_Vec2d): Geom2d_Geometry; + Translated(P1: gp_Pnt2d, P2: gp_Pnt2d): Geom2d_Geometry; + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an ellipse in the plane (2D space). An ellipse is defined by its major and minor radii and, as with any conic curve, is positioned in the plane with a coordinate system ({@link gp_Ax22d | `gp_Ax22d`} object) where: + * + * - the origin is the center of the ellipse, + * - the "X Direction" defines the major axis, and + * - the "Y Direction" defines the minor axis. This coordinate system is the local coordinate system of the ellipse. The orientation (direct or indirect) of the local coordinate system gives an explicit orientation to the ellipse, determining the direction in which the parameter increases along the ellipse. The {@link Geom2d_Ellipse | `Geom2d_Ellipse`} ellipse is parameterized by an angle: P(U) = O + MajorRad*std::cos(U)*XDir + MinorRad*Sin(U)*YDir where: + * - P is the point of parameter U, + * - O, XDir and YDir are respectively the origin, "X Direction" and "Y Direction" of its local coordinate system, + * - MajorRad and MinorRad are the major and minor radii of the ellipse. The "X Axis" of the local coordinate system therefore defines the origin of the parameter of the ellipse. An ellipse is a closed and periodic curve. The period is 2.*Pi and the parameter range is [ 0,2.*Pi [. See Also GCE2d_MakeEllipse which provides functions for more complex ellipse constructions {@link gp_Ax22d | `gp_Ax22d`} {@link gp_Elips2d | `gp_Elips2d`} for an equivalent, non-parameterized data structure + */ +export declare class Geom2d_Ellipse extends Geom2d_Conic { + /** + * Creates an ellipse by conversion of the {@link gp_Elips2d | `gp_Elips2d`} ellipse E. + */ + constructor(E: gp_Elips2d); + /** + * Creates an ellipse defined by its major and minor radii, MajorRadius and MinorRadius, where the coordinate system Axis locates the ellipse and defines its orientation in the plane such that: + * + * - the center of the ellipse is the origin of Axis, + * - the "X Direction" of Axis defines the major axis of the ellipse, + * - the "Y Direction" of Axis defines the minor axis of the ellipse, + * - the orientation of Axis (direct or indirect) gives the orientation of the ellipse. Warnings : It is not forbidden to create an ellipse with MajorRadius = MinorRadius. Exceptions Standard_ConstructionError if: + * - MajorRadius is less than MinorRadius, or + * - MinorRadius is less than 0. + */ + constructor(Axis: gp_Ax22d, MajorRadius: number, MinorRadius: number); + /** + * Creates an ellipse defined by its major and minor radii, MajorRadius and MinorRadius, and positioned in the plane by its major axis MajorAxis; the center of the ellipse is the origin of MajorAxis and the unit vector of MajorAxis is the "X Direction" of the local coordinate system of the ellipse; this coordinate system is direct if Sense is true (default value) or indirect if Sense is false. Warnings : It is not forbidden to create an ellipse with MajorRadius = MinorRadius. Exceptions Standard_ConstructionError if: + * + * - MajorRadius is less than MinorRadius, or + * - MinorRadius is less than 0. + */ + constructor(MajorAxis: gp_Ax2d, MajorRadius: number, MinorRadius: number, Sense?: boolean); + /** + * Converts the {@link gp_Elips2d | `gp_Elips2d`} ellipse E into this ellipse. + */ + SetElips2d(E: gp_Elips2d): void; + /** + * Assigns a value to the major radius of this ellipse. Exceptions Standard_ConstructionError if: + * + * - the major radius of this ellipse becomes less than the minor radius, or + * - MinorRadius is less than 0. + */ + SetMajorRadius(MajorRadius: number): void; + /** + * Assigns a value to the minor radius of this ellipse. Exceptions Standard_ConstructionError if: + * + * - the major radius of this ellipse becomes less than the minor radius, or + * - MinorRadius is less than 0. + */ + SetMinorRadius(MinorRadius: number): void; + /** + * Converts this ellipse into a {@link gp_Elips2d | `gp_Elips2d`} ellipse. + */ + Elips2d(): gp_Elips2d; + /** + * Computes the parameter on the reversed ellipse for the point of parameter U on this ellipse. For an ellipse, the returned value is: 2.*Pi - U. + */ + ReversedParameter(U: number): number; + /** + * Computes the directrices of this ellipse. This directrix is the line normal to the XAxis of the ellipse in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the ellipse, where e is the eccentricity of the ellipse. This line is parallel to the "YAxis". The intersection point between directrix1 and the "XAxis" is the "Location" point of the directrix1. This point is on the positive side of the "XAxis". Raises ConstructionError if Eccentricity = 0.0. (The ellipse degenerates into a circle). + */ + Directrix1(): gp_Ax2d; + /** + * This line is obtained by the symmetrical transformation of "Directrix1" with respect to the "YAxis" of the ellipse. Raises ConstructionError if Eccentricity = 0.0. (The ellipse degenerates into a circle). + */ + Directrix2(): gp_Ax2d; + /** + * Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Returns 0 if MajorRadius = 0. + */ + Eccentricity(): number; + /** + * Computes the focal distance. The focal distance is the distance between the center and a focus of the ellipse. + */ + Focal(): number; + /** + * Returns the first focus of the ellipse. This focus is on the positive side of the "XAxis" of the ellipse. + */ + Focus1(): gp_Pnt2d; + /** + * Returns the second focus of the ellipse. This focus is on the negative side of the "XAxis" of the ellipse. + */ + Focus2(): gp_Pnt2d; + /** + * Returns the major radius of this ellipse. + */ + MajorRadius(): number; + /** + * Returns the minor radius of this ellipse. + */ + MinorRadius(): number; + /** + * Computes the parameter of this ellipse. This value is given by the formula p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0. + */ + Parameter(): number; + /** + * Returns the value of the first parameter of this ellipse. This is 0.0, which gives the start point of this ellipse. The start point and end point of an ellipse are coincident. + */ + FirstParameter(): number; + /** + * Returns the value of the last parameter of this ellipse. This is 2.*Pi, which gives the end point of this ellipse. The start point and end point of an ellipse are coincident. + */ + LastParameter(): number; + /** + * return True. + */ + IsClosed(): boolean; + /** + * return True. + */ + IsPeriodic(): boolean; + /** + * Returns in P the point of parameter U. P = C + MajorRadius * Cos (U) * XDir + MinorRadius * Sin (U) * YDir where C is the center of the ellipse , XDir the direction of the "XAxis" and "YDir" the "YAxis" of the ellipse. + */ + EvalD0(U: number): gp_Pnt2d; + /** + * Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1. + */ + EvalD1(U: number): Geom2d_Curve_ResD1; + /** + * Returns the point P of parameter U. The vectors V1 and V2 are the first and second derivatives at this point. + */ + EvalD2(U: number): Geom2d_Curve_ResD2; + /** + * Returns the point P of parameter U, the first second and third derivatives V1 V2 and V3. + */ + EvalD3(U: number): Geom2d_Curve_ResD3; + /** + * For the point of parameter U of this ellipse, computes the vector corresponding to the Nth derivative. Exceptions Standard_RangeError if N is less than 1. + */ + EvalDN(U: number, N: number): gp_Vec2d; + /** + * Applies the transformation T to this ellipse. + */ + Transform(T: gp_Trsf2d): void; + /** + * Creates a new object which is a copy of this ellipse. + */ + Copy(): Geom2d_Geometry; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An interface between the services provided by any curve from the package Geom2d and those required of the curve by algorithms which use it. + * + * Polynomial coefficients of BSpline curves used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented. + */ +export declare class Geom2dAdaptor_Curve extends Adaptor2d_Curve2d { + constructor(); + constructor(C: Geom2d_Curve); + /** + * Standard_ConstructionError is raised if Ufirst>Ulast. + */ + constructor(C: Geom2d_Curve, UFirst: number, ULast: number); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor2d_Curve2d; + /** + * Reset currently loaded curve (undone `Load()`). + */ + Reset(): void; + Load(theCurve: Geom2d_Curve): void; + /** + * Standard_ConstructionError is raised if theUFirst > theULast + `Precision::PConfusion()`. + */ + Load(theCurve: Geom2d_Curve, theUFirst: number, theULast: number): void; + /** + * Returns true if the adaptor has been loaded with a curve. + */ + IsInitialized(): boolean; + Curve(): Geom2d_Curve; + FirstParameter(): number; + LastParameter(): number; + Continuity(): GeomAbs_Shape; + /** + * If necessary, breaks the curve in intervals of continuity . And returns the number of intervals. + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . + * + * The array must provide enough room to accommodate for the parameters. i.e. T.Length() > `NbIntervals()` + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + Trim(First: number, Last: number, Tol: number): Adaptor2d_Curve2d; + IsClosed(): boolean; + IsPeriodic(): boolean; + Period(): number; + /** + * Computes the point of parameter U on the curve. + */ + Value(U: number): gp_Pnt2d; + /** + * Computes the point of parameter U. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + D0(U: number, P: gp_Pnt2d): void; + /** + * Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V Mutated in place; read the updated value from this argument after the call. + */ + D1(U: number, P: gp_Pnt2d, V: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + D2(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + D3(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d): void; + /** + * The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1. + */ + DN(U: number, N: number): gp_Vec2d; + /** + * returns the parametric resolution + */ + Resolution(R3d: number): number; + /** + * Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve. + */ + GetType(): GeomAbs_CurveType; + Line(): unknown; + Circle(): gp_Circ2d; + Ellipse(): gp_Elips2d; + Hyperbola(): unknown; + Parabola(): unknown; + Degree(): number; + IsRational(): boolean; + NbPoles(): number; + NbKnots(): number; + NbSamples(): number; + Bezier(): Geom2d_BezierCurve; + BSpline(): Geom2d_BSplineCurve; + /** + * Point evaluation. Raises an exception on failure. + */ + EvalD0(theU: number): gp_Pnt2d; + /** + * D1 evaluation. Raises an exception on failure. + */ + EvalD1(theU: number): Geom2d_Curve_ResD1; + /** + * D2 evaluation. Raises an exception on failure. + */ + EvalD2(theU: number): Geom2d_Curve_ResD2; + /** + * D3 evaluation. Raises an exception on failure. + */ + EvalD3(theU: number): Geom2d_Curve_ResD3; + /** + * DN evaluation. Raises an exception on failure. + */ + EvalDN(theU: number, theN: number): gp_Vec2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export interface Geom2dAdaptor_Curve_OffsetData { + BasisAdaptor: Geom2dAdaptor_Curve; + Offset: number; + EvalRep: unknown; +} + +export interface Geom2dAdaptor_Curve_BezierData { + Curve: Geom2d_BezierCurve; + Cache: unknown; + EvalRep: unknown; +} + +export interface Geom2dAdaptor_Curve_BSplineData { + Curve: Geom2d_BSplineCurve; + Cache: unknown; + EvalRep: unknown; +} + +/** + * Root class for 2D curves on which geometric algorithms work. An adapted curve is an interface between the services provided by a curve, and those required of the curve by algorithms, which use it. A derived concrete class is provided: {@link Geom2dAdaptor_Curve | `Geom2dAdaptor_Curve`} for a curve from the Geom2d package. + * + * Polynomial coefficients of BSpline curves used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented. + */ +export declare class Adaptor2d_Curve2d extends Standard_Transient { + constructor(); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor2d_Curve2d; + FirstParameter(): number; + LastParameter(): number; + Continuity(): GeomAbs_Shape; + /** + * If necessary, breaks the curve in intervals of continuity . And returns the number of intervals. + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . + * + * The array must provide enough room to accommodate for the parameters. i.e. T.Length() > `NbIntervals()` + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + Trim(First: number, Last: number, Tol: number): Adaptor2d_Curve2d; + IsClosed(): boolean; + IsPeriodic(): boolean; + Period(): number; + /** + * Computes the point of parameter U on the curve. + */ + Value(U: number): gp_Pnt2d; + /** + * Computes the point of parameter U on the curve. + * @param P Mutated in place; read the updated value from this argument after the call. + */ + D0(U: number, P: gp_Pnt2d): void; + /** + * Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V Mutated in place; read the updated value from this argument after the call. + */ + D1(U: number, P: gp_Pnt2d, V: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + */ + D2(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void; + /** + * Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3. + * @param P Mutated in place; read the updated value from this argument after the call. + * @param V1 Mutated in place; read the updated value from this argument after the call. + * @param V2 Mutated in place; read the updated value from this argument after the call. + * @param V3 Mutated in place; read the updated value from this argument after the call. + */ + D3(U: number, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d): void; + /** + * The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1. + */ + DN(U: number, N: number): gp_Vec2d; + /** + * Returns the parametric resolution corresponding to the real space resolution . + */ + Resolution(R3d: number): number; + /** + * Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve. + */ + GetType(): GeomAbs_CurveType; + Line(): unknown; + Circle(): gp_Circ2d; + Ellipse(): gp_Elips2d; + Hyperbola(): unknown; + Parabola(): unknown; + Degree(): number; + IsRational(): boolean; + NbPoles(): number; + NbKnots(): number; + NbSamples(): number; + Bezier(): Geom2d_BezierCurve; + BSpline(): Geom2d_BSplineCurve; + /** + * Computes the point of parameter U on the curve. Raises an exception on failure. + */ + EvalD0(theU: number): gp_Pnt2d; + /** + * Computes the point and first derivative at parameter U. Raises an exception on failure. + */ + EvalD1(theU: number): Geom2d_Curve_ResD1; + /** + * Computes the point and first two derivatives at parameter U. Raises an exception on failure. + */ + EvalD2(theU: number): Geom2d_Curve_ResD2; + /** + * Computes the point and first three derivatives at parameter U. Raises an exception on failure. + */ + EvalD3(theU: number): Geom2d_Curve_ResD3; + /** + * Computes the Nth derivative at parameter U. Raises an exception on failure. + */ + EvalDN(theU: number, theN: number): gp_Vec2d; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The {@link GeomTools | `GeomTools`} package provides utilities for Geometry. + * + * - SurfaceSet, CurveSet, Curve2dSet : Tools used for dumping, writing and reading. + * - Methods to dump, write, read curves and surfaces. + */ +export declare class GeomTools { + constructor(); + // dropped: SetUndefinedTypeHandler param 0 resolves to excluded type GeomTools_UndefinedTypeHandler + // dropped: GetUndefinedTypeHandler return resolves to excluded type GeomTools_UndefinedTypeHandler + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This package provides an implementation of algorithms to do the conversion between equivalent geometric entities from package Geom2d. + * It gives the possibility : . to obtain the B-spline representation of bounded curves. . to split a B-spline curve into several B-spline curves with some constraints of continuity, . to convert a B-spline curve into several Bezier curves or surfaces. All the geometric entities used in this package are bounded. References : . Generating the Bezier Points of B-spline curves and surfaces (Wolfgang Bohm) CAGD volume 13 number 6 november 1981 . On NURBS: A Survey (Leslie Piegl) IEEE Computer Graphics and Application January 1991 . + * Curve and surface construction using rational B-splines (Leslie Piegl and Wayne Tiller) CAD Volume 19 number 9 november 1987 . A survey of curve and surface methods in CAGD (Wolfgang BOHM) CAGD 1 1984. + */ +export declare class Geom2dConvert { + constructor(); + /** + * Convert a curve to BSpline by Approximation. + * + * This method computes the arc of B-spline curve between the two knots FromK1 and ToK2. If C is periodic the arc has the same orientation as C if SameOrientation = true. + * If C is not periodic SameOrientation is not used for the computation and C is oriented from the knot fromK1 to the knot toK2. We just keep the local definition of C between the knots FromK1 and ToK2. + * The returned B-spline curve has its first and last knots with a multiplicity equal to degree + 1, where degree is the polynomial degree of C. The indexes of the knots FromK1 and ToK2 doesn't include the repetition of multiple knots in their definition. + * + * Raised if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] Raised if FromK1 = ToK2 + */ + static SplitBSplineCurve(C: Geom2d_BSplineCurve, FromK1: number, ToK2: number, SameOrientation: boolean): Geom2d_BSplineCurve; + /** + * This function computes the segment of B-spline curve between the parametric values FromU1, ToU2. If C is periodic the arc has the same orientation as C if SameOrientation = True. If C is not periodic SameOrientation is not used for the computation and C is oriented fromU1 toU2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1 - U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. + * + * Raised if FromU1 or ToU2 are out of the parametric bounds of the curve (The tolerance criterion is ParametricTolerance). Raised if Abs (FromU1 - ToU2) <= ParametricTolerance Raised if ParametricTolerance < Resolution from gp. + */ + static SplitBSplineCurve(C: Geom2d_BSplineCurve, FromU1: number, ToU2: number, ParametricTolerance: number, SameOrientation: boolean): Geom2d_BSplineCurve; + /** + * This function converts a non infinite curve from Geom into a B-spline curve. C must be an ellipse or a circle or a trimmed conic or a trimmed line or a Bezier curve or a trimmed Bezier curve or a BSpline curve or a trimmed BSpline curve or an Offset curve or a trimmed Offset curve. The returned B-spline is not periodic except if C is a Circle or an Ellipse. + * ParameterisationType applies only if the curve is a Circle or an ellipse : TgtThetaOver2, TgtThetaOver2_1, TgtThetaOver2_2, TgtThetaOver2_3, TgtThetaOver2_4, Purpose: this is the classical rational parameterisation 2 1 - t cos(theta) = ----- 2 1 + t. + * + * 2t sin(theta) = ----- 2 1 + t + * + * t = tan (theta/2) + * + * with TgtThetaOver2 the routine will compute the number of spans using the rule num_spans = [ (ULast - UFirst) / 1.2 ] + 1 with TgtThetaOver2_N, N spans will be forced: an error will be raized if (ULast - UFirst) >= PI and N = 1, ULast - UFirst >= 2 PI and N = 2 + * + * QuasiAngular, here t is a rational function that approximates theta ----> tan(theta/2). Nevetheless the composing with above function yields exact functions whose square sum up to 1 RationalC1 ; t is replaced by a polynomial function of u so as to grant C1 contiuity across knots. Exceptions Standard_DomainError if the curve C is infinite. Standard_ConstructionError: + * + * - if C is a complete circle or ellipse, and if Parameterisation is not equal to Convert_TgtThetaOver2 or to Convert_RationalC1, or + * - if C is a trimmed circle or ellipse and if Parameterisation is equal to Convert_TgtThetaOver2_1 and if U2 - U1 > 0.9999 * Pi where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a half-circle or a half-ellipse, for example), or + * - if C is a trimmed circle or ellipse and Parameterisation is equal to Convert_TgtThetaOver2_2 and U2 - U1 > 1.9999 * Pi where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a quasi-complete circle or ellipse). + */ + static CurveToBSplineCurve(C: Geom2d_Curve, Parameterisation?: Convert_ParameterisationType): Geom2d_BSplineCurve; + /** + * This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatG1(ArrayOfCurves: NCollection_Array1_handle_Geom2d_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number): { ArrayOfConcatenated: NCollection_HArray1_handle_Geom2d_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfIndices`: owned by the returned envelope. + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatC1(ArrayOfCurves: NCollection_Array1_handle_Geom2d_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number): { ArrayOfIndices: NCollection_HArray1_int; ArrayOfConcatenated: NCollection_HArray1_handle_Geom2d_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfIndices`: owned by the returned envelope. + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatC1(ArrayOfCurves: NCollection_Array1_handle_Geom2d_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number, AngularTolerance: number): { ArrayOfIndices: NCollection_HArray1_int; ArrayOfConcatenated: NCollection_HArray1_handle_Geom2d_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns a new BSpline which could still be C0. tolerance is a geometrical tolerance. + * @returns A result object with fields: + * - `BS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToC1BSplineCurve(Tolerance: number): { BS: Geom2d_BSplineCurve; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. Tolerance is a geometrical tolerance. + * @returns A result object with fields: + * - `tabBS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToArrayOfC1BSplineCurve(BS: Geom2d_BSplineCurve, Tolerance: number): { tabBS: NCollection_HArray1_handle_Geom2d_BSplineCurve; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance. + * @returns A result object with fields: + * - `tabBS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToArrayOfC1BSplineCurve(BS: Geom2d_BSplineCurve, AngularTolerance: number, Tolerance: number): { tabBS: NCollection_HArray1_handle_Geom2d_BSplineCurve; [Symbol.dispose](): void }; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An algorithm to convert a BSpline curve into a series of adjacent Bezier curves. A BSplineCurveToBezierCurve object provides a framework for: + * + * - defining the BSpline curve to be converted + * - implementing the construction algorithm, and + * - consulting the results. References : Generating the Bezier points of B-spline curves and surfaces (Wolfgang Bohm) CAD volume 13 number 6 november 1981 + */ +export declare class Geom2dConvert_BSplineCurveToBezierCurve { + /** + * Computes all the data needed to convert. + * + * - the BSpline curve BasisCurve, into a series of adjacent Bezier arcs. The result consists of a series of BasisCurve arcs limited by points corresponding to knot values of the curve. Use the available interrogation functions to ascertain the number of computed Bezier arcs, and then to construct each individual Bezier curve (or all Bezier curves). Note: ParametricTolerance is not used. + */ + constructor(BasisCurve: Geom2d_BSplineCurve); + /** + * Computes all the data needed to convert the portion of the BSpline curve BasisCurve limited by the two parameter values U1 and U2 for Example if there is a Knot Uk and Uk < U < Uk + ParametricTolerance/2 the last curve corresponds to the span [Uk-1, Uk] and not to [Uk, Uk+1] The result consists of a series of BasisCurve arcs limited by points corresponding to knot values of the curve. + * Use the available interrogation functions to ascertain the number of computed Bezier arcs, and then to construct each individual Bezier curve (or all Bezier curves). Note: ParametricTolerance is not used. Raises DomainError if U1 or U2 are out of the parametric bounds of the basis curve [FirstParameter, LastParameter]. The Tolerance criterion is ParametricTolerance. Raised if Abs (U2 - U1) <= ParametricTolerance. + */ + constructor(BasisCurve: Geom2d_BSplineCurve, U1: number, U2: number, ParametricTolerance: number); + /** + * Constructs and returns the Bezier curve of index Index to the table of adjacent Bezier arcs computed by this algorithm. This Bezier curve has the same orientation as the BSpline curve analyzed in this framework. Exceptions Standard_OutOfRange if Index is less than 1 or greater than the number of adjacent Bezier arcs computed by this algorithm. + */ + Arc(Index: number): Geom2d_BezierCurve; + /** + * Constructs all the Bezier curves whose data is computed by this algorithm and loads these curves into the Curves table. The Bezier curves have the same orientation as the BSpline curve analyzed in this framework. Exceptions Standard_DimensionError if the Curves array was not created with the following bounds: + * + * - 1 , and + * - the number of adjacent Bezier arcs computed by this algorithm (as given by the function NbArcs). + * @param Curves Mutated in place; read the updated value from this argument after the call. + */ + Arcs(Curves: NCollection_Array1_handle_Geom2d_BezierCurve): void; + /** + * This methode returns the bspline's knots associated to the converted arcs Raises DimensionError if the length of Curves is not equal to NbArcs + 1. + * @param TKnots Mutated in place; read the updated value from this argument after the call. + */ + Knots(TKnots: NCollection_Array1_double): void; + /** + * Returns the number of BezierCurve arcs. If at the creation time you have decomposed the basis curve between the parametric values UFirst, ULast the number of BezierCurve arcs depends on the number of knots included inside the interval [UFirst, ULast]. If you have decomposed the whole basis B-spline curve the number of BezierCurve arcs NbArcs is equal to the number of knots less one. + */ + NbArcs(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A framework to convert a 2D curve to a BSpline. This is done by approximation within a given tolerance. + */ +export declare class Geom2dConvert_ApproxCurve { + /** + * Constructs an approximation framework defined by. + * + * - the 2D conic Curve + * - the tolerance value Tol2d + * - the degree of continuity Order + * - the maximum number of segments allowed MaxSegments + * - the highest degree MaxDegree which the polynomial defining the BSpline is allowed to have. + */ + constructor(Curve: Geom2d_Curve, Tol2d: number, Order: GeomAbs_Shape, MaxSegments: number, MaxDegree: number); + /** + * Constructs an approximation framework defined by. + * + * - the 2D conic Curve + * - the tolerance value Tol2d + * - the degree of continuity Order + * - the maximum number of segments allowed MaxSegments + * - the highest degree MaxDegree which the polynomial defining the BSpline is allowed to have. + */ + constructor(Curve: Adaptor2d_Curve2d, Tol2d: number, Order: GeomAbs_Shape, MaxSegments: number, MaxDegree: number); + /** + * Returns the 2D BSpline curve resulting from the approximation algorithm. + */ + Curve(): Geom2d_BSplineCurve; + /** + * returns true if the approximation has been done with within required tolerance + */ + IsDone(): boolean; + /** + * returns true if the approximation did come out with a result that is not NECESSARELY within the required tolerance + */ + HasResult(): boolean; + /** + * Returns the greatest distance between a point on the source conic and the BSpline curve resulting from the approximation. (>0 when an approximation has been done, 0 if no approximation). + */ + MaxError(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Geom Library. This package provides an implementation of functions for basic computation on geometric entity from packages Geom and Geom2d. + */ +export declare class GeomLib { + constructor(); + /** + * Computes the curve 3d from package Geom corresponding to curve 2d from package Geom2d, on the plan defined with the local coordinate system Position. + */ + static To3d(Position: gp_Ax2, Curve2d: Geom2d_Curve): Geom_Curve; + /** + * Computes the curve 3d from package Geom corresponding to the curve 3d from package Geom, transformed with the transformation WARNING : this method may return a null Handle if it's impossible to compute the transformation of a curve. It's not implemented when : 1) the curve is an infinite parabola or hyperbola 2) the curve is an offsetcurve. + */ + static GTransform(Curve: Geom2d_Curve, GTrsf: gp_GTrsf2d): Geom2d_Curve; + /** + * Make the curve Curve2dPtr have the imposed range First to List the most economic way, that is if it can change the range without changing the nature of the curve it will try to do that. Otherwise it will produce a Bspline curve that has the required range. + * @returns A result object with fields: + * - `NewCurve2dPtr`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static SameRange(Tolerance: number, Curve2dPtr: Geom2d_Curve, First: number, Last: number, RequestedFirst: number, RequestedLast: number): { NewCurve2dPtr: Geom2d_Curve; [Symbol.dispose](): void }; + static BuildCurve3d(Tolerance: number, CurvePtr: unknown, FirstParameter: number, LastParameter: number, MaxDeviation: number, AverageDeviation: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegment: number): { NewCurvePtr: Geom_Curve; MaxDeviation: number; AverageDeviation: number; [Symbol.dispose](): void }; + static AdjustExtremity(P1: gp_Pnt, P2: gp_Pnt, T1: gp_Vec, T2: gp_Vec): { Curve: Geom_BoundedCurve; [Symbol.dispose](): void }; + /** + * Extends the bounded curve Curve to the point Point. The extension is built: + * + * - at the end of the curve if After equals true, or + * - at the beginning of the curve if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded curve Curve into a BSpline curve. Warning + * - Nothing is done, and Curve is not modified if Cont is not equal to 1, 2 or 3. + * - It is recommended that the extension should not be too large with respect to the size of the bounded curve Curve: Point must not be located too far from one of the extremities of Curve. + * @returns A result object with fields: + * - `Curve`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static ExtendCurveToPoint(Point: gp_Pnt, Cont: number, After: boolean): { Curve: Geom_BoundedCurve; [Symbol.dispose](): void }; + /** + * Extends the bounded surface Surf along one of its boundaries. The chord length of the extension is equal to Length. The direction of the extension is given as: + * + * - the u parametric direction of Surf, if InU equals true, or + * - the v parametric direction of Surf, if InU equals false. In this parametric direction, the extension is built on the side of: + * - the last parameter of Surf, if After equals true, or + * - the first parameter of Surf, if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded surface Surf into a BSpline surface. Warning + * - Nothing is done, and Surf is not modified if Cont is not equal to 1, 2 or 3. + * - It is recommended that Length, the size of the extension should not be too large with respect to the size of the bounded surface Surf. + * - Surf must not be a periodic BSpline surface in the parametric direction corresponding to the direction of extension. + * @returns A result object with fields: + * - `Surf`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static ExtendSurfByLength(Length: number, Cont: number, InU: boolean, After: boolean): { Surf: Geom_BoundedSurface; [Symbol.dispose](): void }; + /** + * Compute axes of inertia, of some points .Location() is the BaryCentre .XDirection is the axe of upper inertia .Direction is the Normal to the average plane IsSingular is True if points are on line Tol is used to determine singular cases. + * @param Axe Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `IsSingular`: updated value from the call. + */ + static AxeOfInertia(Points: NCollection_Array1_gp_Pnt, Axe: gp_Ax2, IsSingular: boolean, Tol: number): { IsSingular: boolean }; + /** + * Compute principale axes of inertia, and dispersion value of some points. + * @param Bary Mutated in place; read the updated value from this argument after the call. + * @param XDir Mutated in place; read the updated value from this argument after the call. + * @param YDir Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `Xgap`: updated value from the call. + * - `YGap`: updated value from the call. + * - `ZGap`: updated value from the call. + */ + static Inertia(Points: NCollection_Array1_gp_Pnt, Bary: gp_Pnt, XDir: gp_Dir, YDir: gp_Dir, Xgap?: number, YGap?: number, ZGap?: number): { Xgap: number; YGap: number; ZGap: number }; + /** + * Warning! This assume that the InParameter is an increasing sequence of real number and it will not check for that : Unpredictable result can happen if this is not satisfied. It is the caller responsibility to check for that property. + * + * This method makes uniform NumPoints segments S1,...SNumPoints out of the segment defined by the first parameter and the last parameter of the InParameter ; keeps only one point of the InParameters set of parameter in each of the uniform segments taking care of the first and the last parameters. For the ith segment the element of the InParameter is the one that is the first to exceed the midpoint of the segment and to fall before the midpoint of the next segment There will be at the end at most NumPoints + 1 if NumPoints > 2 in the OutParameters Array + * @returns A result object with fields: + * - `OutParameters`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static RemovePointsFromArray(NumPoints: number, InParameters: NCollection_Array1_double): { OutParameters: NCollection_HArray1_double; [Symbol.dispose](): void }; + /** + * this makes sure that there is at least MinNumPoints in OutParameters taking into account the parameters in the InParameters array provided those are in order, that is the sequence of real in the InParameter is strictly non decreasing + * @returns A result object with fields: + * - `OutParameters`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static DensifyArray1OfReal(MinNumPoints: number, InParameters: NCollection_Array1_double): { OutParameters: NCollection_HArray1_double; [Symbol.dispose](): void }; + /** + * This method fuse intervals Interval1 and Interval2 with specified Confusion. + * @param Interval1 first interval to fuse + * @param Interval2 second interval to fuse + * @param IsAdjustToFirstInterval flag to set method of fusion, if intervals are close if false, intervals are fusing by half-division method if true, intervals are fusing by selecting value from Interval1 + * @param Fusion output interval Mutated in place; read the updated value from this argument after the call. + */ + static FuseIntervals(Interval1: NCollection_Array1_double, Interval2: NCollection_Array1_double, Fusion: NCollection_Sequence_double, Confusion: number, IsAdjustToFirstInterval: boolean): void; + /** + * this will compute the maximum distance at the parameters given in the Parameters array by evaluating each parameter the two curves and taking the maximum of the evaluated distance + * @returns A result object with fields: + * - `MaxDistance`: updated value from the call. + */ + static EvalMaxParametricDistance(Curve: Adaptor3d_Curve, AReferenceCurve: Adaptor3d_Curve, Tolerance: number, Parameters: NCollection_Array1_double, MaxDistance?: number): { MaxDistance: number }; + /** + * this will compute the maximum distance at the parameters given in the Parameters array by projecting from the Curve to the reference curve and taking the minimum distance Than the maximum will be taken on those minimas. + * @returns A result object with fields: + * - `MaxDistance`: updated value from the call. + */ + static EvalMaxDistanceAlongParameter(Curve: Adaptor3d_Curve, AReferenceCurve: Adaptor3d_Curve, Tolerance: number, Parameters: NCollection_Array1_double, MaxDistance?: number): { MaxDistance: number }; + /** + * Cancel,on the boundaries,the denominator first derivative in the directions wished by the user and set its value to 1. + * @returns A result object with fields: + * - `BSurf`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static CancelDenominatorDerivative(UDirection: boolean, VDirection: boolean): { BSurf: Geom_BSplineSurface; [Symbol.dispose](): void }; + /** + * Estimate surface normal at the given (U, V) point. + * @param theSurf input surface + * @param theUV (U, V) point coordinates on the surface + * @param theTol estimation tolerance + * @param theNorm computed normal Mutated in place; read the updated value from this argument after the call. + * @returns 0 if normal estimated from D1, 1 if estimated from D2 (quasysingular), >=2 in case of failure (undefined or infinite solutions) + */ + static NormEstim(theSurf: Geom_Surface, theUV: gp_Pnt2d, theTol: number, theNorm: gp_Dir): number; + /** + * This method defines if opposite boundaries of surface coincide with given tolerance. + * @returns A result object with fields: + * - `isUClosed`: updated value from the call. + * - `isVClosed`: updated value from the call. + */ + static IsClosed(S: Geom_Surface, Tol: number, isUClosed?: boolean, isVClosed?: boolean): { isUClosed: boolean; isVClosed: boolean }; + /** + * Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked. + */ + static IsBSplUClosed(S: Geom_BSplineSurface, U1: number, U2: number, Tol: number): boolean; + /** + * Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked. + */ + static IsBSplVClosed(S: Geom_BSplineSurface, V1: number, V2: number, Tol: number): boolean; + /** + * Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion. + */ + static IsBzUClosed(S: unknown, U1: number, U2: number, Tol: number): boolean; + /** + * Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion. + */ + static IsBzVClosed(S: unknown, V1: number, V2: number, Tol: number): boolean; + /** + * Checks whether the 2d curve is a isoline. It can be represented by b-spline, bezier, or geometric line. This line should have natural parameterization. + * @param theC2D Trimmed curve to be checked. + * @param theIsU Flag indicating that line is u const. + * @param theParam Line parameter. + * @param theIsForward Flag indicating forward parameterization on a isoline. + * @returns A result object with fields: + * - `returnValue`: true when 2d curve is a line and false otherwise. + * - `theIsU`: Flag indicating that line is u const. + * - `theParam`: Line parameter. + * - `theIsForward`: Flag indicating forward parameterization on a isoline. + */ + static isIsoLine(theC2D: Adaptor2d_Curve2d, theIsU?: boolean, theParam?: number, theIsForward?: boolean): { returnValue: boolean; theIsU: boolean; theParam: number; theIsForward: boolean }; + /** + * Builds 3D curve for a isoline. This method takes corresponding isoline from the input surface. + * @param theC2D Trimmed curve to be approximated. + * @param theIsU Flag indicating that line is u const. + * @param theParam Line parameter. + * @param theIsForward Flag indicating forward parameterization on a isoline. + * @returns true when 3d curve is built and false otherwise. + */ + static buildC3dOnIsoLine(theC2D: Adaptor2d_Curve2d, theSurf: Adaptor3d_Surface, theFirst: number, theLast: number, theTolerance: number, theIsU: boolean, theParam: number, theIsForward: boolean): Geom_Curve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +export type Extrema_ExtAlgo = typeof Extrema_ExtAlgo[keyof typeof Extrema_ExtAlgo]; +export declare const Extrema_ExtAlgo: { + readonly Extrema_ExtAlgo_Grad: 'Extrema_ExtAlgo_Grad'; + readonly Extrema_ExtAlgo_Tree: 'Extrema_ExtAlgo_Tree'; +}; + +/** + * Implements a general mechanism to compute the global properties of a "compound geometric system" in 3D space by composition of the global properties of elementary geometric entities such as a curve, surface, solid, or set of points. It is also possible to compose the properties of several "compound geometric systems". + * + * To compute the global properties of a compound geometric system: + * + * - declare a {@link GProp_GProps | `GProp_GProps`} using a constructor which initializes the instance and defines the location point used to compute the inertia, + * - compose the global properties of the geometric components into the system using the method `Add()`. + * + * To compute the global properties of the geometric components of the system, use the services of the following frameworks: + * + * - {@link GProp_PGProps | `GProp_PGProps`} for a set of points, + * - CGProps for a curve, + * - SGProps for a surface, + * - VGProps for a "solid". The CGProps, SGProps and VGProps frameworks are generic and must be instantiated for the application (see {@link BRepGProp | `BRepGProp`} / GeomGProp). + * + * The global properties computed are: + * + * - the dimension (length, area or volume), + * - the mass, + * - the centre of mass, + * - the moments of inertia (static moments and quadratic moments), + * - the moment about an axis, + * - the radius of gyration about an axis, + * - the principal properties of inertia (see {@link GProp_PrincipalProps | `GProp_PrincipalProps`}):the principal moments,the principal axes of inertia,the principal radii of gyration. + * + * Example: + * + * ``` + * //DeclarestheGProps;theabsoluteorigin(0,0,0)isusedasthe //defaultreferencepointtocomputethecentreofmass. GProp_GPropsaSystem; //Computestheinertiaofa3Dcurve. Your_CGPropsaComponent1(theCurve,...); //Computestheinertiaoftwosurfaces. + * Your_SGPropsaComponent2(theSurface1,...); Your_SGPropsaComponent3(theSurface2,...); //Composestheglobalpropertiesofcomponents1,2,3.Adensity //canbeassociatedwiththecomponents;itdefaultsto1.0. constdoubleaDensity1=2.0; constdoubleaDensity2=3.0; aSystem.Add(aComponent1,aDensity1); aSystem.Add(aComponent2,aDensity2); aSystem.Add(aComponent3); //Returnsthecentreofmassofthesystemintheabsolute //Cartesiancoordinatesystem. constgp_PntaG=aSystem.CentreOfMass(); //Computestheprincipalpropertiesofinertiaofthesystem. constGProp_PrincipalPropsaPp=aSystem.PrincipalProperties(); //Returnstheprincipalmomentsandradiiofgyration. doubleaIxx,aIyy,aIzz,aRxx,aRyy,aRzz; aPp.Moments(aIxx,aIyy,aIzz); aPp.RadiusOfGyration(aRxx,aRyy,aRzz); + * ``` + */ +export declare class GProp_GProps { + /** + * The origin (0, 0, 0) of the absolute Cartesian coordinate system is used to compute the global properties. + */ + constructor(); + /** + * The point SystemLocation is used to compute the global properties of the system. For greater accuracy, define this point close to the location of the system; for example a point near the centre of mass of the system. + * + * At initialization the framework is empty: it retains no dimensional information such as mass or inertia. It is, however, ready to bring together global properties of various other systems whose global properties have already been computed using another framework. To do this, use `Add()` to define the components of the system, once per component, and then use the interrogation functions to access the computed values. + * @param SystemLocation reference point of the system used for inertia accumulation + */ + constructor(SystemLocation: gp_Pnt); + /** + * Either: + * + * - initializes the global properties retained by this framework from those retained by the framework Item, or + * - brings together the global properties retained by this framework with those retained by the framework Item. + * + * The value Density (1.0 by default) is used as the density of the system analysed by Item. + * Sometimes the density has already been accounted for at construction time of Item - for example when Item is a {@link GProp_PGProps | `GProp_PGProps`} framework built to compute the global properties of a set of weighted points, or another {@link GProp_GProps | `GProp_GProps`} object that already retains composite global properties. In these cases the real density was already taken into account at construction of Item. + * Note that this is not checked: if the density of parts of the system is taken into account two or more times, the result of the computation will be wrong. + * + * Notes: + * + * - The reference point of Item may differ from the reference point of this framework. Huygens' theorem is applied automatically to transfer inertia values to the reference point of this framework. + * - `Add()` is used once per component of the system. After all components are composed, the interrogation functions return values for the system as a whole. + * - The system whose global properties have been brought together by this framework is referred to as the "current system". The current system itself is not retained: only its global properties are. + * @param Item framework holding the global properties of the component to compose + * @param Density density of the component (default 1.0) + */ + Add(Item: GProp_GProps, Density?: number): void; + /** + * Returns the mass of the current system. + * + * If no density has been attached to the components of the current system, the returned value corresponds to: + * + * - the total length of the edges of the current system if this framework retains only linear properties (for example, when using only LinearProperties() to combine properties of lines from shapes), or + * - the total area of the faces of the current system if this framework retains only surface properties (for example, when using only SurfaceProperties() to combine properties of surfaces from shapes), or + * - the total volume of the solids of the current system if this framework retains only volume properties (for example, when using only VolumeProperties() to combine properties of volumes from solids). + * @remarks **Warning:** A length, an area or a volume is computed in the current unit system. The mass of a single object is its length, area or volume multiplied by its density. Be consistent with respect to the units used. + */ + Mass(): number; + /** + * Returns the centre of mass of the current system. With a uniform gravitational field this is also the centre of gravity. The coordinates returned for the centre of mass are expressed in the absolute Cartesian coordinate system. + */ + CentreOfMass(): gp_Pnt; + /** + * Returns the matrix of inertia. It is a symmetric matrix whose coefficients are the quadratic moments of inertia: + * + * ``` + * | Ixx Ixy Ixz | matrix = | Ixy Iyy Iyz | | Ixz Iyz Izz | + * ``` + * + * Ixx, Iyy, Izz are the moments of inertia; Ixy, Ixz, Iyz are the products of inertia. + * + * The matrix of inertia is returned in the central coordinate system (G, Gx, Gy, Gz), where G is the centre of mass of the system and Gx, Gy, Gz are parallel to the X(1, 0, 0), Y(0, 1, 0) and Z(0, 0, 1) directions of the absolute Cartesian coordinate system. To compute the matrix of inertia at another location use `GProp::HOperator()` (Huygens' theorem). + */ + MatrixOfInertia(): unknown; + /** + * Returns the static moments of inertia of the current system - i.e. the moments of inertia about the three axes of the absolute Cartesian coordinate system. + * @param Ix static moment of inertia about X + * @param Iy static moment of inertia about Y + * @param Iz static moment of inertia about Z + * @returns A result object with fields: + * - `Ix`: static moment of inertia about X + * - `Iy`: static moment of inertia about Y + * - `Iz`: static moment of inertia about Z + */ + StaticMoments(Ix?: number, Iy?: number, Iz?: number): { Ix: number; Iy: number; Iz: number }; + /** + * Computes the moment of inertia of the system about the axis A. + * @param A axis about which the moment of inertia is computed + */ + MomentOfInertia(A: gp_Ax1): number; + /** + * Computes the principal properties of inertia of the current system. There is always a set of axes for which the products of inertia of a geometric system are equal to 0 - i.e. the matrix of inertia of the system is diagonal. These axes are the principal axes of inertia; their origin coincides with the centre of mass of the system. The associated moments are called the principal moments of inertia. + * + * This function computes the eigen values and eigen vectors of the matrix of inertia of the system. Results are stored in a {@link GProp_PrincipalProps | `GProp_PrincipalProps`} framework which can be queried to access the value sought. + */ + PrincipalProperties(): unknown; + /** + * Returns the radius of gyration of the current system about the axis A. + * @param A axis about which the radius of gyration is computed + */ + RadiusOfGyration(A: gp_Ax1): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Computes a set of points on a curve from package Adaptor3d such as between two successive points P1(u1)and P2(u2) : + * + * ``` + * .||P1P3^P3P2||/||P1P3||*||P3P2|| `gp::Resolution()` and CurvatureDeflection > `gp::Resolution()` must be satisfied at the construction time. + * + * A minimum number of points can be fixed for a linear or circular element. Example: + * + * ``` + * occ::handleaCurve=newGeom_BezierCurve(thePoles); GeomAdaptor_CurveaCurveAdaptor(aCurve); doubleaCDeflect=0.01;//Curvaturedeflection doubleanADeflect=0.09;//Angulardeflection GCPnts_TangentialDeflectionaPointsOnCurve; aPointsOnCurve.Initialize(aCurveAdaptor,anADeflect,aCDeflect); for(inti=1;i<=aPointsOnCurve.NbPoints();++i) { doubleaU=aPointsOnCurve.Parameter(i); gp_PntaPnt=aPointsOnCurve.Value(i); } + * ``` + */ +export declare class GCPnts_TangentialDeflection { + /** + * Empty constructor. + * @see `Initialize()` + */ + constructor(); + /** + * Constructor for 3D curve. + * @param theC 3d curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + constructor(theC: Adaptor3d_Curve, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number); + /** + * Constructor for 2D curve. + * @param theC 2d curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + constructor(theC: Adaptor2d_Curve2d, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number); + /** + * Constructor for 2D curve with restricted range. + * @param theC 2d curve + * @param theFirstParameter first parameter on curve + * @param theLastParameter last parameter on curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + constructor(theC: Adaptor3d_Curve, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number); + /** + * Constructor for 2D curve with restricted range. + * @param theC 2d curve + * @param theFirstParameter first parameter on curve + * @param theLastParameter last parameter on curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + constructor(theC: Adaptor2d_Curve2d, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints?: number, theUTol?: number, theMinLen?: number); + /** + * Initialize algorithm for 3D curve. + * @param theC 3d curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + Initialize(theC: Adaptor3d_Curve, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void; + /** + * Initialize algorithm for 2D curve. + * @param theC 2d curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + Initialize(theC: Adaptor2d_Curve2d, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void; + /** + * Initialize algorithm for 3D curve with restricted range. + * @param theC 3d curve + * @param theFirstParameter first parameter on curve + * @param theLastParameter last parameter on curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + Initialize(theC: Adaptor3d_Curve, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void; + /** + * Initialize algorithm for 2D curve with restricted range. + * @param theC 2d curve + * @param theFirstParameter first parameter on curve + * @param theLastParameter last parameter on curve + * @param theAngularDeflection angular deflection in radians + * @param theCurvatureDeflection linear deflection + * @param theMinimumOfPoints minimum number of points + * @param theUTol tolerance in curve parametric scope + * @param theMinLen minimal length + */ + Initialize(theC: Adaptor2d_Curve2d, theFirstParameter: number, theLastParameter: number, theAngularDeflection: number, theCurvatureDeflection: number, theMinimumOfPoints: number, theUTol: number, theMinLen: number): void; + /** + * Add point to already calculated points (or replace existing) Returns index of new added point or founded with parametric tolerance (replaced if theIsReplace is true). + */ + AddPoint(thePnt: gp_Pnt, theParam: number, theIsReplace?: boolean): number; + NbPoints(): number; + Parameter(I: number): number; + Value(I: number): gp_Pnt; + /** + * Computes angular step for the arc using the given parameters. + */ + static ArcAngularStep(theRadius: number, theLinearDeflection: number, theAngularDeflection: number, theMinLength: number): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements construction algorithms for arcs of ellipses in the plane. The result is a `Geom2d_TrimmedCurve`. A `GC_MakeArcOfEllipse2d` object provides a framework for: + * + * - defining the construction parameters; + * - running the construction algorithm; + * - querying the construction status and the resulting arc via `Value()`. + * @remarks **Note:** Angular parameters are expressed in radians. + */ +export declare class GC_MakeArcOfEllipse2d extends GC_Root { + /** + * Constructs an arc from angular bounds on an ellipse. + * @param theEllipse source ellipse + * @param theAlpha1 first angle (radians) + * @param theAlpha2 second angle (radians) + * @param theSense orientation of resulting arc + */ + constructor(theEllipse: gp_Elips2d, theAlpha1: number, theAlpha2: number, theSense?: boolean); + /** + * Constructs an arc from a point and angular bound on an ellipse. + * @param theEllipse source ellipse + * @param thePoint point on source ellipse + * @param theAlpha angle value (radians) + * @param theSense orientation of resulting arc + */ + constructor(theEllipse: gp_Elips2d, thePoint: gp_Pnt2d, theAlpha: number, theSense?: boolean); + /** + * Constructs an arc between two points on an ellipse. + * @param theEllipse source ellipse + * @param theP1 first point on source ellipse + * @param theP2 second point on source ellipse + * @param theSense orientation of resulting arc + * @remarks **Note:** Orientation is trigonometric when `theSense` is true, otherwise opposite. + * @remarks **Note:** IsDone always returns true. + */ + constructor(theEllipse: gp_Elips2d, theP1: gp_Pnt2d, theP2: gp_Pnt2d, theSense?: boolean); + /** + * Returns the constructed arc of ellipse. + * @returns resulting trimmed curve + */ + Value(): Geom2d_TrimmedCurve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements construction algorithms for line segments in the plane. The result is a `Geom2d_TrimmedCurve`. A `GC_MakeSegment2d` object provides a framework for: + * + * - defining the construction parameters; + * - running the construction algorithm; + * - querying the construction status and the resulting segment via `Value()`. + */ +export declare class GC_MakeSegment2d extends GC_Root { + /** + * Creates a segment between two points. + * @param theP1 first point + * @param theP2 second point + * @remarks **Note:** Construction fails with `gce_ConfusedPoints` if points are coincident. + */ + constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d); + /** + * Creates a segment on a line defined by point and direction. The segment starts at `theP1` and ends at the orthogonal projection of `theP2` onto that line. + * @param theP1 first point + * @param theV direction vector + * @param theP2 second point + * @remarks **Note:** Construction fails with `gce_ConfusedPoints` if the projected endpoint is coincident with `theP1` within resolution. + */ + constructor(theP1: gp_Pnt2d, theV: gp_Dir2d, theP2: gp_Pnt2d); + /** + * Creates a segment on a line between two parameter values. + * @param theLine source line + * @param theU1 first parameter + * @param theU2 second parameter + */ + constructor(theLine: unknown, theU1: number, theU2: number); + /** + * Creates a segment on a line between point parameter and target parameter. + * @param theLine source line + * @param thePoint first point on segment support line + * @param theUlast last parameter + */ + constructor(theLine: unknown, thePoint: gp_Pnt2d, theUlast: number); + /** + * Creates a segment on a line between projections of two points. + * @param theLine source line + * @param theP1 first point + * @param theP2 second point + */ + constructor(theLine: unknown, theP1: gp_Pnt2d, theP2: gp_Pnt2d); + /** + * Returns the constructed line segment. Exceptions StdFail_NotDone if no line segment is constructed. + * @returns resulting trimmed curve + */ + Value(): Geom2d_TrimmedCurve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements construction algorithms for ellipses in the plane. The result is a `Geom2d_Ellipse`. A `GC_MakeEllipse2d` object provides a framework for: + * + * - defining the construction parameters; + * - running the construction algorithm; + * - querying the construction status and the resulting ellipse via `Value()`. + * @remarks **Note:** Ellipse parameterization range is [0, 2*PI]. + * @remarks **Note:** The X axis of the local coordinate system is the major axis, and the Y axis is the minor axis. + */ +export declare class GC_MakeEllipse2d extends GC_Root { + /** + * Creates an ellipse from a non-persistent one from package gp. + * @param theEllipse source ellipse + */ + constructor(theEllipse: gp_Elips2d); + /** + * Creates an ellipse from a local coordinate system and radii. + * @param theAxis local coordinate system + * @param theMajorRadius major radius value + * @param theMinorRadius minor radius value + * @remarks **Note:** Error status is provided by the underlying `gce_MakeElips2d` (for example `gce_InvertRadius` or `gce_NegativeRadius`). + */ + constructor(theAxis: gp_Ax22d, theMajorRadius: number, theMinorRadius: number); + /** + * Creates an ellipse from two apex points and center point. + * @param theS1 first apex point + * @param theS2 second point defining minor radius + * @param theCenter center point + * @remarks **Note:** Error status is provided by the underlying `gce_MakeElips2d`. + */ + constructor(theS1: gp_Pnt2d, theS2: gp_Pnt2d, theCenter: gp_Pnt2d); + /** + * Creates an ellipse from major axis placement and radii. + * @param theMajorAxis major axis placement + * @param theMajorRadius major radius value + * @param theMinorRadius minor radius value + * @param theSense orientation flag + * @remarks **Note:** Error status is provided by the underlying `gce_MakeElips2d` (for example `gce_InvertRadius` or `gce_NegativeRadius`). + */ + constructor(theMajorAxis: gp_Ax2d, theMajorRadius: number, theMinorRadius: number, theSense?: boolean); + /** + * Returns the constructed ellipse. Exceptions StdFail_NotDone if no ellipse is constructed. + * @returns resulting ellipse + */ + Value(): Geom2d_Ellipse; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements construction algorithms for arcs of circles in the plane. The result is a `Geom2d_TrimmedCurve`. A `GC_MakeArcOfCircle2d` object provides a framework for: + * + * - defining the construction parameters; + * - running the construction algorithm; + * - querying the construction status and the resulting arc via `Value()`. + * @remarks **Note:** Angular parameters are expressed in radians. + */ +export declare class GC_MakeArcOfCircle2d extends GC_Root { + /** + * Constructs an arc passing through three points. + * @param theP1 first point + * @param theP2 intermediate point + * @param theP3 last point + */ + constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d, theP3: gp_Pnt2d); + /** + * Constructs an arc from two points and tangent vector at start point. + * @param theP1 start point + * @param theV tangent vector at start point + * @param theP2 end point + */ + constructor(theP1: gp_Pnt2d, theV: gp_Vec2d, theP2: gp_Pnt2d); + /** + * Constructs an arc from angular bounds on a circle. + * @param theCircle source circle + * @param theAlpha1 first angle (radians) + * @param theAlpha2 second angle (radians) + * @param theSense orientation of resulting arc + */ + constructor(theCircle: gp_Circ2d, theAlpha1: number, theAlpha2: number, theSense?: boolean); + /** + * Constructs an arc from a point and angular bound on a circle. + * @param theCircle source circle + * @param thePoint point on source circle + * @param theAlpha angle value (radians) + * @param theSense orientation of resulting arc + */ + constructor(theCircle: gp_Circ2d, thePoint: gp_Pnt2d, theAlpha: number, theSense?: boolean); + /** + * Constructs an arc between two points on a circle. + * @param theCircle source circle + * @param theP1 first point on source circle + * @param theP2 second point on source circle + * @param theSense orientation of resulting arc + */ + constructor(theCircle: gp_Circ2d, theP1: gp_Pnt2d, theP2: gp_Pnt2d, theSense?: boolean); + /** + * Returns the constructed arc of circle. Exceptions StdFail_NotDone if no arc of circle is constructed. + * @returns resulting trimmed curve + */ + Value(): Geom2d_TrimmedCurve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class implements construction algorithms for circles in the plane. The result is a `Geom2d_Circle`. A `GC_MakeCircle2d` object provides a framework for: + * + * - defining the construction parameters; + * - running the construction algorithm; + * - querying the construction status and the resulting circle via `Value()`. + * @remarks **Note:** A circle is parameterized in the range [0, 2*PI], and the X axis of its local coordinate system defines the parameter origin. + */ +export declare class GC_MakeCircle2d extends GC_Root { + /** + * Creates a circle from a non-persistent one from package gp. + * @param theCircle source circle + */ + constructor(theCircle: gp_Circ2d); + /** + * Creates a circle from a local coordinate system and radius. + * @param theAxis local coordinate system + * @param theRadius radius value + * @remarks **Note:** Construction fails with `gce_NegativeRadius` if `theRadius` is negative. + */ + constructor(theAxis: gp_Ax22d, theRadius: number); + /** + * Creates a circle parallel to another one at signed distance. + * @param theCircle source circle + * @param theDist signed distance + * @remarks **Note:** If `theDist` is positive, the resulting circle encloses `theCircle`. + * @remarks **Note:** If `theDist` is negative, the resulting circle is enclosed by `theCircle`. + * @remarks **Note:** Error status is provided by the underlying `gce_MakeCirc2d`. + */ + constructor(theCircle: gp_Circ2d, theDist: number); + /** + * Creates a circle parallel to another one and passing through a point. + * @param theCircle source circle + * @param thePoint point on resulting circle + * @remarks **Note:** Error status is provided by the underlying `gce_MakeCirc2d`. + */ + constructor(theCircle: gp_Circ2d, thePoint: gp_Pnt2d); + /** + * Creates a circle from an axis placement and radius. + * @param theAxis axis placement + * @param theRadius radius value + * @param theSense orientation flag + * @remarks **Note:** Construction fails with `gce_NegativeRadius` if `theRadius` is negative. + */ + constructor(theAxis: gp_Ax2d, theRadius: number, theSense?: boolean); + /** + * Creates a circle passing through three points. + * @param theP1 first point + * @param theP2 second point + * @param theP3 third point + * @remarks **Note:** Error status is provided by the underlying `gce_MakeCirc2d`. + */ + constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d, theP3: gp_Pnt2d); + /** + * Creates a circle from center point and radius. + * @param theCenter center point + * @param theRadius radius value + * @param theSense orientation flag + * @remarks **Note:** Error status is provided by the underlying `gce_MakeCirc2d`. + */ + constructor(theCenter: gp_Pnt2d, theRadius: number, theSense?: boolean); + /** + * Creates a circle from center point and one point on the circle. + * @param theCenter center point + * @param thePoint point on resulting circle + * @param theSense orientation flag + * @remarks **Note:** Error status is provided by the underlying `gce_MakeCirc2d`. + */ + constructor(theCenter: gp_Pnt2d, thePoint: gp_Pnt2d, theSense?: boolean); + /** + * Returns the constructed circle. Exceptions StdFail_NotDone if no circle is constructed. + * @returns resulting circle + */ + Value(): Geom2d_Circle; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Implements construction algorithms for an arc of circle in 3D space. The result is a {@link Geom_TrimmedCurve | `Geom_TrimmedCurve`} curve. A MakeArcOfCircle object provides a framework for: + * + * - defining the construction of the arc of circle, + * - implementing the construction algorithm, and + * - consulting the results. In particular, the Value function returns the constructed arc of circle. + */ +export declare class GC_MakeArcOfCircle extends GC_Root { + /** + * Creates an arc of circle passing through three points. + * @param theP1 first point + * @param theP2 second point + * @param theP3 third point + */ + constructor(theP1: gp_Pnt, theP2: gp_Pnt, theP3: gp_Pnt); + /** + * Creates an arc of circle from two points and a tangent at the first point. + * @param theP1 start point + * @param theV tangent vector at start point + * @param theP2 end point + * @remarks **Note:** The tangent direction is given by the input vector. The orientation of the arc is:the sense determined by the order of the three input points;the sense defined by the input vector; orfor the other constructors:the sense of the source circle if the orientation flag is true, orthe opposite sense if `theSense` is false. + * @remarks **Note:** Angles are expressed in radians. + * @remarks **Note:** Construction fails with `gce_ConfusedPoints` if `theP1` and `theP2` are coincident. + * @remarks **Note:** Construction fails with `gce_IntersectionError` if the supporting lines used to define circle center do not intersect. + */ + constructor(theP1: gp_Pnt, theV: gp_Vec, theP2: gp_Pnt); + /** + * Creates an arc of circle from angular bounds. + * @param theCirc source circle + * @param theAlpha1 first angle (radians) + * @param theAlpha2 second angle (radians) + * @param theSense orientation of resulting arc + */ + constructor(theCirc: gp_Circ, theAlpha1: number, theAlpha2: number, theSense: boolean); + /** + * Creates an arc of circle from a point and an angular bound. + * @param theCirc source circle + * @param theP point on circle + * @param theAlpha target angle (radians) + * @param theSense orientation of resulting arc + */ + constructor(theCirc: gp_Circ, theP: gp_Pnt, theAlpha: number, theSense: boolean); + /** + * Creates an arc of circle from two points on the circle. + * @param theCirc source circle + * @param theP1 first point on circle + * @param theP2 second point on circle + * @param theSense orientation of resulting arc + */ + constructor(theCirc: gp_Circ, theP1: gp_Pnt, theP2: gp_Pnt, theSense: boolean); + /** + * Returns the constructed arc of circle. Exceptions StdFail_NotDone if no arc of circle is constructed. + * @returns resulting arc + */ + Value(): Geom_TrimmedCurve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides common status services for GC builders reporting construction errors. + */ +export declare class GC_Root { + constructor(); + /** + * Returns true if the construction is successful. + */ + IsDone(): boolean; + /** + * Returns true if the construction has failed. + */ + IsError(): boolean; + /** + * Returns the status of the construction: + * + * - gce_Done, if the construction is successful, or + * - another value of the `gce_ErrorType` enumeration indicating why the construction failed. + */ + Status(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Computes the bounding box for a curve in 2d . Functions to add a 2D curve to a bounding box. The 2D curve is defined from a Geom2d curve. + */ +export declare class BndLib_Add2dCurve { + constructor(); + /** + * Adds to the bounding box B the curve C B is then enlarged by the tolerance value Tol. Note: depending on the type of curve, one of the following representations of the curve C is used to include it in the bounding box B: + * + * - an exact representation if C is built from a line, a circle or a conic curve, + * - the poles of the curve if C is built from a Bezier curve or a BSpline curve, + * - if not, the points of an approximation of the curve C. Warning C is an adapted curve, that is, an object which is an interface between: + * - the services provided by a 2D curve from the package Geom2d + * - and those required of the curve by the computation algorithm. The adapted curve is created in the following way: `occ::handle` mycurve = ... ; {@link Geom2dAdaptor_Curve | `Geom2dAdaptor_Curve`} C(mycurve); The bounding box B is then enlarged by adding it: {@link Bnd_Box2d | `Bnd_Box2d`} B; // ... double Tol = ... ; Add2dCurve::Add ( C, Tol, B ); Exceptions {@link Standard_Failure | `Standard_Failure`} if the curve is built from: + * - a {@link Geom_Line | `Geom_Line`}, or + * - a {@link Geom_Parabola | `Geom_Parabola`}, or + * - a {@link Geom_Hyperbola | `Geom_Hyperbola`}, and P1 and P2 are either two negative infinite real numbers, or two positive infinite real numbers. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static Add(C: Adaptor2d_Curve2d, Tol: number, B: Bnd_Box2d): void; + /** + * Adds to the bounding box B the curve C B is then enlarged by the tolerance value Tol. Note: depending on the type of curve, one of the following representations of the curve C is used to include it in the bounding box B: + * + * - an exact representation if C is built from a line, a circle or a conic curve, + * - the poles of the curve if C is built from a Bezier curve or a BSpline curve, + * - if not, the points of an approximation of the curve C. + * @param Box Mutated in place; read the updated value from this argument after the call. + */ + static Add(C: Geom2d_Curve, Tol: number, Box: Bnd_Box2d): void; + /** + * Adds to the bounding box Bthe arc of the curve C limited by the two parameter values P1 and P2. B is then enlarged by the tolerance value Tol. Note: depending on the type of curve, one of the following representations of the curve C is used to include it in the bounding box B: + * + * - an exact representation if C is built from a line, a circle or a conic curve, + * - the poles of the curve if C is built from a Bezier curve or a BSpline curve, + * - if not, the points of an approximation of the curve C. Warning C is an adapted curve, that is, an object which is an interface between: + * - the services provided by a 2D curve from the package Geom2d + * - and those required of the curve by the computation algorithm. The adapted curve is created in the following way: `occ::handle` mycurve = ... ; {@link Geom2dAdaptor_Curve | `Geom2dAdaptor_Curve`} C(mycurve); The bounding box B is then enlarged by adding it: {@link Bnd_Box2d | `Bnd_Box2d`} B; // ... double Tol = ... ; Add2dCurve::Add ( C, Tol, B ); Exceptions {@link Standard_Failure | `Standard_Failure`} if the curve is built from: + * - a {@link Geom_Line | `Geom_Line`}, or + * - a {@link Geom_Parabola | `Geom_Parabola`}, or + * - a {@link Geom_Hyperbola | `Geom_Hyperbola`}, and P1 and P2 are either two negative infinite real numbers, or two positive infinite real numbers. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static Add(C: Adaptor2d_Curve2d, U1: number, U2: number, Tol: number, B: Bnd_Box2d): void; + /** + * Adds to the bounding box B the part of curve C B is then enlarged by the tolerance value Tol. U1, U2 - the parametric range to compute the bounding box; Note: depending on the type of curve, one of the following representations of the curve C is used to include it in the bounding box B: + * + * - an exact representation if C is built from a line, a circle or a conic curve, + * - the poles of the curve if C is built from a Bezier curve or a BSpline curve, + * - if not, the points of an approximation of the curve C. + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static Add(C: Geom2d_Curve, U1: number, U2: number, Tol: number, B: Bnd_Box2d): void; + /** + * Adds to the bounding box B the part of curve C B is then enlarged by the tolerance value Tol. U1, U2 - the parametric range to compute the bounding box; Note: depending on the type of curve, one of the following algorithms is used to include it in the bounding box B: + * + * - an exact analytical if C is built from a line, a circle or a conic curve, + * - numerical calculation of bounding box sizes, based on minimization algorithm, for other types of curve If Tol = < `Precision::PConfusion()`, `Precision::PConfusion` is used as tolerance for calculation + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddOptimal(C: Geom2d_Curve, U1: number, U2: number, Tol: number, B: Bnd_Box2d): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The {@link GeomConvert | `GeomConvert`} package provides some global functions as follows. + * + * - converting classical Geom curves into BSpline curves, + * - segmenting BSpline curves, particularly at knots values: this function may be used in conjunction with the {@link GeomConvert_BSplineCurveKnotSplitting | `GeomConvert_BSplineCurveKnotSplitting`} class to segment a BSpline curve into arcs which comply with required continuity levels, + * - converting classical Geom surfaces into BSpline surfaces, and + * - segmenting BSpline surfaces, particularly at knots values: this function may be used in conjunction with the {@link GeomConvert_BSplineSurfaceKnotSplitting | `GeomConvert_BSplineSurfaceKnotSplitting`} class to segment a BSpline surface into patches which comply with required continuity levels. All geometric entities used in this package are bounded. + * + * References : . Generating the Bezier Points of B-spline curves and surfaces (Wolfgang Bohm) CAGD volume 13 number 6 november 1981 . On NURBS: A Survey (Leslie Piegl) IEEE Computer Graphics and Application January 1991 . Curve and surface construction using rational B-splines (Leslie Piegl and Wayne Tiller) CAD Volume 19 number 9 november 1987 . A survey of curve and surface methods in CAGD (Wolfgang BOHM) CAGD 1 1984 + */ +export declare class GeomConvert { + constructor(); + /** + * Convert a curve from Geom by an approximation method. + * + * This method computes the arc of B-spline curve between the two knots FromK1 and ToK2. If C is periodic the arc has the same orientation as C if SameOrientation = true. + * If C is not periodic SameOrientation is not used for the computation and C is oriented from the knot fromK1 to the knot toK2. We just keep the local definition of C between the knots FromK1 and ToK2. + * The returned B-spline curve has its first and last knots with a multiplicity equal to degree + 1, where degree is the polynomial degree of C. The indexes of the knots FromK1 and ToK2 doesn't include the repetition of multiple knots in their definition. Raised if FromK1 = ToK2 Raised if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] + */ + static SplitBSplineCurve(C: Geom_BSplineCurve, FromK1: number, ToK2: number, SameOrientation: boolean): Geom_BSplineCurve; + /** + * This function computes the segment of B-spline curve between the parametric values FromU1, ToU2. If C is periodic the arc has the same orientation as C if SameOrientation = True. If C is not periodic SameOrientation is not used for the computation and C is oriented fromU1 toU2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1 - U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. + * + * Raised if FromU1 or ToU2 are out of the parametric bounds of the curve (The tolerance criterion is ParametricTolerance). Raised if Abs (FromU1 - ToU2) <= ParametricTolerance Raised if ParametricTolerance < Resolution from gp. + */ + static SplitBSplineCurve(C: Geom_BSplineCurve, FromU1: number, ToU2: number, ParametricTolerance: number, SameOrientation: boolean): Geom_BSplineCurve; + /** + * Computes the B-spline surface patche between the knots values FromUK1, ToUK2, FromVK1, ToVK2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is true in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromUK1 ToUK2 and FromVK1 ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2 FromUK1 or ToUK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] FromVK1 or ToVK2 are out of the bounds [FirstVKnotIndex, LastVKnotIndex]. + */ + static SplitBSplineSurface(S: Geom_BSplineSurface, FromUK1: number, ToUK2: number, FromVK1: number, ToVK2: number, SameUOrientation: boolean, SameVOrientation: boolean): Geom_BSplineSurface; + /** + * This method splits a B-spline surface patche between the knots values FromK1, ToK2 in one direction. If USplit = True then the splitting direction is the U parametric direction else it is the V parametric direction. + * If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is True If S is not periodic in this direction SameOrientation is not used for the computation and S is oriented FromK1 ToK2. Raised if FromK1 = ToK2 or if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] in the considered parametric direction. + */ + static SplitBSplineSurface(S: Geom_BSplineSurface, FromK1: number, ToK2: number, USplit: boolean, SameOrientation: boolean): Geom_BSplineSurface; + /** + * This method computes the B-spline surface patche between the parametric values FromU1, ToU2, FromV1, ToV2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is True in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromU1 ToU2 and FromV1 ToV2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1 - U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. + * + * Raised if FromU1 or ToU2 or FromV1 or ToU2 are out of the parametric bounds of the surface (the tolerance criterion is ParametricTolerance). Raised if Abs (FromU1 - ToU2) <= ParametricTolerance or Abs (FromV1 - ToV2) <= ParametricTolerance. Raised if ParametricTolerance < Resolution. + */ + static SplitBSplineSurface(S: Geom_BSplineSurface, FromU1: number, ToU2: number, FromV1: number, ToV2: number, ParametricTolerance: number, SameUOrientation: boolean, SameVOrientation: boolean): Geom_BSplineSurface; + /** + * This method splits the B-spline surface S in one direction between the parametric values FromParam1, ToParam2. If USplit = True then the Splitting direction is the U parametric direction else it is the V parametric direction. + * If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is true. + * If S is not periodic in the considered direction SameOrientation is not used for the computation and S is oriented FromParam1 ToParam2. + * If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1 - U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. + * + * Raises if FromParam1 or ToParam2 are out of the parametric bounds of the surface in the considered direction. Raises if Abs (FromParam1 - ToParam2) <= ParametricTolerance. + */ + static SplitBSplineSurface(S: Geom_BSplineSurface, FromParam1: number, ToParam2: number, USplit: boolean, ParametricTolerance: number, SameOrientation: boolean): Geom_BSplineSurface; + /** + * This function converts a non infinite curve from Geom into a B-spline curve. C must be an ellipse or a circle or a trimmed conic or a trimmed line or a Bezier curve or a trimmed Bezier curve or a BSpline curve or a trimmed BSpline curve or an OffsetCurve. The returned B-spline is not periodic except if C is a Circle or an Ellipse. If the Parameterisation is QuasiAngular than the returned curve is NOT periodic in case a periodic {@link Geom_Circle | `Geom_Circle`} or {@link Geom_Ellipse | `Geom_Ellipse`}. + * For TgtThetaOver2_1 and TgtThetaOver2_2 the method raises an exception in case of a periodic {@link Geom_Circle | `Geom_Circle`} or a {@link Geom_Ellipse | `Geom_Ellipse`} ParameterisationType applies only if the curve is a Circle or an ellipse: TgtThetaOver2, TgtThetaOver2_1, TgtThetaOver2_2, TgtThetaOver2_3, TgtThetaOver2_4,. + * + * Purpose: this is the classical rational parameterisation 2 1 - t cos(theta) = ----- 2 1 + t + * + * 2t sin(theta) = ----- 2 1 + t + * + * t = tan (theta/2) + * + * with TgtThetaOver2 the routine will compute the number of spans using the rule num_spans = [ (ULast - UFirst) / 1.2 ] + 1 with TgtThetaOver2_N, N spans will be forced: an error will be raized if (ULast - UFirst) >= PI and N = 1, ULast - UFirst >= 2 PI and N = 2 + * + * QuasiAngular, here t is a rational function that approximates theta ----> tan(theta/2). Nevetheless the composing with above function yields exact functions whose square sum up to 1 RationalC1 ; t is replaced by a polynomial function of u so as to grant C1 contiuity across knots. Exceptions Standard_DomainError: + * + * - if the curve C is infinite, or + * - if C is a (complete) circle or ellipse, and Parameterisation is equal to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2. Standard_ConstructionError: + * - if C is a (complete) circle or ellipse, and if Parameterisation is not equal to Convert_TgtThetaOver2, Convert_RationalC1, Convert_QuasiAngular (the curve is converted in these three cases) or to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2 (another exception is raised in these two cases). + * - if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_1 and if U2 - U1 > 0.9999 * Pi, where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a half-circle or a half-ellipse, for example), or + * - if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_2 and U2 - U1 > 1.9999 * Pi where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a quasi-complete circle or ellipse). + */ + static CurveToBSplineCurve(C: Geom_Curve, Parameterisation?: Convert_ParameterisationType): Geom_BSplineCurve; + /** + * This algorithm converts a non infinite surface from Geom into a B-spline surface. S must be a trimmed plane or a trimmed cylinder or a trimmed cone or a trimmed sphere or a trimmed torus or a sphere or a torus or a Bezier surface of a trimmed Bezier surface or a trimmed swept surface with a corresponding basis curve which can be turned into a B-spline curve (see the method CurveToBSplineCurve). Raises DomainError if the type of the surface is not previously defined. + */ + static SurfaceToBSplineSurface(S: Geom_Surface): Geom_BSplineSurface; + /** + * This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatG1(ArrayOfCurves: NCollection_Array1_handle_Geom_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number): { ArrayOfConcatenated: NCollection_HArray1_handle_Geom_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfIndices`: owned by the returned envelope. + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatC1(ArrayOfCurves: NCollection_Array1_handle_Geom_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number): { ArrayOfIndices: NCollection_HArray1_int; ArrayOfConcatenated: NCollection_HArray1_handle_Geom_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] ClosedFlag indicates if the ArrayOfCurves is closed. In this case ClosedTolerance contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0 ClosedFlag becomes False on the output if it is impossible to build closed curve. + * @param ArrayOfCurves Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `ArrayOfIndices`: owned by the returned envelope. + * - `ArrayOfConcatenated`: owned by the returned envelope. + * - `ClosedFlag`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static ConcatC1(ArrayOfCurves: NCollection_Array1_handle_Geom_BSplineCurve, ArrayOfToler: NCollection_Array1_double, ClosedFlag: boolean, ClosedTolerance: number, AngularTolerance: number): { ArrayOfIndices: NCollection_HArray1_int; ArrayOfConcatenated: NCollection_HArray1_handle_Geom_BSplineCurve; ClosedFlag: boolean; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns a new BSpline which could still be C0. tolerance is a geometrical tolerance. The Angular toleranceis in radians and measures the angle of the tangents on the left and on the right to decide if the curve is G1 or not at a given point. + * @returns A result object with fields: + * - `BS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToC1BSplineCurve(tolerance: number, AngularTolerance: number): { BS: Geom_BSplineCurve; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance. + * @returns A result object with fields: + * - `tabBS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToArrayOfC1BSplineCurve(BS: Geom_BSplineCurve, tolerance: number): { tabBS: NCollection_HArray1_handle_Geom_BSplineCurve; [Symbol.dispose](): void }; + /** + * This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance : it allows for the maximum deformation The Angular tolerance is in radians and measures the angle of the tangents on the left and on the right to decide if the curve is C1 or not at a given point. + * @returns A result object with fields: + * - `tabBS`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static C0BSplineToArrayOfC1BSplineCurve(BS: Geom_BSplineCurve, AngularTolerance: number, tolerance: number): { tabBS: NCollection_HArray1_handle_Geom_BSplineCurve; [Symbol.dispose](): void }; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a vertex which. + * + * - references an underlying vertex with the potential to be given a location and an orientation + * - has a location for the underlying vertex, giving its placement in the local coordinate system + * - has an orientation for the underlying vertex, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Vertex extends TopoDS_Shape { + /** + * Undefined Vertex. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a compound which. + * + * - references an underlying compound with the potential to be given a location and an orientation + * - has a location for the underlying compound, giving its placement in the local coordinate system + * - has an orientation for the underlying compound, in terms of its geometry (as opposed to orientation in relation to other shapes). Casts shape S to the more specialized return type, Compound. + */ +export declare class TopoDS_Compound extends TopoDS_Shape { + /** + * Constructs an Undefined Compound. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a face which. + * + * - references an underlying face with the potential to be given a location and an orientation + * - has a location for the underlying face, giving its placement in the local coordinate system + * - has an orientation for the underlying face, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Face extends TopoDS_Shape { + /** + * Undefined Face. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A Builder is used to create Topological Data Structures. It is the root of the Builder class hierarchy. + * + * There are three groups of methods in the Builder: + * + * The Make methods create Shapes. + * + * The Add method includes a Shape in another Shape. + * + * The Remove method removes a Shape from an other Shape. + * + * The methods in Builder are not static. They can be redefined in inherited builders. + * + * This Builder does not provide methods to Make Vertices, Edges, Faces, Shells or Solids. These methods are provided in the inherited Builders as they must provide the geometry. + * + * The Add method check for the following rules: + * + * - Any SHAPE can be added in a COMPOUND. + * - Only SOLID can be added in a COMPSOLID. + * - Only SHELL, EDGE and VERTEX can be added in a SOLID. EDGE and VERTEX as to be INTERNAL or EXTERNAL. + * - Only FACE can be added in a SHELL. + * - Only WIRE and VERTEX can be added in a FACE. VERTEX as to be INTERNAL or EXTERNAL. + * - Only EDGE can be added in a WIRE. + * - Only VERTEX can be added in an EDGE. + * - Nothing can be added in a VERTEX. + */ +export declare class TopoDS_Builder { + constructor(); + /** + * Make an empty Wire. + * @param W Mutated in place; read the updated value from this argument after the call. + */ + MakeWire(W: TopoDS_Wire): void; + /** + * Make an empty Shell. + * @param S Mutated in place; read the updated value from this argument after the call. + */ + MakeShell(S: TopoDS_Shell): void; + /** + * Make a Solid covering the whole 3D space. + * @param S Mutated in place; read the updated value from this argument after the call. + */ + MakeSolid(S: TopoDS_Solid): void; + /** + * Make an empty Composite Solid. + * @param C Mutated in place; read the updated value from this argument after the call. + */ + MakeCompSolid(C: TopoDS_CompSolid): void; + /** + * Make an empty Compound. + * @param C Mutated in place; read the updated value from this argument after the call. + */ + MakeCompound(C: TopoDS_Compound): void; + /** + * Add the Shape C in the Shape S. Exceptions. + * + * - TopoDS_FrozenShape if S is not free and cannot be modified. + * - TopoDS__UnCompatibleShapes if S and C are not compatible. + * @param S Mutated in place; read the updated value from this argument after the call. + */ + Add(S: TopoDS_Shape, C: TopoDS_Shape): void; + /** + * Remove the Shape C from the Shape S. Exceptions TopoDS_FrozenShape if S is frozen and cannot be modified. + * @param S Mutated in place; read the updated value from this argument after the call. + */ + Remove(S: TopoDS_Shape, C: TopoDS_Shape): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a composite solid which. + * + * - references an underlying composite solid with the potential to be given a location and an orientation + * - has a location for the underlying composite solid, giving its placement in the local coordinate system + * - has an orientation for the underlying composite solid, in terms of its geometry (as opposed to orientation in relation to other shapes). Casts shape S to the more specialized return type, CompSolid. + */ +export declare class TopoDS_CompSolid extends TopoDS_Shape { + /** + * Constructs an Undefined CompSolid. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes an edge which. + * + * - references an underlying edge with the potential to be given a location and an orientation + * - has a location for the underlying edge, giving its placement in the local coordinate system + * - has an orientation for the underlying edge, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Edge extends TopoDS_Shape { + /** + * Undefined Edge. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a solid shape which. + * + * - references an underlying solid shape with the potential to be given a location and an orientation + * - has a location for the underlying shape, giving its placement in the local coordinate system + * - has an orientation for the underlying shape, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Solid extends TopoDS_Shape { + /** + * Constructs an Undefined Solid. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a wire which. + * + * - references an underlying wire with the potential to be given a location and an orientation + * - has a location for the underlying wire, giving its placement in the local coordinate system + * - has an orientation for the underlying wire, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Wire extends TopoDS_Shape { + /** + * Undefined Wire. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a shell which. + * + * - references an underlying shell with the potential to be given a location and an orientation + * - has a location for the underlying shell, giving its placement in the local coordinate system + * - has an orientation for the underlying shell, in terms of its geometry (as opposed to orientation in relation to other shapes). + */ +export declare class TopoDS_Shell extends TopoDS_Shape { + /** + * Constructs an Undefined Shell. + */ + constructor(); + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Describes a shape which. + * + * - references an underlying shape with the potential to be given a location and an orientation + * - has a location for the underlying shape, giving its placement in the local coordinate system + * - has an orientation for the underlying shape, in terms of its geometry (as opposed to orientation in relation to other shapes). Note: A Shape is empty if it references an underlying shape which has an empty list of shapes. + */ +export declare class TopoDS_Shape { + /** + * Creates a NULL Shape referring to nothing. + */ + constructor(); + /** + * Returns true if this shape is null. In other words, it references no underlying shape with the potential to be given a location and an orientation. + */ + IsNull(): boolean; + /** + * Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null. + */ + Nullify(): void; + /** + * Returns the shape local coordinate system. + */ + Location(): TopLoc_Location; + /** + * Sets the shape local coordinate system. + * @param theLoc the new local coordinate system. + * @param theRaiseExc flag to raise exception in case of transformation with scale or negative. + */ + Location(theLoc: TopLoc_Location, theRaiseExc: boolean): void; + /** + * Returns a shape similar to with the local coordinate system set to . + * @param theLoc the new local coordinate system. + * @param theRaiseExc flag to raise exception in case of transformation with scale or negative. + * @returns the located shape. + */ + Located(theLoc: TopLoc_Location, theRaiseExc?: boolean): TopoDS_Shape; + /** + * Returns the shape orientation. + */ + Orientation(): TopAbs_Orientation; + /** + * Sets the shape orientation. + */ + Orientation(theOrient: TopAbs_Orientation): void; + /** + * Returns a shape similar to with the orientation set to . + */ + Oriented(theOrient: TopAbs_Orientation): TopoDS_Shape; + /** + * Returns a handle to the actual shape implementation. + */ + TShape(): unknown; + TShape(theTShape: unknown): void; + /** + * Returns the value of the `TopAbs_ShapeEnum` enumeration that corresponds to this shape, for example VERTEX, EDGE, and so on. Exceptions Standard_NullObject if this shape is null. + */ + ShapeType(): TopAbs_ShapeEnum; + /** + * Returns the free flag. + */ + Free(): boolean; + /** + * Sets the free flag. + */ + Free(theIsFree: boolean): void; + /** + * Returns the locked flag. + */ + Locked(): boolean; + /** + * Sets the locked flag. + */ + Locked(theIsLocked: boolean): void; + /** + * Returns the modification flag. + */ + Modified(): boolean; + /** + * Sets the modification flag. + */ + Modified(theIsModified: boolean): void; + /** + * Returns the checked flag. + */ + Checked(): boolean; + /** + * Sets the checked flag. + */ + Checked(theIsChecked: boolean): void; + /** + * Returns the orientability flag. + */ + Orientable(): boolean; + /** + * Sets the orientability flag. + */ + Orientable(theIsOrientable: boolean): void; + /** + * Returns the closedness flag. + */ + Closed(): boolean; + /** + * Sets the closedness flag. + */ + Closed(theIsClosed: boolean): void; + /** + * Returns the infinity flag. + */ + Infinite(): boolean; + /** + * Sets the infinity flag. + */ + Infinite(theIsInfinite: boolean): void; + /** + * Returns the convexness flag. + */ + Convex(): boolean; + /** + * Sets the convexness flag. + */ + Convex(theIsConvex: boolean): void; + /** + * Multiplies the Shape location by thePosition. + * @param thePosition the transformation to apply. + * @param theRaiseExc flag to raise exception in case of transformation with scale or negative. + */ + Move(thePosition: TopLoc_Location, theRaiseExc?: boolean): void; + /** + * Returns a shape similar to with a location multiplied by thePosition. + * @param thePosition the transformation to apply. + * @param theRaiseExc flag to raise exception in case of transformation with scale or negative. + * @returns the moved shape. + */ + Moved(thePosition: TopLoc_Location, theRaiseExc?: boolean): TopoDS_Shape; + /** + * Reverses the orientation, using the Reverse method from the {@link TopAbs | `TopAbs`} package. + */ + Reverse(): void; + /** + * Returns a shape similar to with the orientation reversed, using the Reverse method from the {@link TopAbs | `TopAbs`} package. + */ + Reversed(): TopoDS_Shape; + /** + * Complements the orientation, using the Complement method from the {@link TopAbs | `TopAbs`} package. + */ + Complement(): void; + /** + * Returns a shape similar to with the orientation complemented, using the Complement method from the {@link TopAbs | `TopAbs`} package. + */ + Complemented(): TopoDS_Shape; + /** + * Updates the Shape Orientation by composition with theOrient, using the Compose method from the {@link TopAbs | `TopAbs`} package. + */ + Compose(theOrient: TopAbs_Orientation): void; + /** + * Returns a shape similar to with the orientation composed with theOrient, using the Compose method from the {@link TopAbs | `TopAbs`} package. + */ + Composed(theOrient: TopAbs_Orientation): TopoDS_Shape; + /** + * Returns the number of direct sub-shapes (children). + * @see {@link TopoDS_Iterator | `TopoDS_Iterator`} + */ + NbChildren(): number; + /** + * Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ. + */ + IsPartner(theOther: TopoDS_Shape): boolean; + /** + * Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ. + */ + IsSame(theOther: TopoDS_Shape): boolean; + /** + * Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations. + */ + IsEqual(theOther: TopoDS_Shape): boolean; + /** + * Negation of the IsEqual method. + */ + IsNotEqual(theOther: TopoDS_Shape): boolean; + /** + * Replace by a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes. + */ + EmptyCopy(): void; + /** + * Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes. + */ + EmptyCopied(): TopoDS_Shape; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The {@link BRepTools | `BRepTools`} package provides utilities for BRep data structures. + * + * - WireExplorer: Tool to explore the topology of a wire in the order of the edges. + * - ShapeSet: Tools used for dumping, writing and reading. + * - UVBounds: Methods to compute the limits of the boundary of a face, a wire or an edge in the parametric space of a face. + * - Update: Methods to call when a topology has been created to compute all missing data. + * - UpdateFaceUVPoints: Method to update the UV points stored with the edges on a face. + * - Compare: Method to compare two vertices. + * - Compare: Method to compare two edges. + * - OuterWire: Method to find the outer wire of a face. + * - Map3DEdges: Method to map all the 3D Edges of a Shape. + * - Dump: Method to dump a BRep object. + */ +export declare class BRepTools { + constructor(); + // dropped: LoadTriangulation param 3 resolves to excluded type OSD_FileSystem + // dropped: LoadAllTriangulations param 1 resolves to excluded type OSD_FileSystem + /** + * Returns in UMin, UMax, VMin, VMax the bounding values in the parametric space of F. + * @returns A result object with fields: + * - `UMin`: updated value from the call. + * - `UMax`: updated value from the call. + * - `VMin`: updated value from the call. + * - `VMax`: updated value from the call. + */ + static UVBounds(F: TopoDS_Face, UMin?: number, UMax?: number, VMin?: number, VMax?: number): { UMin: number; UMax: number; VMin: number; VMax: number }; + /** + * Returns in UMin, UMax, VMin, VMax the bounding values of the wire in the parametric space of F. + * @returns A result object with fields: + * - `UMin`: updated value from the call. + * - `UMax`: updated value from the call. + * - `VMin`: updated value from the call. + * - `VMax`: updated value from the call. + */ + static UVBounds(F: TopoDS_Face, W: TopoDS_Wire, UMin: number, UMax: number, VMin: number, VMax: number): { UMin: number; UMax: number; VMin: number; VMax: number }; + /** + * Returns in UMin, UMax, VMin, VMax the bounding values of the edge in the parametric space of F. + * @returns A result object with fields: + * - `UMin`: updated value from the call. + * - `UMax`: updated value from the call. + * - `VMin`: updated value from the call. + * - `VMax`: updated value from the call. + */ + static UVBounds(F: TopoDS_Face, E: TopoDS_Edge, UMin: number, UMax: number, VMin: number, VMax: number): { UMin: number; UMax: number; VMin: number; VMax: number }; + /** + * Adds to the box **the bounding values in the parametric space of F.** + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddUVBounds(F: TopoDS_Face, B: Bnd_Box2d): void; + /** + * Adds to the box **the bounding values of the wire in the parametric space of F.** + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddUVBounds(F: TopoDS_Face, W: TopoDS_Wire, B: Bnd_Box2d): void; + /** + * Adds to the box **the bounding values of the edge in the parametric space of F.** + * @param B Mutated in place; read the updated value from this argument after the call. + */ + static AddUVBounds(F: TopoDS_Face, E: TopoDS_Edge, B: Bnd_Box2d): void; + /** + * Update a vertex (nothing is done). + */ + static Update(V: TopoDS_Vertex): void; + /** + * Update an edge, compute 2d bounding boxes. + */ + static Update(E: TopoDS_Edge): void; + /** + * Update a wire (nothing is done). + */ + static Update(W: TopoDS_Wire): void; + /** + * Update a Face, update UV points. + */ + static Update(F: TopoDS_Face): void; + /** + * Update a shell (nothing is done). + */ + static Update(S: TopoDS_Shell): void; + /** + * Update a solid (nothing is done). + */ + static Update(S: TopoDS_Solid): void; + /** + * Update a composite solid (nothing is done). + */ + static Update(C: TopoDS_CompSolid): void; + /** + * Update a compound (nothing is done). + */ + static Update(C: TopoDS_Compound): void; + /** + * Update a shape, call the correct update. + */ + static Update(S: TopoDS_Shape): void; + /** + * For each edge of the face reset the UV points to the bounding points of the parametric curve of the edge on the face. + */ + static UpdateFaceUVPoints(theF: TopoDS_Face): void; + /** + * Removes all cached polygonal representation of the shape, i.e. the triangulations of the faces of and polygons on triangulations and polygons 3d of the edges. In case polygonal representation is the only available representation for the shape (shape does not have geometry) it is not removed. + * @param theShape the shape to clean + * @param theForce allows removing all polygonal representations from the shape, including polygons on triangulations irrelevant for the faces of the given shape. + */ + static Clean(theShape: TopoDS_Shape, theForce?: boolean): void; + /** + * Removes geometry (curves and surfaces) from all edges and faces of the shape. + */ + static CleanGeometry(theShape: TopoDS_Shape): void; + /** + * Removes all the pcurves of the edges of that refer to surfaces not belonging to any face of . + */ + static RemoveUnusedPCurves(S: TopoDS_Shape): void; + /** + * Verifies that each Face from the shape has got a triangulation with a deflection smaller or equal to specified one and the Edges a discretization on this triangulation. + * @param theShape shape to verify + * @param theLinDefl maximum allowed linear deflection + * @param theToCheckFreeEdges if TRUE, then free Edges are required to have 3D polygon + * @returns FALSE if input Shape contains Faces without triangulation, or that triangulation has worse (greater) deflection than specified one, or Edges in Shape lack polygons on triangulation or free Edges in Shape lack 3D polygons + */ + static Triangulation(theShape: TopoDS_Shape, theLinDefl: number, theToCheckFreeEdges?: boolean): boolean; + /** + * Releases triangulation data for each face of the shape if there is deferred storage to load it later. + * @param theShape shape to unload triangulations + * @param theTriangulationIdx index defining what triangulation should be unloaded. Starts from 0. -1 is used in specific case to unload currently already active triangulation. If some face doesn't contain triangulation with this index, nothing will be unloaded for it. Exception will be thrown in case of invalid negative index + * @returns TRUE if at least one triangulation is unloaded. + */ + static UnloadTriangulation(theShape: TopoDS_Shape, theTriangulationIdx?: number): boolean; + /** + * Activates triangulation data for each face of the shape from some deferred storage using specified shared input file system. + * @param theShape shape to activate triangulations + * @param theTriangulationIdx index defining what triangulation should be activated. Starts from 0. Exception will be thrown in case of invalid negative index + * @param theToActivateStrictly flag to activate exactly triangulation with defined theTriangulationIdx index. In TRUE case if some face doesn't contain triangulation with this index, active triangulation will not be changed for it. Else the last available triangulation will be activated. + * @returns TRUE if at least one active triangulation was changed. + */ + static ActivateTriangulation(theShape: TopoDS_Shape, theTriangulationIdx: number, theToActivateStrictly?: boolean): boolean; + /** + * Releases all available triangulations for each face of the shape if there is deferred storage to load them later. + * @param theShape shape to unload triangulations + * @returns TRUE if at least one triangulation is unloaded. + */ + static UnloadAllTriangulations(theShape: TopoDS_Shape): boolean; + /** + * Returns True if the distance between the two vertices is lower than their tolerance. + */ + static Compare(V1: TopoDS_Vertex, V2: TopoDS_Vertex): boolean; + /** + * Returns True if the distance between the two edges is lower than their tolerance. + */ + static Compare(E1: TopoDS_Edge, E2: TopoDS_Edge): boolean; + /** + * Returns the outer most wire of . Returns a Null wire if has no wires. + */ + static OuterWire(F: TopoDS_Face): TopoDS_Wire; + /** + * Stores in the map all the 3D topology edges of . + * @param M Mutated in place; read the updated value from this argument after the call. + */ + static Map3DEdges(S: TopoDS_Shape, M: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): void; + /** + * Verifies that the edge is found two times on the face before calling `BRep_Tool::IsClosed`. + */ + static IsReallyClosed(E: TopoDS_Edge, F: TopoDS_Face): boolean; + /** + * Detect closedness of face in U and V directions. + * @returns A result object with fields: + * - `theUclosed`: updated value from the call. + * - `theVclosed`: updated value from the call. + */ + static DetectClosedness(theFace: TopoDS_Face, theUclosed?: boolean, theVclosed?: boolean): { theUclosed: boolean; theVclosed: boolean }; + /** + * Writes the shape to the file in an ASCII format TopTools_FormatVersion_VERSION_1. This alias writes shape with triangulation data. + * @param theShape the shape to write + * @param theFile the path to file to output shape into + * @param theProgress the range of progress indicator to fill in + */ + static Write(theShape: TopoDS_Shape, theFile: string, theProgress: Message_ProgressRange): boolean; + /** + * Writes the shape to the file in an ASCII format of specified version. + * @param theShape the shape to write + * @param theFile the path to file to output shape into + * @param theWithTriangles flag which specifies whether to save shape with (TRUE) or without (FALSE) triangles; has no effect on triangulation-only geometry + * @param theWithNormals flag which specifies whether to save triangulation with (TRUE) or without (FALSE) normals; has no effect on triangulation-only geometry + * @param theVersion the {@link TopTools | `TopTools`} format version + * @param theProgress the range of progress indicator to fill in + */ + static Write(theShape: TopoDS_Shape, theFile: string, theWithTriangles: boolean, theWithNormals: boolean, theVersion: unknown, theProgress: Message_ProgressRange): boolean; + /** + * Reads a Shape from in returns it in . **is used to build the shape.** + * @param Sh Mutated in place; read the updated value from this argument after the call. + */ + static Read(Sh: TopoDS_Shape, File: string, B: unknown, theProgress: Message_ProgressRange): boolean; + /** + * Evals real tolerance of edge . , , , , are correspondently 3d curve of edge, 2d curve on surface and rang of edge If calculated tolerance is more then current edge tolerance, edge is updated. Method returns actual tolerance of edge. + */ + static EvalAndUpdateTol(theE: TopoDS_Edge, theC3d: Geom_Curve, theC2d: Geom2d_Curve, theS: Geom_Surface, theF: number, theL: number): number; + /** + * returns the cumul of the orientation of and the containing wire in + */ + static OriEdgeInFace(theEdge: TopoDS_Edge, theFace: TopoDS_Face): TopAbs_Orientation; + /** + * Removes internal sub-shapes from the shape. The check on internal status is based on orientation of sub-shapes, classification is not performed. Before removal of internal sub-shapes the algorithm checks if such removal is not going to break topological connectivity between sub-shapes. The flag if set to true disables the connectivity check and clears the given shape from all sub-shapes with internal orientation. + * @param theS Mutated in place; read the updated value from this argument after the call. + */ + static RemoveInternals(theS: TopoDS_Shape, theForce: boolean): void; + /** + * Check all locations of shape according criterium: aTrsf.IsNegative() || (std::abs(std::abs(aTrsf.ScaleFactor()) - 1.) > `TopLoc_Location::ScalePrec()`) All sub-shapes having such locations are put in list theProblemShapes. + * @param theProblemShapes Mutated in place; read the updated value from this argument after the call. + */ + static CheckLocations(theS: TopoDS_Shape, theProblemShapes: NCollection_List_TopoDS_Shape): void; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Provides class methods to access to the geometry of BRep shapes. + */ +export declare class BRep_Tool { + constructor(); + /** + * If S is Shell, returns True if it has no free boundaries (edges). If S is Wire, returns True if it has no free ends (vertices). (Internal and External sub-shepes are ignored in these checks) If S is Edge, returns True if its vertices are the same. For other shape types returns S.Closed(). + */ + static IsClosed(S: TopoDS_Shape): boolean; + /** + * Returns True if has two PCurves in the parametric space of . i.e. is on a closed surface and is on the closing curve. + */ + static IsClosed(E: TopoDS_Edge, F: TopoDS_Face): boolean; + /** + * Returns True if has two PCurves in the parametric space of . i.e. is a closed surface and is on the closing curve. + */ + static IsClosed(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location): boolean; + /** + * Returns True if has two arrays of indices in the triangulation . + */ + static IsClosed(E: TopoDS_Edge, T: Poly_Triangulation, L: TopLoc_Location): boolean; + /** + * Returns the geometric surface of the face. Returns in the location for the surface. + * @param L Mutated in place; read the updated value from this argument after the call. + */ + static Surface(F: TopoDS_Face, L: TopLoc_Location): Geom_Surface; + /** + * Returns the geometric surface of the face. It can be a copy if there is a Location. + */ + static Surface(F: TopoDS_Face): Geom_Surface; + /** + * Returns the triangulation of the face according to the mesh purpose. + * @param theFace the input face to find triangulation. + * @param theLocation the face location. Mutated in place; read the updated value from this argument after the call. + * @param theMeshPurpose a mesh purpose to find appropriate triangulation (NONE by default). + * @returns an active triangulation in case of NONE purpose, the first triangulation appropriate for the input purpose, just the first triangulation if none matching other criteria and input purpose is AnyFallback or null handle if there is no any suitable triangulation. + */ + static Triangulation(theFace: TopoDS_Face, theLocation: TopLoc_Location, theMeshPurpose: number): Poly_Triangulation; + /** + * Returns all triangulations of the face. + * @param theFace the input face. + * @param theLocation the face location. Mutated in place; read the updated value from this argument after the call. + * @returns list of all available face triangulations. + */ + static Triangulations(theFace: TopoDS_Face, theLocation: TopLoc_Location): NCollection_List_handle_Poly_Triangulation; + /** + * Returns the tolerance of the face. + */ + static Tolerance(F: TopoDS_Face): number; + /** + * Returns the tolerance for . + */ + static Tolerance(E: TopoDS_Edge): number; + /** + * Returns the tolerance. + */ + static Tolerance(V: TopoDS_Vertex): number; + /** + * Returns the NaturalRestriction flag of the face. + */ + static NaturalRestriction(F: TopoDS_Face): boolean; + /** + * Returns True if has a surface, false otherwise. + */ + static IsGeometric(F: TopoDS_Face): boolean; + /** + * Returns True if is a 3d curve or a curve on surface. + */ + static IsGeometric(E: TopoDS_Edge): boolean; + /** + * Returns the 3D curve of the edge. May be a Null handle. Returns in the location for the curve. In and the parameter range. + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static Curve(E: TopoDS_Edge, L: TopLoc_Location, First?: number, Last?: number): { returnValue: Geom_Curve; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns the 3D curve of the edge. May be a Null handle. In and the parameter range. It can be a copy if there is a Location. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static Curve(E: TopoDS_Edge, First?: number, Last?: number): { returnValue: Geom_Curve; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns the 3D polygon of the edge. May be a Null handle. Returns in the location for the polygon. + * @param L Mutated in place; read the updated value from this argument after the call. + */ + static Polygon3D(E: TopoDS_Edge, L: TopLoc_Location): unknown; + /** + * Returns the curve associated to the edge in the parametric space of the surface. Returns a NULL handle if this curve does not exist. Returns in and the parameter range. If the surface is a plane the curve can be not stored but created a new each time. The flag pointed by serves to indicate storage status. It is valued if the pointer is non-null. + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `C`: owned by the returned envelope. + * - `S`: owned by the returned envelope. + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static CurveOnSurface(E: TopoDS_Edge, L: TopLoc_Location, First?: number, Last?: number): { C: Geom2d_Curve; S: Geom_Surface; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns the curve associated to the edge in the parametric space of the face. Returns a NULL handle if this curve does not exist. Returns in and the parameter range. If the surface is a plane the curve can be not stored but created a new each time. The flag pointed by serves to indicate storage status. It is valued if the pointer is non-null. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static CurveOnSurface(E: TopoDS_Edge, F: TopoDS_Face, First: number, Last: number, theIsStored: boolean): { returnValue: Geom2d_Curve; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns in `, , the 2d curve, the surface and the location for the edge of rank . and are null if the index is out of range. Returns in and the parameter range.` + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `C`: owned by the returned envelope. + * - `S`: owned by the returned envelope. + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static CurveOnSurface(E: TopoDS_Edge, L: TopLoc_Location, First: number, Last: number, Index: number): { C: Geom2d_Curve; S: Geom_Surface; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns the curve associated to the edge in the parametric space of the surface. Returns a NULL handle if this curve does not exist. Returns in and the parameter range. If the surface is a plane the curve can be not stored but created a new each time. The flag pointed by serves to indicate storage status. It is valued if the pointer is non-null. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static CurveOnSurface(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location, First: number, Last: number, theIsStored: boolean): { returnValue: Geom2d_Curve; First: number; Last: number; [Symbol.dispose](): void }; + /** + * For the planar surface builds the 2d curve for the edge by projection of the edge on plane. Returns a NULL handle if the surface is not planar or the projection failed. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + * Dispose the returned envelope to release owned Handle fields. + */ + static CurveOnPlane(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location, First?: number, Last?: number): { returnValue: Geom2d_Curve; First: number; Last: number; [Symbol.dispose](): void }; + /** + * Returns the polygon associated to the edge in the parametric space of the face. Returns a NULL handle if this polygon does not exist. + */ + static PolygonOnSurface(E: TopoDS_Edge, F: TopoDS_Face): unknown; + /** + * Returns in `, , a 2d curve, a surface and a location for the edge . and are null if the edge has no polygon on surface.` + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `C`: owned by the returned envelope. + * - `S`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static PolygonOnSurface(E: TopoDS_Edge, L: TopLoc_Location): { C: unknown; S: Geom_Surface; [Symbol.dispose](): void }; + /** + * Returns the polygon associated to the edge in the parametric space of the surface. Returns a NULL handle if this polygon does not exist. + */ + static PolygonOnSurface(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location): unknown; + /** + * Returns in `, , the 2d curve, the surface and the location for the edge of rank . and are null if the index is out of range.` + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `C`: owned by the returned envelope. + * - `S`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static PolygonOnSurface(E: TopoDS_Edge, L: TopLoc_Location, Index: number): { C: unknown; S: Geom_Surface; [Symbol.dispose](): void }; + /** + * Returns in. + * + * , , a polygon on triangulation, a triangulation and a location for the edge . + * + * and are null if the edge has no polygon on triangulation. + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `P`: owned by the returned envelope. + * - `T`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static PolygonOnTriangulation(E: TopoDS_Edge, L: TopLoc_Location): { P: Poly_PolygonOnTriangulation; T: Poly_Triangulation; [Symbol.dispose](): void }; + /** + * Returns the polygon associated to the edge in the parametric space of the face. Returns a NULL handle if this polygon does not exist. + */ + static PolygonOnTriangulation(E: TopoDS_Edge, T: Poly_Triangulation, L: TopLoc_Location): Poly_PolygonOnTriangulation; + /** + * Returns in. + * + * , , a polygon on triangulation, a triangulation and a location for the edge for the range index. `and are null if the edge has no polygon on triangulation.` + * @param L Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `P`: owned by the returned envelope. + * - `T`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + static PolygonOnTriangulation(E: TopoDS_Edge, L: TopLoc_Location, Index: number): { P: Poly_PolygonOnTriangulation; T: Poly_Triangulation; [Symbol.dispose](): void }; + /** + * Returns the SameParameter flag for the edge. + */ + static SameParameter(E: TopoDS_Edge): boolean; + /** + * Returns the SameRange flag for the edge. + */ + static SameRange(E: TopoDS_Edge): boolean; + /** + * Returns True if the edge is degenerated. + */ + static Degenerated(E: TopoDS_Edge): boolean; + /** + * Gets the range of the 3d curve. + * @returns A result object with fields: + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + */ + static Range(E: TopoDS_Edge, First?: number, Last?: number): { First: number; Last: number }; + /** + * Gets the range of the edge on the pcurve on the surface. + * @returns A result object with fields: + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + */ + static Range(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location, First?: number, Last?: number): { First: number; Last: number }; + /** + * Gets the range of the edge on the pcurve on the face. + * @returns A result object with fields: + * - `First`: updated value from the call. + * - `Last`: updated value from the call. + */ + static Range(E: TopoDS_Edge, F: TopoDS_Face, First?: number, Last?: number): { First: number; Last: number }; + /** + * Gets the UV locations of the extremities of the edge. + * @param PFirst Mutated in place; read the updated value from this argument after the call. + * @param PLast Mutated in place; read the updated value from this argument after the call. + */ + static UVPoints(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; + /** + * Gets the UV locations of the extremities of the edge. + * @param PFirst Mutated in place; read the updated value from this argument after the call. + * @param PLast Mutated in place; read the updated value from this argument after the call. + */ + static UVPoints(E: TopoDS_Edge, F: TopoDS_Face, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; + /** + * Sets the UV locations of the extremities of the edge. + */ + static SetUVPoints(E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; + /** + * Sets the UV locations of the extremities of the edge. + */ + static SetUVPoints(E: TopoDS_Edge, F: TopoDS_Face, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; + /** + * Returns True if the edge is on the surfaces of the two faces. + */ + static HasContinuity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face): boolean; + /** + * Returns True if the edge is on the surfaces. + */ + static HasContinuity(E: TopoDS_Edge, S1: Geom_Surface, S2: Geom_Surface, L1: TopLoc_Location, L2: TopLoc_Location): boolean; + /** + * Returns True if the edge has regularity on some two surfaces. + */ + static HasContinuity(E: TopoDS_Edge): boolean; + /** + * Returns the continuity. + */ + static Continuity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face): GeomAbs_Shape; + /** + * Returns the continuity. + */ + static Continuity(E: TopoDS_Edge, S1: Geom_Surface, S2: Geom_Surface, L1: TopLoc_Location, L2: TopLoc_Location): GeomAbs_Shape; + /** + * Returns the max continuity of edge between some surfaces or GeomAbs_C0 if there are no such surfaces. + */ + static MaxContinuity(theEdge: TopoDS_Edge): GeomAbs_Shape; + /** + * Returns the 3d point. + */ + static Pnt(V: TopoDS_Vertex): gp_Pnt; + /** + * Returns the parameter of on . Throws Standard_NoSuchObject if no parameter on edge. + */ + static Parameter(V: TopoDS_Vertex, E: TopoDS_Edge): number; + /** + * Finds the parameter of on . + * @param theV input vertex + * @param theE input edge + * @param theParam calculated parameter on the curve + * @returns A result object with fields: + * - `returnValue`: TRUE if done + * - `theParam`: calculated parameter on the curve + */ + static Parameter(theV: TopoDS_Vertex, theE: TopoDS_Edge, theParam: number): { returnValue: boolean; theParam: number }; + /** + * Returns the parameters of the vertex on the pcurve of the edge on the face. + */ + static Parameter(V: TopoDS_Vertex, E: TopoDS_Edge, F: TopoDS_Face): number; + /** + * Returns the parameters of the vertex on the pcurve of the edge on the surface. + */ + static Parameter(V: TopoDS_Vertex, E: TopoDS_Edge, S: Geom_Surface, L: TopLoc_Location): number; + /** + * Returns the parameters of the vertex on the face. + */ + static Parameters(V: TopoDS_Vertex, F: TopoDS_Face): gp_Pnt2d; + /** + * Returns the maximum tolerance of input shape subshapes. + */ + static MaxTolerance(theShape: TopoDS_Shape, theSubShape: TopAbs_ShapeEnum): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The Surface from BRepAdaptor allows to use a Face of the BRep topology look like a 3D surface. + * + * It has the methods of the class Surface from Adaptor3d. + * + * It is created or initialized with a Face. It takes into account the local coordinates system. + * + * The u,v parameter range is the minmax value for the restriction, unless the flag restriction is set to false. + */ +export declare class BRepAdaptor_Surface extends GeomAdaptor_TransformedSurface { + /** + * Creates an undefined surface with no face loaded. + */ + constructor(); + /** + * Creates a surface to access the geometry of . If is true the parameter range is the parameter range in the UV space of the restriction. + */ + constructor(F: TopoDS_Face, R?: boolean); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Surface; + /** + * Sets the surface to the geometry of . + */ + Initialize(F: TopoDS_Face, Restriction?: boolean): void; + /** + * Returns the face. + */ + Face(): TopoDS_Face; + /** + * Returns the face tolerance. + */ + Tolerance(): number; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The Curve from BRepAdaptor allows to use a Wire of the BRep topology like a 3D curve. Warning: With this class of curve, C0 and C1 continuities are not assumed. So be careful with some algorithm! Please note that {@link BRepAdaptor_CompCurve | `BRepAdaptor_CompCurve`} cannot be periodic curve at all (even if it contains single periodic edge). + * + * {@link BRepAdaptor_CompCurve | `BRepAdaptor_CompCurve`} can only work on valid wires where all edges are connected to each other to make a chain. + */ +export declare class BRepAdaptor_CompCurve extends Adaptor3d_Curve { + /** + * Creates an undefined Curve with no Wire loaded. + */ + constructor(); + constructor(W: TopoDS_Wire, KnotByCurvilinearAbcissa?: boolean); + /** + * Creates a Curve to access the geometry of edge . + */ + constructor(W: TopoDS_Wire, KnotByCurvilinearAbcissa: boolean, First: number, Last: number, Tol: number); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Curve; + /** + * Sets the wire . + */ + Initialize(W: TopoDS_Wire, KnotByCurvilinearAbcissa: boolean): void; + /** + * Sets wire and trimmed parameter. + */ + Initialize(W: TopoDS_Wire, KnotByCurvilinearAbcissa: boolean, First: number, Last: number, Tol: number): void; + /** + * Returns the wire. + */ + Wire(): TopoDS_Wire; + /** + * returns an edge and one parameter on them corresponding to the parameter U. + * @param E Mutated in place; read the updated value from this argument after the call. + * @returns A result object with fields: + * - `UonE`: updated value from the call. + */ + Edge(U: number, E: TopoDS_Edge, UonE?: number): { UonE: number }; + FirstParameter(): number; + LastParameter(): number; + Continuity(): GeomAbs_Shape; + /** + * Returns the number of intervals for continuity . May be one if Continuity(me) >= . + */ + NbIntervals(S: GeomAbs_Shape): number; + /** + * Stores in the parameters bounding the intervals of continuity . + * + * The array must provide enough room to accommodate for the parameters. i.e. T.Length() > `NbIntervals()` + * @param T Mutated in place; read the updated value from this argument after the call. + */ + Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. If >= . + */ + Trim(First: number, Last: number, Tol: number): Adaptor3d_Curve; + IsClosed(): boolean; + IsPeriodic(): boolean; + Period(): number; + /** + * Computes the point of parameter theU on the curve. + */ + EvalD0(theU: number): gp_Pnt; + /** + * Computes the point of parameter theU on the curve with its first derivative. Raised if the continuity of the current interval is not C1. + */ + EvalD1(theU: number): Geom_Curve_ResD1; + /** + * Returns the point and the first and second derivatives at parameter theU. Raised if the continuity of the current interval is not C2. + */ + EvalD2(theU: number): Geom_Curve_ResD2; + /** + * Returns the point and the first, second and third derivatives at parameter theU. Raised if the continuity of the current interval is not C3. + */ + EvalD3(theU: number): Geom_Curve_ResD3; + /** + * Returns the derivative of order theN at parameter theU. Raised if the continuity of the current interval is not CN. Raised if theN < 1. + */ + EvalDN(theU: number, theN: number): gp_Vec; + /** + * returns the parametric resolution + */ + Resolution(R3d: number): number; + /** + * Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve. + */ + GetType(): GeomAbs_CurveType; + Line(): unknown; + Circle(): gp_Circ; + Ellipse(): gp_Elips; + Hyperbola(): unknown; + Parabola(): unknown; + Degree(): number; + IsRational(): boolean; + NbPoles(): number; + NbKnots(): number; + Bezier(): Geom_BezierCurve; + BSpline(): Geom_BSplineCurve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The Curve from BRepAdaptor allows to use an Edge of the BRep topology like a 3D curve. + * + * It has the methods the class Curve from Adaptor3d. + * + * It is created or Initialized with an Edge. It takes into account local coordinate systems. If the Edge has a 3D curve it is use with priority. If the edge has no 3D curve one of the curves on surface is used. It is possible to enforce using a curve on surface by creating or initialising with an Edge and a Face. + */ +export declare class BRepAdaptor_Curve extends GeomAdaptor_TransformedCurve { + /** + * Creates an undefined Curve with no Edge loaded. + */ + constructor(); + /** + * Creates a Curve to access the geometry of edge . + */ + constructor(E: TopoDS_Edge); + /** + * Creates a Curve to access the geometry of edge . The geometry will be computed using the parametric curve of on the face . An Error is raised if the edge does not have a pcurve on the face. + */ + constructor(E: TopoDS_Edge, F: TopoDS_Face); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor3d_Curve; + /** + * Reset currently loaded curve (undone `Load()`). + */ + Reset(): void; + /** + * Sets the Curve to access the geometry of edge . + */ + Initialize(E: TopoDS_Edge): void; + /** + * Sets the Curve to access the geometry of edge . The geometry will be computed using the parametric curve of on the face . An Error is raised if the edge does not have a pcurve on the face. + */ + Initialize(E: TopoDS_Edge, F: TopoDS_Face): void; + /** + * Returns the edge. + */ + Edge(): TopoDS_Edge; + /** + * Returns the edge tolerance. + */ + Tolerance(): number; + /** + * Returns a curve equivalent of between parameters and . is used to test for 3d points confusion. + */ + Trim(First: number, Last: number, Tol: number): Adaptor3d_Curve; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * The Curve2d from BRepAdaptor allows to use an Edge on a Face like a 2d curve (curve in the parametric space). + * + * It has the methods of the class Curve2d from Adpator. + * + * It is created or initialized with a Face and an Edge. The methods are inherited from Curve from {@link Geom2dAdaptor | `Geom2dAdaptor`}. + */ +export declare class BRepAdaptor_Curve2d extends Geom2dAdaptor_Curve { + /** + * Creates an uninitialized curve2d. + */ + constructor(); + /** + * Creates with the pcurve of on . + */ + constructor(E: TopoDS_Edge, F: TopoDS_Face); + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** + * Shallow copy of adaptor. + */ + ShallowCopy(): Adaptor2d_Curve2d; + /** + * Initialize with the pcurve of on . + */ + Initialize(E: TopoDS_Edge, F: TopoDS_Face): void; + /** + * Returns the Edge. + */ + Edge(): TopoDS_Edge; + /** + * Returns the Face. + */ + Face(): TopoDS_Face; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * An Explorer is a Tool to visit a Topological Data Structure from the `TopoDS` package. + * + * An Explorer is built with: + * + * - The Shape to explore. + * - The type of Shapes to find: e.g VERTEX, EDGE. This type cannot be SHAPE. + * - The type of Shapes to avoid. e.g SHELL, EDGE. By default this type is SHAPE which means no restriction on the exploration. + * + * The Explorer visits all the structure to find shapes of the requested type which are not contained in the type to avoid. + * + * Example to find all the Faces in the Shape S : + * + * {@link TopExp_Explorer | `TopExp_Explorer`} Ex; for (Ex.Init(S,TopAbs_FACE); Ex.More(); Ex.Next()) { ProcessFace(Ex.Current()); } + * + * // an other way {@link TopExp_Explorer | `TopExp_Explorer`} Ex(S,TopAbs_FACE); while (Ex.More()) { ProcessFace(Ex.Current()); Ex.Next(); } + * + * To find all the vertices which are not in an edge : + * + * for (Ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ...) + * + * To find all the faces in a SHELL, then all the faces not in a SHELL : + * + * {@link TopExp_Explorer | `TopExp_Explorer`} Ex1, Ex2; + * + * for (Ex1.Init(S,TopAbs_SHELL),...) { // visit all shells for (Ex2.Init(Ex1.Current(),TopAbs_FACE),...) { // visit all the faces of the current shell } } + * + * for (Ex1.Init(S,TopAbs_FACE,TopAbs_SHELL),...) { // visit all faces not in a shell } + * + * If the type to avoid is the same or is less complex than the type to find it has no effect. + * + * For example searching edges not in a vertex does not make a difference. + */ +export declare class TopExp_Explorer { + /** + * Creates an empty explorer, becomes useful after Init. + */ + constructor(); + /** + * Creates an Explorer on the Shape . + * + * is the type of shapes to search. TopAbs_VERTEX, TopAbs_EDGE, ... + * + * is the type of shape to skip in the exploration. If is equal or less complex than or if is SHAPE it has no effect on the exploration. + */ + constructor(S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid?: TopAbs_ShapeEnum); + /** + * Resets this explorer on the shape S. It is initialized to search the shape S, for shapes of type ToFind, that are not part of a shape ToAvoid. If the shape ToAvoid is equal to TopAbs_SHAPE, or if it is the same as, or less complex than, the shape ToFind it has no effect on the search. + */ + Init(S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid?: TopAbs_ShapeEnum): void; + /** + * Returns True if there are more shapes in the exploration. + */ + More(): boolean; + /** + * Moves to the next Shape in the exploration. + */ + Next(): void; + /** + * Returns the current shape in the exploration. + */ + Value(): TopoDS_Shape; + /** + * Returns the current shape in the exploration. + */ + Current(): TopoDS_Shape; + /** + * Reinitialize the exploration with the original arguments. + */ + ReInit(): void; + /** + * Return explored shape. + */ + ExploredShape(): TopoDS_Shape; + /** + * Returns the current depth of the exploration. 0 is the shape to explore itself. + */ + Depth(): number; + /** + * Clears the content of the explorer. + */ + Clear(): void; + /** + * Returns a sentinel marking the end of iteration. + */ + end(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Reading from stereolithography format. Reads STL file and creates a shape composed of triangular faces, one per facet. IMPORTANT: This approach is very inefficient, especially for large files. IMPORTANT: Consider reading STL file to {@link Poly_Triangulation | `Poly_Triangulation`} object instead (see class {@link RWStl | `RWStl`}). + */ +export declare class StlAPI_Reader { + constructor(); + /** + * Reads STL data from stream to the {@link TopoDS_Shape | `TopoDS_Shape`} (each triangle is converted to the face). + * @param theShape result shape Mutated in place; read the updated value from this argument after the call. + * @returns True if reading is successful + */ + Read(theShape: TopoDS_Shape, theFileName: string): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Offers the API for STL data manipulation. + */ +export declare class StlAPI { + constructor(); + /** + * Convert and write shape to STL format. File is written in binary if aAsciiMode is False otherwise it is written in Ascii (by default). + */ + static Write(theShape: TopoDS_Shape, theFile: string, theAsciiMode?: boolean): boolean; + /** + * Legacy interface. Read STL file and create a shape composed of triangular faces, one per facet. This approach is very inefficient, especially for large files. Consider reading STL file to {@link Poly_Triangulation | `Poly_Triangulation`} object instead (see class {@link RWStl | `RWStl`}). + * @param theShape Mutated in place; read the updated value from this argument after the call. + * @deprecated + */ + static Read(theShape: TopoDS_Shape, aFile: string): boolean; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class gives a way to manage meaningful static variables, used as "global" parameters in various procedures. + * + * A Static brings a specification (its type, constraints if any) and a value. Its basic form is a string, it can be specified as integer or real or enumerative string, and queried as such. Its string content, which is a `occ::handle` can be shared by other data structures, hence gives a direct on line access to its value. + * + * All this description is inherited from TypedValue + * + * A Static can be given an initial value, it can be filled from, either a set of Resources (an applicative feature which accesses and manages parameter files), or environment or internal definition : these define families of Static. In addition, it supports a status for reinitialisation : an initialisation procedure can ask if the value of the Static has changed from its last call, in this case does something then marks the Status "uptodate", else it does nothing. + * + * Statics are named and recorded then accessed in an alphabetic dictionary + */ +export declare class Interface_Static extends Interface_TypedValue { + /** + * Creates a new Static with same definition as another one (value is copied, except for Entity : it remains null). + */ + constructor(family: string, name: string, other: Interface_Static); + /** + * Creates and records a Static, with a family and a name family can report to a name of resource or to a system or internal definition. The name must be unique. + * + * type gives the type of the parameter, default is free text Also available : Integer, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the Static once created + * + * init gives an initial value. If it is not given, the Static begin as "not set", its value is empty + */ + constructor(family: string, name: string, type_?: unknown, init?: string); + /** + * Returns the family. It can be : a resource name for applis, an internal name between : $e (environment variables), $l (other, purely local). + */ + Family(): string; + /** + * Sets a "wild-card" static : its value will be considered if is not properly set. (reset by set a null one). + */ + SetWild(wildcard: Interface_Static): void; + /** + * Returns the wildcard static, which can be (is most often) null. + */ + Wild(): Interface_Static; + /** + * Records a Static has "uptodate", i.e. its value has been taken into account by a reinitialisation procedure This flag is reset at each successful SetValue. + */ + SetUptodate(): void; + /** + * Returns the status "uptodate". + */ + UpdatedStatus(): boolean; + /** + * Declares a new Static (by calling its constructor) If this name is already taken, does nothing and returns False Else, creates it and returns True For additional definitions, get the Static then edit it. + */ + static Init(family: string, name: string, type_: unknown, init: string): boolean; + /** + * As Init with ParamType, but type is given as a character This allows a simpler call Types : 'i' Integer, 'r' Real, 't' Text, 'e' Enum, 'o' Object '=' for same definition as, gives the initial Static Returns False if does not match this list. + */ + static Init(family: string, name: string, type_: string, init: string): boolean; + /** + * Returns a Static from its name. Null Handle if not present. + */ + static Static(name: string): Interface_Static; + /** + * Returns True if a Static named is present, False else. + */ + static IsPresent(name: string): boolean; + /** + * Returns a part of the definition of a Static, as a CString The part is designated by its name, as a CString If the required value is not a string, it is converted to a CString then returned If is not present, or not defined for , this function returns an empty string. + * + * Allowed parts for CDef : family : the family type : the type ("integer","real","text","enum") label : the label satis : satisfy function name if any rmin : minimum real value rmax : maximum real value imin : minimum integer value imax : maximum integer value enum nn (nn : value of an integer) : enum value for nn unit : unit definition for a real + */ + static CDef(name: string, part: string): string; + /** + * Returns a part of the definition of a Static, as an Integer The part is designated by its name, as a CString If the required value is not a string, returns zero For a Boolean, 0 for false, 1 for true If is not present, or not defined for , this function returns zero. + * + * Allowed parts for IDef : imin, imax : minimum or maximum integer value estart : starting number for enum ecount : count of enum values (starting from estart) ematch : exact match status eval val : case determined from a string + */ + static IDef(name: string, part: string): number; + /** + * Returns True if is present AND set True (D) : considers this item only False : if not set and attached to a wild-card, considers this wild-card. + */ + static IsSet(name: string, proper?: boolean): boolean; + /** + * Returns the value of the parameter identified by the string name. If the specified parameter does not exist, an empty string is returned. Example `Interface_Static::CVal`("write.step.schema"); which could return: "AP214". + */ + static CVal(name: string): string; + /** + * Returns the integer value of the translation parameter identified by the string name. Returns the value 0 if the parameter does not exist. Example `Interface_Static::IVal`("write.step.schema"); which could return: 3. + */ + static IVal(name: string): number; + /** + * Returns the value of a static translation parameter identified by the string name. Returns the value 0.0 if the parameter does not exist. + */ + static RVal(name: string): number; + /** + * Modifies the value of the parameter identified by name. The modification is specified by the string val. false is returned if the parameter does not exist. Example `Interface_Static::SetCVal` ("write.step.schema","AP203") This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode. + */ + static SetCVal(name: string, val: string): boolean; + /** + * Modifies the value of the parameter identified by name. The modification is specified by the integer value val. false is returned if the parameter does not exist. Example `Interface_Static::SetIVal` ("write.step.schema", 3) This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode.S. + */ + static SetIVal(name: string, val: number): boolean; + /** + * Modifies the value of a translation parameter. false is returned if the parameter does not exist. The modification is specified by the real number value val. + */ + static SetRVal(name: string, val: number): boolean; + /** + * Sets a Static to be "uptodate" Returns False if is not present This status can be used by a reinitialisation procedure to rerun if a value has been changed. + */ + static Update(name: string): boolean; + /** + * Returns the status "uptodate" from a Static Returns False if is not present. + */ + static IsUpdated(name: string): boolean; + /** + * Returns a list of names of statics : = 0 (D) : criter is for family = 1 : criter is regexp on names, takes final items (ignore wild cards) = 2 : idem but take only wilded, not final items = 3 : idem, take all items matching criter idem + 100 : takes only non-updated items idem + 200 : takes only updated items criter empty (D) : returns all names else returns names which match the given criter Remark : families beginning by '$' are not listed by criter "" they are listed only by criter "$". + * + * This allows for instance to set new values after having loaded or reloaded a resource, then to update them as required + */ + static Items(mode?: number, criter?: string): NCollection_HSequence_handle_TCollection_HAsciiString; + /** + * Initializes all standard static parameters, which can be used by every function. statics specific of a norm or a function must be defined around it. + */ + static Standards(): void; + /** + * Fills given string-to-string map with all static data. + * @param theMap Mutated in place; read the updated value from this argument after the call. + */ + static FillMap(theMap: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * Now strictly equivalent to TypedValue from MoniTool, except for ParamType which remains for compatibility reasons. + * + * This class allows to dynamically manage .. typed values, i.e. values which have an alphanumeric expression, but with controls. Such as "must be an Integer" or "Enumerative Text" etc + * + * Hence, a TypedValue brings a specification (type + constraints if any) and a value. Its basic form is a string, it can be specified as integer or real or enumerative string, then queried as such. Its string content, which is a `occ::handle` can be shared by other data structures, hence gives a direct on line access to its value. + */ +export declare class Interface_TypedValue extends MoniTool_TypedValue { + /** + * Creates a TypedValue, with a name. + * + * type gives the type of the parameter, default is free text Also available : Integer, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the TypedValue once created + * + * init gives an initial value. If it is not given, the TypedValue begins as "not set", its value is empty + */ + constructor(name: string, type_?: unknown, init?: string); + /** + * Returns the type I.E. calls ValueType then makes correspondence between ParamType from Interface (which remains for compatibility reasons) and ValueType from MoniTool. + */ + Type(): unknown; + /** + * Correspondence ParamType from Interface to ValueType from MoniTool. + */ + static ParamTypeToValueType(typ: unknown): unknown; + /** + * Correspondence ParamType from Interface to ValueType from MoniTool. + */ + static ValueTypeToParamType(typ: unknown): unknown; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class allows to dynamically manage .. typed values, i.e. values which have an alphanumeric expression, but with controls. Such as "must be an Integer" or "Enumerative Text" etc. + * + * Hence, a TypedValue brings a specification (type + constraints if any) and a value. Its basic form is a string, it can be specified as integer or real or enumerative string, then queried as such. Its string content, which is a `occ::handle` can be shared by other data structures, hence gives a direct on line access to its value. + */ +export declare class MoniTool_TypedValue extends Standard_Transient { + /** + * Creates a TypedValue from another one, by duplication. + */ + constructor(other: MoniTool_TypedValue); + /** + * Creates a TypedValue, with a name. + * + * type gives the type of the parameter, default is free text Also available : Integer, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the TypedValue once created + * + * init gives an initial value. If it is not given, the TypedValue begins as "not set", its value is empty + */ + constructor(name: string, type_?: unknown, init?: string); + /** + * Returns the name. + */ + Name(): string; + /** + * Returns the type of the value. + */ + ValueType(): unknown; + /** + * Returns the Definition By priority, the enforced one, else an automatic one, computed from the specification. + */ + Definition(): unknown; + /** + * Enforces a Definition. + */ + SetDefinition(deftext: string): void; + /** + * Completes the definition of a TypedValue by command , once created with its type Returns True if done, False if could not be interpreted may be : imin ival : minimum value for an integer imax ival : maximum value for an integer rmin rval : minimum value for a real rmax rval : maximum value for a real unit name : name of unit ematch i : enum from integer value i, match required enum i : enum from integer value i, match not required eval text : add an enumerative value (increments max by 1) eval ?? : add a non-authorised enum value (to be skipped) tmax l : maximum length for a text. + */ + AddDef(initext: string): boolean; + /** + * Sets a label, which can then be displayed. + */ + SetLabel(label: string): void; + /** + * Returns the label, if set; else returns an empty string. + */ + Label(): string; + /** + * Sets a maximum length for a text (active only for a free text). + */ + SetMaxLength(max: number): void; + /** + * Returns the maximum length, 0 if not set. + */ + MaxLength(): number; + /** + * Sets an Integer limit (included) to , the upper limit if is True, the lower limit if is False. + */ + SetIntegerLimit(max: boolean, val: number): void; + /** + * Gives an Integer Limit (upper if True, lower if False). Returns True if this limit is defined, False else (in that case, gives the natural limit for Integer). + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `val`: updated value from the call. + */ + IntegerLimit(max: boolean, val?: number): { returnValue: boolean; val: number }; + /** + * Sets a Real limit (included) to , the upper limit if is True, the lower limit if is False. + */ + SetRealLimit(max: boolean, val: number): void; + /** + * Gives an Real Limit (upper if True, lower if False). Returns True if this limit is defined, False else (in that case, gives the natural limit for Real). + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `val`: updated value from the call. + */ + RealLimit(max: boolean, val?: number): { returnValue: boolean; val: number }; + /** + * Sets (Clears if empty) a unit definition, as an equation of dimensions. TypedValue just records this definition, does not exploit it, to be done as required by user applications. + */ + SetUnitDef(def: string): void; + /** + * Returns the recorded unit definition, empty if not set. + */ + UnitDef(): string; + /** + * For an enumeration, precises the starting value (default 0) and the match condition : if True (D), the string value must match the definition, else it may take another value : in that case, the Integer Value will be Start - 1. (empty value remains allowed). + */ + StartEnum(start?: number, match?: boolean): void; + /** + * Adds enumerative definitions. For more than 10, several calls. + */ + AddEnum(v1?: string, v2?: string, v3?: string, v4?: string, v5?: string, v6?: string, v7?: string, v8?: string, v9?: string, v10?: string): void; + /** + * Adds an enumeration definition, by its string and numeric values. If it is the first setting for this value, it is recorded as main value. Else, it is recognized as alternate string for this numeric value. + */ + AddEnumValue(val: string, num: number): void; + /** + * Gives the Enum definitions : start value, end value, match status. Returns True for an Enum, False else. + * @returns A result object with fields: + * - `returnValue`: the C++ return value + * - `startcase`: updated value from the call. + * - `endcase`: updated value from the call. + * - `match`: updated value from the call. + */ + EnumDef(startcase?: number, endcase?: number, match?: boolean): { returnValue: boolean; startcase: number; endcase: number; match: boolean }; + /** + * Returns the value of an enumerative definition, from its rank Empty string if out of range or not an Enum. + */ + EnumVal(num: number): string; + /** + * Returns the case number which corresponds to a string value Works with main and additional values Returns (StartEnum - 1) if not OK, -1 if not an Enum. + */ + EnumCase(val: string): number; + /** + * Sets type of which an Object TypedValue must be kind of Error for a TypedValue not an Object (Entity). + */ + SetObjectType(typ: unknown): void; + /** + * Returns the type of which an Object TypedValue must be kind of Default is {@link Standard_Transient | `Standard_Transient`} Null for a TypedValue not an Object. + */ + ObjectType(): unknown; + /** + * Sets a specific Interpret function. + */ + SetInterpret(func: ((arg0: MoniTool_TypedValue, arg1: TCollection_HAsciiString, arg2: boolean) => TCollection_HAsciiString)): void; + /** + * Tells if a TypedValue has an Interpret. + */ + HasInterpret(): boolean; + /** + * Sets a specific Satisfies function : it is added to the already defined criteria It must match the form : satisfies (val : HAsciiString) returns Boolean. + */ + SetSatisfies(func: ((arg0: TCollection_HAsciiString) => boolean), name: string): void; + /** + * Returns name of specific satisfy, empty string if none. + */ + SatisfiesName(): string; + /** + * Returns True if the value is set (not empty/not null object). + */ + IsSetValue(): boolean; + /** + * Returns the value, as a cstring. Empty if not set. + */ + CStringValue(): string; + /** + * Returns the value, as a Handle (can then be shared) Null if not defined. + */ + HStringValue(): TCollection_HAsciiString; + /** + * Interprets a value. True : returns a native value False : returns a coded value If the Interpret function is set, calls it Else, for an Enum, Native returns the Text, Coded returns the number STANDARD RETURNS : = hval means no specific interpretation Null means senseless Can also be redefined. + */ + Interpret(hval: TCollection_HAsciiString, native: boolean): TCollection_HAsciiString; + /** + * Returns True if a value statifies the specification (remark : does not apply to Entity : see ObjectType, for this type, the string is just a comment). + */ + Satisfies(hval: TCollection_HAsciiString): boolean; + /** + * Clears the recorded Value : it is now unset. + */ + ClearValue(): void; + /** + * Changes the value. The new one must satisfy the specification Returns False (and did not set) if the new value does not satisfy the specification Can be redefined to be managed (in a subclass). + */ + SetCStringValue(val: string): boolean; + /** + * Forces a new Handle for the Value It can be empty, else (if Type is not free Text), it must satisfy the specification. Not only the value is changed, but also the way it is shared Remark : for Type=Object, this value is not controlled, it can be set as a comment Returns False (and did not set) if the new value does not satisfy the specification Can be redefined to be managed (in a subclass). + */ + SetHStringValue(hval: TCollection_HAsciiString): boolean; + /** + * Returns the value as integer, i.e. : For type = Integer, the integer itself; 0 if not set For type = Enum, the designated rank (see Enum definition) StartEnum - 1 if not set or not in the definition Else, returns 0. + */ + IntegerValue(): number; + /** + * Changes the value as an integer, only for Integer or Enum. + */ + SetIntegerValue(ival: number): boolean; + /** + * Returns the value as real, for a Real type TypedValue Else, returns 0. + */ + RealValue(): number; + /** + * Changes the value as a real, only for Real. + */ + SetRealValue(rval: number): boolean; + /** + * Returns the value as Transient Object, only for Object/Entity Remark that the "HString value" is IGNORED here Null if not set; remains to be casted. + */ + ObjectValue(): Standard_Transient; + /** + * Same as ObjectValue, but avoids DownCast : the receiving variable is directly loaded. It is assumed that it complies with the definition of ObjectType ! Otherwise, big trouble. + * @returns A result object with fields: + * - `val`: owned by the returned envelope. + * Dispose the returned envelope to release owned Handle fields. + */ + GetObjectValue(): { val: Standard_Transient; [Symbol.dispose](): void }; + /** + * Changes the value as Transient Object, only for Object/Entity Returns False if DynamicType does not satisfy ObjectType Can be redefined to be managed (in a subclass). + */ + SetObjectValue(obj: Standard_Transient): boolean; + /** + * Returns the type name of the ObjectValue, or an empty string if not set. + */ + ObjectTypeName(): string; + /** + * Adds a TypedValue in the library. It is recorded then will be accessed by its Name Its Definition may be imposed, else it is computed as usual By default it will be accessed by its Definition (string) Returns True if done, False if tv is Null or brings no Definition or not defined. + * + * If a TypedValue was already recorded under this name, it is replaced + */ + static AddLib(tv: MoniTool_TypedValue, def?: string): boolean; + /** + * Returns the TypedValue bound with a given Name Null Handle if none recorded Warning: it is the original, not duplicated. + */ + static Lib(def: string): MoniTool_TypedValue; + /** + * Returns a COPY of the TypedValue bound with a given Name Null Handle if none recorded. + */ + static FromLib(def: string): MoniTool_TypedValue; + /** + * Returns the list of names of items of the Library of Types Library of TypedValue as Valued Parameters, accessed by parameter name for use by management of Static Parameters. + */ + static LibList(): NCollection_HSequence_TCollection_AsciiString; + /** + * Returns a static value from its name, null if unknown. + */ + static StaticValue(name: string): MoniTool_TypedValue; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This WorkSession completes the basic one, by adding : + * + * - use of Controller, with norm selection... + * - management of transfers (both ways) with auxiliary classes TransferReader and TransferWriter -> these transfers may work with a Context List : its items are given by the user, according to the transfer to be i.e. it is interpreted by the Actors Each item is accessed by a Name + */ +export declare class XSControl_WorkSession extends IFSelect_WorkSession { + constructor(); + /** + * In addition to basic ClearData, clears Transfer and Management for interactive use, for mode = 0,1,2 and over 4 Plus : mode = 5 to clear Transfers (both ways) only mode = 6 to clear enforced results mode = 7 to clear transfers, results. + */ + ClearData(mode: number): void; + /** + * Selects a Norm defined by its name. A Norm is described and handled by a Controller Returns True if done, False if is unknown. + * + * The current Profile for this Norm is taken. + */ + SelectNorm(theNormName: string): boolean; + /** + * Selects a Norm defined by its Controller itself. + */ + SetController(theCtl: unknown): void; + /** + * Returns the name of the last Selected Norm. If none is defined, returns an empty string By default, returns the complete name of the norm If is True, returns the short name used for resource. + */ + SelectedNorm(theRsc: boolean): string; + /** + * Returns the norm controller itself. + */ + NormAdaptor(): unknown; + /** + * Returns the current Context List, Null if not defined The Context is given to the TransientProcess for TransferRead. + */ + Context(): NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient; + /** + * Sets the current Context List, as a whole Sets it to the TransferReader. + */ + SetAllContext(theContext: NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient): void; + /** + * Clears the whole current Context (nullifies it). + */ + ClearContext(): void; + /** + * Sets a Transfer Reader, by internal ways, according mode : 0 recreates it clear 1 clears it (does not recreate) 2 aligns Roots of TransientProcess from final Results 3 aligns final Results from Roots of TransientProcess 4 begins a new transfer (by BeginTransfer) 5 recreates TransferReader then begins a new transfer. + */ + InitTransferReader(theMode: number): void; + /** + * Sets a Transfer Reader, which manages transfers on reading. + */ + SetTransferReader(theTR: unknown): void; + /** + * Returns the Transfer Reader, Null if not set. + */ + TransferReader(): unknown; + /** + * Returns the TransientProcess(internal data for TransferReader). + */ + MapReader(): unknown; + /** + * Changes the Map Reader, i.e. considers that the new one defines the relevant read results (forgets the former ones) Returns True when done, False in case of bad definition, i.e. if Model from TP differs from that of Session. + */ + SetMapReader(theTP: unknown): boolean; + /** + * Returns the result attached to a starting entity If = 0, returns Final Result If = 1, considers Last Result If = 2, considers Final, else if absent, Last returns it as Transient, if result is not transient returns the Binder = 10,11,12 idem but returns the Binder itself (if it is not, e.g. Shape, returns the Binder) = 20, returns the ResultFromModel. + */ + Result(theEnt: Standard_Transient, theMode: number): Standard_Transient; + /** + * Commands the transfer of, either one entity, or a list I.E. calls the TransferReader after having analysed It is cumulated from the last BeginTransfer is processed by GiveList, hence : + * + * - a Selection : its SelectionResult + * - a HSequenceOfTransient : this list + * - the Model : in this specific case, all the roots, with no cumulation of former transfers (TransferReadRoots) + */ + TransferReadOne(theEnts: Standard_Transient, theProgress?: Message_ProgressRange): number; + /** + * Commands the transfer of all the root entities of the model i.e. calls TransferRoot from the TransferReader with the Graph No cumulation with former calls to TransferReadOne. + */ + TransferReadRoots(theProgress?: Message_ProgressRange): number; + /** + * produces and returns a new Model well conditioned It is produced by the Norm Controller It can be Null (if this function is not implemented) + */ + NewModel(): unknown; + /** + * Returns the Transfer Reader, Null if not set. + */ + TransferWriter(): unknown; + /** + * Changes the Map Reader, i.e. considers that the new one defines the relevant read results (forgets the former ones) Returns True when done, False if is Null. + */ + SetMapWriter(theFP: unknown): boolean; + /** + * Transfers a Shape from CasCade to a model of current norm, according to the last call to SetModeWriteShape Returns status :Done if OK, Fail if error during transfer, Error if transfer badly initialised. + */ + TransferWriteShape(theShape: TopoDS_Shape, theCompGraph?: boolean, theProgress?: Message_ProgressRange): IFSelect_ReturnStatus; + Vars(): unknown; + SetVars(theVars: unknown): void; + static get_type_name(): string; + static get_type_descriptor(): unknown; + DynamicType(): unknown; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * A groundwork to convert a shape to data which complies with a particular norm. This data can be that of a whole model or that of a specific list of entities in the model. You specify the list using a single selection or a combination of selections. A selection is an operator which computes a list of entities from a list given in input. To specify the input, you can use: + * + * - A predefined selection such as "xst-transferrable-roots" + * - A filter based on a signature. A signature is an operator which returns a string from an entity according to its type. For example: + * - "xst-type" (CDL) + * - "iges-level" + * - "step-type". A filter can be based on a signature by giving a value to be matched by the string returned. For example, "xst-type(Curve)". If no list is specified, the selection computes its list of entities from the whole model. To use this class, you have to initialize the transfer norm first, as shown in the example below. + * Example: Control_Reader reader; `IFSelect_ReturnStatus` status = reader.ReadFile (filename.); When using {@link IGESControl_Reader | `IGESControl_Reader`} or {@link STEPControl_Reader | `STEPControl_Reader`} - as the above example shows - the reader initializes the norm directly. Note that loading the file only stores the data. It does not translate this data. Shapes are accumulated by successive transfers. The last shape is cleared by: + * - ClearShapes which allows you to handle a new batch + * - TransferRoots which restarts the list of shapes from scratch. + */ +export declare class XSControl_Reader { + /** + * Creates a Reader from scratch (creates an empty WorkSession) A WorkSession or a Controller must be provided before running. + */ + constructor(); + /** + * Creates a Reader from scratch, with a norm name which identifies a Controller. + */ + constructor(norm: string); + /** + * Creates a Reader from an already existing Session, with a Controller already set Virtual destructor. + */ + constructor(WS: XSControl_WorkSession, scratch?: boolean); + // dropped: SetShapeFixParameters param 0 resolves to excluded type DE_ShapeFixParameters + // dropped: GetDefaultShapeFixParameters return resolves to excluded type DE_ShapeFixParameters + /** + * Sets a specific norm to Returns True if done, False if is not available. + */ + SetNorm(norm: string): boolean; + /** + * Sets a specific session to . + */ + SetWS(WS: XSControl_WorkSession, scratch?: boolean): void; + /** + * Returns the session used in . + */ + WS(): XSControl_WorkSession; + /** + * Loads a file and returns the read status Zero for a Model which complies with the Controller. + */ + ReadFile(filename: string): IFSelect_ReturnStatus; + /** + * Returns the model. It can then be consulted (header, product). + */ + Model(): unknown; + /** + * Returns a list of entities from the IGES or STEP file according to the following rules: + * + * - if first and second are empty strings, the whole file is selected. + * - if first is an entity number or label, the entity referred to is selected. + * - if first is a list of entity numbers/labels separated by commas, the entities referred to are selected, + * - if first is the name of a selection in the worksession and second is not defined, the list contains the standard output for that selection. + * - if first is the name of a selection and second is defined, the criterion defined by second is applied to the result of the first selection. A selection is an operator which computes a list of entities from a list given in input according to its type. If no list is specified, the selection computes its list of entities from the whole model. A selection can be: + * - A predefined selection (xst-transferrable-mode) + * - A filter based on a signature A Signature is an operator which returns a string from an entity according to its type. For example: + * - "xst-type" (CDL) + * - "iges-level" + * - "step-type". For example, if you wanted to select only the advanced_faces in a STEP file you would use the following code: Example Reader.GiveList("xst-transferrable-roots","step-type(ADVANCED_FACE)"); Warning If the value given to second is incorrect, it will simply be ignored. + */ + GiveList(first: string, second: string): NCollection_HSequence_handle_Standard_Transient; + /** + * Computes a List of entities from the model as follows being a Selection, being an entity or a list of entities (as a HSequenceOfTransient) : the standard result of this selection applied to this list if is erroneous, a null handle is returned. + */ + GiveList(first: string, ent: Standard_Transient): NCollection_HSequence_handle_Standard_Transient; + /** + * Determines the list of root entities which are candidate for a transfer to a Shape, and returns the number of entities in the list. + */ + NbRootsForTransfer(): number; + /** + * Returns an IGES or STEP root entity for translation. The entity is identified by its rank in a list. + */ + RootForTransfer(num?: number): Standard_Transient; + /** + * Translates a root identified by the rank num in the model. false is returned if no shape is produced. + */ + TransferOneRoot(num?: number, theProgress?: Message_ProgressRange): boolean; + /** + * Translates an IGES or STEP entity identified by the rank num in the model. false is returned if no shape is produced. + */ + TransferOne(num: number, theProgress?: Message_ProgressRange): boolean; + /** + * Translates an IGES or STEP entity in the model. true is returned if a shape is produced; otherwise, false is returned. + */ + TransferEntity(start: Standard_Transient, theProgress?: Message_ProgressRange): boolean; + /** + * Translates a list of entities. Returns the number of IGES or STEP entities that were successfully translated. The list can be produced with GiveList. Warning - This function does not clear the existing output shapes. + */ + TransferList(list: NCollection_HSequence_handle_Standard_Transient, theProgress?: Message_ProgressRange): number; + /** + * Translates all translatable roots and returns the number of successful translations. Warning - This function clears existing output shapes first. + */ + TransferRoots(theProgress?: Message_ProgressRange): number; + /** + * Clears the list of shapes that may have accumulated in calls to TransferOne or TransferRoot.C. + */ + ClearShapes(): void; + /** + * Returns the number of shapes produced by translation. + */ + NbShapes(): number; + /** + * Returns the shape resulting from a translation and identified by the rank num. num equals 1 by default. In other words, the first shape resulting from the translation is returned. + */ + Shape(num?: number): TopoDS_Shape; + /** + * Returns all of the results in a single shape which is: + * + * - a null shape if there are no results, + * - a shape if there is one result, + * - a compound containing the resulting shapes if there are more than one. + */ + OneShape(): TopoDS_Shape; + /** + * Prints the check list attached to loaded data, on the {@link Standard | `Standard`} Trace File (starts at std::cout) All messages or fails only, according to mode = 0 : per entity, prints messages mode = 1 : per message, just gives count of entities per check mode = 2 : also gives entity numbers. + */ + PrintCheckLoad(failsonly: boolean, mode: unknown): void; + /** + * Displays check results for the last translation of IGES or STEP entities to Open CASCADE entities. Only fail messages are displayed if failsonly is true. All messages are displayed if failsonly is false. mode determines the contents and the order of the messages according to the terms of the `IFSelect_PrintCount` enumeration. + */ + PrintCheckTransfer(failsonly: boolean, mode: unknown): void; + /** + * Displays the statistics for the last translation. what defines the kind of statistics that are displayed as follows: + * + * - 0 gives general statistics (number of translated roots, number of warnings, number of fail messages), + * - 1 gives root results, + * - 2 gives statistics for all checked entities, + * - 3 gives the list of translated entities, + * - 4 gives warning and fail messages, + * - 5 gives fail messages only. The use of mode depends on the value of what. If what is 0, mode is ignored. If what is 1, 2 or 3, mode defines the following: + * - 0 lists the numbers of IGES or STEP entities in the respective model + * - 1 gives the number, identifier, type and result type for each IGES or STEP entity and/or its status (fail, warning, etc.) + * - 2 gives maximum information for each IGES or STEP entity (i.e. checks) + * - 3 gives the number of entities per type of IGES or STEP entity + * - 4 gives the number of IGES or STEP entities per result type and/or status + * - 5 gives the number of pairs (IGES or STEP or result type and status) + * - 6 gives the number of pairs (IGES or STEP or result type and status) AND the list of entity numbers in the IGES or STEP model. If what is 4 or 5, mode defines the warning and fail messages as follows: + * - if mode is 0 all warnings and checks per entity are returned + * - if mode is 2 the list of entities per warning is returned. If mode is not set, only the list of all entities per warning is given. + */ + PrintStatsTransfer(what: number, mode: number): void; + /** + * Gives statistics about Transfer. + * @returns A result object with fields: + * - `nbMapped`: updated value from the call. + * - `nbWithResult`: updated value from the call. + * - `nbWithFail`: updated value from the call. + */ + GetStatsTransfer(list: NCollection_HSequence_handle_Standard_Transient, nbMapped?: number, nbWithResult?: number, nbWithFail?: number): { nbMapped: number; nbWithResult: number; nbWithFail: number }; + /** + * Sets parameters for shape processing. + * @param theParameters the parameters for shape processing. + */ + SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void; + /** + * Returns parameters for shape processing that was set by SetParameters() method. + * @returns the parameters for shape processing. Empty map if no parameters were set. + */ + GetShapeFixParameters(): NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString; + /** + * Sets flags defining operations to be performed on shapes. + * @param theFlags The flags defining operations to be performed on shapes. + */ + SetShapeProcessFlags(theFlags: any): void; + /** + * Returns flags defining operations to be performed on shapes. + * @returns Pair of values defining operations to be performed on shapes and a boolean value that indicates whether the flags were set. + */ + GetShapeProcessFlags(): [any, boolean]; + /** Releases the C++ object. The caller must ensure no further access. */ + delete(): void; + [Symbol.dispose](): void; +} + +/** + * This class can be used to simply manage a process such as splitting a file, extracting a set of Entities ... It allows to manage different types of Variables : Integer or Text Parameters, Selections, Dispatches, in addition to a ShareOut. To each of these variables, a unique Integer Identifier is attached. A Name can be attached too as desired. + */ +export declare class IFSelect_WorkSession extends Standard_Transient { + /** + * Creates a Work Session It provides default, empty ShareOut and ModelCopier, which can be replaced (if required, should be done just after creation). + */ + constructor(); + // dropped: HGraph return resolves to excluded type Interface_HGraph + // dropped: Graph return resolves to excluded type Interface_Graph + // dropped: IntParam return resolves to excluded type IFSelect_IntParam + // dropped: IntValue param 0 resolves to excluded type IFSelect_IntParam + // dropped: NewIntParam return resolves to excluded type IFSelect_IntParam + // dropped: SetIntValue param 0 resolves to excluded type IFSelect_IntParam + /** + * Changes the Error Handler status (by default, it is not set). + */ + SetErrorHandle(toHandle: boolean): void; + /** + * Returns the Error Handler status. + */ + ErrorHandle(): boolean; + /** + * Returns the ShareOut defined at creation time. + */ + ShareOut(): unknown; + /** + * Sets a new ShareOut. Fills Items which its content Warning : data from the former ShareOut are lost. + */ + SetShareOut(shareout: unknown): void; + /** + * Set value of mode responsible for presence of selections after loading If mode set to true that different selections will be accessible after loading else selections will be not accessible after loading( for economy memory in applications). + */ + SetModeStat(theMode: boolean): void; + /** + * Return value of mode defining of filling selection during loading. + */ + GetModeStat(): boolean; + /** + * Sets a WorkLibrary, which will be used to Read and Write Files. + */ + SetLibrary(theLib: unknown): void; + /** + * Returns the WorkLibrary. Null Handle if not yet set should be C++ : return const &. + */ + WorkLibrary(): unknown; + /** + * Sets a Protocol, which will be used to determine Graphs, to Read and to Write Files. + */ + SetProtocol(protocol: unknown): void; + /** + * Returns the Protocol. Null Handle if not yet set should be C++ : return const &. + */ + Protocol(): unknown; + /** + * Sets a specific Signature to be the SignType, i.e. the Signature which will determine TypeName from the Model (basic function). It is recorded in the GTool This Signature is also set as "xst-sign-type" (reserved name). + */ + SetSignType(signtype: unknown): void; + /** + * Returns the current SignType. + */ + SignType(): unknown; + /** + * Returns True is a Model has been set. + */ + HasModel(): boolean; + /** + * Sets a Model as input : this will be the Model from which the ShareOut will work if is True (default) all SelectPointed items are cleared, else they must be managed by the caller Remark : SetModel clears the Graph, recomputes it if a Protocol is set and if the Model is not empty, of course. + */ + SetModel(model: unknown, clearpointed?: boolean): void; + /** + * Returns the Model of the Work Session (Null Handle if none) should be C++ : return const &. + */ + Model(): unknown; + /** + * Stores the filename used for read for setting the model It is cleared by SetModel and ClearData(1). + */ + SetLoadedFile(theFileName: string): void; + /** + * Returns the filename used to load current model empty if unknown. + */ + LoadedFile(): string; + /** + * Reads a file with the WorkLibrary (sets Model and LoadedFile) Returns a integer status which can be : RetDone if OK, RetVoid if no Protocol not defined, RetError for file not found, RetFail if fail during read. + */ + ReadFile(filename: string): IFSelect_ReturnStatus; + /** + * Returns the count of Entities stored in the Model, or 0. + */ + NbStartingEntities(): number; + /** + * Returns an Entity stored in the Model of the WorkSession (Null Handle is no Model or num out of range). + */ + StartingEntity(num: number): Standard_Transient; + /** + * Returns the Number of an Entity in the Model (0 if no Model set or not in the Model). + */ + StartingNumber(ent: Standard_Transient): number; + /** + * From a given label in Model, returns the corresponding number Starts from first entity by Default, may start after a given number : this number may be given negative, its absolute value is then considered. Hence a loop on NumberFromLabel may be programmed (stop test is : returned value positive or null). + * + * Returns 0 if not found, < 0 if more than one found (first found in negative). If just gives an integer value, returns it + */ + NumberFromLabel(val: string, afternum?: number): number; + /** + * Returns the label for , as the Model does If is not in the Model or if no Model is loaded, a Null Handle is returned. + */ + EntityLabel(ent: Standard_Transient): TCollection_HAsciiString; + /** + * Returns the Name of an Entity This Name is computed by the general service Name Returns a Null Handle if fails. + */ + EntityName(ent: Standard_Transient): TCollection_HAsciiString; + /** + * Returns the Category Number determined for an entity it is computed by the class Category An unknown entity (number 0) gives a value -1. + */ + CategoryNumber(ent: Standard_Transient): number; + /** + * Returns the Category Name determined for an entity it is computed by the class Category Remark : an unknown entity gives an empty string. + */ + CategoryName(ent: Standard_Transient): string; + /** + * Returns the Validity Name determined for an entity it is computed by the class SignValidity Remark : an unknown entity gives an empty string. + */ + ValidityName(ent: Standard_Transient): string; + /** + * Clears recorded data (not the items) according mode : 1 : all Data : Model, Graph, CheckList, + ClearData 4 2 : Graph and CheckList (they will then be recomputed later) 3 : CheckList (it will be recomputed by ComputeCheck) 4 : just content of SelectPointed and Counters Plus 0 : does nothing but called by SetModel ClearData is virtual, hence it can be redefined to clear other data of a specialised Work Session. + */ + ClearData(mode: number): void; + /** + * Computes the Graph used for Selections, Displays ... If a HGraph is already set, with same model as given by method Model, does nothing. Else, computes a new Graph. If is given True, computes a new Graph anyway. Remark that a call to ClearGraph will cause ComputeGraph to really compute a new Graph Returns True if Graph is OK, False else (i.e. if no Protocol is set, or if Model is absent or empty). + */ + ComputeGraph(enforce?: boolean): boolean; + /** + * Returns the list of entities shared by (can be empty) Returns a null Handle if is unknown. + */ + Shareds(ent: Standard_Transient): NCollection_HSequence_handle_Standard_Transient; + /** + * Returns the list of entities sharing (can be empty) Returns a null Handle if is unknown. + */ + Sharings(ent: Standard_Transient): NCollection_HSequence_handle_Standard_Transient; + /** + * Returns True if a Model is defined and really loaded (not empty), a Protocol is set and a Graph has been computed. In this case, the WorkSession can start to work. + */ + IsLoaded(): boolean; + /** + * Computes the CheckList for the Model currently loaded It can then be used for displays, queries ... Returns True if OK, False else (i.e. no Protocol set, or Model absent). If is False, works only if not already done or if a new Model has been loaded from last call. Remark : computation is enforced by every call to SetModel or RunTransformer. + */ + ComputeCheck(enforce?: boolean): boolean; + /** + * Returns the Maximum Value for an Item Identifier. It can be greater to the count of known Items, because some can have been removed. + */ + MaxIdent(): number; + /** + * Returns an Item, given its Ident. Returns a Null Handle if no Item corresponds to this Ident. + */ + Item(id: number): Standard_Transient; + /** + * Returns the Ident attached to an Item in the WorkSession, or Zero if it is unknown. + */ + ItemIdent(item: Standard_Transient): number; + /** + * Returns the Item which corresponds to a Variable, given its Name (whatever the type of this Item). Returns a Null Handle if this Name is not recorded. + */ + NamedItem(name: string): Standard_Transient; + /** + * Same as above, but is given through a Handle Especially useful with methods SelectionNames, etc... + */ + NamedItem(name: TCollection_HAsciiString): Standard_Transient; + /** + * Returns the Ident attached to a Name, 0 if name not recorded. + */ + NameIdent(name: string): number; + /** + * Returns True if an Item of the WorkSession has an attached Name. + */ + HasName(item: Standard_Transient): boolean; + /** + * Returns the Name attached to an Item as a Variable of this WorkSession. If is Null or not recorded, returns an empty string. + */ + Name(item: Standard_Transient): TCollection_HAsciiString; + /** + * Adds an Item and returns its attached Ident. Does nothing if is already recorded (and returns its attached Ident) if True commands call to SetActive (see below) Remark : the determined Ident is used if is a Dispatch, to fill the ShareOut. + */ + AddItem(item: Standard_Transient, active?: boolean): number; + /** + * Adds an Item with an attached Name. If the Name is already known in the WorkSession, the older item losts it Returns Ident if Done, 0 else, i.e. if is null If is empty, works as AddItem (i.e. with no name) If is already known but with no attached Name, this method tries to attached a Name to it if True commands call to SetActive (see below). + */ + AddNamedItem(name: string, item: Standard_Transient, active?: boolean): number; + /** + * Following the type of : + * + * - Dispatch : Adds or Removes it in the ShareOut & FileNaming + * - GeneralModifier : Adds or Removes it for final sending (i.e. in the ModelCopier) Returns True if it did something, False else (state unchanged) + */ + SetActive(item: Standard_Transient, mode: boolean): boolean; + /** + * Removes an Item from the Session, given its Name Returns True if Done, False else (Name not recorded) (Applies only on Item which are Named). + */ + RemoveNamedItem(name: string): boolean; + /** + * Removes a Name without removing the Item Returns True if Done, False else (Name not recorded). + */ + RemoveName(name: string): boolean; + /** + * Removes an Item given its Ident. Returns False if is attached to no Item in the WorkSession. For a Named Item, also removes its Name. + */ + RemoveItem(item: Standard_Transient): boolean; + /** + * Clears all the recorded Items : Selections, Dispatches, Modifiers, and Strings & IntParams, with their Idents & Names. Remark that if a Model has been loaded, it is not cleared. + */ + ClearItems(): void; + /** + * Returns a Label which illustrates the content of an Item, given its Ident. This Label is : + * + * - for a Text Parameter, "Text:" + * - for an Integer Parameter, "Integer:" + * - for a Selection, a Dispatch or a Modifier, its Label (see these classes) + * - for any other kind of Variable, its cdl type + */ + ItemLabel(id: number): TCollection_HAsciiString; + /** + * Fills a Sequence with the List of Idents attached to the Items of which Type complies with (IsKind) (alphabetic order) Remark : = TYPE(Standard_Transient) gives all the Idents which are suitable in the WorkSession. + */ + ItemIdents(type_: unknown): NCollection_HSequence_int; + /** + * Fills a Sequence with the list of the Names attached to Items of which Type complies with (IsKind) (alphabetic order) Remark : = TYPE(Standard_Transient) gives all the Names. + */ + ItemNames(type_: unknown): NCollection_HSequence_handle_TCollection_HAsciiString; + /** + * Fills a Sequence with the NAMES of the control items, of which the label matches