diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 7f87653e..9af7c71c 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -4,11 +4,12 @@ project (chili-wasm) set (CMAKE_CXX_STANDARD 17) set (TARGET chili-wasm) set (CMAKE_CONFIGURATION_TYPES Debug;Release) +set (CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "") get_filename_component(SOURCE_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY) set(CMAKE_INSTALL_PREFIX "${SOURCE_ROOT_DIR}/packages/chili-wasm/lib") -set (OcctModules +set (OcctToolkits # FoundationClasses TKernel TKMath # ModelingData @@ -20,20 +21,23 @@ set (OcctModules # ApplicationFramework TKCDF TKLCAF TKCAF TKStdL TKStd TKVCAF TKBin TKBinL TKBinXCAF # DataExchange - TKDE TKXSBase TKDESTEP TKDEIGES TKDESTL TKDEVRML TKDEOBJ TKDEGLTF TKDEPLY TKXCAF TKRWMesh + TKDE TKXSBase TKXCAF TKDESTEP TKDEIGES ) +set (OcctUsedPackages) +foreach(toolkit ${OcctToolkits}) + file (STRINGS build/occt/src/${toolkit}/PACKAGES OcctPackages) + list (APPEND OcctUsedPackages ${OcctPackages}) +endforeach() +list (REMOVE_DUPLICATES OcctUsedPackages) + set (OcctSourceFolders) set (OcctIncludeDirs) - -foreach(module ${OcctModules}) - file (STRINGS build/occt/src/${module}/PACKAGES OcctPackage) - foreach(package ${OcctPackage}) - if (NOT package STREQUAL "") - list (APPEND OcctSourceFolders build/occt/src/${package}/*.c*) - list (APPEND OcctIncludeDirs build/occt/src/${package}) - endif() - endforeach() +foreach(package ${OcctUsedPackages}) + if (NOT package STREQUAL "") + list (APPEND OcctSourceFolders build/occt/src/${package}/*.c*) + list (APPEND OcctIncludeDirs build/occt/src/${package}) + endif() endforeach() file (GLOB OcctSourceFiles ${OcctSourceFolders}) @@ -48,18 +52,27 @@ source_group ("Sources" FILES ${ChiliWasmSourceFiles}) source_group ("OCCT" FILES ${OcctSourceFiles}) if (${EMSCRIPTEN}) - add_executable (${TARGET} ${ChiliWasmSourceFiles} ${OcctSourceFiles}) - target_compile_options (${TARGET} PUBLIC + add_library(occt STATIC ${OcctSourceFiles}) + target_include_directories (occt PUBLIC ${OcctIncludeDirs}) + target_compile_options (occt PUBLIC $<$:-O3> $<$:-flto> $,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0> -DOCCT_NO_PLUGINS ) + add_executable (${TARGET} ${ChiliWasmSourceFiles}) + target_include_directories (${TARGET} PUBLIC ${OcctIncludeDirs}) + target_compile_options (${TARGET} PUBLIC + $<$:-O3> + $<$:-flto> + $,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0> + ) + target_link_libraries(${TARGET} PUBLIC occt) target_link_options (${TARGET} PUBLIC $,-O3,-O0> - $<$:-flto> + $,-flto,-fno-lto> $,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0> -sMODULARIZE=1 -sEXPORT_ES6=1 @@ -69,9 +82,8 @@ if (${EMSCRIPTEN}) --emit-tsd "${TARGET}.d.ts" ) - target_include_directories (${TARGET} PUBLIC ${OcctIncludeDirs}) - install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.wasm DESTINATION ${CMAKE_INSTALL_PREFIX}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.d.ts DESTINATION ${CMAKE_INSTALL_PREFIX}) + endif () \ No newline at end of file diff --git a/cpp/src/shape.cpp b/cpp/src/shape.cpp index c430bab4..9e992178 100644 --- a/cpp/src/shape.cpp +++ b/cpp/src/shape.cpp @@ -59,7 +59,8 @@ class Shape { return section.Shape(); } - static TopoDS_Shape sectionSP(const TopoDS_Shape& shape, const gp_Pln& pln) { + static TopoDS_Shape sectionSP(const TopoDS_Shape& shape, const Ax3& ax3) { + gp_Pln pln = Ax3::toPln(ax3); BRepAlgoAPI_Section section(shape, pln); return section.Shape(); } diff --git a/package-lock.json b/package-lock.json index a8736f1a..02012a5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2764,10 +2764,6 @@ "resolved": "packages/chili-geo", "link": true }, - "node_modules/chili-occ": { - "resolved": "packages/chili-occ", - "link": true - }, "node_modules/chili-storage": { "resolved": "packages/chili-storage", "link": true @@ -6773,15 +6769,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opencascade.js": { - "version": "2.0.0-beta.94e2944", - "resolved": "https://registry.npmmirror.com/opencascade.js/-/opencascade.js-2.0.0-beta.94e2944.tgz", - "integrity": "sha512-ck1gMc4uY9sU/LrPI8+N4kv601MNJL0Lne6xwt9xSGJ63cVvsrJbapOySwfSVlMZa4nMUJezR6ckmo1PWFfheQ==", - "dev": true, - "peerDependencies": { - "ws": "^8.5.0" - } - }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmmirror.com/opener/-/opener-1.5.2.tgz", @@ -9521,7 +9508,6 @@ "version": "0.3.0", "devDependencies": { "chili": "*", - "chili-occ": "*", "chili-three": "*", "chili-ui": "*", "chili-wasm": "*" @@ -9539,6 +9525,7 @@ }, "packages/chili-occ": { "version": "0.3.0", + "extraneous": true, "devDependencies": { "chili-geo": "*", "opencascade.js": "2.0.0-beta.94e2944" @@ -11817,7 +11804,6 @@ "version": "file:packages/chili-builder", "requires": { "chili": "*", - "chili-occ": "*", "chili-three": "*", "chili-ui": "*", "chili-wasm": "*" @@ -11832,13 +11818,6 @@ "chili-core": "*" } }, - "chili-occ": { - "version": "file:packages/chili-occ", - "requires": { - "chili-geo": "*", - "opencascade.js": "2.0.0-beta.94e2944" - } - }, "chili-storage": { "version": "file:packages/chili-storage", "requires": { @@ -14754,13 +14733,6 @@ "is-wsl": "^3.1.0" } }, - "opencascade.js": { - "version": "2.0.0-beta.94e2944", - "resolved": "https://registry.npmmirror.com/opencascade.js/-/opencascade.js-2.0.0-beta.94e2944.tgz", - "integrity": "sha512-ck1gMc4uY9sU/LrPI8+N4kv601MNJL0Lne6xwt9xSGJ63cVvsrJbapOySwfSVlMZa4nMUJezR6ckmo1PWFfheQ==", - "dev": true, - "requires": {} - }, "opener": { "version": "1.5.2", "resolved": "https://registry.npmmirror.com/opener/-/opener-1.5.2.tgz", diff --git a/package.json b/package.json index 96a728fa..ede9ecd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chili3d", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "author": "仙阁", "scripts": { diff --git a/packages/chili-builder/package.json b/packages/chili-builder/package.json index 65f354e9..f4088139 100644 --- a/packages/chili-builder/package.json +++ b/packages/chili-builder/package.json @@ -1,12 +1,11 @@ { "name": "chili-builder", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { "chili": "*", "chili-three": "*", - "chili-occ": "*", "chili-ui": "*", "chili-wasm": "*" } diff --git a/packages/chili-builder/src/appBuilder.ts b/packages/chili-builder/src/appBuilder.ts index ef96b620..b7e33336 100644 --- a/packages/chili-builder/src/appBuilder.ts +++ b/packages/chili-builder/src/appBuilder.ts @@ -32,20 +32,9 @@ export class AppBuilder { return this; } - useOcc(): this { + useWasmOcc() { this._inits.push(async () => { - Logger.info("initializing occ"); - - let occ = await import("chili-occ"); - await occ.initMyOcc(); - this._shapeFactory = new occ.ShapeFactory(); - }); - return this; - } - - useNewOcc() { - this._inits.push(async () => { - Logger.info("initializing new occ"); + Logger.info("initializing wasm occ"); let wasm = await import("chili-wasm"); await wasm.initWasm(); @@ -68,8 +57,10 @@ export class AppBuilder { this._inits.push(async () => { Logger.info("initializing MainWindow"); + this.loadAdditionalI18n(); + let ui = await import("chili-ui"); - this._window = new ui.MainWindow(); + this._window = new ui.MainWindow(await this.getRibbonTabs()); }); return this; } @@ -79,23 +70,33 @@ export class AppBuilder { return this; } + async getRibbonTabs() { + let defaultRibbon = await import("./ribbon"); + return defaultRibbon.DefaultRibbon; + } + async build(): Promise { for (const init of this._inits) { await init(); } this.ensureNecessary(); - Application.build( + let app = this.createApp(); + this._window?.init(app); + + this.loadAdditionalCommands(); + + Logger.info("Application build completed"); + } + + createApp() { + return new Application( this._visualFactory!, this._shapeFactory!, this.getServices(), this._storage!, - this._window, + this._window ); - - this.loadAdditionalModule(); - - Logger.info("Application build completed"); } private ensureNecessary() { @@ -110,11 +111,16 @@ export class AppBuilder { } } - private loadAdditionalModule() { + private loadAdditionalI18n() { for (const module of this._additionalModules) { module.i18n().forEach((local) => { - I18n.combineTranslation(local.code as any, local.translation); + I18n.combineTranslation(local.code, local.translation); }); + } + } + + private loadAdditionalCommands() { + for (const module of this._additionalModules) { if (this._window) { module.ribbonCommands().forEach((command) => { this._window!.registerRibbonCommand(command.tabName, command.groupName, command.command); diff --git a/packages/chili-ui/src/profile/ribbon.ts b/packages/chili-builder/src/ribbon.ts similarity index 87% rename from packages/chili-ui/src/profile/ribbon.ts rename to packages/chili-builder/src/ribbon.ts index 6546b345..9d4bda76 100644 --- a/packages/chili-ui/src/profile/ribbon.ts +++ b/packages/chili-builder/src/ribbon.ts @@ -1,16 +1,6 @@ -import { CommandKeys, I18nKeys } from "chili-core"; +import { RibbonTab } from "chili-core"; -export type RibbonGroupProfile = { - groupName: I18nKeys; - items: (CommandKeys | CommandKeys[])[]; -}; - -export type RibbonTabProfile = { - tabName: I18nKeys; - groups: RibbonGroupProfile[]; -}; - -export const DefaultRibbon: RibbonTabProfile[] = [ +export const DefaultRibbon: RibbonTab[] = [ { tabName: "ribbon.tab.startup", groups: [ diff --git a/packages/chili-core/package.json b/packages/chili-core/package.json index b5b09ae3..77f330ec 100644 --- a/packages/chili-core/package.json +++ b/packages/chili-core/package.json @@ -1,6 +1,6 @@ { "name": "chili-core", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": {} diff --git a/packages/chili-core/src/document.ts b/packages/chili-core/src/document.ts index 65330041..024237d8 100644 --- a/packages/chili-core/src/document.ts +++ b/packages/chili-core/src/document.ts @@ -18,11 +18,11 @@ import { IVisual } from "./visual"; export interface IDocument extends IPropertyChanged, IDisposable, ISerialize { name: string; currentNode?: INodeLinkedList; + rootNode: INodeLinkedList; readonly selection: ISelection; readonly id: string; readonly history: History; readonly visual: IVisual; - readonly rootNode: INodeLinkedList; readonly application: IApplication; materials: ObservableCollection; addNode(...nodes: INode[]): void; diff --git a/packages/chili-core/src/foundation/binding.ts b/packages/chili-core/src/foundation/binding.ts index a459808e..34d9ae09 100644 --- a/packages/chili-core/src/foundation/binding.ts +++ b/packages/chili-core/src/foundation/binding.ts @@ -42,7 +42,7 @@ export class Binding { this.source.removePropertyChanged(this._onPropertyChanged); } - private _onPropertyChanged = (property: keyof T) => { + private readonly _onPropertyChanged = (property: keyof T) => { if (property === this.path && this._target) { let element = this._target.element.deref(); if (element) { @@ -66,6 +66,6 @@ export class Binding { if (!result.isOk) { throw new Error(`Cannot convert value ${value}`); } - return result.ok(); + return result.value; } } diff --git a/packages/chili-core/src/foundation/collection.ts b/packages/chili-core/src/foundation/collection.ts index b8210683..7357903a 100644 --- a/packages/chili-core/src/foundation/collection.ts +++ b/packages/chili-core/src/foundation/collection.ts @@ -35,7 +35,7 @@ export interface ICollectionChanged { } export class ObservableCollection implements ICollectionChanged, IDisposable { - private _callbacks: Set<(args: CollectionChangedArgs) => void> = new Set(); + private readonly _callbacks: Set<(args: CollectionChangedArgs) => void> = new Set(); private _items: T[]; constructor(...items: T[]) { diff --git a/packages/chili-core/src/foundation/history.ts b/packages/chili-core/src/foundation/history.ts index a603f9b7..11a9f6b0 100644 --- a/packages/chili-core/src/foundation/history.ts +++ b/packages/chili-core/src/foundation/history.ts @@ -10,8 +10,8 @@ export interface IHistoryRecord extends IDisposable { } export class History implements IDisposable { - private _undos: IHistoryRecord[] = []; - private _redos: IHistoryRecord[] = []; + private readonly _undos: IHistoryRecord[] = []; + private readonly _redos: IHistoryRecord[] = []; disabled: boolean = false; undoLimits: number = 50; diff --git a/packages/chili-core/src/foundation/observer.ts b/packages/chili-core/src/foundation/observer.ts index 31328117..0586d500 100644 --- a/packages/chili-core/src/foundation/observer.ts +++ b/packages/chili-core/src/foundation/observer.ts @@ -14,18 +14,60 @@ export interface IPropertyChanged extends IDisposable { clearPropertyChanged(): void; } +const DEFAULT_VALUE = Symbol.for("DEFAULT_VALUE"); + export class Observable implements IPropertyChanged { protected readonly propertyChangedHandlers: Set> = new Set(); - protected setPrivatePropertyValue(pubKey: K, newValue: this[K]) { - let privateKey = `_${String(pubKey)}`; + private getPrivateKey(pubKey: K) { + return `_${String(pubKey)}`; + } + + protected getPrivateValue( + pubKey: K, + defaultValue: this[K] = DEFAULT_VALUE as any, + ): this[K] { + let privateKey = this.getPrivateKey(pubKey); if (privateKey in this) { - (this as any)[privateKey] = newValue; + return (this as any)[privateKey]; + } else if (defaultValue !== DEFAULT_VALUE) { + this.defineProtoProperty(pubKey, privateKey, defaultValue); + return defaultValue; } else { throw new Error(`property ${privateKey} dose not exist in ${this.constructor.name}`); } } + protected setPrivateValue(pubKey: K, newValue: this[K]): void { + let privateKey = this.getPrivateKey(pubKey); + if (privateKey in this) { + (this as any)[privateKey] = newValue; + return; + } + + this.defineProtoProperty(pubKey, privateKey, newValue); + } + + private defineProtoProperty( + pubKey: K, + privateKey: string, + newValue: this[K], + ): void { + let proto = Object.getPrototypeOf(this); + while (proto !== null) { + if (proto.hasOwnProperty(pubKey)) { + Object.defineProperty(proto, privateKey, { + value: newValue, + writable: true, + enumerable: false, + configurable: true, + }); + break; + } + proto = Object.getPrototypeOf(proto); + } + } + /** * Set the value of a private property, and if successful, execute emitPropertyChanged. * @@ -39,7 +81,7 @@ export class Observable implements IPropertyChanged { ): boolean { let oldValue = this[property]; if (this.isEuqals(oldValue, newValue, equals)) return false; - this.setPrivatePropertyValue(property, newValue); + this.setPrivateValue(property, newValue); onPropertyChanged?.(property, oldValue); this.emitPropertyChanged(property, oldValue); return true; diff --git a/packages/chili-core/src/foundation/pubsub.ts b/packages/chili-core/src/foundation/pubsub.ts index 5e44586c..2ddc68f9 100644 --- a/packages/chili-core/src/foundation/pubsub.ts +++ b/packages/chili-core/src/foundation/pubsub.ts @@ -4,7 +4,7 @@ import { CommandKeys, ICommand } from "../command"; import { IDocument } from "../document"; import { I18nKeys } from "../i18n"; import { Material } from "../material"; -import { IModel, INode } from "../model"; +import { INode } from "../model"; import { ObjectSnapType } from "../snapType"; import { CursorType, IView } from "../visual"; import { AsyncController } from "./asyncController"; @@ -17,9 +17,9 @@ export interface PubSubEventMap { executeCommand: (commandName: CommandKeys) => void; activeViewChanged: (view: IView | undefined) => void; viewClosed: (view: IView) => void; - modelUpdate: (model: IModel) => void; - visibleChanged: (model: IModel) => void; - parentVisibleChanged: (model: IModel) => void; + modelUpdate: (model: INode) => void; + visibleChanged: (model: INode) => void; + parentVisibleChanged: (model: INode) => void; selectionChanged: (document: IDocument, selected: INode[], unselected: INode[]) => void; snapTypeChanged: (snapeType: ObjectSnapType) => void; statusBarTip: (tip: I18nKeys) => void; @@ -45,7 +45,7 @@ export interface PubSubEventMap { export class PubSub implements IDisposable { static readonly default: PubSub = new PubSub(); - private _events: Map void>>; + private readonly _events: Map void>>; constructor() { this._events = new Map(); diff --git a/packages/chili-core/src/foundation/result.ts b/packages/chili-core/src/foundation/result.ts index bc538bf8..64e09e0b 100644 --- a/packages/chili-core/src/foundation/result.ts +++ b/packages/chili-core/src/foundation/result.ts @@ -1,11 +1,34 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. +import { Serializer } from "../serialize"; import { IEqualityComparer } from "./equalityComparer"; +import { Logger } from "./logger"; +@Serializer.register(["isOk", "value", "error"]) export class Result { readonly #isOk: boolean; + @Serializer.serialze() + get isOk(): boolean { + return this.#isOk; + } + readonly #value: T | undefined; + @Serializer.serialze() + get value(): T { + if (!this.#isOk) { + Logger.warn("Result is error"); + } + return this.#value!; + } + readonly #error: E | undefined; + @Serializer.serialze() + get error(): E { + if (this.#isOk) { + Logger.warn("Result is ok"); + } + return this.#error!; + } constructor(isOk: boolean, value: T | undefined, error: E | undefined) { this.#isOk = isOk; @@ -17,28 +40,18 @@ export class Result { return Result.err(this.#error as E) as any; } - get isOk(): boolean { - return this.#isOk; + isOkAnd(predict: (value: T | undefined) => boolean): boolean { + return this.#isOk && predict(this.#value); } - ok(): T { - if (!this.#isOk) { - throw this.#error; - } - return this.#value!; + isErrorOr(predict: (value: T | undefined) => boolean): boolean { + return !this.#isOk || predict(this.#value); } unchecked(): T | undefined { return this.#value; } - error(): E { - if (this.#isOk) { - throw new Error(`Result is ok: ${this.#value}`); - } - return this.#error!; - } - static ok(value: T): Result { return new Result(true, value, undefined) as any; } @@ -56,8 +69,8 @@ export class ResultEqualityComparer implements IEqualityComparer> { - return new Promise((resolve, _reject) => { - let input = document.createElement("input"); - input.type = "file"; - input.multiple = multiple; - input.accept = accept; - input.style.visibility = "hidden"; - input.onchange = async () => { - document.body.removeChild(input); - resolve(await readInputedFiles(input, method)); - }; - input.oncancel = () => { - document.body.removeChild(input); - resolve(Result.err(`cancel`)); - }; - document.body.appendChild(input); - input.click(); - }); + let files = await readFilesAsync(accept, multiple); + if (!files.isOk) { + return files.parse(); + } + + return readInputedFiles(files.value, method); } -async function readInputedFiles( - input: HTMLInputElement, - method: "readAsText" | "readAsDataURL" | "readAsArrayBuffer", -) { - let files = input.files ?? []; +async function readInputedFiles(files: FileList, method: "readAsText" | "readAsDataURL") { let result: FileData[] = []; for (const file of files) { let data = await readFileDataAsync(file, method); @@ -76,12 +61,12 @@ async function readInputedFiles( return Result.ok(result); } -function readFileDataAsync(file: File, method: any): Promise { +function readFileDataAsync(file: File, method: any): Promise { return new Promise((resolve) => { let reader = new FileReader(); reader.onload = (e) => { if (e.target?.readyState === FileReader.DONE) { - resolve(e.target.result); + resolve(e.target.result as string); } }; reader.onerror = () => { diff --git a/packages/chili-core/src/i18n/i18n.ts b/packages/chili-core/src/i18n/i18n.ts index a6779b75..05cb8d36 100644 --- a/packages/chili-core/src/i18n/i18n.ts +++ b/packages/chili-core/src/i18n/i18n.ts @@ -7,9 +7,11 @@ import zh from "./zh-cn"; const I18nId = "chili18n"; const I18nArgs = new WeakMap(); +export type LanguageCode = "zh-CN" | "en"; + export type Locale = { display: string; - code: string; + code: LanguageCode; translation: { [key in I18nKeys]: string; } & { @@ -19,24 +21,19 @@ export type Locale = { export type Translation = Record; -export enum Language { - English, - Chinese, -} - export namespace I18n { - export const languages = new Map([ - [Language.English, en], - [Language.Chinese, zh], + export const languages = new Map([ + ["en", en], + ["zh-CN", zh], ]); - let _currentLanguage = - navigator.language.toLowerCase() === "zh-cn" ? Language.Chinese : Language.English; + let _currentLanguage: LanguageCode = "zh-CN"; + export function currentLanguage() { return _currentLanguage; } - export function combineTranslation(language: Language, translations: Record) { + export function combineTranslation(language: LanguageCode, translations: Record) { let local = languages.get(language); if (local) { local.translation = { @@ -47,7 +44,8 @@ export namespace I18n { } export function translate(key: I18nKeys, ...args: any[]) { - let text = languages.get(_currentLanguage)!.translation[key]; + let language = languages.get(_currentLanguage)!; + let text = language.translation[key] ?? languages.get("zh-CN")!.translation[key]; if (args.length > 0) { text = text.replace(/\{(\d+)\}/g, (_, index) => args[index]); } @@ -62,9 +60,13 @@ export namespace I18n { } } - export function changeLanguage(language: Language): boolean { - if (!languages.has(language)) return false; - _currentLanguage = language; + export function changeLanguage(index: number) { + if (index < 0 || index >= languages.size) return; + + let newLanguage = Array.from(languages.keys())[index]; + if (newLanguage === _currentLanguage) return; + _currentLanguage = newLanguage; + document.querySelectorAll(`[data-${I18nId}]`).forEach((e) => { let html = e as HTMLElement; let id = html?.dataset[I18nId] as I18nKeys; @@ -72,7 +74,5 @@ export namespace I18n { let args = I18nArgs.get(html) ?? []; html.textContent = translate(id, ...args); }); - - return true; } } diff --git a/packages/chili-core/src/material.ts b/packages/chili-core/src/material.ts index e1a477b1..41990087 100644 --- a/packages/chili-core/src/material.ts +++ b/packages/chili-core/src/material.ts @@ -10,71 +10,64 @@ export class Material extends HistoryObservable { @Serializer.serialze() readonly id: string; - private _name: string; @Serializer.serialze() @Property.define("common.name") get name(): string { - return this._name; + return this.getPrivateValue("name"); } set name(value: string) { this.setProperty("name", value); } - private _color: number; @Serializer.serialze() @Property.define("common.color", { type: "color" }) get color(): number { - return this._color; + return this.getPrivateValue("color"); } set color(value: number) { this.setProperty("color", value); } - private _opacity: number = 1; @Serializer.serialze() @Property.define("common.opacity") get opacity(): number { - return this._opacity; + return this.getPrivateValue("opacity", 1); } set opacity(value: number) { this.setProperty("opacity", value); } - private _texture: string = ""; @Serializer.serialze() @Property.define("material.texture") get texture() { - return this._texture; + return this.getPrivateValue("texture", ""); } set texture(value: string) { this.setProperty("texture", value); } - private _angle: number = 0; @Serializer.serialze() @Property.define("common.angle") get angle(): number { - return this._angle; + return this.getPrivateValue("angle", 0); } set angle(value: number) { this.setProperty("angle", value); } - private _repeatU: number = 1; @Serializer.serialze() @Property.define("material.repeatU") get repeatU(): number { - return this._repeatU; + return this.getPrivateValue("repeatU", 1); } set repeatU(value: number) { this.setProperty("repeatU", value); } - private _repeatV: number = 1; @Serializer.serialze() @Property.define("material.repeatV") get repeatV(): number { - return this._repeatV; + return this.getPrivateValue("repeatV", 1); } set repeatV(value: number) { this.setProperty("repeatV", value); @@ -83,16 +76,16 @@ export class Material extends HistoryObservable { constructor(document: IDocument, name: string, color: number, id: string = Id.generate()) { super(document); this.id = id; - this._name = name; - this._color = color; + this.setPrivateValue("name", name); + this.setPrivateValue("color", color); } clone(): Material { let material = new Material(this.document, `${this.name} clone`, this.color); - material._texture = this._texture; - material._angle = this._angle; - material._repeatU = this._repeatU; - material._repeatV = this._repeatV; + material.setPrivateValue("texture", this.texture); + material.setPrivateValue("angle", this.angle); + material.setPrivateValue("repeatU", this.repeatU); + material.setPrivateValue("repeatV", this.repeatV); return material; } diff --git a/packages/chili-core/src/math/quaternion.ts b/packages/chili-core/src/math/quaternion.ts index 474ec252..2ffbb602 100644 --- a/packages/chili-core/src/math/quaternion.ts +++ b/packages/chili-core/src/math/quaternion.ts @@ -32,7 +32,12 @@ export class Quaternion { } normalize(): Quaternion { const magnitude = this.magnitude(); - return new Quaternion(this.w / magnitude, this.x / magnitude, this.y / magnitude, this.z / magnitude); + return new Quaternion( + this.w / magnitude, + this.x / magnitude, + this.y / magnitude, + this.z / magnitude, + ); } toEuler(): { x: number; y: number; z: number } { const sinr_cosp = 2 * (this.w * this.x + this.y * this.z); @@ -50,10 +55,7 @@ export class Quaternion { }; } toMatrix4(): Matrix4 { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; + const { x, y, z, w } = this; const xx = x * x, xy = x * y, xz = x * z, diff --git a/packages/chili-core/src/model/entity.ts b/packages/chili-core/src/model/entity.ts deleted file mode 100644 index 3d680963..00000000 --- a/packages/chili-core/src/model/entity.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { HistoryObservable } from "../foundation"; -import { I18nKeys } from "../i18n"; -import { Matrix4 } from "../math"; -import { Serializer } from "../serialize"; - -export abstract class Entity extends HistoryObservable { - abstract display: I18nKeys; - - protected _matrix: Matrix4 = Matrix4.identity(); - @Serializer.serialze() - get matrix(): Matrix4 { - return this._matrix; - } - set matrix(value: Matrix4) { - this.setProperty( - "matrix", - value, - (_p, oldMatrix) => { - this.onMatrixChanged(value, oldMatrix); - }, - { - equals: (left, right) => left.equals(right), - }, - ); - } - - protected onMatrixChanged(newMatrix: Matrix4, oldMatrix: Matrix4): void {} -} diff --git a/packages/chili-core/src/model/facebaseNode.ts b/packages/chili-core/src/model/facebaseNode.ts new file mode 100644 index 00000000..687b80d4 --- /dev/null +++ b/packages/chili-core/src/model/facebaseNode.ts @@ -0,0 +1,16 @@ +// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. + +import { Property } from "../property"; +import { Serializer } from "../serialize"; +import { ParameterShapeNode } from "./node"; + +export abstract class FacebaseNode extends ParameterShapeNode { + @Serializer.serialze() + @Property.define("command.faceable.isFace") + get isFace() { + return this.getPrivateValue("isFace", false); + } + set isFace(value: boolean) { + this.setProperty("isFace", value); + } +} diff --git a/packages/chili-core/src/model/feature.ts b/packages/chili-core/src/model/feature.ts deleted file mode 100644 index bd00c09b..00000000 --- a/packages/chili-core/src/model/feature.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { IShape } from "../shape"; -import { Entity } from "./entity"; - -export abstract class Feature extends Entity { - origin: IShape | undefined; -} diff --git a/packages/chili-core/src/model/geometryEntity.ts b/packages/chili-core/src/model/geometryEntity.ts deleted file mode 100644 index ac608eec..00000000 --- a/packages/chili-core/src/model/geometryEntity.ts +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { IDocument } from "../document"; -import { PubSub, Result } from "../foundation"; -import { I18nKeys } from "../i18n"; -import { Matrix4 } from "../math"; -import { Property } from "../property"; -import { Serializer } from "../serialize"; -import { IShape } from "../shape"; -import { Entity } from "./entity"; -import { IParameterBody } from "./parameterBody"; - -export abstract class GeometryEntity extends Entity { - private _materialId: string; - @Serializer.serialze() - @Property.define("common.material", { type: "materialId" }) - get materialId(): string { - return this._materialId; - } - set materialId(value: string) { - this.setProperty("materialId", value); - } - - protected _shape: Result = Result.err("undefined"); - get shape(): Result { - return this._shape; - } - - constructor(document: IDocument, materialId?: string) { - super(document); - this._materialId = materialId ?? document.materials.at(0)!.id; - } - - override onMatrixChanged(newMatrix: Matrix4): void { - if (this._shape.isOk) this._shape.ok().matrix = newMatrix; - } - - protected updateShape(shape: Result, notify: boolean): boolean { - if (shape.isOk && this._shape.isOk && this._shape.ok().isEqual(shape.ok())) { - return false; - } - - if (!shape.isOk) { - PubSub.default.pub("displayError", shape.error()); - return false; - } - - let oldShape = this._shape; - this._shape = shape; - this._shape.ok().matrix = this._matrix; - if (notify) this.emitPropertyChanged("shape", oldShape); - return true; - } - - override dispose(): void { - super.dispose(); - this._shape.unchecked()?.dispose(); - } -} - -@Serializer.register(["document", "shape", "materialId"], undefined, EditableGeometryEntity.serializer) -export class EditableGeometryEntity extends GeometryEntity { - override display: I18nKeys = "entity.parameter"; - - constructor(document: IDocument, shape: IShape, materialId?: string) { - super(document, materialId); - this._shape = Result.ok(shape); - } - - replaceShape(shape: IShape): boolean { - return this.updateShape(Result.ok(shape), true); - } - - static serializer(target: EditableGeometryEntity) { - let properties = Serializer.serializeProperties(target); - properties["shape"] = Serializer.serializeObject(target.shape.ok()); - return properties; - } -} - -@Serializer.register(["document", "body", "materialId"]) -export class ParameterGeometryEntity extends GeometryEntity { - override display: I18nKeys = "entity.parameter"; - - @Serializer.serialze() - readonly body: IParameterBody; - - protected shouldRegenerateShape: boolean = true; - override get shape(): Result { - if (this.shouldRegenerateShape) { - let shape = this.body.generateShape(); - if (!shape.isOk) { - PubSub.default.pub("showToast", "error.default"); - } - this.updateShape(shape, false); - this.shouldRegenerateShape = false; - } - return this._shape; - } - - constructor(document: IDocument, body: IParameterBody, materialId?: string) { - super(document, materialId); - this.body = body; - this.body.clearPropertyChanged(); - this.body.onPropertyChanged(this.onParameterChanged); - } - - private onParameterChanged = () => { - this.shouldRegenerateShape = true; - this.emitPropertyChanged("shape", this._shape); - }; -} diff --git a/packages/chili-core/src/model/index.ts b/packages/chili-core/src/model/index.ts index 82a3826a..0ffa3c60 100644 --- a/packages/chili-core/src/model/index.ts +++ b/packages/chili-core/src/model/index.ts @@ -1,9 +1,5 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -export * from "./entity"; -export * from "./feature"; -export * from "./geometryEntity"; -export * from "./model"; +export * from "./facebaseNode"; export * from "./node"; export * from "./nodeLinkedList"; -export * from "./parameterBody"; diff --git a/packages/chili-core/src/model/model.ts b/packages/chili-core/src/model/model.ts deleted file mode 100644 index e7277615..00000000 --- a/packages/chili-core/src/model/model.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { IDocument } from "../document"; -import { Id } from "../foundation"; -import { Serializer } from "../serialize"; -import { GeometryEntity } from "./geometryEntity"; -import { IModel, IModelGroup, Node } from "./node"; - -export abstract class Model extends Node implements IModel { - @Serializer.serialze() - readonly geometry: GeometryEntity; - - constructor(document: IDocument, name: string, body: GeometryEntity, id: string = Id.generate()) { - super(document, name, id); - this.geometry = body; - } - - override dispose(): void { - super.dispose(); - this.geometry.dispose(); - } -} - -@Serializer.register(["document", "name", "geometry", "id"]) -export class GeometryModel extends Model { - constructor(document: IDocument, name: string, geometry: GeometryEntity, id: string = Id.generate()) { - super(document, name, geometry, id); - } - - protected onVisibleChanged(): void { - this.document.visual.context.setVisible(this, this.visible && this.parentVisible); - } - - protected onParentVisibleChanged(): void { - this.document.visual.context.setVisible(this, this.visible && this.parentVisible); - } -} - -export class ModelGroup extends Model implements IModelGroup { - private readonly _children: IModel[] = []; - - get children(): ReadonlyArray { - return this._children; - } - - protected onVisibleChanged(): void { - this.document.visual.context.setVisible(this, this.visible && this.parentVisible); - } - - protected onParentVisibleChanged(): void { - this.document.visual.context.setVisible(this, this.visible && this.parentVisible); - } - - override clone(): this { - // todo - return this; - } -} diff --git a/packages/chili-core/src/model/node.ts b/packages/chili-core/src/model/node.ts index c3cce1a6..249e1616 100644 --- a/packages/chili-core/src/model/node.ts +++ b/packages/chili-core/src/model/node.ts @@ -1,10 +1,20 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { IDocument } from "../document"; -import { HistoryObservable, IDisposable, IPropertyChanged, Id } from "../foundation"; +import { + HistoryObservable, + IDisposable, + IEqualityComparer, + IPropertyChanged, + Id, + PubSub, + Result, +} from "../foundation"; +import { I18n, I18nKeys } from "../i18n"; +import { Matrix4 } from "../math"; import { Property } from "../property"; import { Serialized, Serializer } from "../serialize"; -import { GeometryEntity } from "./geometryEntity"; +import { IShape, IShapeMeshData } from "../shape"; export interface INode extends IPropertyChanged, IDisposable { readonly id: string; @@ -28,34 +38,13 @@ export interface INodeLinkedList extends INode { move(child: INode, newParent: this, newPreviousSibling?: INode): void; } -export interface IModel extends INode { - readonly document: IDocument; - readonly geometry: GeometryEntity; -} - -export interface IModelGroup extends IModel { - children: ReadonlyArray; -} - export namespace INode { export function isLinkedListNode(node: INode): node is INodeLinkedList { return (node as INodeLinkedList).add !== undefined; } - - export function isModelNode(node: INode): node is IModel { - return (node as IModel).geometry !== undefined; - } - - export function isModelGroup(node: INode): node is IModelGroup { - let group = node as IModelGroup; - return group.geometry !== undefined && group.children !== undefined; - } } export abstract class Node extends HistoryObservable implements INode { - private _visible: boolean = true; - private _parentVisible: boolean = true; - parent: INodeLinkedList | undefined; previousSibling: INode | undefined; nextSibling: INode | undefined; @@ -63,30 +52,25 @@ export abstract class Node extends HistoryObservable implements INode { @Serializer.serialze() readonly id: string; - constructor( - document: IDocument, - private _name: string, - id: string = Id.generate(), - ) { + constructor(document: IDocument, name: string, id: string) { super(document); this.id = id; + this.setPrivateValue("name", name); } @Serializer.serialze() @Property.define("common.name") get name() { - return this._name; + return this.getPrivateValue("name"); } - set name(value: string) { this.setProperty("name", value); } @Serializer.serialze() get visible(): boolean { - return this._visible; + return this.getPrivateValue("visible", true); } - set visible(value: boolean) { this.setProperty("visible", value, () => this.onVisibleChanged()); } @@ -94,9 +78,8 @@ export abstract class Node extends HistoryObservable implements INode { protected abstract onVisibleChanged(): void; get parentVisible() { - return this._parentVisible; + return this.getPrivateValue("parentVisible", true); } - set parentVisible(value: boolean) { this.setProperty("parentVisible", value, () => this.onParentVisibleChanged()); } @@ -104,7 +87,7 @@ export abstract class Node extends HistoryObservable implements INode { clone(): this { let serialized = Serializer.serializeObject(this); serialized.properties["id"] = Id.generate(); - serialized.properties["name"] = `${this._name}_copy`; + serialized.properties["name"] = `${this.name}_copy`; let cloned: this = Serializer.deserializeObject(this.document, serialized); this.parent?.add(cloned); return cloned; @@ -237,6 +220,159 @@ export namespace INode { } } +export interface IMeshObject extends IPropertyChanged { + materialId: string; + matrix: Matrix4; + get mesh(): IShapeMeshData; +} + +export abstract class GeometryNode extends Node implements IMeshObject { + @Serializer.serialze() + @Property.define("common.material", { type: "materialId" }) + get materialId(): string { + return this.getPrivateValue("materialId"); + } + set materialId(value: string) { + this.setProperty("materialId", value); + } + + @Serializer.serialze() + get matrix(): Matrix4 { + return this.getPrivateValue("matrix", Matrix4.identity()); + } + set matrix(value: Matrix4) { + this.setProperty( + "matrix", + value, + (_p, oldMatrix) => { + this.onMatrixChanged(value, oldMatrix); + }, + { + equals: (left, right) => left.equals(right), + }, + ); + } + + constructor(document: IDocument, name: string, materialId?: string, id: string = Id.generate()) { + super(document, name, id); + this.setPrivateValue("materialId", materialId ?? document.materials.at(0)?.id ?? ""); + } + + protected onMatrixChanged(newMatrix: Matrix4, oldMatrix: Matrix4): void {} + + protected onVisibleChanged(): void { + this.document.visual.context.setVisible(this, this.visible && this.parentVisible); + } + + protected onParentVisibleChanged(): void { + this.document.visual.context.setVisible(this, this.visible && this.parentVisible); + } + + protected _mesh: IShapeMeshData | undefined; + get mesh(): IShapeMeshData { + if (this._mesh === undefined) { + this._mesh = this.createMesh(); + } + return this._mesh; + } + + protected abstract createMesh(): IShapeMeshData; +} + +export abstract class ShapeNode extends GeometryNode { + abstract get shape(): Result; + + protected override onMatrixChanged(newMatrix: Matrix4): void { + if (this.shape.isOk) this.shape.value.matrix = newMatrix; + } + + protected override createMesh(): IShapeMeshData { + if (!this.shape.isOk) { + throw new Error(this.shape.error); + } + return this.shape.value.mesh; + } + + override dispose(): void { + super.dispose(); + this.shape.unchecked()?.dispose(); + } +} + +const SHAPE_UNDEFINED = "Shape not initialized"; +export abstract class ParameterShapeNode extends ShapeNode { + protected _shape: Result = Result.err(SHAPE_UNDEFINED); + override get shape(): Result { + if (!this._shape.isOk && this._shape.error === SHAPE_UNDEFINED) { + this._shape = this.generateShape(); + } + return this._shape; + } + override set shape(shape: Result) { + if (shape.isOk && this._shape.isOk && this._shape.value.isEqual(shape.value)) { + return; + } + + let oldShape = this._shape; + this._shape = shape; + this._mesh = undefined; + this._shape.value.matrix = this.matrix; + this.emitPropertyChanged("shape", oldShape); + } + + protected setPropertyEmitShapeChanged( + property: K, + newValue: this[K], + onPropertyChanged?: (property: K, oldValue: this[K]) => void, + equals?: IEqualityComparer | undefined, + ): boolean { + if (this.setProperty(property, newValue, onPropertyChanged, equals)) { + this.shape = this.generateShape(); + return true; + } + + return false; + } + + constructor(document: IDocument, materialId?: string, id?: string) { + super(document, undefined as any, materialId, id); + this.name = I18n.translate(this.display()); + } + + protected abstract generateShape(): Result; + abstract display(): I18nKeys; +} + +@Serializer.register(["document", "name", "shape", "materialId", "id"]) +export class EditableShapeNode extends ShapeNode { + protected _shape: Result; + @Serializer.serialze() + override get shape(): Result { + return this._shape; + } + override set shape(shape: Result) { + if (this._shape.isOk && this._shape.unchecked() === shape.unchecked()) { + return; + } + + if (!shape.isOk) { + PubSub.default.pub("displayError", shape.error); + return; + } + + let oldShape = this._shape; + this._shape = shape; + this._mesh = undefined; + this._shape.value.matrix = this.matrix; + this.emitPropertyChanged("shape", oldShape); + } + + constructor(document: IDocument, name: string, shape: IShape, materialId?: string, id?: string) { + super(document, name, materialId, id); + this._shape = Result.ok(shape); + } +} + export namespace NodeSerializer { export function serialize(node: INode) { let nodes: Serialized[] = []; diff --git a/packages/chili-core/src/model/parameterBody.ts b/packages/chili-core/src/model/parameterBody.ts deleted file mode 100644 index 7a6ef0fe..00000000 --- a/packages/chili-core/src/model/parameterBody.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { HistoryObservable, IPropertyChanged, Result } from "../foundation"; -import { I18nKeys } from "../i18n"; -import { Property } from "../property"; -import { Serializer } from "../serialize"; -import { IShape } from "../shape"; - -export interface IParameterBody extends IPropertyChanged { - display: I18nKeys; - generateShape(): Result; -} - -export abstract class ParameterBody extends HistoryObservable implements IParameterBody { - abstract display: I18nKeys; - abstract generateShape(): Result; -} - -export abstract class FacebaseParameterBody extends ParameterBody { - protected _isFace: boolean = false; - @Serializer.serialze() - @Property.define("command.faceable.isFace") - get isFace() { - return this._isFace; - } - set isFace(value: boolean) { - this.setProperty("isFace", value); - } -} diff --git a/packages/chili-core/src/selection.ts b/packages/chili-core/src/selection.ts index 28bb4f19..718d01eb 100644 --- a/packages/chili-core/src/selection.ts +++ b/packages/chili-core/src/selection.ts @@ -2,14 +2,14 @@ import { AsyncController, IDisposable } from "./foundation"; import { I18nKeys } from "./i18n"; -import { IModel, INode } from "./model"; +import { GeometryNode, INode } from "./model"; import { IShapeFilter } from "./selectionFilter"; import { ShapeType } from "./shape"; import { CursorType, IEventHandler, VisualShapeData } from "./visual"; export interface ISelection extends IDisposable { pickShape(prompt: I18nKeys, controller: AsyncController, multiMode: boolean): Promise; - pickModel(prompt: I18nKeys, controller: AsyncController, multiMode: boolean): Promise; + pickModel(prompt: I18nKeys, controller: AsyncController, multiMode: boolean): Promise; pickAsync( handler: IEventHandler, prompt: I18nKeys, diff --git a/packages/chili-core/src/shape/shape.ts b/packages/chili-core/src/shape/shape.ts index 76564349..16698be8 100644 --- a/packages/chili-core/src/shape/shape.ts +++ b/packages/chili-core/src/shape/shape.ts @@ -38,6 +38,7 @@ export interface IShape extends IDisposable { findSubShapes(subshapeType: ShapeType): IShape[]; section(shape: IShape | Plane): IShape; split(edges: (IEdge | IWire)[]): IShape; + reserve(): void; } export interface IVertex extends IShape {} diff --git a/packages/chili-core/src/ui/index.ts b/packages/chili-core/src/ui/index.ts index 64166f24..b3c11fac 100644 --- a/packages/chili-core/src/ui/index.ts +++ b/packages/chili-core/src/ui/index.ts @@ -1,5 +1,5 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -export * from "./button" -export * from "./window" - +export * from "./button"; +export * from "./ribbon"; +export * from "./window"; diff --git a/packages/chili-core/src/ui/ribbon.ts b/packages/chili-core/src/ui/ribbon.ts new file mode 100644 index 00000000..606a6389 --- /dev/null +++ b/packages/chili-core/src/ui/ribbon.ts @@ -0,0 +1,14 @@ +// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. + +import { CommandKeys } from "../command"; +import { I18nKeys } from "../i18n"; + +export type RibbonGroup = { + groupName: I18nKeys; + items: (CommandKeys | CommandKeys[])[]; +}; + +export type RibbonTab = { + tabName: I18nKeys; + groups: RibbonGroup[]; +}; diff --git a/packages/chili-core/src/visual/visualContext.ts b/packages/chili-core/src/visual/visualContext.ts index 7bf6eed8..dec8538e 100644 --- a/packages/chili-core/src/visual/visualContext.ts +++ b/packages/chili-core/src/visual/visualContext.ts @@ -2,7 +2,7 @@ import { IDisposable, INodeChangedObserver } from "../foundation"; import { XYZ } from "../math"; -import { IModel } from "../model"; +import { INode } from "../model"; import { IShapeFilter } from "../selectionFilter"; import { ShapeMeshData } from "../shape"; import { IVisualObject } from "./visualObject"; @@ -19,12 +19,12 @@ export interface IVisualContext extends IDisposable, INodeChangedObserver { filter?: IShapeFilter, ): IVisualGeometry[]; removeVisualObject(object: IVisualObject): void; - addModel(models: IModel[]): void; - removeModel(models: IModel[]): void; - getShape(model: IModel): IVisualGeometry | undefined; - getModel(shape: IVisualGeometry): IModel | undefined; - redrawModel(models: IModel[]): void; - setVisible(model: IModel, visible: boolean): void; + addModel(models: INode[]): void; + removeModel(models: INode[]): void; + getShape(model: INode): IVisualGeometry | undefined; + getModel(shape: IVisualGeometry): INode | undefined; + redrawModel(models: INode[]): void; + setVisible(model: INode, visible: boolean): void; shapes(): IVisualGeometry[]; displayMesh(...datas: ShapeMeshData[]): number; removeMesh(id: number): void; diff --git a/packages/chili-core/src/visual/visualShape.ts b/packages/chili-core/src/visual/visualShape.ts index 8c3dce95..22a5e85c 100644 --- a/packages/chili-core/src/visual/visualShape.ts +++ b/packages/chili-core/src/visual/visualShape.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity } from "../model"; +import { GeometryNode } from "../model"; import { IVisualObject } from "./visualObject"; export enum VisualState { @@ -30,5 +30,5 @@ export interface VisualGroup { } export interface IVisualGeometry extends IVisualObject { - get geometryEngity(): GeometryEntity; + get geometryNode(): GeometryNode; } diff --git a/packages/chili-core/test/result.test.ts b/packages/chili-core/test/result.test.ts index 4ca1ff85..23973f9c 100644 --- a/packages/chili-core/test/result.test.ts +++ b/packages/chili-core/test/result.test.ts @@ -5,20 +5,19 @@ import { Result } from "../src"; test("test result", () => { let r1 = Result.ok("11"); expect(r1.isOk).toBeTruthy; - expect(r1.ok()).toBe("11"); + expect(r1.value).toBe("11"); expect(r1.isOk).toBeTruthy(); let r2 = Result.err("err"); expect(r2.isOk).toBeFalsy(); - expect(() => r2.ok()).toThrow("err"); expect(!r2.isOk).toBeTruthy(); - expect((r2 as Result).error()).toBe("err"); + expect((r2 as Result).error).toBe("err"); let r3 = Result.ok(true); expect(r3.isOk).toBeTruthy(); - expect((r3 as Result).ok()).toBeTruthy(); + expect((r3 as Result).value).toBeTruthy(); let r4 = Result.ok(undefined); expect(r4.isOk).toBeTruthy(); - expect((r4 as Result).ok()).toBeUndefined(); + expect((r4 as Result).value).toBeUndefined(); }); diff --git a/packages/chili-geo/package.json b/packages/chili-geo/package.json index b7738102..596fa70f 100644 --- a/packages/chili-geo/package.json +++ b/packages/chili-geo/package.json @@ -1,6 +1,6 @@ { "name": "chili-geo", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-geo/src/utils.ts b/packages/chili-geo/src/utils.ts index 44ad70c0..b7bcb11c 100644 --- a/packages/chili-geo/src/utils.ts +++ b/packages/chili-geo/src/utils.ts @@ -28,7 +28,7 @@ export class GeoUtils { private static wireNormal = (wire: IWire) => { let face = wire.toFace(); if (face.isOk) { - return face.ok().normal(0, 0)[1]; + return face.value.normal(0, 0)[1]; } let firstEdge: IEdge | undefined = undefined; diff --git a/packages/chili-occ/occ-wasm/README.md b/packages/chili-occ/occ-wasm/README.md deleted file mode 100644 index 8410fbcf..00000000 --- a/packages/chili-occ/occ-wasm/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# `opencascadejs` - -An opencascadejs build containing only the APIs necessary to run chili. - -## Usage - -```shell -sudo docker run -it --rm -v $(pwd):/src -u $(id -u):$(id -g) docker.io/donalffons/opencascade.js build_config.yml -``` - -## Link - -[Creating Custom Builds](https://ocjs.org/docs/app-dev-workflow/custom-builds) \ No newline at end of file diff --git a/packages/chili-occ/occ-wasm/build_config.yml b/packages/chili-occ/occ-wasm/build_config.yml deleted file mode 100644 index 0e03608b..00000000 --- a/packages/chili-occ/occ-wasm/build_config.yml +++ /dev/null @@ -1,258 +0,0 @@ -mainBuild: - name: chili_occ.js - bindings: - - symbol: Adaptor3d_Curve - - symbol: Adaptor3d_Surface - - symbol: Bnd_Box - - symbol: Bnd_OBB - - symbol: BOPAlgo_GlueEnum - - symbol: BOPAlgo_Options - - symbol: BOPTools_AlgoTools3D - - symbol: BRep_Builder - - symbol: BRep_Tool - - symbol: BRepAdaptor_CompCurve - - symbol: BRepAdaptor_Curve - - symbol: BRepAdaptor_Surface - - symbol: BRepAlgoAPI_Algo - - symbol: BRepAlgoAPI_BooleanOperation - - symbol: BRepAlgoAPI_BuilderAlgo - - symbol: BRepAlgoAPI_Common - - symbol: BRepAlgoAPI_Cut - - symbol: BRepAlgoAPI_Fuse - - symbol: BRepAlgoAPI_Section - - symbol: BRepBndLib - - symbol: BRepBuilderAPI_Command - - symbol: BRepBuilderAPI_MakeEdge - - symbol: BRepBuilderAPI_MakeFace - - symbol: BRepBuilderAPI_MakePolygon - - symbol: BRepBuilderAPI_MakeShape - - symbol: BRepBuilderAPI_MakeSolid - - symbol: BRepBuilderAPI_MakeVertex - - symbol: BRepBuilderAPI_MakeWire - - symbol: BRepBuilderAPI_ModifyShape - - symbol: BRepBuilderAPI_Sewing - - symbol: BRepBuilderAPI_Transform - - symbol: BRepBuilderAPI_TransitionMode - - symbol: BRepBuilderAPI_WireError - - symbol: BRepCheck_Analyzer - - symbol: BRepExtrema_DistShapeShape - - symbol: BRepExtrema_ExtCC - - symbol: BRepFeat_Form - - symbol: BRepFeat_Gluer - - symbol: BRepFeat_MakeDPrism - - symbol: BRepFeat_MakePipe - - symbol: BRepFeat_MakePrism - - symbol: BRepFeat_MakeRevol - - symbol: BRepFeat_MakeRevolutionForm - - symbol: BRepFeat_RibSlot - - symbol: BRepFeat_SplitShape - - symbol: BRepFill_TypeOfContact - - symbol: BRepFilletAPI_LocalOperation - - symbol: BRepFilletAPI_MakeChamfer - - symbol: BRepFilletAPI_MakeFillet - - symbol: BRepGProp - - symbol: BRepGProp_Face - - symbol: BRepLib - - symbol: BRepMesh_DiscretRoot - - symbol: BRepMesh_IncrementalMesh - - symbol: BRepOffset_Mode - - symbol: BRepOffsetAPI_DraftAngle - - symbol: BRepOffsetAPI_MakeFilling - - symbol: BRepOffsetAPI_MakeOffset - - symbol: BRepOffsetAPI_MakeOffsetShape - - symbol: BRepOffsetAPI_MakePipe - - symbol: BRepOffsetAPI_MakePipeShell - - symbol: BRepOffsetAPI_MakeThickSolid - - symbol: BRepOffsetAPI_ThruSections - - symbol: BRepPrimAPI_MakeBox - - symbol: BRepPrimAPI_MakeCylinder - - symbol: BRepPrimAPI_MakeOneAxis - - symbol: BRepPrimAPI_MakePrism - - symbol: BRepPrimAPI_MakeRevol - - symbol: BRepPrimAPI_MakeRevolution - - symbol: BRepPrimAPI_MakeSphere - - symbol: BRepPrimAPI_MakeSweep - - symbol: BRepPrimAPI_MakeTorus - - symbol: BRepTools - - symbol: BRepTools_Quilt - - symbol: BRepTools_ReShape - - symbol: ChFi3d_FilletShape - - symbol: ChFiDS_ChamfMode - - symbol: Convert_ParameterisationType - - symbol: Extrema_ExtAlgo - - symbol: Extrema_ExtCC - - symbol: Extrema_ExtCS - - symbol: Extrema_ExtPC - - symbol: Extrema_ExtPS - - symbol: Extrema_ExtSS - - symbol: Extrema_POnCurv - - symbol: Extrema_POnSurf - - symbol: GC_MakeArcOfCircle - - symbol: GC_MakeArcOfEllipse - - symbol: GC_Root - - symbol: GCPnts_AbscissaPoint - - symbol: GCPnts_UniformAbscissa - - symbol: GCPnts_TangentialDeflection - - symbol: Geom_BezierCurve - - symbol: Geom_BezierSurface - - symbol: Geom_BoundedCurve - - symbol: Geom_BoundedSurface - - symbol: Geom_BSplineCurve - - symbol: Geom_BSplineSurface - - symbol: Geom_Circle - - symbol: Geom_Conic - - symbol: Geom_ConicalSurface - - symbol: Geom_Curve - - symbol: Geom_CylindricalSurface - - symbol: Geom_ElementarySurface - - symbol: Geom_Ellipse - - symbol: Geom_Geometry - - symbol: Geom_Hyperbola - - symbol: Geom_Line - - symbol: Geom_OffsetCurve - - symbol: Geom_OffsetSurface - - symbol: Geom_Parabola - - symbol: Geom_Plane - - symbol: Geom_RectangularTrimmedSurface - - symbol: Geom_SphericalSurface - - symbol: Geom_Surface - - symbol: Geom_SurfaceOfLinearExtrusion - - symbol: Geom_SurfaceOfRevolution - - symbol: Geom_SweptSurface - - symbol: Geom_ToroidalSurface - - symbol: Geom_TrimmedCurve - - symbol: GeomAbs_CurveType - - symbol: GeomAbs_JoinType - - symbol: GeomAbs_Shape - - symbol: GeomAbs_SurfaceType - - symbol: GeomAdaptor_Curve - - symbol: GeomAPI_ExtremaCurveCurve - - symbol: GeomAPI_ExtremaCurveSurface - - symbol: GeomAPI_ExtremaSurfaceSurface - - symbol: GeomAPI_IntCS - - symbol: GeomAPI_Interpolate - - symbol: GeomAPI_IntSS - - symbol: GeomAPI_PointsToBSpline - - symbol: GeomAPI_PointsToBSplineSurface - - symbol: GeomAPI_ProjectPointOnCurve - - symbol: GeomAPI_ProjectPointOnSurf - - symbol: GeomFill_Trihedron - - symbol: GeomLib - - symbol: GeomLib_Tool - - symbol: GeomLib_IsPlanarSurface - - symbol: GeomPlate_Surface - - symbol: GeomProjLib - - symbol: gp_Ax1 - - symbol: gp_Ax2 - - symbol: gp_Ax3 - - symbol: gp_Circ - - symbol: gp_Cylinder - - symbol: gp_Dir - - symbol: gp_Dir2d - - symbol: gp_Elips - - symbol: gp_GTrsf - - symbol: gp_Lin - - symbol: gp_Pln - - symbol: gp_Pnt - - symbol: gp_Pnt2d - - symbol: gp_Quaternion - - symbol: gp_Trsf - - symbol: gp_Vec - - symbol: gp_Vec2d - - symbol: gp_XY - - symbol: gp_XYZ - - symbol: GProp_GProps - - symbol: Handle_Geom_BezierCurve - - symbol: Handle_Geom_BSplineCurve - - symbol: Handle_Geom_BSplineSurface - - symbol: Handle_Geom_Circle - - symbol: Handle_Geom_Conic - - symbol: Handle_Geom_Curve - - symbol: Handle_Geom_Geometry - - symbol: Handle_Geom_Line - - symbol: Handle_Geom_Surface - - symbol: Handle_Geom_TrimmedCurve - - symbol: Handle_Geom2d_Curve - - symbol: Handle_Law_Function - - symbol: Handle_Poly_PolygonOnTriangulation - - symbol: Handle_Poly_Triangulation - - symbol: Handle_StepData_StepModel - - symbol: IFSelect_ReturnStatus - - symbol: IGESControl_Controller - - symbol: IGESControl_Reader - - symbol: IGESControl_Writer - - symbol: Interface_Static - - symbol: Interface_TypedValue - - symbol: Law_BSpFunc - - symbol: Law_Composite - - symbol: Law_Function - - symbol: Law_Interpol - - symbol: Law_Linear - - symbol: Law_S - - symbol: Message_ProgressRange - - symbol: MoniTool_TypedValue - - symbol: NCollection_BaseList - - symbol: NCollection_BaseMap - - symbol: NCollection_BaseSequence - - symbol: Poly_Array1OfTriangle - - symbol: Poly_Connect - - symbol: Poly_PolygonOnTriangulation - - symbol: Poly_Triangle - - symbol: Poly_Triangulation - - symbol: Precision - - symbol: ProjLib - - symbol: ShapeAnalysis - - symbol: ShapeAnalysis_Edge - - symbol: ShapeAnalysis_WireOrder - - symbol: ShapeBuild_ReShape - - symbol: ShapeExtend_CompositeSurface - - symbol: ShapeFix_EdgeConnect - - symbol: ShapeFix_Face - - symbol: ShapeFix_Root - - symbol: ShapeFix_Solid - - symbol: ShapeFix_Wire - - symbol: ShapeUpgrade_UnifySameDomain - - symbol: Standard_Transient - - symbol: StdPrs_ToolTriangulatedShape - - symbol: STEPControl_Reader - - symbol: STEPControl_StepModelType - - symbol: STEPControl_Writer - - symbol: StlAPI - - symbol: StlAPI_Reader - - symbol: StlAPI_Writer - - symbol: TColgp_Array1OfDir - - symbol: TColgp_Array1OfPnt - - symbol: TColgp_Array1OfVec - - symbol: TColgp_Array2OfPnt - - symbol: TColStd_Array1OfBoolean - - symbol: TColStd_Array1OfInteger - - symbol: TColStd_Array1OfReal - - symbol: TopAbs_Orientation - - symbol: TopAbs_ShapeEnum - - symbol: TopExp - - symbol: TopExp_Explorer - - symbol: TopLoc_Location - - symbol: TopoDS - - symbol: TopoDS_Builder - - symbol: TopoDS_Compound - - symbol: TopoDS_CompSolid - - symbol: TopoDS_Edge - - symbol: TopoDS_Face - - symbol: TopoDS_Shape - - symbol: TopoDS_Shell - - symbol: TopoDS_Solid - - symbol: TopoDS_Vertex - - symbol: TopoDS_Wire - - symbol: TopTools_IndexedDataMapOfShapeListOfShape - - symbol: TopTools_IndexedMapOfShape - - symbol: TopTools_ListOfShape - - symbol: TopTools_SequenceOfShape - - symbol: XSControl_Reader - - emccFlags: - - -sEXPORT_ES6=1 - - -sUSE_ES6_IMPORT_META=0 - - -sALLOW_MEMORY_GROWTH=1 - - -sEXPORTED_RUNTIME_METHODS=["FS"] - - -O3 - - -sDISABLE_EXCEPTION_CATCHING=1 \ No newline at end of file diff --git a/packages/chili-occ/occ-wasm/chili_occ.d.ts b/packages/chili-occ/occ-wasm/chili_occ.d.ts deleted file mode 100644 index a54c4b1c..00000000 --- a/packages/chili-occ/occ-wasm/chili_occ.d.ts +++ /dev/null @@ -1,8336 +0,0 @@ -export declare class Adaptor3d_Curve extends Standard_Transient { - constructor(); - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Curve; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Trim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Curve; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Value(U: Standard_Real): gp_Pnt; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Resolution(R3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_CurveType; - Line(): gp_Lin; - Circle(): gp_Circ; - Ellipse(): gp_Elips; - Hyperbola(): gp_Hypr; - Parabola(): gp_Parab; - Degree(): Graphic3d_ZLayerId; - IsRational(): Standard_Boolean; - NbPoles(): Graphic3d_ZLayerId; - NbKnots(): Graphic3d_ZLayerId; - Bezier(): Handle_Geom_BezierCurve; - BSpline(): Handle_Geom_BSplineCurve; - OffsetCurve(): Handle_Geom_OffsetCurve; - delete(): void; -} - -export declare class Adaptor3d_Surface extends Standard_Transient { - constructor(); - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Surface; - FirstUParameter(): Standard_Real; - LastUParameter(): Standard_Real; - FirstVParameter(): Standard_Real; - LastVParameter(): Standard_Real; - UContinuity(): GeomAbs_Shape; - VContinuity(): GeomAbs_Shape; - NbUIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - NbVIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - UIntervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - VIntervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - UTrim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Surface; - VTrim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Surface; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - Value(U: Standard_Real, V: Standard_Real): gp_Pnt; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - UResolution(R3d: Standard_Real): Standard_Real; - VResolution(R3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_SurfaceType; - Plane(): gp_Pln; - Cylinder(): gp_Cylinder; - Cone(): gp_Cone; - Sphere(): gp_Sphere; - Torus(): gp_Torus; - UDegree(): Graphic3d_ZLayerId; - NbUPoles(): Graphic3d_ZLayerId; - VDegree(): Graphic3d_ZLayerId; - NbVPoles(): Graphic3d_ZLayerId; - NbUKnots(): Graphic3d_ZLayerId; - NbVKnots(): Graphic3d_ZLayerId; - IsURational(): Standard_Boolean; - IsVRational(): Standard_Boolean; - Bezier(): Handle_Geom_BezierSurface; - BSpline(): Handle_Geom_BSplineSurface; - AxeOfRevolution(): gp_Ax1; - Direction(): gp_Dir; - BasisCurve(): Handle_Adaptor3d_Curve; - BasisSurface(): Handle_Adaptor3d_Surface; - OffsetValue(): Standard_Real; - delete(): void; -} - -export declare type BOPAlgo_GlueEnum = { - BOPAlgo_GlueOff: {}; - BOPAlgo_GlueShift: {}; - BOPAlgo_GlueFull: {}; -} - -export declare class BOPAlgo_Options { - Allocator(): Handle_NCollection_BaseAllocator; - Clear(): void; - AddError(theAlert: Handle_Message_Alert): void; - AddWarning(theAlert: Handle_Message_Alert): void; - HasErrors(): Standard_Boolean; - HasError(theType: Handle_Standard_Type): Standard_Boolean; - HasWarnings(): Standard_Boolean; - HasWarning(theType: Handle_Standard_Type): Standard_Boolean; - GetReport(): Handle_Message_Report; - DumpErrors(theOS: Standard_OStream): void; - DumpWarnings(theOS: Standard_OStream): void; - ClearWarnings(): void; - static GetParallelMode(): Standard_Boolean; - static SetParallelMode(theNewMode: Standard_Boolean): void; - SetRunParallel(theFlag: Standard_Boolean): void; - RunParallel(): Standard_Boolean; - SetFuzzyValue(theFuzz: Standard_Real): void; - FuzzyValue(): Standard_Real; - SetUseOBB(theUseOBB: Standard_Boolean): void; - UseOBB(): Standard_Boolean; - delete(): void; -} - - export declare class BOPAlgo_Options_1 extends BOPAlgo_Options { - constructor(); - } - - export declare class BOPAlgo_Options_2 extends BOPAlgo_Options { - constructor(theAllocator: Handle_NCollection_BaseAllocator); - } - -export declare class BOPTools_AlgoTools3D { - constructor(); - static DoSplitSEAMOnFace_1(theESplit: TopoDS_Edge, theFace: TopoDS_Face): Standard_Boolean; - static DoSplitSEAMOnFace_2(theEOrigin: TopoDS_Edge, theESplit: TopoDS_Edge, theFace: TopoDS_Face): Standard_Boolean; - static GetNormalToFaceOnEdge_1(aE: TopoDS_Edge, aF: TopoDS_Face, aT: Standard_Real, aD: gp_Dir, theContext: Handle_IntTools_Context): void; - static GetNormalToFaceOnEdge_2(aE: TopoDS_Edge, aF: TopoDS_Face, aD: gp_Dir, theContext: Handle_IntTools_Context): void; - static SenseFlag(aNF1: gp_Dir, aNF2: gp_Dir): Graphic3d_ZLayerId; - static GetNormalToSurface(aS: Handle_Geom_Surface, U: Standard_Real, V: Standard_Real, aD: gp_Dir): Standard_Boolean; - static GetApproxNormalToFaceOnEdge_1(aE: TopoDS_Edge, aF: TopoDS_Face, aT: Standard_Real, aPx: gp_Pnt, aD: gp_Dir, theContext: Handle_IntTools_Context): Standard_Boolean; - static GetApproxNormalToFaceOnEdge_2(theE: TopoDS_Edge, theF: TopoDS_Face, aT: Standard_Real, aP: gp_Pnt, aDNF: gp_Dir, aDt2D: Standard_Real): Standard_Boolean; - static GetApproxNormalToFaceOnEdge_3(theE: TopoDS_Edge, theF: TopoDS_Face, aT: Standard_Real, aDt2D: Standard_Real, aP: gp_Pnt, aDNF: gp_Dir, theContext: Handle_IntTools_Context): Standard_Boolean; - static PointNearEdge_1(aE: TopoDS_Edge, aF: TopoDS_Face, aT: Standard_Real, aDt2D: Standard_Real, aP2D: gp_Pnt2d, aPx: gp_Pnt, theContext: Handle_IntTools_Context): Graphic3d_ZLayerId; - static PointNearEdge_2(aE: TopoDS_Edge, aF: TopoDS_Face, aT: Standard_Real, aDt2D: Standard_Real, aP2D: gp_Pnt2d, aPx: gp_Pnt): Graphic3d_ZLayerId; - static PointNearEdge_3(aE: TopoDS_Edge, aF: TopoDS_Face, aT: Standard_Real, aP2D: gp_Pnt2d, aPx: gp_Pnt, theContext: Handle_IntTools_Context): Graphic3d_ZLayerId; - static PointNearEdge_4(aE: TopoDS_Edge, aF: TopoDS_Face, aP2D: gp_Pnt2d, aPx: gp_Pnt, theContext: Handle_IntTools_Context): Graphic3d_ZLayerId; - static MinStepIn2d(): Standard_Real; - static IsEmptyShape(aS: TopoDS_Shape): Standard_Boolean; - static OrientEdgeOnFace(aE: TopoDS_Edge, aF: TopoDS_Face, aER: TopoDS_Edge): void; - static PointInFace_1(theF: TopoDS_Face, theP: gp_Pnt, theP2D: gp_Pnt2d, theContext: Handle_IntTools_Context): Graphic3d_ZLayerId; - static PointInFace_2(theF: TopoDS_Face, theE: TopoDS_Edge, theT: Standard_Real, theDt2D: Standard_Real, theP: gp_Pnt, theP2D: gp_Pnt2d, theContext: Handle_IntTools_Context): Graphic3d_ZLayerId; - static PointInFace_3(theF: TopoDS_Face, theL: Handle_Geom2d_Curve, theP: gp_Pnt, theP2D: gp_Pnt2d, theContext: Handle_IntTools_Context, theDt2D: Standard_Real): Graphic3d_ZLayerId; - delete(): void; -} - -export declare class BRep_Builder extends TopoDS_Builder { - constructor(); - MakeFace_1(F: TopoDS_Face): void; - MakeFace_2(F: TopoDS_Face, S: Handle_Geom_Surface, Tol: Standard_Real): void; - MakeFace_3(F: TopoDS_Face, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real): void; - MakeFace_4(theFace: TopoDS_Face, theTriangulation: Handle_Poly_Triangulation): void; - MakeFace_5(theFace: TopoDS_Face, theTriangulations: Poly_ListOfTriangulation, theActiveTriangulation: Handle_Poly_Triangulation): void; - UpdateFace_1(F: TopoDS_Face, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real): void; - UpdateFace_2(theFace: TopoDS_Face, theTriangulation: Handle_Poly_Triangulation, theToReset: Standard_Boolean): void; - UpdateFace_3(F: TopoDS_Face, Tol: Standard_Real): void; - NaturalRestriction(F: TopoDS_Face, N: Standard_Boolean): void; - MakeEdge_1(E: TopoDS_Edge): void; - MakeEdge_2(E: TopoDS_Edge, C: Handle_Geom_Curve, Tol: Standard_Real): void; - MakeEdge_3(E: TopoDS_Edge, C: Handle_Geom_Curve, L: TopLoc_Location, Tol: Standard_Real): void; - MakeEdge_4(E: TopoDS_Edge, P: Handle_Poly_Polygon3D): void; - MakeEdge_5(E: TopoDS_Edge, N: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation): void; - MakeEdge_6(E: TopoDS_Edge, N: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation, L: TopLoc_Location): void; - UpdateEdge_1(E: TopoDS_Edge, C: Handle_Geom_Curve, Tol: Standard_Real): void; - UpdateEdge_2(E: TopoDS_Edge, C: Handle_Geom_Curve, L: TopLoc_Location, Tol: Standard_Real): void; - UpdateEdge_3(E: TopoDS_Edge, C: Handle_Geom2d_Curve, F: TopoDS_Face, Tol: Standard_Real): void; - UpdateEdge_4(E: TopoDS_Edge, C1: Handle_Geom2d_Curve, C2: Handle_Geom2d_Curve, F: TopoDS_Face, Tol: Standard_Real): void; - UpdateEdge_5(E: TopoDS_Edge, C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real): void; - UpdateEdge_6(E: TopoDS_Edge, C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real, Pf: gp_Pnt2d, Pl: gp_Pnt2d): void; - UpdateEdge_7(E: TopoDS_Edge, C1: Handle_Geom2d_Curve, C2: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real): void; - UpdateEdge_8(E: TopoDS_Edge, C1: Handle_Geom2d_Curve, C2: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real, Pf: gp_Pnt2d, Pl: gp_Pnt2d): void; - UpdateEdge_9(E: TopoDS_Edge, P: Handle_Poly_Polygon3D): void; - UpdateEdge_10(E: TopoDS_Edge, P: Handle_Poly_Polygon3D, L: TopLoc_Location): void; - UpdateEdge_11(E: TopoDS_Edge, N: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation): void; - UpdateEdge_12(E: TopoDS_Edge, N: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation, L: TopLoc_Location): void; - UpdateEdge_13(E: TopoDS_Edge, N1: Handle_Poly_PolygonOnTriangulation, N2: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation): void; - UpdateEdge_14(E: TopoDS_Edge, N1: Handle_Poly_PolygonOnTriangulation, N2: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation, L: TopLoc_Location): void; - UpdateEdge_15(E: TopoDS_Edge, P: Handle_Poly_Polygon2D, S: TopoDS_Face): void; - UpdateEdge_16(E: TopoDS_Edge, P: Handle_Poly_Polygon2D, S: Handle_Geom_Surface, T: TopLoc_Location): void; - UpdateEdge_17(E: TopoDS_Edge, P1: Handle_Poly_Polygon2D, P2: Handle_Poly_Polygon2D, S: TopoDS_Face): void; - UpdateEdge_18(E: TopoDS_Edge, P1: Handle_Poly_Polygon2D, P2: Handle_Poly_Polygon2D, S: Handle_Geom_Surface, L: TopLoc_Location): void; - UpdateEdge_19(E: TopoDS_Edge, Tol: Standard_Real): void; - Continuity_1(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, C: GeomAbs_Shape): void; - Continuity_2(E: TopoDS_Edge, S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, L1: TopLoc_Location, L2: TopLoc_Location, C: GeomAbs_Shape): void; - SameParameter(E: TopoDS_Edge, S: Standard_Boolean): void; - SameRange(E: TopoDS_Edge, S: Standard_Boolean): void; - Degenerated(E: TopoDS_Edge, D: Standard_Boolean): void; - Range_1(E: TopoDS_Edge, First: Standard_Real, Last: Standard_Real, Only3d: Standard_Boolean): void; - Range_2(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real): void; - Range_3(E: TopoDS_Edge, F: TopoDS_Face, First: Standard_Real, Last: Standard_Real): void; - Transfert_1(Ein: TopoDS_Edge, Eout: TopoDS_Edge): void; - MakeVertex_1(V: TopoDS_Vertex): void; - MakeVertex_2(V: TopoDS_Vertex, P: gp_Pnt, Tol: Standard_Real): void; - UpdateVertex_1(V: TopoDS_Vertex, P: gp_Pnt, Tol: Standard_Real): void; - UpdateVertex_2(V: TopoDS_Vertex, P: Standard_Real, E: TopoDS_Edge, Tol: Standard_Real): void; - UpdateVertex_3(V: TopoDS_Vertex, P: Standard_Real, E: TopoDS_Edge, F: TopoDS_Face, Tol: Standard_Real): void; - UpdateVertex_4(V: TopoDS_Vertex, P: Standard_Real, E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, Tol: Standard_Real): void; - UpdateVertex_5(Ve: TopoDS_Vertex, U: Standard_Real, V: Standard_Real, F: TopoDS_Face, Tol: Standard_Real): void; - UpdateVertex_6(V: TopoDS_Vertex, Tol: Standard_Real): void; - Transfert_2(Ein: TopoDS_Edge, Eout: TopoDS_Edge, Vin: TopoDS_Vertex, Vout: TopoDS_Vertex): void; - delete(): void; -} - -export declare class BRep_Tool { - constructor(); - static IsClosed_1(S: TopoDS_Shape): Standard_Boolean; - static Surface_1(F: TopoDS_Face, L: TopLoc_Location): Handle_Geom_Surface; - static Surface_2(F: TopoDS_Face): Handle_Geom_Surface; - static Triangulation(theFace: TopoDS_Face, theLocation: TopLoc_Location, theMeshPurpose: Poly_MeshPurpose): Handle_Poly_Triangulation; - static Triangulations(theFace: TopoDS_Face, theLocation: TopLoc_Location): Poly_ListOfTriangulation; - static Tolerance_1(F: TopoDS_Face): Standard_Real; - static NaturalRestriction(F: TopoDS_Face): Standard_Boolean; - static IsGeometric_1(F: TopoDS_Face): Standard_Boolean; - static IsGeometric_2(E: TopoDS_Edge): Standard_Boolean; - static Curve_1(E: TopoDS_Edge, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real): Handle_Geom_Curve; - static Curve_2(E: TopoDS_Edge, First: Standard_Real, Last: Standard_Real): Handle_Geom_Curve; - static Polygon3D(E: TopoDS_Edge, L: TopLoc_Location): Handle_Poly_Polygon3D; - static CurveOnSurface_1(E: TopoDS_Edge, F: TopoDS_Face, First: Standard_Real, Last: Standard_Real, theIsStored: Standard_Boolean): Handle_Geom2d_Curve; - static CurveOnSurface_2(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real, theIsStored: Standard_Boolean): Handle_Geom2d_Curve; - static CurveOnPlane(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real): Handle_Geom2d_Curve; - static CurveOnSurface_3(E: TopoDS_Edge, C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real): void; - static CurveOnSurface_4(E: TopoDS_Edge, C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real, Index: Graphic3d_ZLayerId): void; - static PolygonOnSurface_1(E: TopoDS_Edge, F: TopoDS_Face): Handle_Poly_Polygon2D; - static PolygonOnSurface_2(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location): Handle_Poly_Polygon2D; - static PolygonOnSurface_3(E: TopoDS_Edge, C: Handle_Poly_Polygon2D, S: Handle_Geom_Surface, L: TopLoc_Location): void; - static PolygonOnSurface_4(E: TopoDS_Edge, C: Handle_Poly_Polygon2D, S: Handle_Geom_Surface, L: TopLoc_Location, Index: Graphic3d_ZLayerId): void; - static PolygonOnTriangulation_1(E: TopoDS_Edge, T: Handle_Poly_Triangulation, L: TopLoc_Location): Handle_Poly_PolygonOnTriangulation; - static PolygonOnTriangulation_2(E: TopoDS_Edge, P: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation, L: TopLoc_Location): void; - static PolygonOnTriangulation_3(E: TopoDS_Edge, P: Handle_Poly_PolygonOnTriangulation, T: Handle_Poly_Triangulation, L: TopLoc_Location, Index: Graphic3d_ZLayerId): void; - static IsClosed_2(E: TopoDS_Edge, F: TopoDS_Face): Standard_Boolean; - static IsClosed_3(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location): Standard_Boolean; - static IsClosed_4(E: TopoDS_Edge, T: Handle_Poly_Triangulation, L: TopLoc_Location): Standard_Boolean; - static Tolerance_2(E: TopoDS_Edge): Standard_Real; - static SameParameter(E: TopoDS_Edge): Standard_Boolean; - static SameRange(E: TopoDS_Edge): Standard_Boolean; - static Degenerated(E: TopoDS_Edge): Standard_Boolean; - static Range_1(E: TopoDS_Edge, First: Standard_Real, Last: Standard_Real): void; - static Range_2(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, First: Standard_Real, Last: Standard_Real): void; - static Range_3(E: TopoDS_Edge, F: TopoDS_Face, First: Standard_Real, Last: Standard_Real): void; - static UVPoints_1(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; - static UVPoints_2(E: TopoDS_Edge, F: TopoDS_Face, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; - static SetUVPoints_1(E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; - static SetUVPoints_2(E: TopoDS_Edge, F: TopoDS_Face, PFirst: gp_Pnt2d, PLast: gp_Pnt2d): void; - static HasContinuity_1(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face): Standard_Boolean; - static Continuity_1(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face): GeomAbs_Shape; - static HasContinuity_2(E: TopoDS_Edge, S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, L1: TopLoc_Location, L2: TopLoc_Location): Standard_Boolean; - static Continuity_2(E: TopoDS_Edge, S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, L1: TopLoc_Location, L2: TopLoc_Location): GeomAbs_Shape; - static HasContinuity_3(E: TopoDS_Edge): Standard_Boolean; - static MaxContinuity(theEdge: TopoDS_Edge): GeomAbs_Shape; - static Pnt(V: TopoDS_Vertex): gp_Pnt; - static Tolerance_3(V: TopoDS_Vertex): Standard_Real; - static Parameter_1(theV: TopoDS_Vertex, theE: TopoDS_Edge, theParam: Standard_Real): Standard_Boolean; - static Parameter_2(V: TopoDS_Vertex, E: TopoDS_Edge): Standard_Real; - static Parameter_3(V: TopoDS_Vertex, E: TopoDS_Edge, F: TopoDS_Face): Standard_Real; - static Parameter_4(V: TopoDS_Vertex, E: TopoDS_Edge, S: Handle_Geom_Surface, L: TopLoc_Location): Standard_Real; - static Parameters(V: TopoDS_Vertex, F: TopoDS_Face): gp_Pnt2d; - static MaxTolerance(theShape: TopoDS_Shape, theSubShape: TopAbs_ShapeEnum): Standard_Real; - delete(): void; -} - -export declare class BRepAdaptor_CompCurve extends Adaptor3d_Curve { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Curve; - Initialize_1(W: TopoDS_Wire, KnotByCurvilinearAbcissa: Standard_Boolean): void; - Initialize_2(W: TopoDS_Wire, KnotByCurvilinearAbcissa: Standard_Boolean, First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): void; - Wire(): TopoDS_Wire; - Edge(U: Standard_Real, E: TopoDS_Edge, UonE: Standard_Real): void; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Trim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Curve; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Value(U: Standard_Real): gp_Pnt; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Resolution(R3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_CurveType; - Line(): gp_Lin; - Circle(): gp_Circ; - Ellipse(): gp_Elips; - Hyperbola(): gp_Hypr; - Parabola(): gp_Parab; - Degree(): Graphic3d_ZLayerId; - IsRational(): Standard_Boolean; - NbPoles(): Graphic3d_ZLayerId; - NbKnots(): Graphic3d_ZLayerId; - Bezier(): Handle_Geom_BezierCurve; - BSpline(): Handle_Geom_BSplineCurve; - delete(): void; -} - - export declare class BRepAdaptor_CompCurve_1 extends BRepAdaptor_CompCurve { - constructor(); - } - - export declare class BRepAdaptor_CompCurve_2 extends BRepAdaptor_CompCurve { - constructor(W: TopoDS_Wire, KnotByCurvilinearAbcissa: Standard_Boolean); - } - - export declare class BRepAdaptor_CompCurve_3 extends BRepAdaptor_CompCurve { - constructor(W: TopoDS_Wire, KnotByCurvilinearAbcissa: Standard_Boolean, First: Standard_Real, Last: Standard_Real, Tol: Standard_Real); - } - -export declare class BRepAdaptor_Curve extends Adaptor3d_Curve { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Curve; - Reset(): void; - Initialize_1(E: TopoDS_Edge): void; - Initialize_2(E: TopoDS_Edge, F: TopoDS_Face): void; - Trsf(): gp_Trsf; - Is3DCurve(): Standard_Boolean; - IsCurveOnSurface(): Standard_Boolean; - Curve(): GeomAdaptor_Curve; - CurveOnSurface(): Adaptor3d_CurveOnSurface; - Edge(): TopoDS_Edge; - Tolerance(): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Trim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Curve; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Value(U: Standard_Real): gp_Pnt; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Resolution(R3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_CurveType; - Line(): gp_Lin; - Circle(): gp_Circ; - Ellipse(): gp_Elips; - Hyperbola(): gp_Hypr; - Parabola(): gp_Parab; - Degree(): Graphic3d_ZLayerId; - IsRational(): Standard_Boolean; - NbPoles(): Graphic3d_ZLayerId; - NbKnots(): Graphic3d_ZLayerId; - Bezier(): Handle_Geom_BezierCurve; - BSpline(): Handle_Geom_BSplineCurve; - OffsetCurve(): Handle_Geom_OffsetCurve; - delete(): void; -} - - export declare class BRepAdaptor_Curve_1 extends BRepAdaptor_Curve { - constructor(); - } - - export declare class BRepAdaptor_Curve_2 extends BRepAdaptor_Curve { - constructor(E: TopoDS_Edge); - } - - export declare class BRepAdaptor_Curve_3 extends BRepAdaptor_Curve { - constructor(E: TopoDS_Edge, F: TopoDS_Face); - } - -export declare class BRepAdaptor_Surface extends Adaptor3d_Surface { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Surface; - Initialize(F: TopoDS_Face, Restriction: Standard_Boolean): void; - Surface(): GeomAdaptor_Surface; - ChangeSurface(): GeomAdaptor_Surface; - Trsf(): gp_Trsf; - Face(): TopoDS_Face; - Tolerance(): Standard_Real; - FirstUParameter(): Standard_Real; - LastUParameter(): Standard_Real; - FirstVParameter(): Standard_Real; - LastVParameter(): Standard_Real; - UContinuity(): GeomAbs_Shape; - VContinuity(): GeomAbs_Shape; - NbUIntervals(theSh: GeomAbs_Shape): Graphic3d_ZLayerId; - NbVIntervals(theSh: GeomAbs_Shape): Graphic3d_ZLayerId; - UIntervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - VIntervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - UTrim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Surface; - VTrim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Surface; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - Value(U: Standard_Real, V: Standard_Real): gp_Pnt; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - UResolution(theR3d: Standard_Real): Standard_Real; - VResolution(theR3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_SurfaceType; - Plane(): gp_Pln; - Cylinder(): gp_Cylinder; - Cone(): gp_Cone; - Sphere(): gp_Sphere; - Torus(): gp_Torus; - UDegree(): Graphic3d_ZLayerId; - NbUPoles(): Graphic3d_ZLayerId; - VDegree(): Graphic3d_ZLayerId; - NbVPoles(): Graphic3d_ZLayerId; - NbUKnots(): Graphic3d_ZLayerId; - NbVKnots(): Graphic3d_ZLayerId; - IsURational(): Standard_Boolean; - IsVRational(): Standard_Boolean; - Bezier(): Handle_Geom_BezierSurface; - BSpline(): Handle_Geom_BSplineSurface; - AxeOfRevolution(): gp_Ax1; - Direction(): gp_Dir; - BasisCurve(): Handle_Adaptor3d_Curve; - BasisSurface(): Handle_Adaptor3d_Surface; - OffsetValue(): Standard_Real; - delete(): void; -} - - export declare class BRepAdaptor_Surface_1 extends BRepAdaptor_Surface { - constructor(); - } - - export declare class BRepAdaptor_Surface_2 extends BRepAdaptor_Surface { - constructor(F: TopoDS_Face, R: Standard_Boolean); - } - -export declare class BRepAlgoAPI_Algo extends BRepBuilderAPI_MakeShape { - Shape(): TopoDS_Shape; - Clear(): void; - SetRunParallel(theFlag: Standard_Boolean): void; - RunParallel(): Standard_Boolean; - SetFuzzyValue(theFuzz: Standard_Real): void; - FuzzyValue(): Standard_Real; - HasErrors(): Standard_Boolean; - HasWarnings(): Standard_Boolean; - HasError(theType: Handle_Standard_Type): Standard_Boolean; - HasWarning(theType: Handle_Standard_Type): Standard_Boolean; - DumpErrors(theOS: Standard_OStream): void; - DumpWarnings(theOS: Standard_OStream): void; - ClearWarnings(): void; - GetReport(): Handle_Message_Report; - SetUseOBB(theUseOBB: Standard_Boolean): void; - delete(): void; -} - -export declare class BRepAlgoAPI_BooleanOperation extends BRepAlgoAPI_BuilderAlgo { - Shape1(): TopoDS_Shape; - Shape2(): TopoDS_Shape; - SetTools(theLS: TopTools_ListOfShape): void; - Tools(): TopTools_ListOfShape; - SetOperation(theBOP: BOPAlgo_Operation): void; - Operation(): BOPAlgo_Operation; - Build(theRange: Message_ProgressRange): void; - delete(): void; -} - - export declare class BRepAlgoAPI_BooleanOperation_1 extends BRepAlgoAPI_BooleanOperation { - constructor(); - } - - export declare class BRepAlgoAPI_BooleanOperation_2 extends BRepAlgoAPI_BooleanOperation { - constructor(thePF: BOPAlgo_PaveFiller); - } - -export declare class BRepAlgoAPI_BuilderAlgo extends BRepAlgoAPI_Algo { - SetArguments(theLS: TopTools_ListOfShape): void; - Arguments(): TopTools_ListOfShape; - SetNonDestructive(theFlag: Standard_Boolean): void; - NonDestructive(): Standard_Boolean; - SetGlue(theGlue: BOPAlgo_GlueEnum): void; - Glue(): BOPAlgo_GlueEnum; - SetCheckInverted(theCheck: Standard_Boolean): void; - CheckInverted(): Standard_Boolean; - Build(theRange: Message_ProgressRange): void; - SimplifyResult(theUnifyEdges: Standard_Boolean, theUnifyFaces: Standard_Boolean, theAngularTol: Standard_Real): void; - Modified(theS: TopoDS_Shape): TopTools_ListOfShape; - Generated(theS: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(aS: TopoDS_Shape): Standard_Boolean; - HasModified(): Standard_Boolean; - HasGenerated(): Standard_Boolean; - HasDeleted(): Standard_Boolean; - SetToFillHistory(theHistFlag: Standard_Boolean): void; - HasHistory(): Standard_Boolean; - SectionEdges(): TopTools_ListOfShape; - DSFiller(): BOPAlgo_PPaveFiller; - Builder(): BOPAlgo_PBuilder; - History(): Handle_BRepTools_History; - delete(): void; -} - - export declare class BRepAlgoAPI_BuilderAlgo_1 extends BRepAlgoAPI_BuilderAlgo { - constructor(); - } - - export declare class BRepAlgoAPI_BuilderAlgo_2 extends BRepAlgoAPI_BuilderAlgo { - constructor(thePF: BOPAlgo_PaveFiller); - } - -export declare class BRepAlgoAPI_Common extends BRepAlgoAPI_BooleanOperation { - delete(): void; -} - - export declare class BRepAlgoAPI_Common_1 extends BRepAlgoAPI_Common { - constructor(); - } - - export declare class BRepAlgoAPI_Common_2 extends BRepAlgoAPI_Common { - constructor(PF: BOPAlgo_PaveFiller); - } - - export declare class BRepAlgoAPI_Common_3 extends BRepAlgoAPI_Common { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange: Message_ProgressRange); - } - - export declare class BRepAlgoAPI_Common_4 extends BRepAlgoAPI_Common { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, PF: BOPAlgo_PaveFiller, theRange: Message_ProgressRange); - } - -export declare class BRepAlgoAPI_Cut extends BRepAlgoAPI_BooleanOperation { - delete(): void; -} - - export declare class BRepAlgoAPI_Cut_1 extends BRepAlgoAPI_Cut { - constructor(); - } - - export declare class BRepAlgoAPI_Cut_2 extends BRepAlgoAPI_Cut { - constructor(PF: BOPAlgo_PaveFiller); - } - - export declare class BRepAlgoAPI_Cut_3 extends BRepAlgoAPI_Cut { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange: Message_ProgressRange); - } - - export declare class BRepAlgoAPI_Cut_4 extends BRepAlgoAPI_Cut { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, aDSF: BOPAlgo_PaveFiller, bFWD: Standard_Boolean, theRange: Message_ProgressRange); - } - -export declare class BRepAlgoAPI_Fuse extends BRepAlgoAPI_BooleanOperation { - delete(): void; -} - - export declare class BRepAlgoAPI_Fuse_1 extends BRepAlgoAPI_Fuse { - constructor(); - } - - export declare class BRepAlgoAPI_Fuse_2 extends BRepAlgoAPI_Fuse { - constructor(PF: BOPAlgo_PaveFiller); - } - - export declare class BRepAlgoAPI_Fuse_3 extends BRepAlgoAPI_Fuse { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, theRange: Message_ProgressRange); - } - - export declare class BRepAlgoAPI_Fuse_4 extends BRepAlgoAPI_Fuse { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, aDSF: BOPAlgo_PaveFiller, theRange: Message_ProgressRange); - } - -export declare class BRepAlgoAPI_Section extends BRepAlgoAPI_BooleanOperation { - Init1_1(S1: TopoDS_Shape): void; - Init1_2(Pl: gp_Pln): void; - Init1_3(Sf: Handle_Geom_Surface): void; - Init2_1(S2: TopoDS_Shape): void; - Init2_2(Pl: gp_Pln): void; - Init2_3(Sf: Handle_Geom_Surface): void; - Approximation(B: Standard_Boolean): void; - ComputePCurveOn1(B: Standard_Boolean): void; - ComputePCurveOn2(B: Standard_Boolean): void; - Build(theRange: Message_ProgressRange): void; - HasAncestorFaceOn1(E: TopoDS_Shape, F: TopoDS_Shape): Standard_Boolean; - HasAncestorFaceOn2(E: TopoDS_Shape, F: TopoDS_Shape): Standard_Boolean; - delete(): void; -} - - export declare class BRepAlgoAPI_Section_1 extends BRepAlgoAPI_Section { - constructor(); - } - - export declare class BRepAlgoAPI_Section_2 extends BRepAlgoAPI_Section { - constructor(PF: BOPAlgo_PaveFiller); - } - - export declare class BRepAlgoAPI_Section_3 extends BRepAlgoAPI_Section { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, PerformNow: Standard_Boolean); - } - - export declare class BRepAlgoAPI_Section_4 extends BRepAlgoAPI_Section { - constructor(S1: TopoDS_Shape, S2: TopoDS_Shape, aDSF: BOPAlgo_PaveFiller, PerformNow: Standard_Boolean); - } - - export declare class BRepAlgoAPI_Section_5 extends BRepAlgoAPI_Section { - constructor(S1: TopoDS_Shape, Pl: gp_Pln, PerformNow: Standard_Boolean); - } - - export declare class BRepAlgoAPI_Section_6 extends BRepAlgoAPI_Section { - constructor(S1: TopoDS_Shape, Sf: Handle_Geom_Surface, PerformNow: Standard_Boolean); - } - - export declare class BRepAlgoAPI_Section_7 extends BRepAlgoAPI_Section { - constructor(Sf: Handle_Geom_Surface, S2: TopoDS_Shape, PerformNow: Standard_Boolean); - } - - export declare class BRepAlgoAPI_Section_8 extends BRepAlgoAPI_Section { - constructor(Sf1: Handle_Geom_Surface, Sf2: Handle_Geom_Surface, PerformNow: Standard_Boolean); - } - -export declare class BRepBndLib { - constructor(); - static Add(S: TopoDS_Shape, B: Bnd_Box, useTriangulation: Standard_Boolean): void; - static AddClose(S: TopoDS_Shape, B: Bnd_Box): void; - static AddOptimal(S: TopoDS_Shape, B: Bnd_Box, useTriangulation: Standard_Boolean, useShapeTolerance: Standard_Boolean): void; - static AddOBB(theS: TopoDS_Shape, theOBB: Bnd_OBB, theIsTriangulationUsed: Standard_Boolean, theIsOptimal: Standard_Boolean, theIsShapeToleranceUsed: Standard_Boolean): void; - delete(): void; -} - -export declare class BRepBuilderAPI_Command { - IsDone(): Standard_Boolean; - Check(): void; - delete(): void; -} - -export declare class BRepBuilderAPI_MakeEdge extends BRepBuilderAPI_MakeShape { - Init_1(C: Handle_Geom_Curve): void; - Init_2(C: Handle_Geom_Curve, p1: Standard_Real, p2: Standard_Real): void; - Init_3(C: Handle_Geom_Curve, P1: gp_Pnt, P2: gp_Pnt): void; - Init_4(C: Handle_Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): void; - Init_5(C: Handle_Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: Standard_Real, p2: Standard_Real): void; - Init_6(C: Handle_Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: Standard_Real, p2: Standard_Real): void; - Init_7(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface): void; - Init_8(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, p1: Standard_Real, p2: Standard_Real): void; - Init_9(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, P1: gp_Pnt, P2: gp_Pnt): void; - Init_10(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex): void; - Init_11(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: Standard_Real, p2: Standard_Real): void; - Init_12(C: Handle_Geom2d_Curve, S: Handle_Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: Standard_Real, p2: Standard_Real): void; - IsDone(): Standard_Boolean; - Error(): BRepBuilderAPI_EdgeError; - Edge(): TopoDS_Edge; - Vertex1(): TopoDS_Vertex; - Vertex2(): TopoDS_Vertex; - delete(): void; -} - - export declare class BRepBuilderAPI_MakeEdge_1 extends BRepBuilderAPI_MakeEdge { - constructor(); - } - - export declare class BRepBuilderAPI_MakeEdge_2 extends BRepBuilderAPI_MakeEdge { - constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_3 extends BRepBuilderAPI_MakeEdge { - constructor(P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_4 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Lin); - } - - export declare class BRepBuilderAPI_MakeEdge_5 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Lin, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_6 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Lin, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_7 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Lin, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_8 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Circ); - } - - export declare class BRepBuilderAPI_MakeEdge_9 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Circ, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_10 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Circ, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_11 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Circ, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_12 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Elips); - } - - export declare class BRepBuilderAPI_MakeEdge_13 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Elips, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_14 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Elips, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_15 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Elips, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_16 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Hypr); - } - - export declare class BRepBuilderAPI_MakeEdge_17 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Hypr, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_18 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Hypr, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_19 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Hypr, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_20 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Parab); - } - - export declare class BRepBuilderAPI_MakeEdge_21 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Parab, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_22 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Parab, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_23 extends BRepBuilderAPI_MakeEdge { - constructor(L: gp_Parab, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_24 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve); - } - - export declare class BRepBuilderAPI_MakeEdge_25 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_26 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_27 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_28 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_29 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_30 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface); - } - - export declare class BRepBuilderAPI_MakeEdge_31 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_32 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface, P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakeEdge_33 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakeEdge_34 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: Standard_Real, p2: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeEdge_35 extends BRepBuilderAPI_MakeEdge { - constructor(L: Handle_Geom2d_Curve, S: Handle_Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: Standard_Real, p2: Standard_Real); - } - -export declare class BRepBuilderAPI_MakeFace extends BRepBuilderAPI_MakeShape { - Init_1(F: TopoDS_Face): void; - Init_2(S: Handle_Geom_Surface, Bound: Standard_Boolean, TolDegen: Standard_Real): void; - Init_3(S: Handle_Geom_Surface, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real, TolDegen: Standard_Real): void; - Add(W: TopoDS_Wire): void; - IsDone(): Standard_Boolean; - Error(): BRepBuilderAPI_FaceError; - Face(): TopoDS_Face; - delete(): void; -} - - export declare class BRepBuilderAPI_MakeFace_1 extends BRepBuilderAPI_MakeFace { - constructor(); - } - - export declare class BRepBuilderAPI_MakeFace_2 extends BRepBuilderAPI_MakeFace { - constructor(F: TopoDS_Face); - } - - export declare class BRepBuilderAPI_MakeFace_3 extends BRepBuilderAPI_MakeFace { - constructor(P: gp_Pln); - } - - export declare class BRepBuilderAPI_MakeFace_4 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cylinder); - } - - export declare class BRepBuilderAPI_MakeFace_5 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cone); - } - - export declare class BRepBuilderAPI_MakeFace_6 extends BRepBuilderAPI_MakeFace { - constructor(S: gp_Sphere); - } - - export declare class BRepBuilderAPI_MakeFace_7 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Torus); - } - - export declare class BRepBuilderAPI_MakeFace_8 extends BRepBuilderAPI_MakeFace { - constructor(S: Handle_Geom_Surface, TolDegen: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_9 extends BRepBuilderAPI_MakeFace { - constructor(P: gp_Pln, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_10 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cylinder, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_11 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cone, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_12 extends BRepBuilderAPI_MakeFace { - constructor(S: gp_Sphere, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_13 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Torus, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_14 extends BRepBuilderAPI_MakeFace { - constructor(S: Handle_Geom_Surface, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real, TolDegen: Standard_Real); - } - - export declare class BRepBuilderAPI_MakeFace_15 extends BRepBuilderAPI_MakeFace { - constructor(W: TopoDS_Wire, OnlyPlane: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_16 extends BRepBuilderAPI_MakeFace { - constructor(P: gp_Pln, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_17 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cylinder, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_18 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Cone, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_19 extends BRepBuilderAPI_MakeFace { - constructor(S: gp_Sphere, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_20 extends BRepBuilderAPI_MakeFace { - constructor(C: gp_Torus, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_21 extends BRepBuilderAPI_MakeFace { - constructor(S: Handle_Geom_Surface, W: TopoDS_Wire, Inside: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakeFace_22 extends BRepBuilderAPI_MakeFace { - constructor(F: TopoDS_Face, W: TopoDS_Wire); - } - -export declare class BRepBuilderAPI_MakePolygon extends BRepBuilderAPI_MakeShape { - Add_1(P: gp_Pnt): void; - Add_2(V: TopoDS_Vertex): void; - Added(): Standard_Boolean; - Close(): void; - FirstVertex(): TopoDS_Vertex; - LastVertex(): TopoDS_Vertex; - IsDone(): Standard_Boolean; - Edge(): TopoDS_Edge; - Wire(): TopoDS_Wire; - delete(): void; -} - - export declare class BRepBuilderAPI_MakePolygon_1 extends BRepBuilderAPI_MakePolygon { - constructor(); - } - - export declare class BRepBuilderAPI_MakePolygon_2 extends BRepBuilderAPI_MakePolygon { - constructor(P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepBuilderAPI_MakePolygon_3 extends BRepBuilderAPI_MakePolygon { - constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, Close: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakePolygon_4 extends BRepBuilderAPI_MakePolygon { - constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, P4: gp_Pnt, Close: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakePolygon_5 extends BRepBuilderAPI_MakePolygon { - constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex); - } - - export declare class BRepBuilderAPI_MakePolygon_6 extends BRepBuilderAPI_MakePolygon { - constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex, V3: TopoDS_Vertex, Close: Standard_Boolean); - } - - export declare class BRepBuilderAPI_MakePolygon_7 extends BRepBuilderAPI_MakePolygon { - constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex, V3: TopoDS_Vertex, V4: TopoDS_Vertex, Close: Standard_Boolean); - } - -export declare class BRepBuilderAPI_MakeShape extends BRepBuilderAPI_Command { - Build(theRange: Message_ProgressRange): void; - Shape(): TopoDS_Shape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - delete(): void; -} - -export declare class BRepBuilderAPI_MakeSolid extends BRepBuilderAPI_MakeShape { - Add(S: TopoDS_Shell): void; - IsDone(): Standard_Boolean; - Solid(): TopoDS_Solid; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - delete(): void; -} - - export declare class BRepBuilderAPI_MakeSolid_1 extends BRepBuilderAPI_MakeSolid { - constructor(); - } - - export declare class BRepBuilderAPI_MakeSolid_2 extends BRepBuilderAPI_MakeSolid { - constructor(S: TopoDS_CompSolid); - } - - export declare class BRepBuilderAPI_MakeSolid_3 extends BRepBuilderAPI_MakeSolid { - constructor(S: TopoDS_Shell); - } - - export declare class BRepBuilderAPI_MakeSolid_4 extends BRepBuilderAPI_MakeSolid { - constructor(S1: TopoDS_Shell, S2: TopoDS_Shell); - } - - export declare class BRepBuilderAPI_MakeSolid_5 extends BRepBuilderAPI_MakeSolid { - constructor(S1: TopoDS_Shell, S2: TopoDS_Shell, S3: TopoDS_Shell); - } - - export declare class BRepBuilderAPI_MakeSolid_6 extends BRepBuilderAPI_MakeSolid { - constructor(So: TopoDS_Solid); - } - - export declare class BRepBuilderAPI_MakeSolid_7 extends BRepBuilderAPI_MakeSolid { - constructor(So: TopoDS_Solid, S: TopoDS_Shell); - } - -export declare class BRepBuilderAPI_MakeVertex extends BRepBuilderAPI_MakeShape { - constructor(P: gp_Pnt) - Vertex(): TopoDS_Vertex; - delete(): void; -} - -export declare class BRepBuilderAPI_MakeWire extends BRepBuilderAPI_MakeShape { - Add_1(E: TopoDS_Edge): void; - Add_2(W: TopoDS_Wire): void; - Add_3(L: TopTools_ListOfShape): void; - IsDone(): Standard_Boolean; - Error(): BRepBuilderAPI_WireError; - Wire(): TopoDS_Wire; - Edge(): TopoDS_Edge; - Vertex(): TopoDS_Vertex; - delete(): void; -} - - export declare class BRepBuilderAPI_MakeWire_1 extends BRepBuilderAPI_MakeWire { - constructor(); - } - - export declare class BRepBuilderAPI_MakeWire_2 extends BRepBuilderAPI_MakeWire { - constructor(E: TopoDS_Edge); - } - - export declare class BRepBuilderAPI_MakeWire_3 extends BRepBuilderAPI_MakeWire { - constructor(E1: TopoDS_Edge, E2: TopoDS_Edge); - } - - export declare class BRepBuilderAPI_MakeWire_4 extends BRepBuilderAPI_MakeWire { - constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge); - } - - export declare class BRepBuilderAPI_MakeWire_5 extends BRepBuilderAPI_MakeWire { - constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge, E4: TopoDS_Edge); - } - - export declare class BRepBuilderAPI_MakeWire_6 extends BRepBuilderAPI_MakeWire { - constructor(W: TopoDS_Wire); - } - - export declare class BRepBuilderAPI_MakeWire_7 extends BRepBuilderAPI_MakeWire { - constructor(W: TopoDS_Wire, E: TopoDS_Edge); - } - -export declare class BRepBuilderAPI_ModifyShape extends BRepBuilderAPI_MakeShape { - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; - delete(): void; -} - -export declare class BRepBuilderAPI_Sewing extends Standard_Transient { - constructor(tolerance: Standard_Real, option1: Standard_Boolean, option2: Standard_Boolean, option3: Standard_Boolean, option4: Standard_Boolean) - Init(tolerance: Standard_Real, option1: Standard_Boolean, option2: Standard_Boolean, option3: Standard_Boolean, option4: Standard_Boolean): void; - Load(shape: TopoDS_Shape): void; - Add(shape: TopoDS_Shape): void; - Perform(theProgress: Message_ProgressRange): void; - SewedShape(): TopoDS_Shape; - SetContext(theContext: Handle_BRepTools_ReShape): void; - GetContext(): Handle_BRepTools_ReShape; - NbFreeEdges(): Graphic3d_ZLayerId; - FreeEdge(index: Graphic3d_ZLayerId): TopoDS_Edge; - NbMultipleEdges(): Graphic3d_ZLayerId; - MultipleEdge(index: Graphic3d_ZLayerId): TopoDS_Edge; - NbContigousEdges(): Graphic3d_ZLayerId; - ContigousEdge(index: Graphic3d_ZLayerId): TopoDS_Edge; - ContigousEdgeCouple(index: Graphic3d_ZLayerId): TopTools_ListOfShape; - IsSectionBound(section: TopoDS_Edge): Standard_Boolean; - SectionToBoundary(section: TopoDS_Edge): TopoDS_Edge; - NbDegeneratedShapes(): Graphic3d_ZLayerId; - DegeneratedShape(index: Graphic3d_ZLayerId): TopoDS_Shape; - IsDegenerated(shape: TopoDS_Shape): Standard_Boolean; - IsModified(shape: TopoDS_Shape): Standard_Boolean; - Modified(shape: TopoDS_Shape): TopoDS_Shape; - IsModifiedSubShape(shape: TopoDS_Shape): Standard_Boolean; - ModifiedSubShape(shape: TopoDS_Shape): TopoDS_Shape; - Dump(): void; - NbDeletedFaces(): Graphic3d_ZLayerId; - DeletedFace(index: Graphic3d_ZLayerId): TopoDS_Face; - WhichFace(theEdg: TopoDS_Edge, index: Graphic3d_ZLayerId): TopoDS_Face; - SameParameterMode(): Standard_Boolean; - SetSameParameterMode(SameParameterMode: Standard_Boolean): void; - Tolerance(): Standard_Real; - SetTolerance(theToler: Standard_Real): void; - MinTolerance(): Standard_Real; - SetMinTolerance(theMinToler: Standard_Real): void; - MaxTolerance(): Standard_Real; - SetMaxTolerance(theMaxToler: Standard_Real): void; - FaceMode(): Standard_Boolean; - SetFaceMode(theFaceMode: Standard_Boolean): void; - FloatingEdgesMode(): Standard_Boolean; - SetFloatingEdgesMode(theFloatingEdgesMode: Standard_Boolean): void; - LocalTolerancesMode(): Standard_Boolean; - SetLocalTolerancesMode(theLocalTolerancesMode: Standard_Boolean): void; - SetNonManifoldMode(theNonManifoldMode: Standard_Boolean): void; - NonManifoldMode(): Standard_Boolean; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class BRepBuilderAPI_Transform extends BRepBuilderAPI_ModifyShape { - Perform(S: TopoDS_Shape, Copy: Standard_Boolean): void; - ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepBuilderAPI_Transform_1 extends BRepBuilderAPI_Transform { - constructor(T: gp_Trsf); - } - - export declare class BRepBuilderAPI_Transform_2 extends BRepBuilderAPI_Transform { - constructor(S: TopoDS_Shape, T: gp_Trsf, Copy: Standard_Boolean); - } - -export declare type BRepBuilderAPI_TransitionMode = { - BRepBuilderAPI_Transformed: {}; - BRepBuilderAPI_RightCorner: {}; - BRepBuilderAPI_RoundCorner: {}; -} - -export declare type BRepBuilderAPI_WireError = { - BRepBuilderAPI_WireDone: {}; - BRepBuilderAPI_EmptyWire: {}; - BRepBuilderAPI_DisconnectedWire: {}; - BRepBuilderAPI_NonManifoldWire: {}; -} - -export declare class BRepCheck_Analyzer { - constructor(S: TopoDS_Shape, GeomControls: Standard_Boolean, theIsParallel: Standard_Boolean) - Init(S: TopoDS_Shape, GeomControls: Standard_Boolean, theIsParallel: Standard_Boolean): void; - IsValid_1(S: TopoDS_Shape): Standard_Boolean; - IsValid_2(): Standard_Boolean; - Result(theSubS: TopoDS_Shape): Handle_BRepCheck_Result; - delete(): void; -} - -export declare class BRepExtrema_DistShapeShape { - SetDeflection(theDeflection: Standard_Real): void; - LoadS1(Shape1: TopoDS_Shape): void; - LoadS2(Shape1: TopoDS_Shape): void; - Perform(theRange: Message_ProgressRange): Standard_Boolean; - IsDone(): Standard_Boolean; - NbSolution(): Graphic3d_ZLayerId; - Value(): Standard_Real; - InnerSolution(): Standard_Boolean; - PointOnShape1(N: Graphic3d_ZLayerId): gp_Pnt; - PointOnShape2(N: Graphic3d_ZLayerId): gp_Pnt; - SupportTypeShape1(N: Graphic3d_ZLayerId): BRepExtrema_SupportType; - SupportTypeShape2(N: Graphic3d_ZLayerId): BRepExtrema_SupportType; - SupportOnShape1(N: Graphic3d_ZLayerId): TopoDS_Shape; - SupportOnShape2(N: Graphic3d_ZLayerId): TopoDS_Shape; - ParOnEdgeS1(N: Graphic3d_ZLayerId, t: Standard_Real): void; - ParOnEdgeS2(N: Graphic3d_ZLayerId, t: Standard_Real): void; - ParOnFaceS1(N: Graphic3d_ZLayerId, u: Standard_Real, v: Standard_Real): void; - ParOnFaceS2(N: Graphic3d_ZLayerId, u: Standard_Real, v: Standard_Real): void; - Dump(o: Standard_OStream): void; - SetFlag(F: Extrema_ExtFlag): void; - SetAlgo(A: Extrema_ExtAlgo): void; - SetMultiThread(theIsMultiThread: Standard_Boolean): void; - IsMultiThread(): Standard_Boolean; - delete(): void; -} - - export declare class BRepExtrema_DistShapeShape_1 extends BRepExtrema_DistShapeShape { - constructor(); - } - - export declare class BRepExtrema_DistShapeShape_2 extends BRepExtrema_DistShapeShape { - constructor(Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, F: Extrema_ExtFlag, A: Extrema_ExtAlgo, theRange: Message_ProgressRange); - } - - export declare class BRepExtrema_DistShapeShape_3 extends BRepExtrema_DistShapeShape { - constructor(Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, theDeflection: Standard_Real, F: Extrema_ExtFlag, A: Extrema_ExtAlgo, theRange: Message_ProgressRange); - } - -export declare class BRepExtrema_ExtCC { - Initialize(E2: TopoDS_Edge): void; - Perform(E1: TopoDS_Edge): void; - IsDone(): Standard_Boolean; - NbExt(): Graphic3d_ZLayerId; - IsParallel(): Standard_Boolean; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - ParameterOnE1(N: Graphic3d_ZLayerId): Standard_Real; - PointOnE1(N: Graphic3d_ZLayerId): gp_Pnt; - ParameterOnE2(N: Graphic3d_ZLayerId): Standard_Real; - PointOnE2(N: Graphic3d_ZLayerId): gp_Pnt; - TrimmedSquareDistances(dist11: Standard_Real, distP12: Standard_Real, distP21: Standard_Real, distP22: Standard_Real, P11: gp_Pnt, P12: gp_Pnt, P21: gp_Pnt, P22: gp_Pnt): void; - delete(): void; -} - - export declare class BRepExtrema_ExtCC_1 extends BRepExtrema_ExtCC { - constructor(); - } - - export declare class BRepExtrema_ExtCC_2 extends BRepExtrema_ExtCC { - constructor(E1: TopoDS_Edge, E2: TopoDS_Edge); - } - -export declare class BRepFeat_Form extends BRepBuilderAPI_MakeShape { - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - FirstShape(): TopTools_ListOfShape; - LastShape(): TopTools_ListOfShape; - NewEdges(): TopTools_ListOfShape; - TgtEdges(): TopTools_ListOfShape; - BasisShapeValid(): void; - GeneratedShapeValid(): void; - ShapeFromValid(): void; - ShapeUntilValid(): void; - GluedFacesValid(): void; - SketchFaceValid(): void; - PerfSelectionValid(): void; - Curves(S: TColGeom_SequenceOfCurve): void; - BarycCurve(): Handle_Geom_Curve; - CurrentStatusError(): BRepFeat_StatusError; - delete(): void; -} - -export declare class BRepFeat_Gluer extends BRepBuilderAPI_MakeShape { - Init(Snew: TopoDS_Shape, Sbase: TopoDS_Shape): void; - Bind_1(Fnew: TopoDS_Face, Fbase: TopoDS_Face): void; - Bind_2(Enew: TopoDS_Edge, Ebase: TopoDS_Edge): void; - OpeType(): LocOpe_Operation; - BasisShape(): TopoDS_Shape; - GluedShape(): TopoDS_Shape; - Build(theRange: Message_ProgressRange): void; - IsDeleted(F: TopoDS_Shape): Standard_Boolean; - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepFeat_Gluer_1 extends BRepFeat_Gluer { - constructor(); - } - - export declare class BRepFeat_Gluer_2 extends BRepFeat_Gluer { - constructor(Snew: TopoDS_Shape, Sbase: TopoDS_Shape); - } - -export declare class BRepFeat_MakeDPrism extends BRepFeat_Form { - Init(Sbase: TopoDS_Shape, Pbase: TopoDS_Face, Skface: TopoDS_Face, Angle: Standard_Real, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean): void; - Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; - Perform_1(Height: Standard_Real): void; - Perform_2(Until: TopoDS_Shape): void; - Perform_3(From: TopoDS_Shape, Until: TopoDS_Shape): void; - PerformUntilEnd(): void; - PerformFromEnd(FUntil: TopoDS_Shape): void; - PerformThruAll(): void; - PerformUntilHeight(Until: TopoDS_Shape, Height: Standard_Real): void; - Curves(S: TColGeom_SequenceOfCurve): void; - BarycCurve(): Handle_Geom_Curve; - BossEdges(sig: Graphic3d_ZLayerId): void; - TopEdges(): TopTools_ListOfShape; - LatEdges(): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepFeat_MakeDPrism_1 extends BRepFeat_MakeDPrism { - constructor(Sbase: TopoDS_Shape, Pbase: TopoDS_Face, Skface: TopoDS_Face, Angle: Standard_Real, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean); - } - - export declare class BRepFeat_MakeDPrism_2 extends BRepFeat_MakeDPrism { - constructor(); - } - -export declare class BRepFeat_MakePipe extends BRepFeat_Form { - Init(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Spine: TopoDS_Wire, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean): void; - Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; - Perform_1(): void; - Perform_2(Until: TopoDS_Shape): void; - Perform_3(From: TopoDS_Shape, Until: TopoDS_Shape): void; - Curves(S: TColGeom_SequenceOfCurve): void; - BarycCurve(): Handle_Geom_Curve; - delete(): void; -} - - export declare class BRepFeat_MakePipe_1 extends BRepFeat_MakePipe { - constructor(); - } - - export declare class BRepFeat_MakePipe_2 extends BRepFeat_MakePipe { - constructor(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Spine: TopoDS_Wire, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean); - } - -export declare class BRepFeat_MakePrism extends BRepFeat_Form { - Init(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Direction: gp_Dir, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean): void; - Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; - Perform_1(Length: Standard_Real): void; - Perform_2(Until: TopoDS_Shape): void; - Perform_3(From: TopoDS_Shape, Until: TopoDS_Shape): void; - PerformUntilEnd(): void; - PerformFromEnd(FUntil: TopoDS_Shape): void; - PerformThruAll(): void; - PerformUntilHeight(Until: TopoDS_Shape, Length: Standard_Real): void; - Curves(S: TColGeom_SequenceOfCurve): void; - BarycCurve(): Handle_Geom_Curve; - delete(): void; -} - - export declare class BRepFeat_MakePrism_1 extends BRepFeat_MakePrism { - constructor(); - } - - export declare class BRepFeat_MakePrism_2 extends BRepFeat_MakePrism { - constructor(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Direction: gp_Dir, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean); - } - -export declare class BRepFeat_MakeRevol extends BRepFeat_Form { - Init(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Axis: gp_Ax1, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean): void; - Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; - Perform_1(Angle: Standard_Real): void; - Perform_2(Until: TopoDS_Shape): void; - Perform_3(From: TopoDS_Shape, Until: TopoDS_Shape): void; - PerformThruAll(): void; - PerformUntilAngle(Until: TopoDS_Shape, Angle: Standard_Real): void; - Curves(S: TColGeom_SequenceOfCurve): void; - BarycCurve(): Handle_Geom_Curve; - delete(): void; -} - - export declare class BRepFeat_MakeRevol_1 extends BRepFeat_MakeRevol { - constructor(); - } - - export declare class BRepFeat_MakeRevol_2 extends BRepFeat_MakeRevol { - constructor(Sbase: TopoDS_Shape, Pbase: TopoDS_Shape, Skface: TopoDS_Face, Axis: gp_Ax1, Fuse: Graphic3d_ZLayerId, Modify: Standard_Boolean); - } - -export declare class BRepFeat_MakeRevolutionForm extends BRepFeat_RibSlot { - Init(Sbase: TopoDS_Shape, W: TopoDS_Wire, Plane: Handle_Geom_Plane, Axis: gp_Ax1, Height1: Standard_Real, Height2: Standard_Real, Fuse: Graphic3d_ZLayerId, Sliding: Standard_Boolean): void; - Add(E: TopoDS_Edge, OnFace: TopoDS_Face): void; - Perform(): void; - Propagate(L: TopTools_ListOfShape, F: TopoDS_Face, FPoint: gp_Pnt, LPoint: gp_Pnt, falseside: Standard_Boolean): Standard_Boolean; - delete(): void; -} - - export declare class BRepFeat_MakeRevolutionForm_1 extends BRepFeat_MakeRevolutionForm { - constructor(); - } - - export declare class BRepFeat_MakeRevolutionForm_2 extends BRepFeat_MakeRevolutionForm { - constructor(Sbase: TopoDS_Shape, W: TopoDS_Wire, Plane: Handle_Geom_Plane, Axis: gp_Ax1, Height1: Standard_Real, Height2: Standard_Real, Fuse: Graphic3d_ZLayerId, Sliding: Standard_Boolean); - } - -export declare class BRepFeat_RibSlot extends BRepBuilderAPI_MakeShape { - IsDeleted(F: TopoDS_Shape): Standard_Boolean; - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - FirstShape(): TopTools_ListOfShape; - LastShape(): TopTools_ListOfShape; - FacesForDraft(): TopTools_ListOfShape; - NewEdges(): TopTools_ListOfShape; - TgtEdges(): TopTools_ListOfShape; - static IntPar(C: Handle_Geom_Curve, P: gp_Pnt): Standard_Real; - static ChoiceOfFaces(faces: TopTools_ListOfShape, cc: Handle_Geom_Curve, par: Standard_Real, bnd: Standard_Real, Pln: Handle_Geom_Plane): TopoDS_Face; - CurrentStatusError(): BRepFeat_StatusError; - delete(): void; -} - -export declare class BRepFeat_SplitShape extends BRepBuilderAPI_MakeShape { - Add_1(theEdges: TopTools_SequenceOfShape): Standard_Boolean; - Init(S: TopoDS_Shape): void; - SetCheckInterior(ToCheckInterior: Standard_Boolean): void; - Add_2(W: TopoDS_Wire, F: TopoDS_Face): void; - Add_3(E: TopoDS_Edge, F: TopoDS_Face): void; - Add_4(Comp: TopoDS_Compound, F: TopoDS_Face): void; - Add_5(E: TopoDS_Edge, EOn: TopoDS_Edge): void; - DirectLeft(): TopTools_ListOfShape; - Left(): TopTools_ListOfShape; - Right(): TopTools_ListOfShape; - Build(theRange: Message_ProgressRange): void; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepFeat_SplitShape_1 extends BRepFeat_SplitShape { - constructor(); - } - - export declare class BRepFeat_SplitShape_2 extends BRepFeat_SplitShape { - constructor(S: TopoDS_Shape); - } - -export declare type BRepFill_TypeOfContact = { - BRepFill_NoContact: {}; - BRepFill_Contact: {}; - BRepFill_ContactOnBorder: {}; -} - -export declare class BRepFilletAPI_LocalOperation extends BRepBuilderAPI_MakeShape { - Add(E: TopoDS_Edge): void; - ResetContour(IC: Graphic3d_ZLayerId): void; - NbContours(): Graphic3d_ZLayerId; - Contour(E: TopoDS_Edge): Graphic3d_ZLayerId; - NbEdges(I: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Edge(I: Graphic3d_ZLayerId, J: Graphic3d_ZLayerId): TopoDS_Edge; - Remove(E: TopoDS_Edge): void; - Length(IC: Graphic3d_ZLayerId): Standard_Real; - FirstVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - LastVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - Abscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - RelativeAbscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - ClosedAndTangent(IC: Graphic3d_ZLayerId): Standard_Boolean; - Closed(IC: Graphic3d_ZLayerId): Standard_Boolean; - Reset(): void; - Simulate(IC: Graphic3d_ZLayerId): void; - NbSurf(IC: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Sect(IC: Graphic3d_ZLayerId, IS: Graphic3d_ZLayerId): Handle_ChFiDS_SecHArray1; - delete(): void; -} - -export declare class BRepFilletAPI_MakeChamfer extends BRepFilletAPI_LocalOperation { - constructor(S: TopoDS_Shape) - Add_1(E: TopoDS_Edge): void; - Add_2(Dis: Standard_Real, E: TopoDS_Edge): void; - SetDist(Dis: Standard_Real, IC: Graphic3d_ZLayerId, F: TopoDS_Face): void; - GetDist(IC: Graphic3d_ZLayerId, Dis: Standard_Real): void; - Add_3(Dis1: Standard_Real, Dis2: Standard_Real, E: TopoDS_Edge, F: TopoDS_Face): void; - SetDists(Dis1: Standard_Real, Dis2: Standard_Real, IC: Graphic3d_ZLayerId, F: TopoDS_Face): void; - Dists(IC: Graphic3d_ZLayerId, Dis1: Standard_Real, Dis2: Standard_Real): void; - AddDA(Dis: Standard_Real, Angle: Standard_Real, E: TopoDS_Edge, F: TopoDS_Face): void; - SetDistAngle(Dis: Standard_Real, Angle: Standard_Real, IC: Graphic3d_ZLayerId, F: TopoDS_Face): void; - GetDistAngle(IC: Graphic3d_ZLayerId, Dis: Standard_Real, Angle: Standard_Real): void; - SetMode(theMode: ChFiDS_ChamfMode): void; - IsSymetric(IC: Graphic3d_ZLayerId): Standard_Boolean; - IsTwoDistances(IC: Graphic3d_ZLayerId): Standard_Boolean; - IsDistanceAngle(IC: Graphic3d_ZLayerId): Standard_Boolean; - ResetContour(IC: Graphic3d_ZLayerId): void; - NbContours(): Graphic3d_ZLayerId; - Contour(E: TopoDS_Edge): Graphic3d_ZLayerId; - NbEdges(I: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Edge(I: Graphic3d_ZLayerId, J: Graphic3d_ZLayerId): TopoDS_Edge; - Remove(E: TopoDS_Edge): void; - Length(IC: Graphic3d_ZLayerId): Standard_Real; - FirstVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - LastVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - Abscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - RelativeAbscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - ClosedAndTangent(IC: Graphic3d_ZLayerId): Standard_Boolean; - Closed(IC: Graphic3d_ZLayerId): Standard_Boolean; - Build(theRange: Message_ProgressRange): void; - Reset(): void; - Builder(): Handle_TopOpeBRepBuild_HBuilder; - Generated(EorV: TopoDS_Shape): TopTools_ListOfShape; - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(F: TopoDS_Shape): Standard_Boolean; - Simulate(IC: Graphic3d_ZLayerId): void; - NbSurf(IC: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Sect(IC: Graphic3d_ZLayerId, IS: Graphic3d_ZLayerId): Handle_ChFiDS_SecHArray1; - delete(): void; -} - -export declare class BRepFilletAPI_MakeFillet extends BRepFilletAPI_LocalOperation { - constructor(S: TopoDS_Shape, FShape: ChFi3d_FilletShape) - SetParams(Tang: Standard_Real, Tesp: Standard_Real, T2d: Standard_Real, TApp3d: Standard_Real, TolApp2d: Standard_Real, Fleche: Standard_Real): void; - SetContinuity(InternalContinuity: GeomAbs_Shape, AngularTolerance: Standard_Real): void; - Add_1(E: TopoDS_Edge): void; - Add_2(Radius: Standard_Real, E: TopoDS_Edge): void; - Add_3(R1: Standard_Real, R2: Standard_Real, E: TopoDS_Edge): void; - Add_4(L: Handle_Law_Function, E: TopoDS_Edge): void; - Add_5(UandR: TColgp_Array1OfPnt2d, E: TopoDS_Edge): void; - SetRadius_1(Radius: Standard_Real, IC: Graphic3d_ZLayerId, IinC: Graphic3d_ZLayerId): void; - SetRadius_2(R1: Standard_Real, R2: Standard_Real, IC: Graphic3d_ZLayerId, IinC: Graphic3d_ZLayerId): void; - SetRadius_3(L: Handle_Law_Function, IC: Graphic3d_ZLayerId, IinC: Graphic3d_ZLayerId): void; - SetRadius_4(UandR: TColgp_Array1OfPnt2d, IC: Graphic3d_ZLayerId, IinC: Graphic3d_ZLayerId): void; - ResetContour(IC: Graphic3d_ZLayerId): void; - IsConstant_1(IC: Graphic3d_ZLayerId): Standard_Boolean; - Radius_1(IC: Graphic3d_ZLayerId): Standard_Real; - IsConstant_2(IC: Graphic3d_ZLayerId, E: TopoDS_Edge): Standard_Boolean; - Radius_2(IC: Graphic3d_ZLayerId, E: TopoDS_Edge): Standard_Real; - SetRadius_5(Radius: Standard_Real, IC: Graphic3d_ZLayerId, E: TopoDS_Edge): void; - SetRadius_6(Radius: Standard_Real, IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): void; - GetBounds(IC: Graphic3d_ZLayerId, E: TopoDS_Edge, F: Standard_Real, L: Standard_Real): Standard_Boolean; - GetLaw(IC: Graphic3d_ZLayerId, E: TopoDS_Edge): Handle_Law_Function; - SetLaw(IC: Graphic3d_ZLayerId, E: TopoDS_Edge, L: Handle_Law_Function): void; - SetFilletShape(FShape: ChFi3d_FilletShape): void; - GetFilletShape(): ChFi3d_FilletShape; - NbContours(): Graphic3d_ZLayerId; - Contour(E: TopoDS_Edge): Graphic3d_ZLayerId; - NbEdges(I: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Edge(I: Graphic3d_ZLayerId, J: Graphic3d_ZLayerId): TopoDS_Edge; - Remove(E: TopoDS_Edge): void; - Length(IC: Graphic3d_ZLayerId): Standard_Real; - FirstVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - LastVertex(IC: Graphic3d_ZLayerId): TopoDS_Vertex; - Abscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - RelativeAbscissa(IC: Graphic3d_ZLayerId, V: TopoDS_Vertex): Standard_Real; - ClosedAndTangent(IC: Graphic3d_ZLayerId): Standard_Boolean; - Closed(IC: Graphic3d_ZLayerId): Standard_Boolean; - Build(theRange: Message_ProgressRange): void; - Reset(): void; - Builder(): Handle_TopOpeBRepBuild_HBuilder; - Generated(EorV: TopoDS_Shape): TopTools_ListOfShape; - Modified(F: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(F: TopoDS_Shape): Standard_Boolean; - NbSurfaces(): Graphic3d_ZLayerId; - NewFaces(I: Graphic3d_ZLayerId): TopTools_ListOfShape; - Simulate(IC: Graphic3d_ZLayerId): void; - NbSurf(IC: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Sect(IC: Graphic3d_ZLayerId, IS: Graphic3d_ZLayerId): Handle_ChFiDS_SecHArray1; - NbFaultyContours(): Graphic3d_ZLayerId; - FaultyContour(I: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - NbComputedSurfaces(IC: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - ComputedSurface(IC: Graphic3d_ZLayerId, IS: Graphic3d_ZLayerId): Handle_Geom_Surface; - NbFaultyVertices(): Graphic3d_ZLayerId; - FaultyVertex(IV: Graphic3d_ZLayerId): TopoDS_Vertex; - HasResult(): Standard_Boolean; - BadShape(): TopoDS_Shape; - StripeStatus(IC: Graphic3d_ZLayerId): ChFiDS_ErrorStatus; - delete(): void; -} - -export declare class BRepGProp { - constructor(); - static LinearProperties(S: TopoDS_Shape, LProps: GProp_GProps, SkipShared: Standard_Boolean, UseTriangulation: Standard_Boolean): void; - static SurfaceProperties_1(S: TopoDS_Shape, SProps: GProp_GProps, SkipShared: Standard_Boolean, UseTriangulation: Standard_Boolean): void; - static SurfaceProperties_2(S: TopoDS_Shape, SProps: GProp_GProps, Eps: Standard_Real, SkipShared: Standard_Boolean): Standard_Real; - static VolumeProperties_1(S: TopoDS_Shape, VProps: GProp_GProps, OnlyClosed: Standard_Boolean, SkipShared: Standard_Boolean, UseTriangulation: Standard_Boolean): void; - static VolumeProperties_2(S: TopoDS_Shape, VProps: GProp_GProps, Eps: Standard_Real, OnlyClosed: Standard_Boolean, SkipShared: Standard_Boolean): Standard_Real; - static VolumePropertiesGK_1(S: TopoDS_Shape, VProps: GProp_GProps, Eps: Standard_Real, OnlyClosed: Standard_Boolean, IsUseSpan: Standard_Boolean, CGFlag: Standard_Boolean, IFlag: Standard_Boolean, SkipShared: Standard_Boolean): Standard_Real; - static VolumePropertiesGK_2(S: TopoDS_Shape, VProps: GProp_GProps, thePln: gp_Pln, Eps: Standard_Real, OnlyClosed: Standard_Boolean, IsUseSpan: Standard_Boolean, CGFlag: Standard_Boolean, IFlag: Standard_Boolean, SkipShared: Standard_Boolean): Standard_Real; - delete(): void; -} - -export declare class BRepGProp_Face { - Load_1(F: TopoDS_Face): void; - VIntegrationOrder(): Graphic3d_ZLayerId; - NaturalRestriction(): Standard_Boolean; - GetFace(): TopoDS_Face; - Value2d(U: Standard_Real): gp_Pnt2d; - SIntOrder(Eps: Standard_Real): Graphic3d_ZLayerId; - SVIntSubs(): Graphic3d_ZLayerId; - SUIntSubs(): Graphic3d_ZLayerId; - UKnots(Knots: IntTools_CArray1OfReal): void; - VKnots(Knots: IntTools_CArray1OfReal): void; - LIntOrder(Eps: Standard_Real): Graphic3d_ZLayerId; - LIntSubs(): Graphic3d_ZLayerId; - LKnots(Knots: IntTools_CArray1OfReal): void; - UIntegrationOrder(): Graphic3d_ZLayerId; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Normal(U: Standard_Real, V: Standard_Real, P: gp_Pnt, VNor: gp_Vec): void; - Load_2(E: TopoDS_Edge): Standard_Boolean; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IntegrationOrder(): Graphic3d_ZLayerId; - D12d(U: Standard_Real, P: gp_Pnt2d, V1: gp_Vec2d): void; - Load_3(IsFirstParam: Standard_Boolean, theIsoType: GeomAbs_IsoType): void; - GetUKnots(theUMin: Standard_Real, theUMax: Standard_Real, theUKnots: Handle_TColStd_HArray1OfReal): void; - GetTKnots(theTMin: Standard_Real, theTMax: Standard_Real, theTKnots: Handle_TColStd_HArray1OfReal): void; - delete(): void; -} - - export declare class BRepGProp_Face_1 extends BRepGProp_Face { - constructor(IsUseSpan: Standard_Boolean); - } - - export declare class BRepGProp_Face_2 extends BRepGProp_Face { - constructor(F: TopoDS_Face, IsUseSpan: Standard_Boolean); - } - -export declare class BRepLib { - constructor(); - static Precision_1(P: Standard_Real): void; - static Precision_2(): Standard_Real; - static Plane_1(P: Handle_Geom_Plane): void; - static Plane_2(): Handle_Geom_Plane; - static CheckSameRange(E: TopoDS_Edge, Confusion: Standard_Real): Standard_Boolean; - static SameRange(E: TopoDS_Edge, Tolerance: Standard_Real): void; - static BuildCurve3d(E: TopoDS_Edge, Tolerance: Standard_Real, Continuity: GeomAbs_Shape, MaxDegree: Graphic3d_ZLayerId, MaxSegment: Graphic3d_ZLayerId): Standard_Boolean; - static BuildCurves3d_1(S: TopoDS_Shape, Tolerance: Standard_Real, Continuity: GeomAbs_Shape, MaxDegree: Graphic3d_ZLayerId, MaxSegment: Graphic3d_ZLayerId): Standard_Boolean; - static BuildCurves3d_2(S: TopoDS_Shape): Standard_Boolean; - static BuildPCurveForEdgeOnPlane_1(theE: TopoDS_Edge, theF: TopoDS_Face): void; - static BuildPCurveForEdgeOnPlane_2(theE: TopoDS_Edge, theF: TopoDS_Face, aC2D: Handle_Geom2d_Curve, bToUpdate: Standard_Boolean): void; - static UpdateEdgeTol(E: TopoDS_Edge, MinToleranceRequest: Standard_Real, MaxToleranceToCheck: Standard_Real): Standard_Boolean; - static UpdateEdgeTolerance(S: TopoDS_Shape, MinToleranceRequest: Standard_Real, MaxToleranceToCheck: Standard_Real): Standard_Boolean; - static SameParameter_1(theEdge: TopoDS_Edge, Tolerance: Standard_Real): void; - static SameParameter_2(theEdge: TopoDS_Edge, theTolerance: Standard_Real, theNewTol: Standard_Real, IsUseOldEdge: Standard_Boolean): TopoDS_Edge; - static SameParameter_3(S: TopoDS_Shape, Tolerance: Standard_Real, forced: Standard_Boolean): void; - static SameParameter_4(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, Tolerance: Standard_Real, forced: Standard_Boolean): void; - static UpdateTolerances_1(S: TopoDS_Shape, verifyFaceTolerance: Standard_Boolean): void; - static UpdateTolerances_2(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, verifyFaceTolerance: Standard_Boolean): void; - static UpdateInnerTolerances(S: TopoDS_Shape): void; - static OrientClosedSolid(solid: TopoDS_Solid): Standard_Boolean; - static ContinuityOfFaces(theEdge: TopoDS_Edge, theFace1: TopoDS_Face, theFace2: TopoDS_Face, theAngleTol: Standard_Real): GeomAbs_Shape; - static EncodeRegularity_1(S: TopoDS_Shape, TolAng: Standard_Real): void; - static EncodeRegularity_2(S: TopoDS_Shape, LE: TopTools_ListOfShape, TolAng: Standard_Real): void; - static EncodeRegularity_3(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, TolAng: Standard_Real): void; - static SortFaces(S: TopoDS_Shape, LF: TopTools_ListOfShape): void; - static ReverseSortFaces(S: TopoDS_Shape, LF: TopTools_ListOfShape): void; - static EnsureNormalConsistency(S: TopoDS_Shape, theAngTol: Standard_Real, ForceComputeNormals: Standard_Boolean): Standard_Boolean; - static UpdateDeflection(S: TopoDS_Shape): void; - static BoundingVertex(theLV: TopoDS_ListOfShape, theNewCenter: gp_Pnt, theNewTol: Standard_Real): void; - static FindValidRange_1(theCurve: Adaptor3d_Curve, theTolE: Standard_Real, theParV1: Standard_Real, thePntV1: gp_Pnt, theTolV1: Standard_Real, theParV2: Standard_Real, thePntV2: gp_Pnt, theTolV2: Standard_Real, theFirst: Standard_Real, theLast: Standard_Real): Standard_Boolean; - static FindValidRange_2(theEdge: TopoDS_Edge, theFirst: Standard_Real, theLast: Standard_Real): Standard_Boolean; - static ExtendFace(theF: TopoDS_Face, theExtVal: Standard_Real, theExtUMin: Standard_Boolean, theExtUMax: Standard_Boolean, theExtVMin: Standard_Boolean, theExtVMax: Standard_Boolean, theFExtended: TopoDS_Face): void; - delete(): void; -} - -export declare class BRepMesh_DiscretRoot extends Standard_Transient { - SetShape(theShape: TopoDS_Shape): void; - Shape(): TopoDS_Shape; - IsDone(): Standard_Boolean; - Perform(theRange: Message_ProgressRange): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class BRepMesh_IncrementalMesh extends BRepMesh_DiscretRoot { - Perform_1(theRange: Message_ProgressRange): void; - Perform_2(theContext: any, theRange: Message_ProgressRange): void; - Parameters(): IMeshTools_Parameters; - ChangeParameters(): IMeshTools_Parameters; - IsModified(): Standard_Boolean; - GetStatusFlags(): Graphic3d_ZLayerId; - static Discret(theShape: TopoDS_Shape, theLinDeflection: Standard_Real, theAngDeflection: Standard_Real, theAlgo: BRepMesh_DiscretRoot): Graphic3d_ZLayerId; - static IsParallelDefault(): Standard_Boolean; - static SetParallelDefault(isInParallel: Standard_Boolean): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class BRepMesh_IncrementalMesh_1 extends BRepMesh_IncrementalMesh { - constructor(); - } - - export declare class BRepMesh_IncrementalMesh_2 extends BRepMesh_IncrementalMesh { - constructor(theShape: TopoDS_Shape, theLinDeflection: Standard_Real, isRelative: Standard_Boolean, theAngDeflection: Standard_Real, isInParallel: Standard_Boolean); - } - - export declare class BRepMesh_IncrementalMesh_3 extends BRepMesh_IncrementalMesh { - constructor(theShape: TopoDS_Shape, theParameters: IMeshTools_Parameters, theRange: Message_ProgressRange); - } - -export declare type BRepOffset_Mode = { - BRepOffset_Skin: {}; - BRepOffset_Pipe: {}; - BRepOffset_RectoVerso: {}; -} - -export declare class BRepOffsetAPI_DraftAngle extends BRepBuilderAPI_ModifyShape { - Clear(): void; - Init(S: TopoDS_Shape): void; - Add(F: TopoDS_Face, Direction: gp_Dir, Angle: Standard_Real, NeutralPlane: gp_Pln, Flag: Standard_Boolean): void; - AddDone(): Standard_Boolean; - Remove(F: TopoDS_Face): void; - ProblematicShape(): TopoDS_Shape; - Status(): Draft_ErrorStatus; - ConnectedFaces(F: TopoDS_Face): TopTools_ListOfShape; - ModifiedFaces(): TopTools_ListOfShape; - Build(theRange: Message_ProgressRange): void; - CorrectWires(): void; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - ModifiedShape(S: TopoDS_Shape): TopoDS_Shape; - delete(): void; -} - - export declare class BRepOffsetAPI_DraftAngle_1 extends BRepOffsetAPI_DraftAngle { - constructor(); - } - - export declare class BRepOffsetAPI_DraftAngle_2 extends BRepOffsetAPI_DraftAngle { - constructor(S: TopoDS_Shape); - } - -export declare class BRepOffsetAPI_MakeFilling extends BRepBuilderAPI_MakeShape { - constructor(Degree: Graphic3d_ZLayerId, NbPtsOnCur: Graphic3d_ZLayerId, NbIter: Graphic3d_ZLayerId, Anisotropie: Standard_Boolean, Tol2d: Standard_Real, Tol3d: Standard_Real, TolAng: Standard_Real, TolCurv: Standard_Real, MaxDeg: Graphic3d_ZLayerId, MaxSegments: Graphic3d_ZLayerId) - SetConstrParam(Tol2d: Standard_Real, Tol3d: Standard_Real, TolAng: Standard_Real, TolCurv: Standard_Real): void; - SetResolParam(Degree: Graphic3d_ZLayerId, NbPtsOnCur: Graphic3d_ZLayerId, NbIter: Graphic3d_ZLayerId, Anisotropie: Standard_Boolean): void; - SetApproxParam(MaxDeg: Graphic3d_ZLayerId, MaxSegments: Graphic3d_ZLayerId): void; - LoadInitSurface(Surf: TopoDS_Face): void; - Add_1(Constr: TopoDS_Edge, Order: GeomAbs_Shape, IsBound: Standard_Boolean): Graphic3d_ZLayerId; - Add_2(Constr: TopoDS_Edge, Support: TopoDS_Face, Order: GeomAbs_Shape, IsBound: Standard_Boolean): Graphic3d_ZLayerId; - Add_3(Support: TopoDS_Face, Order: GeomAbs_Shape): Graphic3d_ZLayerId; - Add_4(Point: gp_Pnt): Graphic3d_ZLayerId; - Add_5(U: Standard_Real, V: Standard_Real, Support: TopoDS_Face, Order: GeomAbs_Shape): Graphic3d_ZLayerId; - Build(theRange: Message_ProgressRange): void; - IsDone(): Standard_Boolean; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - G0Error_1(): Standard_Real; - G1Error_1(): Standard_Real; - G2Error_1(): Standard_Real; - G0Error_2(Index: Graphic3d_ZLayerId): Standard_Real; - G1Error_2(Index: Graphic3d_ZLayerId): Standard_Real; - G2Error_2(Index: Graphic3d_ZLayerId): Standard_Real; - delete(): void; -} - -export declare class BRepOffsetAPI_MakeOffset extends BRepBuilderAPI_MakeShape { - Init_1(Spine: TopoDS_Face, Join: GeomAbs_JoinType, IsOpenResult: Standard_Boolean): void; - Init_2(Join: GeomAbs_JoinType, IsOpenResult: Standard_Boolean): void; - AddWire(Spine: TopoDS_Wire): void; - Perform(Offset: Standard_Real, Alt: Standard_Real): void; - Build(theRange: Message_ProgressRange): void; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepOffsetAPI_MakeOffset_1 extends BRepOffsetAPI_MakeOffset { - constructor(); - } - - export declare class BRepOffsetAPI_MakeOffset_2 extends BRepOffsetAPI_MakeOffset { - constructor(Spine: TopoDS_Face, Join: GeomAbs_JoinType, IsOpenResult: Standard_Boolean); - } - - export declare class BRepOffsetAPI_MakeOffset_3 extends BRepOffsetAPI_MakeOffset { - constructor(Spine: TopoDS_Wire, Join: GeomAbs_JoinType, IsOpenResult: Standard_Boolean); - } - -export declare class BRepOffsetAPI_MakeOffsetShape extends BRepBuilderAPI_MakeShape { - constructor() - PerformBySimple(theS: TopoDS_Shape, theOffsetValue: Standard_Real): void; - PerformByJoin(S: TopoDS_Shape, Offset: Standard_Real, Tol: Standard_Real, Mode: BRepOffset_Mode, Intersection: Standard_Boolean, SelfInter: Standard_Boolean, Join: GeomAbs_JoinType, RemoveIntEdges: Standard_Boolean, theRange: Message_ProgressRange): void; - MakeOffset(): BRepOffset_MakeOffset; - Build(theRange: Message_ProgressRange): void; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - GetJoinType(): GeomAbs_JoinType; - delete(): void; -} - -export declare class BRepOffsetAPI_MakePipe extends BRepPrimAPI_MakeSweep { - Pipe(): BRepFill_Pipe; - Build(theRange: Message_ProgressRange): void; - FirstShape(): TopoDS_Shape; - LastShape(): TopoDS_Shape; - Generated_1(S: TopoDS_Shape): TopTools_ListOfShape; - Generated_2(SSpine: TopoDS_Shape, SProfile: TopoDS_Shape): TopoDS_Shape; - ErrorOnSurface(): Standard_Real; - delete(): void; -} - - export declare class BRepOffsetAPI_MakePipe_1 extends BRepOffsetAPI_MakePipe { - constructor(Spine: TopoDS_Wire, Profile: TopoDS_Shape); - } - - export declare class BRepOffsetAPI_MakePipe_2 extends BRepOffsetAPI_MakePipe { - constructor(Spine: TopoDS_Wire, Profile: TopoDS_Shape, aMode: GeomFill_Trihedron, ForceApproxC1: Standard_Boolean); - } - -export declare class BRepOffsetAPI_MakePipeShell extends BRepPrimAPI_MakeSweep { - constructor(Spine: TopoDS_Wire) - SetMode_1(IsFrenet: Standard_Boolean): void; - SetDiscreteMode(): void; - SetMode_2(Axe: gp_Ax2): void; - SetMode_3(BiNormal: gp_Dir): void; - SetMode_4(SpineSupport: TopoDS_Shape): Standard_Boolean; - SetMode_5(AuxiliarySpine: TopoDS_Wire, CurvilinearEquivalence: Standard_Boolean, KeepContact: BRepFill_TypeOfContact): void; - Add_1(Profile: TopoDS_Shape, WithContact: Standard_Boolean, WithCorrection: Standard_Boolean): void; - Add_2(Profile: TopoDS_Shape, Location: TopoDS_Vertex, WithContact: Standard_Boolean, WithCorrection: Standard_Boolean): void; - SetLaw_1(Profile: TopoDS_Shape, L: Handle_Law_Function, WithContact: Standard_Boolean, WithCorrection: Standard_Boolean): void; - SetLaw_2(Profile: TopoDS_Shape, L: Handle_Law_Function, Location: TopoDS_Vertex, WithContact: Standard_Boolean, WithCorrection: Standard_Boolean): void; - Delete(Profile: TopoDS_Shape): void; - IsReady(): Standard_Boolean; - GetStatus(): BRepBuilderAPI_PipeError; - SetTolerance(Tol3d: Standard_Real, BoundTol: Standard_Real, TolAngular: Standard_Real): void; - SetMaxDegree(NewMaxDegree: Graphic3d_ZLayerId): void; - SetMaxSegments(NewMaxSegments: Graphic3d_ZLayerId): void; - SetForceApproxC1(ForceApproxC1: Standard_Boolean): void; - SetTransitionMode(Mode: BRepBuilderAPI_TransitionMode): void; - Simulate(NumberOfSection: Graphic3d_ZLayerId, Result: TopTools_ListOfShape): void; - Build(theRange: Message_ProgressRange): void; - MakeSolid(): Standard_Boolean; - FirstShape(): TopoDS_Shape; - LastShape(): TopoDS_Shape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - ErrorOnSurface(): Standard_Real; - Profiles(theProfiles: TopTools_ListOfShape): void; - Spine(): TopoDS_Wire; - delete(): void; -} - -export declare class BRepOffsetAPI_MakeThickSolid extends BRepOffsetAPI_MakeOffsetShape { - constructor() - MakeThickSolidBySimple(theS: TopoDS_Shape, theOffsetValue: Standard_Real): void; - MakeThickSolidByJoin(S: TopoDS_Shape, ClosingFaces: TopTools_ListOfShape, Offset: Standard_Real, Tol: Standard_Real, Mode: BRepOffset_Mode, Intersection: Standard_Boolean, SelfInter: Standard_Boolean, Join: GeomAbs_JoinType, RemoveIntEdges: Standard_Boolean, theRange: Message_ProgressRange): void; - Build(theRange: Message_ProgressRange): void; - Modified(S: TopoDS_Shape): TopTools_ListOfShape; - delete(): void; -} - -export declare class BRepOffsetAPI_ThruSections extends BRepBuilderAPI_MakeShape { - constructor(isSolid: Standard_Boolean, ruled: Standard_Boolean, pres3d: Standard_Real) - Init(isSolid: Standard_Boolean, ruled: Standard_Boolean, pres3d: Standard_Real): void; - AddWire(wire: TopoDS_Wire): void; - AddVertex(aVertex: TopoDS_Vertex): void; - CheckCompatibility(check: Standard_Boolean): void; - SetSmoothing(UseSmoothing: Standard_Boolean): void; - SetParType(ParType: Approx_ParametrizationType): void; - SetContinuity(C: GeomAbs_Shape): void; - SetCriteriumWeight(W1: Standard_Real, W2: Standard_Real, W3: Standard_Real): void; - SetMaxDegree(MaxDeg: Graphic3d_ZLayerId): void; - ParType(): Approx_ParametrizationType; - Continuity(): GeomAbs_Shape; - MaxDegree(): Graphic3d_ZLayerId; - UseSmoothing(): Standard_Boolean; - CriteriumWeight(W1: Standard_Real, W2: Standard_Real, W3: Standard_Real): void; - Build(theRange: Message_ProgressRange): void; - FirstShape(): TopoDS_Shape; - LastShape(): TopoDS_Shape; - GeneratedFace(Edge: TopoDS_Shape): TopoDS_Shape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - Wires(): TopTools_ListOfShape; - delete(): void; -} - -export declare class BRepPrimAPI_MakeBox extends BRepBuilderAPI_MakeShape { - Init_1(theDX: Standard_Real, theDY: Standard_Real, theDZ: Standard_Real): void; - Init_2(thePnt: gp_Pnt, theDX: Standard_Real, theDY: Standard_Real, theDZ: Standard_Real): void; - Init_3(thePnt1: gp_Pnt, thePnt2: gp_Pnt): void; - Init_4(theAxes: gp_Ax2, theDX: Standard_Real, theDY: Standard_Real, theDZ: Standard_Real): void; - Wedge(): BRepPrim_Wedge; - Build(theRange: Message_ProgressRange): void; - Shell(): TopoDS_Shell; - Solid(): TopoDS_Solid; - BottomFace(): TopoDS_Face; - BackFace(): TopoDS_Face; - FrontFace(): TopoDS_Face; - LeftFace(): TopoDS_Face; - RightFace(): TopoDS_Face; - TopFace(): TopoDS_Face; - delete(): void; -} - - export declare class BRepPrimAPI_MakeBox_1 extends BRepPrimAPI_MakeBox { - constructor(); - } - - export declare class BRepPrimAPI_MakeBox_2 extends BRepPrimAPI_MakeBox { - constructor(dx: Standard_Real, dy: Standard_Real, dz: Standard_Real); - } - - export declare class BRepPrimAPI_MakeBox_3 extends BRepPrimAPI_MakeBox { - constructor(P: gp_Pnt, dx: Standard_Real, dy: Standard_Real, dz: Standard_Real); - } - - export declare class BRepPrimAPI_MakeBox_4 extends BRepPrimAPI_MakeBox { - constructor(P1: gp_Pnt, P2: gp_Pnt); - } - - export declare class BRepPrimAPI_MakeBox_5 extends BRepPrimAPI_MakeBox { - constructor(Axes: gp_Ax2, dx: Standard_Real, dy: Standard_Real, dz: Standard_Real); - } - -export declare class BRepPrimAPI_MakeCylinder extends BRepPrimAPI_MakeOneAxis { - OneAxis(): Standard_Address; - Cylinder(): BRepPrim_Cylinder; - delete(): void; -} - - export declare class BRepPrimAPI_MakeCylinder_1 extends BRepPrimAPI_MakeCylinder { - constructor(R: Standard_Real, H: Standard_Real); - } - - export declare class BRepPrimAPI_MakeCylinder_2 extends BRepPrimAPI_MakeCylinder { - constructor(R: Standard_Real, H: Standard_Real, Angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeCylinder_3 extends BRepPrimAPI_MakeCylinder { - constructor(Axes: gp_Ax2, R: Standard_Real, H: Standard_Real); - } - - export declare class BRepPrimAPI_MakeCylinder_4 extends BRepPrimAPI_MakeCylinder { - constructor(Axes: gp_Ax2, R: Standard_Real, H: Standard_Real, Angle: Standard_Real); - } - -export declare class BRepPrimAPI_MakeOneAxis extends BRepBuilderAPI_MakeShape { - OneAxis(): Standard_Address; - Build(theRange: Message_ProgressRange): void; - Face(): TopoDS_Face; - Shell(): TopoDS_Shell; - Solid(): TopoDS_Solid; - delete(): void; -} - -export declare class BRepPrimAPI_MakePrism extends BRepPrimAPI_MakeSweep { - Prism(): BRepSweep_Prism; - Build(theRange: Message_ProgressRange): void; - FirstShape_1(): TopoDS_Shape; - LastShape_1(): TopoDS_Shape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - FirstShape_2(theShape: TopoDS_Shape): TopoDS_Shape; - LastShape_2(theShape: TopoDS_Shape): TopoDS_Shape; - delete(): void; -} - - export declare class BRepPrimAPI_MakePrism_1 extends BRepPrimAPI_MakePrism { - constructor(S: TopoDS_Shape, V: gp_Vec, Copy: Standard_Boolean, Canonize: Standard_Boolean); - } - - export declare class BRepPrimAPI_MakePrism_2 extends BRepPrimAPI_MakePrism { - constructor(S: TopoDS_Shape, D: gp_Dir, Inf: Standard_Boolean, Copy: Standard_Boolean, Canonize: Standard_Boolean); - } - -export declare class BRepPrimAPI_MakeRevol extends BRepPrimAPI_MakeSweep { - Revol(): BRepSweep_Revol; - Build(theRange: Message_ProgressRange): void; - FirstShape_1(): TopoDS_Shape; - LastShape_1(): TopoDS_Shape; - Generated(S: TopoDS_Shape): TopTools_ListOfShape; - IsDeleted(S: TopoDS_Shape): Standard_Boolean; - FirstShape_2(theShape: TopoDS_Shape): TopoDS_Shape; - LastShape_2(theShape: TopoDS_Shape): TopoDS_Shape; - HasDegenerated(): Standard_Boolean; - Degenerated(): TopTools_ListOfShape; - delete(): void; -} - - export declare class BRepPrimAPI_MakeRevol_1 extends BRepPrimAPI_MakeRevol { - constructor(S: TopoDS_Shape, A: gp_Ax1, D: Standard_Real, Copy: Standard_Boolean); - } - - export declare class BRepPrimAPI_MakeRevol_2 extends BRepPrimAPI_MakeRevol { - constructor(S: TopoDS_Shape, A: gp_Ax1, Copy: Standard_Boolean); - } - -export declare class BRepPrimAPI_MakeRevolution extends BRepPrimAPI_MakeOneAxis { - OneAxis(): Standard_Address; - Revolution(): BRepPrim_Revolution; - delete(): void; -} - - export declare class BRepPrimAPI_MakeRevolution_1 extends BRepPrimAPI_MakeRevolution { - constructor(Meridian: Handle_Geom_Curve); - } - - export declare class BRepPrimAPI_MakeRevolution_2 extends BRepPrimAPI_MakeRevolution { - constructor(Meridian: Handle_Geom_Curve, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeRevolution_3 extends BRepPrimAPI_MakeRevolution { - constructor(Meridian: Handle_Geom_Curve, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepPrimAPI_MakeRevolution_4 extends BRepPrimAPI_MakeRevolution { - constructor(Meridian: Handle_Geom_Curve, VMin: Standard_Real, VMax: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeRevolution_5 extends BRepPrimAPI_MakeRevolution { - constructor(Axes: gp_Ax2, Meridian: Handle_Geom_Curve); - } - - export declare class BRepPrimAPI_MakeRevolution_6 extends BRepPrimAPI_MakeRevolution { - constructor(Axes: gp_Ax2, Meridian: Handle_Geom_Curve, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeRevolution_7 extends BRepPrimAPI_MakeRevolution { - constructor(Axes: gp_Ax2, Meridian: Handle_Geom_Curve, VMin: Standard_Real, VMax: Standard_Real); - } - - export declare class BRepPrimAPI_MakeRevolution_8 extends BRepPrimAPI_MakeRevolution { - constructor(Axes: gp_Ax2, Meridian: Handle_Geom_Curve, VMin: Standard_Real, VMax: Standard_Real, angle: Standard_Real); - } - -export declare class BRepPrimAPI_MakeSphere extends BRepPrimAPI_MakeOneAxis { - OneAxis(): Standard_Address; - Sphere(): BRepPrim_Sphere; - delete(): void; -} - - export declare class BRepPrimAPI_MakeSphere_1 extends BRepPrimAPI_MakeSphere { - constructor(R: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_2 extends BRepPrimAPI_MakeSphere { - constructor(R: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_3 extends BRepPrimAPI_MakeSphere { - constructor(R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_4 extends BRepPrimAPI_MakeSphere { - constructor(R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real, angle3: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_5 extends BRepPrimAPI_MakeSphere { - constructor(Center: gp_Pnt, R: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_6 extends BRepPrimAPI_MakeSphere { - constructor(Center: gp_Pnt, R: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_7 extends BRepPrimAPI_MakeSphere { - constructor(Center: gp_Pnt, R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_8 extends BRepPrimAPI_MakeSphere { - constructor(Center: gp_Pnt, R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real, angle3: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_9 extends BRepPrimAPI_MakeSphere { - constructor(Axis: gp_Ax2, R: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_10 extends BRepPrimAPI_MakeSphere { - constructor(Axis: gp_Ax2, R: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_11 extends BRepPrimAPI_MakeSphere { - constructor(Axis: gp_Ax2, R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeSphere_12 extends BRepPrimAPI_MakeSphere { - constructor(Axis: gp_Ax2, R: Standard_Real, angle1: Standard_Real, angle2: Standard_Real, angle3: Standard_Real); - } - -export declare class BRepPrimAPI_MakeSweep extends BRepBuilderAPI_MakeShape { - FirstShape(): TopoDS_Shape; - LastShape(): TopoDS_Shape; - delete(): void; -} - -export declare class BRepPrimAPI_MakeTorus extends BRepPrimAPI_MakeOneAxis { - OneAxis(): Standard_Address; - Torus(): BRepPrim_Torus; - delete(): void; -} - - export declare class BRepPrimAPI_MakeTorus_1 extends BRepPrimAPI_MakeTorus { - constructor(R1: Standard_Real, R2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_2 extends BRepPrimAPI_MakeTorus { - constructor(R1: Standard_Real, R2: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_3 extends BRepPrimAPI_MakeTorus { - constructor(R1: Standard_Real, R2: Standard_Real, angle1: Standard_Real, angle2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_4 extends BRepPrimAPI_MakeTorus { - constructor(R1: Standard_Real, R2: Standard_Real, angle1: Standard_Real, angle2: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_5 extends BRepPrimAPI_MakeTorus { - constructor(Axes: gp_Ax2, R1: Standard_Real, R2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_6 extends BRepPrimAPI_MakeTorus { - constructor(Axes: gp_Ax2, R1: Standard_Real, R2: Standard_Real, angle: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_7 extends BRepPrimAPI_MakeTorus { - constructor(Axes: gp_Ax2, R1: Standard_Real, R2: Standard_Real, angle1: Standard_Real, angle2: Standard_Real); - } - - export declare class BRepPrimAPI_MakeTorus_8 extends BRepPrimAPI_MakeTorus { - constructor(Axes: gp_Ax2, R1: Standard_Real, R2: Standard_Real, angle1: Standard_Real, angle2: Standard_Real, angle: Standard_Real); - } - -export declare class BRepTools { - constructor(); - static UVBounds_1(F: TopoDS_Face, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real): void; - static UVBounds_2(F: TopoDS_Face, W: TopoDS_Wire, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real): void; - static UVBounds_3(F: TopoDS_Face, E: TopoDS_Edge, UMin: Standard_Real, UMax: Standard_Real, VMin: Standard_Real, VMax: Standard_Real): void; - static AddUVBounds_1(F: TopoDS_Face, B: Bnd_Box2d): void; - static AddUVBounds_2(F: TopoDS_Face, W: TopoDS_Wire, B: Bnd_Box2d): void; - static AddUVBounds_3(F: TopoDS_Face, E: TopoDS_Edge, B: Bnd_Box2d): void; - static Update_1(V: TopoDS_Vertex): void; - static Update_2(E: TopoDS_Edge): void; - static Update_3(W: TopoDS_Wire): void; - static Update_4(F: TopoDS_Face): void; - static Update_5(S: TopoDS_Shell): void; - static Update_6(S: TopoDS_Solid): void; - static Update_7(C: TopoDS_CompSolid): void; - static Update_8(C: TopoDS_Compound): void; - static Update_9(S: TopoDS_Shape): void; - static UpdateFaceUVPoints(theF: TopoDS_Face): void; - static Clean(theShape: TopoDS_Shape, theForce: Standard_Boolean): void; - static CleanGeometry(theShape: TopoDS_Shape): void; - static RemoveUnusedPCurves(S: TopoDS_Shape): void; - static Triangulation(theShape: TopoDS_Shape, theLinDefl: Standard_Real, theToCheckFreeEdges: Standard_Boolean): Standard_Boolean; - static LoadTriangulation(theShape: TopoDS_Shape, theTriangulationIdx: Graphic3d_ZLayerId, theToSetAsActive: Standard_Boolean, theFileSystem: any): Standard_Boolean; - static UnloadTriangulation(theShape: TopoDS_Shape, theTriangulationIdx: Graphic3d_ZLayerId): Standard_Boolean; - static ActivateTriangulation(theShape: TopoDS_Shape, theTriangulationIdx: Graphic3d_ZLayerId, theToActivateStrictly: Standard_Boolean): Standard_Boolean; - static LoadAllTriangulations(theShape: TopoDS_Shape, theFileSystem: any): Standard_Boolean; - static UnloadAllTriangulations(theShape: TopoDS_Shape): Standard_Boolean; - static Compare_1(V1: TopoDS_Vertex, V2: TopoDS_Vertex): Standard_Boolean; - static Compare_2(E1: TopoDS_Edge, E2: TopoDS_Edge): Standard_Boolean; - static OuterWire(F: TopoDS_Face): TopoDS_Wire; - static Map3DEdges(S: TopoDS_Shape, M: TopTools_IndexedMapOfShape): void; - static IsReallyClosed(E: TopoDS_Edge, F: TopoDS_Face): Standard_Boolean; - static DetectClosedness(theFace: TopoDS_Face, theUclosed: Standard_Boolean, theVclosed: Standard_Boolean): void; - static Dump(Sh: TopoDS_Shape, S: Standard_OStream): void; - static Write_1(theShape: TopoDS_Shape, theStream: Standard_OStream, theProgress: Message_ProgressRange): void; - static Write_2(theShape: TopoDS_Shape, theStream: Standard_OStream, theWithTriangles: Standard_Boolean, theWithNormals: Standard_Boolean, theVersion: TopTools_FormatVersion, theProgress: Message_ProgressRange): void; - static Read_1(Sh: TopoDS_Shape, S: Standard_IStream, B: BRep_Builder, theProgress: Message_ProgressRange): void; - static Write_3(theShape: TopoDS_Shape, theFile: Standard_CString, theProgress: Message_ProgressRange): Standard_Boolean; - static Write_4(theShape: TopoDS_Shape, theFile: Standard_CString, theWithTriangles: Standard_Boolean, theWithNormals: Standard_Boolean, theVersion: TopTools_FormatVersion, theProgress: Message_ProgressRange): Standard_Boolean; - static Read_2(Sh: TopoDS_Shape, File: Standard_CString, B: BRep_Builder, theProgress: Message_ProgressRange): Standard_Boolean; - static EvalAndUpdateTol(theE: TopoDS_Edge, theC3d: Handle_Geom_Curve, theC2d: Handle_Geom2d_Curve, theS: Handle_Geom_Surface, theF: Standard_Real, theL: Standard_Real): Standard_Real; - static OriEdgeInFace(theEdge: TopoDS_Edge, theFace: TopoDS_Face): TopAbs_Orientation; - static RemoveInternals(theS: TopoDS_Shape, theForce: Standard_Boolean): void; - static CheckLocations(theS: TopoDS_Shape, theProblemShapes: TopTools_ListOfShape): void; - delete(): void; -} - -export declare class BRepTools_Quilt { - constructor() - Bind_1(Eold: TopoDS_Edge, Enew: TopoDS_Edge): void; - Bind_2(Vold: TopoDS_Vertex, Vnew: TopoDS_Vertex): void; - Add(S: TopoDS_Shape): void; - IsCopied(S: TopoDS_Shape): Standard_Boolean; - Copy(S: TopoDS_Shape): TopoDS_Shape; - Shells(): TopoDS_Shape; - delete(): void; -} - -export declare class BRepTools_ReShape extends Standard_Transient { - constructor() - Clear(): void; - Remove(shape: TopoDS_Shape): void; - Replace(shape: TopoDS_Shape, newshape: TopoDS_Shape): void; - IsRecorded(shape: TopoDS_Shape): Standard_Boolean; - Value(shape: TopoDS_Shape): TopoDS_Shape; - Status(shape: TopoDS_Shape, newsh: TopoDS_Shape, last: Standard_Boolean): Graphic3d_ZLayerId; - Apply(theShape: TopoDS_Shape, theUntil: TopAbs_ShapeEnum): TopoDS_Shape; - ModeConsiderLocation(): Standard_Boolean; - CopyVertex_1(theV: TopoDS_Vertex, theTol: Standard_Real): TopoDS_Vertex; - CopyVertex_2(theV: TopoDS_Vertex, theNewPos: gp_Pnt, aTol: Standard_Real): TopoDS_Vertex; - IsNewShape(theShape: TopoDS_Shape): Standard_Boolean; - History(): Handle_BRepTools_History; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Bnd_Box { - SetWhole(): void; - SetVoid(): void; - Set_1(P: gp_Pnt): void; - Set_2(P: gp_Pnt, D: gp_Dir): void; - Update_1(aXmin: Standard_Real, aYmin: Standard_Real, aZmin: Standard_Real, aXmax: Standard_Real, aYmax: Standard_Real, aZmax: Standard_Real): void; - Update_2(X: Standard_Real, Y: Standard_Real, Z: Standard_Real): void; - GetGap(): Standard_Real; - SetGap(Tol: Standard_Real): void; - Enlarge(Tol: Standard_Real): void; - Get(theXmin: Standard_Real, theYmin: Standard_Real, theZmin: Standard_Real, theXmax: Standard_Real, theYmax: Standard_Real, theZmax: Standard_Real): void; - CornerMin(): gp_Pnt; - CornerMax(): gp_Pnt; - OpenXmin(): void; - OpenXmax(): void; - OpenYmin(): void; - OpenYmax(): void; - OpenZmin(): void; - OpenZmax(): void; - IsOpen(): Standard_Boolean; - IsOpenXmin(): Standard_Boolean; - IsOpenXmax(): Standard_Boolean; - IsOpenYmin(): Standard_Boolean; - IsOpenYmax(): Standard_Boolean; - IsOpenZmin(): Standard_Boolean; - IsOpenZmax(): Standard_Boolean; - IsWhole(): Standard_Boolean; - IsVoid(): Standard_Boolean; - IsXThin(tol: Standard_Real): Standard_Boolean; - IsYThin(tol: Standard_Real): Standard_Boolean; - IsZThin(tol: Standard_Real): Standard_Boolean; - IsThin(tol: Standard_Real): Standard_Boolean; - Transformed(T: gp_Trsf): Bnd_Box; - Add_1(Other: Bnd_Box): void; - Add_2(P: gp_Pnt): void; - Add_3(P: gp_Pnt, D: gp_Dir): void; - Add_4(D: gp_Dir): void; - IsOut_1(P: gp_Pnt): Standard_Boolean; - IsOut_2(L: gp_Lin): Standard_Boolean; - IsOut_3(P: gp_Pln): Standard_Boolean; - IsOut_4(Other: Bnd_Box): Standard_Boolean; - IsOut_5(Other: Bnd_Box, T: gp_Trsf): Standard_Boolean; - IsOut_6(T1: gp_Trsf, Other: Bnd_Box, T2: gp_Trsf): Standard_Boolean; - IsOut_7(P1: gp_Pnt, P2: gp_Pnt, D: gp_Dir): Standard_Boolean; - Distance(Other: Bnd_Box): Standard_Real; - Dump(): void; - SquareExtent(): Standard_Real; - FinitePart(): Bnd_Box; - HasFinitePart(): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class Bnd_Box_1 extends Bnd_Box { - constructor(); - } - - export declare class Bnd_Box_2 extends Bnd_Box { - constructor(theMin: gp_Pnt, theMax: gp_Pnt); - } - -export declare class Bnd_OBB { - ReBuild(theListOfPoints: TColgp_Array1OfPnt, theListOfTolerances: IntTools_CArray1OfReal, theIsOptimal: Standard_Boolean): void; - SetCenter(theCenter: gp_Pnt): void; - SetXComponent(theXDirection: gp_Dir, theHXSize: Standard_Real): void; - SetYComponent(theYDirection: gp_Dir, theHYSize: Standard_Real): void; - SetZComponent(theZDirection: gp_Dir, theHZSize: Standard_Real): void; - Position(): gp_Ax3; - Center(): gp_XYZ; - XDirection(): gp_XYZ; - YDirection(): gp_XYZ; - ZDirection(): gp_XYZ; - XHSize(): Standard_Real; - YHSize(): Standard_Real; - ZHSize(): Standard_Real; - IsVoid(): Standard_Boolean; - SetVoid(): void; - SetAABox(theFlag: Standard_Boolean): void; - IsAABox(): Standard_Boolean; - Enlarge(theGapAdd: Standard_Real): void; - GetVertex(theP: gp_Pnt[8]): Standard_Boolean; - SquareExtent(): Standard_Real; - IsOut_1(theOther: Bnd_OBB): Standard_Boolean; - IsOut_2(theP: gp_Pnt): Standard_Boolean; - IsCompletelyInside(theOther: Bnd_OBB): Standard_Boolean; - Add_1(theOther: Bnd_OBB): void; - Add_2(theP: gp_Pnt): void; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class Bnd_OBB_1 extends Bnd_OBB { - constructor(); - } - - export declare class Bnd_OBB_2 extends Bnd_OBB { - constructor(theCenter: gp_Pnt, theXDirection: gp_Dir, theYDirection: gp_Dir, theZDirection: gp_Dir, theHXSize: Standard_Real, theHYSize: Standard_Real, theHZSize: Standard_Real); - } - - export declare class Bnd_OBB_3 extends Bnd_OBB { - constructor(theBox: Bnd_Box); - } - -export declare type ChFi3d_FilletShape = { - ChFi3d_Rational: {}; - ChFi3d_QuasiAngular: {}; - ChFi3d_Polynomial: {}; -} - -export declare type ChFiDS_ChamfMode = { - ChFiDS_ClassicChamfer: {}; - ChFiDS_ConstThroatChamfer: {}; - ChFiDS_ConstThroatWithPenetrationChamfer: {}; -} - -export declare type Convert_ParameterisationType = { - Convert_TgtThetaOver2: {}; - Convert_TgtThetaOver2_1: {}; - Convert_TgtThetaOver2_2: {}; - Convert_TgtThetaOver2_3: {}; - Convert_TgtThetaOver2_4: {}; - Convert_QuasiAngular: {}; - Convert_RationalC1: {}; - Convert_Polynomial: {}; -} - -export declare type Extrema_ExtAlgo = { - Extrema_ExtAlgo_Grad: {}; - Extrema_ExtAlgo_Tree: {}; -} - -export declare class Extrema_ExtCC { - Initialize_1(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, TolC1: Standard_Real, TolC2: Standard_Real): void; - Initialize_2(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, TolC1: Standard_Real, TolC2: Standard_Real): void; - SetCurve_1(theRank: Graphic3d_ZLayerId, C: Adaptor3d_Curve): void; - SetCurve_2(theRank: Graphic3d_ZLayerId, C: Adaptor3d_Curve, Uinf: Standard_Real, Usup: Standard_Real): void; - SetRange(theRank: Graphic3d_ZLayerId, Uinf: Standard_Real, Usup: Standard_Real): void; - SetTolerance(theRank: Graphic3d_ZLayerId, Tol: Standard_Real): void; - Perform(): void; - IsDone(): Standard_Boolean; - NbExt(): Graphic3d_ZLayerId; - IsParallel(): Standard_Boolean; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - Points(N: Graphic3d_ZLayerId, P1: Extrema_POnCurv, P2: Extrema_POnCurv): void; - TrimmedSquareDistances(dist11: Standard_Real, distP12: Standard_Real, distP21: Standard_Real, distP22: Standard_Real, P11: gp_Pnt, P12: gp_Pnt, P21: gp_Pnt, P22: gp_Pnt): void; - SetSingleSolutionFlag(theSingleSolutionFlag: Standard_Boolean): void; - GetSingleSolutionFlag(): Standard_Boolean; - delete(): void; -} - - export declare class Extrema_ExtCC_1 extends Extrema_ExtCC { - constructor(TolC1: Standard_Real, TolC2: Standard_Real); - } - - export declare class Extrema_ExtCC_2 extends Extrema_ExtCC { - constructor(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, TolC1: Standard_Real, TolC2: Standard_Real); - } - - export declare class Extrema_ExtCC_3 extends Extrema_ExtCC { - constructor(C1: Adaptor3d_Curve, C2: Adaptor3d_Curve, U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, TolC1: Standard_Real, TolC2: Standard_Real); - } - -export declare class Extrema_ExtCS { - Initialize_1(S: Adaptor3d_Surface, TolC: Standard_Real, TolS: Standard_Real): void; - Initialize_2(S: Adaptor3d_Surface, Uinf: Standard_Real, Usup: Standard_Real, Vinf: Standard_Real, Vsup: Standard_Real, TolC: Standard_Real, TolS: Standard_Real): void; - Perform(C: Adaptor3d_Curve, Uinf: Standard_Real, Usup: Standard_Real): void; - IsDone(): Standard_Boolean; - IsParallel(): Standard_Boolean; - NbExt(): Graphic3d_ZLayerId; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - Points(N: Graphic3d_ZLayerId, P1: Extrema_POnCurv, P2: Extrema_POnSurf): void; - delete(): void; -} - - export declare class Extrema_ExtCS_1 extends Extrema_ExtCS { - constructor(); - } - - export declare class Extrema_ExtCS_2 extends Extrema_ExtCS { - constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, TolC: Standard_Real, TolS: Standard_Real); - } - - export declare class Extrema_ExtCS_3 extends Extrema_ExtCS { - constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, UCinf: Standard_Real, UCsup: Standard_Real, Uinf: Standard_Real, Usup: Standard_Real, Vinf: Standard_Real, Vsup: Standard_Real, TolC: Standard_Real, TolS: Standard_Real); - } - -export declare class Extrema_ExtPC { - Initialize(C: Adaptor3d_Curve, Uinf: Standard_Real, Usup: Standard_Real, TolF: Standard_Real): void; - Perform(P: gp_Pnt): void; - IsDone(): Standard_Boolean; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - NbExt(): Graphic3d_ZLayerId; - IsMin(N: Graphic3d_ZLayerId): Standard_Boolean; - Point(N: Graphic3d_ZLayerId): Extrema_POnCurv; - TrimmedSquareDistances(dist1: Standard_Real, dist2: Standard_Real, P1: gp_Pnt, P2: gp_Pnt): void; - delete(): void; -} - - export declare class Extrema_ExtPC_1 extends Extrema_ExtPC { - constructor(); - } - - export declare class Extrema_ExtPC_2 extends Extrema_ExtPC { - constructor(P: gp_Pnt, C: Adaptor3d_Curve, Uinf: Standard_Real, Usup: Standard_Real, TolF: Standard_Real); - } - - export declare class Extrema_ExtPC_3 extends Extrema_ExtPC { - constructor(P: gp_Pnt, C: Adaptor3d_Curve, TolF: Standard_Real); - } - -export declare class Extrema_ExtPS { - Initialize(S: Adaptor3d_Surface, Uinf: Standard_Real, Usup: Standard_Real, Vinf: Standard_Real, Vsup: Standard_Real, TolU: Standard_Real, TolV: Standard_Real): void; - Perform(P: gp_Pnt): void; - IsDone(): Standard_Boolean; - NbExt(): Graphic3d_ZLayerId; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - Point(N: Graphic3d_ZLayerId): Extrema_POnSurf; - TrimmedSquareDistances(dUfVf: Standard_Real, dUfVl: Standard_Real, dUlVf: Standard_Real, dUlVl: Standard_Real, PUfVf: gp_Pnt, PUfVl: gp_Pnt, PUlVf: gp_Pnt, PUlVl: gp_Pnt): void; - SetFlag(F: Extrema_ExtFlag): void; - SetAlgo(A: Extrema_ExtAlgo): void; - delete(): void; -} - - export declare class Extrema_ExtPS_1 extends Extrema_ExtPS { - constructor(); - } - - export declare class Extrema_ExtPS_2 extends Extrema_ExtPS { - constructor(P: gp_Pnt, S: Adaptor3d_Surface, TolU: Standard_Real, TolV: Standard_Real, F: Extrema_ExtFlag, A: Extrema_ExtAlgo); - } - - export declare class Extrema_ExtPS_3 extends Extrema_ExtPS { - constructor(P: gp_Pnt, S: Adaptor3d_Surface, Uinf: Standard_Real, Usup: Standard_Real, Vinf: Standard_Real, Vsup: Standard_Real, TolU: Standard_Real, TolV: Standard_Real, F: Extrema_ExtFlag, A: Extrema_ExtAlgo); - } - -export declare class Extrema_ExtSS { - Initialize(S2: Adaptor3d_Surface, Uinf2: Standard_Real, Usup2: Standard_Real, Vinf2: Standard_Real, Vsup2: Standard_Real, TolS1: Standard_Real): void; - Perform(S1: Adaptor3d_Surface, Uinf1: Standard_Real, Usup1: Standard_Real, Vinf1: Standard_Real, Vsup1: Standard_Real, TolS1: Standard_Real): void; - IsDone(): Standard_Boolean; - IsParallel(): Standard_Boolean; - NbExt(): Graphic3d_ZLayerId; - SquareDistance(N: Graphic3d_ZLayerId): Standard_Real; - Points(N: Graphic3d_ZLayerId, P1: Extrema_POnSurf, P2: Extrema_POnSurf): void; - delete(): void; -} - - export declare class Extrema_ExtSS_1 extends Extrema_ExtSS { - constructor(); - } - - export declare class Extrema_ExtSS_2 extends Extrema_ExtSS { - constructor(S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, TolS1: Standard_Real, TolS2: Standard_Real); - } - - export declare class Extrema_ExtSS_3 extends Extrema_ExtSS { - constructor(S1: Adaptor3d_Surface, S2: Adaptor3d_Surface, Uinf1: Standard_Real, Usup1: Standard_Real, Vinf1: Standard_Real, Vsup1: Standard_Real, Uinf2: Standard_Real, Usup2: Standard_Real, Vinf2: Standard_Real, Vsup2: Standard_Real, TolS1: Standard_Real, TolS2: Standard_Real); - } - -export declare class Extrema_POnCurv { - SetValues(U: Standard_Real, P: gp_Pnt): void; - Value(): gp_Pnt; - Parameter(): Standard_Real; - delete(): void; -} - - export declare class Extrema_POnCurv_1 extends Extrema_POnCurv { - constructor(); - } - - export declare class Extrema_POnCurv_2 extends Extrema_POnCurv { - constructor(U: Standard_Real, P: gp_Pnt); - } - -export declare class Extrema_POnSurf { - Value(): gp_Pnt; - SetParameters(theU: Standard_Real, theV: Standard_Real, thePnt: gp_Pnt): void; - Parameter(U: Standard_Real, V: Standard_Real): void; - delete(): void; -} - - export declare class Extrema_POnSurf_1 extends Extrema_POnSurf { - constructor(); - } - - export declare class Extrema_POnSurf_2 extends Extrema_POnSurf { - constructor(U: Standard_Real, V: Standard_Real, P: gp_Pnt); - } - -export declare class GC_MakeArcOfCircle extends GC_Root { - Value(): Handle_Geom_TrimmedCurve; - delete(): void; -} - - export declare class GC_MakeArcOfCircle_1 extends GC_MakeArcOfCircle { - constructor(Circ: gp_Circ, Alpha1: Standard_Real, Alpha2: Standard_Real, Sense: Standard_Boolean); - } - - export declare class GC_MakeArcOfCircle_2 extends GC_MakeArcOfCircle { - constructor(Circ: gp_Circ, P: gp_Pnt, Alpha: Standard_Real, Sense: Standard_Boolean); - } - - export declare class GC_MakeArcOfCircle_3 extends GC_MakeArcOfCircle { - constructor(Circ: gp_Circ, P1: gp_Pnt, P2: gp_Pnt, Sense: Standard_Boolean); - } - - export declare class GC_MakeArcOfCircle_4 extends GC_MakeArcOfCircle { - constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt); - } - - export declare class GC_MakeArcOfCircle_5 extends GC_MakeArcOfCircle { - constructor(P1: gp_Pnt, V: gp_Vec, P2: gp_Pnt); - } - -export declare class GC_MakeArcOfEllipse extends GC_Root { - Value(): Handle_Geom_TrimmedCurve; - delete(): void; -} - - export declare class GC_MakeArcOfEllipse_1 extends GC_MakeArcOfEllipse { - constructor(Elips: gp_Elips, Alpha1: Standard_Real, Alpha2: Standard_Real, Sense: Standard_Boolean); - } - - export declare class GC_MakeArcOfEllipse_2 extends GC_MakeArcOfEllipse { - constructor(Elips: gp_Elips, P: gp_Pnt, Alpha: Standard_Real, Sense: Standard_Boolean); - } - - export declare class GC_MakeArcOfEllipse_3 extends GC_MakeArcOfEllipse { - constructor(Elips: gp_Elips, P1: gp_Pnt, P2: gp_Pnt, Sense: Standard_Boolean); - } - -export declare class GC_Root { - constructor(); - IsDone(): Standard_Boolean; - Status(): gce_ErrorType; - delete(): void; -} - -export declare class GCPnts_AbscissaPoint { - static Length_1(theC: Adaptor3d_Curve): Standard_Real; - static Length_2(theC: Adaptor2d_Curve2d): Standard_Real; - static Length_3(theC: Adaptor3d_Curve, theTol: Standard_Real): Standard_Real; - static Length_4(theC: Adaptor2d_Curve2d, theTol: Standard_Real): Standard_Real; - static Length_5(theC: Adaptor3d_Curve, theU1: Standard_Real, theU2: Standard_Real): Standard_Real; - static Length_6(theC: Adaptor2d_Curve2d, theU1: Standard_Real, theU2: Standard_Real): Standard_Real; - static Length_7(theC: Adaptor3d_Curve, theU1: Standard_Real, theU2: Standard_Real, theTol: Standard_Real): Standard_Real; - static Length_8(theC: Adaptor2d_Curve2d, theU1: Standard_Real, theU2: Standard_Real, theTol: Standard_Real): Standard_Real; - IsDone(): Standard_Boolean; - Parameter(): Standard_Real; - delete(): void; -} - - export declare class GCPnts_AbscissaPoint_1 extends GCPnts_AbscissaPoint { - constructor(); - } - - export declare class GCPnts_AbscissaPoint_2 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU0: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_3 extends GCPnts_AbscissaPoint { - constructor(theTol: Standard_Real, theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU0: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_4 extends GCPnts_AbscissaPoint { - constructor(theTol: Standard_Real, theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU0: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_5 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU0: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_6 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU0: Standard_Real, theUi: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_7 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU0: Standard_Real, theUi: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_8 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU0: Standard_Real, theUi: Standard_Real, theTol: Standard_Real); - } - - export declare class GCPnts_AbscissaPoint_9 extends GCPnts_AbscissaPoint { - constructor(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU0: Standard_Real, theUi: Standard_Real, theTol: Standard_Real); - } - -export declare class GCPnts_TangentialDeflection { - Initialize_1(theC: Adaptor3d_Curve, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real): void; - Initialize_2(theC: Adaptor3d_Curve, theFirstParameter: Standard_Real, theLastParameter: Standard_Real, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real): void; - Initialize_3(theC: Adaptor2d_Curve2d, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real): void; - Initialize_4(theC: Adaptor2d_Curve2d, theFirstParameter: Standard_Real, theLastParameter: Standard_Real, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real): void; - AddPoint(thePnt: gp_Pnt, theParam: Standard_Real, theIsReplace: Standard_Boolean): Graphic3d_ZLayerId; - NbPoints(): Graphic3d_ZLayerId; - Parameter(I: Graphic3d_ZLayerId): Standard_Real; - Value(I: Graphic3d_ZLayerId): gp_Pnt; - static ArcAngularStep(theRadius: Standard_Real, theLinearDeflection: Standard_Real, theAngularDeflection: Standard_Real, theMinLength: Standard_Real): Standard_Real; - delete(): void; -} - - export declare class GCPnts_TangentialDeflection_1 extends GCPnts_TangentialDeflection { - constructor(); - } - - export declare class GCPnts_TangentialDeflection_2 extends GCPnts_TangentialDeflection { - constructor(theC: Adaptor3d_Curve, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real); - } - - export declare class GCPnts_TangentialDeflection_3 extends GCPnts_TangentialDeflection { - constructor(theC: Adaptor3d_Curve, theFirstParameter: Standard_Real, theLastParameter: Standard_Real, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real); - } - - export declare class GCPnts_TangentialDeflection_4 extends GCPnts_TangentialDeflection { - constructor(theC: Adaptor2d_Curve2d, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real); - } - - export declare class GCPnts_TangentialDeflection_5 extends GCPnts_TangentialDeflection { - constructor(theC: Adaptor2d_Curve2d, theFirstParameter: Standard_Real, theLastParameter: Standard_Real, theAngularDeflection: Standard_Real, theCurvatureDeflection: Standard_Real, theMinimumOfPoints: Graphic3d_ZLayerId, theUTol: Standard_Real, theMinLen: Standard_Real); - } - -export declare class GCPnts_UniformAbscissa { - Initialize_1(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theToler: Standard_Real): void; - Initialize_2(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real): void; - Initialize_3(theC: Adaptor3d_Curve, theNbPoints: Graphic3d_ZLayerId, theToler: Standard_Real): void; - Initialize_4(theC: Adaptor3d_Curve, theNbPoints: Graphic3d_ZLayerId, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real): void; - Initialize_5(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theToler: Standard_Real): void; - Initialize_6(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real): void; - Initialize_7(theC: Adaptor2d_Curve2d, theNbPoints: Graphic3d_ZLayerId, theToler: Standard_Real): void; - Initialize_8(theC: Adaptor2d_Curve2d, theNbPoints: Graphic3d_ZLayerId, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real): void; - IsDone(): Standard_Boolean; - NbPoints(): Graphic3d_ZLayerId; - Parameter(Index: Graphic3d_ZLayerId): Standard_Real; - Abscissa(): Standard_Real; - delete(): void; -} - - export declare class GCPnts_UniformAbscissa_1 extends GCPnts_UniformAbscissa { - constructor(); - } - - export declare class GCPnts_UniformAbscissa_2 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_3 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor3d_Curve, theAbscissa: Standard_Real, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_4 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor3d_Curve, theNbPoints: Graphic3d_ZLayerId, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_5 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor3d_Curve, theNbPoints: Graphic3d_ZLayerId, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_6 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_7 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor2d_Curve2d, theAbscissa: Standard_Real, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_8 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor2d_Curve2d, theNbPoints: Graphic3d_ZLayerId, theToler: Standard_Real); - } - - export declare class GCPnts_UniformAbscissa_9 extends GCPnts_UniformAbscissa { - constructor(theC: Adaptor2d_Curve2d, theNbPoints: Graphic3d_ZLayerId, theU1: Standard_Real, theU2: Standard_Real, theToler: Standard_Real); - } - -export declare class GProp_GProps { - Add(Item: GProp_GProps, Density: Standard_Real): void; - Mass(): Standard_Real; - CentreOfMass(): gp_Pnt; - MatrixOfInertia(): gp_Mat; - StaticMoments(Ix: Standard_Real, Iy: Standard_Real, Iz: Standard_Real): void; - MomentOfInertia(A: gp_Ax1): Standard_Real; - PrincipalProperties(): GProp_PrincipalProps; - RadiusOfGyration(A: gp_Ax1): Standard_Real; - delete(): void; -} - - export declare class GProp_GProps_1 extends GProp_GProps { - constructor(); - } - - export declare class GProp_GProps_2 extends GProp_GProps { - constructor(SystemLocation: gp_Pnt); - } - -export declare class Geom_BSplineCurve extends Geom_BoundedCurve { - IncreaseDegree(Degree: Graphic3d_ZLayerId): void; - IncreaseMultiplicity_1(Index: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncreaseMultiplicity_2(I1: Graphic3d_ZLayerId, I2: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncrementMultiplicity(I1: Graphic3d_ZLayerId, I2: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - InsertKnot(U: Standard_Real, M: Graphic3d_ZLayerId, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - InsertKnots(Knots: IntTools_CArray1OfReal, Mults: TColStd_Array1OfInteger, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - RemoveKnot(Index: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId, Tolerance: Standard_Real): Standard_Boolean; - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - Segment(U1: Standard_Real, U2: Standard_Real, theTolerance: Standard_Real): void; - SetKnot_1(Index: Graphic3d_ZLayerId, K: Standard_Real): void; - SetKnots(K: IntTools_CArray1OfReal): void; - SetKnot_2(Index: Graphic3d_ZLayerId, K: Standard_Real, M: Graphic3d_ZLayerId): void; - PeriodicNormalization(U: Standard_Real): void; - SetPeriodic(): void; - SetOrigin_1(Index: Graphic3d_ZLayerId): void; - SetOrigin_2(U: Standard_Real, Tol: Standard_Real): void; - SetNotPeriodic(): void; - SetPole_1(Index: Graphic3d_ZLayerId, P: gp_Pnt): void; - SetPole_2(Index: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - SetWeight(Index: Graphic3d_ZLayerId, Weight: Standard_Real): void; - MovePoint(U: Standard_Real, P: gp_Pnt, Index1: Graphic3d_ZLayerId, Index2: Graphic3d_ZLayerId, FirstModifiedPole: Graphic3d_ZLayerId, LastModifiedPole: Graphic3d_ZLayerId): void; - MovePointAndTangent(U: Standard_Real, P: gp_Pnt, Tangent: gp_Vec, Tolerance: Standard_Real, StartingCondition: Graphic3d_ZLayerId, EndingCondition: Graphic3d_ZLayerId, ErrorStatus: Graphic3d_ZLayerId): void; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - IsG1(theTf: Standard_Real, theTl: Standard_Real, theAngTol: Standard_Real): Standard_Boolean; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - IsRational(): Standard_Boolean; - Continuity(): GeomAbs_Shape; - Degree(): Graphic3d_ZLayerId; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - LocalValue(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId): gp_Pnt; - LocalD0(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId, P: gp_Pnt): void; - LocalD1(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId, P: gp_Pnt, V1: gp_Vec): void; - LocalD2(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - LocalD3(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - LocalDN(U: Standard_Real, FromK1: Graphic3d_ZLayerId, ToK2: Graphic3d_ZLayerId, N: Graphic3d_ZLayerId): gp_Vec; - EndPoint(): gp_Pnt; - FirstUKnotIndex(): Graphic3d_ZLayerId; - FirstParameter(): Standard_Real; - Knot(Index: Graphic3d_ZLayerId): Standard_Real; - Knots_1(K: IntTools_CArray1OfReal): void; - Knots_2(): IntTools_CArray1OfReal; - KnotSequence_1(K: IntTools_CArray1OfReal): void; - KnotSequence_2(): IntTools_CArray1OfReal; - KnotDistribution(): GeomAbs_BSplKnotDistribution; - LastUKnotIndex(): Graphic3d_ZLayerId; - LastParameter(): Standard_Real; - LocateU(U: Standard_Real, ParametricTolerance: Standard_Real, I1: Graphic3d_ZLayerId, I2: Graphic3d_ZLayerId, WithKnotRepetition: Standard_Boolean): void; - Multiplicity(Index: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Multiplicities_1(M: TColStd_Array1OfInteger): void; - Multiplicities_2(): TColStd_Array1OfInteger; - NbKnots(): Graphic3d_ZLayerId; - NbPoles(): Graphic3d_ZLayerId; - Pole(Index: Graphic3d_ZLayerId): gp_Pnt; - Poles_1(P: TColgp_Array1OfPnt): void; - Poles_2(): TColgp_Array1OfPnt; - StartPoint(): gp_Pnt; - Weight(Index: Graphic3d_ZLayerId): Standard_Real; - Weights_1(W: IntTools_CArray1OfReal): void; - Weights_2(): IntTools_CArray1OfReal; - Transform(T: gp_Trsf): void; - static MaxDegree(): Graphic3d_ZLayerId; - Resolution(Tolerance3D: Standard_Real, UTolerance: Standard_Real): void; - Copy(): Handle_Geom_Geometry; - IsEqual(theOther: Handle_Geom_BSplineCurve, thePreci: Standard_Real): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_BSplineCurve_1 extends Geom_BSplineCurve { - constructor(Poles: TColgp_Array1OfPnt, Knots: IntTools_CArray1OfReal, Multiplicities: TColStd_Array1OfInteger, Degree: Graphic3d_ZLayerId, Periodic: Standard_Boolean); - } - - export declare class Geom_BSplineCurve_2 extends Geom_BSplineCurve { - constructor(Poles: TColgp_Array1OfPnt, Weights: IntTools_CArray1OfReal, Knots: IntTools_CArray1OfReal, Multiplicities: TColStd_Array1OfInteger, Degree: Graphic3d_ZLayerId, Periodic: Standard_Boolean, CheckRational: Standard_Boolean); - } - -export declare class Handle_Geom_BSplineCurve { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_BSplineCurve): void; - get(): Geom_BSplineCurve; - delete(): void; -} - - export declare class Handle_Geom_BSplineCurve_1 extends Handle_Geom_BSplineCurve { - constructor(); - } - - export declare class Handle_Geom_BSplineCurve_2 extends Handle_Geom_BSplineCurve { - constructor(thePtr: Geom_BSplineCurve); - } - - export declare class Handle_Geom_BSplineCurve_3 extends Handle_Geom_BSplineCurve { - constructor(theHandle: Handle_Geom_BSplineCurve); - } - - export declare class Handle_Geom_BSplineCurve_4 extends Handle_Geom_BSplineCurve { - constructor(theHandle: Handle_Geom_BSplineCurve); - } - -export declare class Geom_BSplineSurface extends Geom_BoundedSurface { - ExchangeUV(): void; - SetUPeriodic(): void; - SetVPeriodic(): void; - PeriodicNormalization(U: Standard_Real, V: Standard_Real): void; - SetUOrigin(Index: Graphic3d_ZLayerId): void; - SetVOrigin(Index: Graphic3d_ZLayerId): void; - SetUNotPeriodic(): void; - SetVNotPeriodic(): void; - UReverse(): void; - VReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReversedParameter(V: Standard_Real): Standard_Real; - IncreaseDegree(UDegree: Graphic3d_ZLayerId, VDegree: Graphic3d_ZLayerId): void; - InsertUKnots(Knots: IntTools_CArray1OfReal, Mults: TColStd_Array1OfInteger, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - InsertVKnots(Knots: IntTools_CArray1OfReal, Mults: TColStd_Array1OfInteger, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - RemoveUKnot(Index: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId, Tolerance: Standard_Real): Standard_Boolean; - RemoveVKnot(Index: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId, Tolerance: Standard_Real): Standard_Boolean; - IncreaseUMultiplicity_1(UIndex: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncreaseUMultiplicity_2(FromI1: Graphic3d_ZLayerId, ToI2: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncrementUMultiplicity(FromI1: Graphic3d_ZLayerId, ToI2: Graphic3d_ZLayerId, Step: Graphic3d_ZLayerId): void; - IncreaseVMultiplicity_1(VIndex: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncreaseVMultiplicity_2(FromI1: Graphic3d_ZLayerId, ToI2: Graphic3d_ZLayerId, M: Graphic3d_ZLayerId): void; - IncrementVMultiplicity(FromI1: Graphic3d_ZLayerId, ToI2: Graphic3d_ZLayerId, Step: Graphic3d_ZLayerId): void; - InsertUKnot(U: Standard_Real, M: Graphic3d_ZLayerId, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - InsertVKnot(V: Standard_Real, M: Graphic3d_ZLayerId, ParametricTolerance: Standard_Real, Add: Standard_Boolean): void; - Segment(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, theUTolerance: Standard_Real, theVTolerance: Standard_Real): void; - CheckAndSegment(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, theUTolerance: Standard_Real, theVTolerance: Standard_Real): void; - SetUKnot_1(UIndex: Graphic3d_ZLayerId, K: Standard_Real): void; - SetUKnots(UK: IntTools_CArray1OfReal): void; - SetUKnot_2(UIndex: Graphic3d_ZLayerId, K: Standard_Real, M: Graphic3d_ZLayerId): void; - SetVKnot_1(VIndex: Graphic3d_ZLayerId, K: Standard_Real): void; - SetVKnots(VK: IntTools_CArray1OfReal): void; - SetVKnot_2(VIndex: Graphic3d_ZLayerId, K: Standard_Real, M: Graphic3d_ZLayerId): void; - LocateU(U: Standard_Real, ParametricTolerance: Standard_Real, I1: Graphic3d_ZLayerId, I2: Graphic3d_ZLayerId, WithKnotRepetition: Standard_Boolean): void; - LocateV(V: Standard_Real, ParametricTolerance: Standard_Real, I1: Graphic3d_ZLayerId, I2: Graphic3d_ZLayerId, WithKnotRepetition: Standard_Boolean): void; - SetPole_1(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, P: gp_Pnt): void; - SetPole_2(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - SetPoleCol_1(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - SetPoleCol_2(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - SetPoleRow_1(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - SetPoleRow_2(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - SetWeight(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, Weight: Standard_Real): void; - SetWeightCol(VIndex: Graphic3d_ZLayerId, CPoleWeights: IntTools_CArray1OfReal): void; - SetWeightRow(UIndex: Graphic3d_ZLayerId, CPoleWeights: IntTools_CArray1OfReal): void; - MovePoint(U: Standard_Real, V: Standard_Real, P: gp_Pnt, UIndex1: Graphic3d_ZLayerId, UIndex2: Graphic3d_ZLayerId, VIndex1: Graphic3d_ZLayerId, VIndex2: Graphic3d_ZLayerId, UFirstIndex: Graphic3d_ZLayerId, ULastIndex: Graphic3d_ZLayerId, VFirstIndex: Graphic3d_ZLayerId, VLastIndex: Graphic3d_ZLayerId): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsURational(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - IsVRational(): Standard_Boolean; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Continuity(): GeomAbs_Shape; - FirstUKnotIndex(): Graphic3d_ZLayerId; - FirstVKnotIndex(): Graphic3d_ZLayerId; - LastUKnotIndex(): Graphic3d_ZLayerId; - LastVKnotIndex(): Graphic3d_ZLayerId; - NbUKnots(): Graphic3d_ZLayerId; - NbUPoles(): Graphic3d_ZLayerId; - NbVKnots(): Graphic3d_ZLayerId; - NbVPoles(): Graphic3d_ZLayerId; - Pole(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId): gp_Pnt; - Poles_1(P: TColgp_Array2OfPnt): void; - Poles_2(): TColgp_Array2OfPnt; - UDegree(): Graphic3d_ZLayerId; - UKnot(UIndex: Graphic3d_ZLayerId): Standard_Real; - UKnotDistribution(): GeomAbs_BSplKnotDistribution; - UKnots_1(Ku: IntTools_CArray1OfReal): void; - UKnots_2(): IntTools_CArray1OfReal; - UKnotSequence_1(Ku: IntTools_CArray1OfReal): void; - UKnotSequence_2(): IntTools_CArray1OfReal; - UMultiplicity(UIndex: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - UMultiplicities_1(Mu: TColStd_Array1OfInteger): void; - UMultiplicities_2(): TColStd_Array1OfInteger; - VDegree(): Graphic3d_ZLayerId; - VKnot(VIndex: Graphic3d_ZLayerId): Standard_Real; - VKnotDistribution(): GeomAbs_BSplKnotDistribution; - VKnots_1(Kv: IntTools_CArray1OfReal): void; - VKnots_2(): IntTools_CArray1OfReal; - VKnotSequence_1(Kv: IntTools_CArray1OfReal): void; - VKnotSequence_2(): IntTools_CArray1OfReal; - VMultiplicity(VIndex: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - VMultiplicities_1(Mv: TColStd_Array1OfInteger): void; - VMultiplicities_2(): TColStd_Array1OfInteger; - Weight(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId): Standard_Real; - Weights_1(W: TColStd_Array2OfReal): void; - Weights_2(): TColStd_Array2OfReal; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - LocalD0(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId, P: gp_Pnt): void; - LocalD1(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - LocalD2(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - LocalD3(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId, 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; - LocalDN(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - LocalValue(U: Standard_Real, V: Standard_Real, FromUK1: Graphic3d_ZLayerId, ToUK2: Graphic3d_ZLayerId, FromVK1: Graphic3d_ZLayerId, ToVK2: Graphic3d_ZLayerId): gp_Pnt; - UIso_1(U: Standard_Real): Handle_Geom_Curve; - VIso_1(V: Standard_Real): Handle_Geom_Curve; - UIso_2(U: Standard_Real, CheckRational: Standard_Boolean): Handle_Geom_Curve; - VIso_2(V: Standard_Real, CheckRational: Standard_Boolean): Handle_Geom_Curve; - Transform(T: gp_Trsf): void; - static MaxDegree(): Graphic3d_ZLayerId; - Resolution(Tolerance3D: Standard_Real, UTolerance: Standard_Real, VTolerance: Standard_Real): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_BSplineSurface_1 extends Geom_BSplineSurface { - constructor(Poles: TColgp_Array2OfPnt, UKnots: IntTools_CArray1OfReal, VKnots: IntTools_CArray1OfReal, UMults: TColStd_Array1OfInteger, VMults: TColStd_Array1OfInteger, UDegree: Graphic3d_ZLayerId, VDegree: Graphic3d_ZLayerId, UPeriodic: Standard_Boolean, VPeriodic: Standard_Boolean); - } - - export declare class Geom_BSplineSurface_2 extends Geom_BSplineSurface { - constructor(Poles: TColgp_Array2OfPnt, Weights: TColStd_Array2OfReal, UKnots: IntTools_CArray1OfReal, VKnots: IntTools_CArray1OfReal, UMults: TColStd_Array1OfInteger, VMults: TColStd_Array1OfInteger, UDegree: Graphic3d_ZLayerId, VDegree: Graphic3d_ZLayerId, UPeriodic: Standard_Boolean, VPeriodic: Standard_Boolean); - } - -export declare class Handle_Geom_BSplineSurface { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_BSplineSurface): void; - get(): Geom_BSplineSurface; - delete(): void; -} - - export declare class Handle_Geom_BSplineSurface_1 extends Handle_Geom_BSplineSurface { - constructor(); - } - - export declare class Handle_Geom_BSplineSurface_2 extends Handle_Geom_BSplineSurface { - constructor(thePtr: Geom_BSplineSurface); - } - - export declare class Handle_Geom_BSplineSurface_3 extends Handle_Geom_BSplineSurface { - constructor(theHandle: Handle_Geom_BSplineSurface); - } - - export declare class Handle_Geom_BSplineSurface_4 extends Handle_Geom_BSplineSurface { - constructor(theHandle: Handle_Geom_BSplineSurface); - } - -export declare class Geom_BezierCurve extends Geom_BoundedCurve { - Increase(Degree: Graphic3d_ZLayerId): void; - InsertPoleAfter_1(Index: Graphic3d_ZLayerId, P: gp_Pnt): void; - InsertPoleAfter_2(Index: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - InsertPoleBefore_1(Index: Graphic3d_ZLayerId, P: gp_Pnt): void; - InsertPoleBefore_2(Index: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - RemovePole(Index: Graphic3d_ZLayerId): void; - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - Segment(U1: Standard_Real, U2: Standard_Real): void; - SetPole_1(Index: Graphic3d_ZLayerId, P: gp_Pnt): void; - SetPole_2(Index: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - SetWeight(Index: Graphic3d_ZLayerId, Weight: Standard_Real): void; - IsClosed(): Standard_Boolean; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - IsRational(): Standard_Boolean; - Continuity(): GeomAbs_Shape; - Degree(): Graphic3d_ZLayerId; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - StartPoint(): gp_Pnt; - EndPoint(): gp_Pnt; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - NbPoles(): Graphic3d_ZLayerId; - Pole(Index: Graphic3d_ZLayerId): gp_Pnt; - Poles_1(P: TColgp_Array1OfPnt): void; - Poles_2(): TColgp_Array1OfPnt; - Weight(Index: Graphic3d_ZLayerId): Standard_Real; - Weights_1(W: IntTools_CArray1OfReal): void; - Weights_2(): IntTools_CArray1OfReal; - Transform(T: gp_Trsf): void; - static MaxDegree(): Graphic3d_ZLayerId; - Resolution(Tolerance3D: Standard_Real, UTolerance: Standard_Real): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_BezierCurve_1 extends Geom_BezierCurve { - constructor(CurvePoles: TColgp_Array1OfPnt); - } - - export declare class Geom_BezierCurve_2 extends Geom_BezierCurve { - constructor(CurvePoles: TColgp_Array1OfPnt, PoleWeights: IntTools_CArray1OfReal); - } - -export declare class Handle_Geom_BezierCurve { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_BezierCurve): void; - get(): Geom_BezierCurve; - delete(): void; -} - - export declare class Handle_Geom_BezierCurve_1 extends Handle_Geom_BezierCurve { - constructor(); - } - - export declare class Handle_Geom_BezierCurve_2 extends Handle_Geom_BezierCurve { - constructor(thePtr: Geom_BezierCurve); - } - - export declare class Handle_Geom_BezierCurve_3 extends Handle_Geom_BezierCurve { - constructor(theHandle: Handle_Geom_BezierCurve); - } - - export declare class Handle_Geom_BezierCurve_4 extends Handle_Geom_BezierCurve { - constructor(theHandle: Handle_Geom_BezierCurve); - } - -export declare class Geom_BezierSurface extends Geom_BoundedSurface { - ExchangeUV(): void; - Increase(UDeg: Graphic3d_ZLayerId, VDeg: Graphic3d_ZLayerId): void; - InsertPoleColAfter_1(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - InsertPoleColAfter_2(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - InsertPoleColBefore_1(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - InsertPoleColBefore_2(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - InsertPoleRowAfter_1(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - InsertPoleRowAfter_2(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - InsertPoleRowBefore_1(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - InsertPoleRowBefore_2(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - RemovePoleCol(VIndex: Graphic3d_ZLayerId): void; - RemovePoleRow(UIndex: Graphic3d_ZLayerId): void; - Segment(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - SetPole_1(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, P: gp_Pnt): void; - SetPole_2(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, P: gp_Pnt, Weight: Standard_Real): void; - SetPoleCol_1(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - SetPoleCol_2(VIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - SetPoleRow_1(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt): void; - SetPoleRow_2(UIndex: Graphic3d_ZLayerId, CPoles: TColgp_Array1OfPnt, CPoleWeights: IntTools_CArray1OfReal): void; - SetWeight(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId, Weight: Standard_Real): void; - SetWeightCol(VIndex: Graphic3d_ZLayerId, CPoleWeights: IntTools_CArray1OfReal): void; - SetWeightRow(UIndex: Graphic3d_ZLayerId, CPoleWeights: IntTools_CArray1OfReal): void; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Continuity(): GeomAbs_Shape; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - NbUPoles(): Graphic3d_ZLayerId; - NbVPoles(): Graphic3d_ZLayerId; - Pole(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId): gp_Pnt; - Poles_1(P: TColgp_Array2OfPnt): void; - Poles_2(): TColgp_Array2OfPnt; - UDegree(): Graphic3d_ZLayerId; - UIso(U: Standard_Real): Handle_Geom_Curve; - VDegree(): Graphic3d_ZLayerId; - VIso(V: Standard_Real): Handle_Geom_Curve; - Weight(UIndex: Graphic3d_ZLayerId, VIndex: Graphic3d_ZLayerId): Standard_Real; - Weights_1(W: TColStd_Array2OfReal): void; - Weights_2(): TColStd_Array2OfReal; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - IsURational(): Standard_Boolean; - IsVRational(): Standard_Boolean; - Transform(T: gp_Trsf): void; - static MaxDegree(): Graphic3d_ZLayerId; - Resolution(Tolerance3D: Standard_Real, UTolerance: Standard_Real, VTolerance: Standard_Real): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_BezierSurface_1 extends Geom_BezierSurface { - constructor(SurfacePoles: TColgp_Array2OfPnt); - } - - export declare class Geom_BezierSurface_2 extends Geom_BezierSurface { - constructor(SurfacePoles: TColgp_Array2OfPnt, PoleWeights: TColStd_Array2OfReal); - } - -export declare class Geom_BoundedCurve extends Geom_Curve { - EndPoint(): gp_Pnt; - StartPoint(): gp_Pnt; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_BoundedSurface extends Geom_Surface { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_Circle extends Geom_Conic { - SetCirc(C: gp_Circ): void; - SetRadius(R: Standard_Real): void; - Circ(): gp_Circ; - Radius(): Standard_Real; - ReversedParameter(U: Standard_Real): Standard_Real; - Eccentricity(): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Circle_1 extends Geom_Circle { - constructor(C: gp_Circ); - } - - export declare class Geom_Circle_2 extends Geom_Circle { - constructor(A2: gp_Ax2, Radius: Standard_Real); - } - -export declare class Handle_Geom_Circle { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Circle): void; - get(): Geom_Circle; - delete(): void; -} - - export declare class Handle_Geom_Circle_1 extends Handle_Geom_Circle { - constructor(); - } - - export declare class Handle_Geom_Circle_2 extends Handle_Geom_Circle { - constructor(thePtr: Geom_Circle); - } - - export declare class Handle_Geom_Circle_3 extends Handle_Geom_Circle { - constructor(theHandle: Handle_Geom_Circle); - } - - export declare class Handle_Geom_Circle_4 extends Handle_Geom_Circle { - constructor(theHandle: Handle_Geom_Circle); - } - -export declare class Geom_Conic extends Geom_Curve { - SetAxis(theA1: gp_Ax1): void; - SetLocation(theP: gp_Pnt): void; - SetPosition(theA2: gp_Ax2): void; - Axis(): gp_Ax1; - Location(): gp_Pnt; - Position(): gp_Ax2; - Eccentricity(): Standard_Real; - XAxis(): gp_Ax1; - YAxis(): gp_Ax1; - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - Continuity(): GeomAbs_Shape; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Handle_Geom_Conic { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Conic): void; - get(): Geom_Conic; - delete(): void; -} - - export declare class Handle_Geom_Conic_1 extends Handle_Geom_Conic { - constructor(); - } - - export declare class Handle_Geom_Conic_2 extends Handle_Geom_Conic { - constructor(thePtr: Geom_Conic); - } - - export declare class Handle_Geom_Conic_3 extends Handle_Geom_Conic { - constructor(theHandle: Handle_Geom_Conic); - } - - export declare class Handle_Geom_Conic_4 extends Handle_Geom_Conic { - constructor(theHandle: Handle_Geom_Conic); - } - -export declare class Geom_ConicalSurface extends Geom_ElementarySurface { - SetCone(C: gp_Cone): void; - SetRadius(R: Standard_Real): void; - SetSemiAngle(Ang: Standard_Real): void; - Cone(): gp_Cone; - UReversedParameter(U: Standard_Real): Standard_Real; - VReversedParameter(V: Standard_Real): Standard_Real; - VReverse(): void; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Apex(): gp_Pnt; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Coefficients(A1: Standard_Real, A2: Standard_Real, A3: Standard_Real, B1: Standard_Real, B2: Standard_Real, B3: Standard_Real, C1: Standard_Real, C2: Standard_Real, C3: Standard_Real, D: Standard_Real): void; - RefRadius(): Standard_Real; - SemiAngle(): Standard_Real; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_ConicalSurface_1 extends Geom_ConicalSurface { - constructor(A3: gp_Ax3, Ang: Standard_Real, Radius: Standard_Real); - } - - export declare class Geom_ConicalSurface_2 extends Geom_ConicalSurface { - constructor(C: gp_Cone); - } - -export declare class Geom_Curve extends Geom_Geometry { - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - TransformedParameter(U: Standard_Real, T: gp_Trsf): Standard_Real; - ParametricTransformation(T: gp_Trsf): Standard_Real; - Reversed(): Handle_Geom_Curve; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Continuity(): GeomAbs_Shape; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Value(U: Standard_Real): gp_Pnt; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Handle_Geom_Curve { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Curve): void; - get(): Geom_Curve; - delete(): void; -} - - export declare class Handle_Geom_Curve_1 extends Handle_Geom_Curve { - constructor(); - } - - export declare class Handle_Geom_Curve_2 extends Handle_Geom_Curve { - constructor(thePtr: Geom_Curve); - } - - export declare class Handle_Geom_Curve_3 extends Handle_Geom_Curve { - constructor(theHandle: Handle_Geom_Curve); - } - - export declare class Handle_Geom_Curve_4 extends Handle_Geom_Curve { - constructor(theHandle: Handle_Geom_Curve); - } - -export declare class Geom_CylindricalSurface extends Geom_ElementarySurface { - SetCylinder(C: gp_Cylinder): void; - SetRadius(R: Standard_Real): void; - Cylinder(): gp_Cylinder; - UReversedParameter(U: Standard_Real): Standard_Real; - VReversedParameter(V: Standard_Real): Standard_Real; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Coefficients(A1: Standard_Real, A2: Standard_Real, A3: Standard_Real, B1: Standard_Real, B2: Standard_Real, B3: Standard_Real, C1: Standard_Real, C2: Standard_Real, C3: Standard_Real, D: Standard_Real): void; - Radius(): Standard_Real; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_CylindricalSurface_1 extends Geom_CylindricalSurface { - constructor(A3: gp_Ax3, Radius: Standard_Real); - } - - export declare class Geom_CylindricalSurface_2 extends Geom_CylindricalSurface { - constructor(C: gp_Cylinder); - } - -export declare class Geom_ElementarySurface extends Geom_Surface { - SetAxis(theA1: gp_Ax1): void; - SetLocation(theLoc: gp_Pnt): void; - SetPosition(theAx3: gp_Ax3): void; - Axis(): gp_Ax1; - Location(): gp_Pnt; - Position(): gp_Ax3; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Continuity(): GeomAbs_Shape; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_Ellipse extends Geom_Conic { - SetElips(E: gp_Elips): void; - SetMajorRadius(MajorRadius: Standard_Real): void; - SetMinorRadius(MinorRadius: Standard_Real): void; - Elips(): gp_Elips; - ReversedParameter(U: Standard_Real): Standard_Real; - Directrix1(): gp_Ax1; - Directrix2(): gp_Ax1; - Eccentricity(): Standard_Real; - Focal(): Standard_Real; - Focus1(): gp_Pnt; - Focus2(): gp_Pnt; - MajorRadius(): Standard_Real; - MinorRadius(): Standard_Real; - Parameter(): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Ellipse_1 extends Geom_Ellipse { - constructor(E: gp_Elips); - } - - export declare class Geom_Ellipse_2 extends Geom_Ellipse { - constructor(A2: gp_Ax2, MajorRadius: Standard_Real, MinorRadius: Standard_Real); - } - -export declare class Geom_Geometry extends Standard_Transient { - Mirror_1(P: gp_Pnt): void; - Mirror_2(A1: gp_Ax1): void; - Mirror_3(A2: gp_Ax2): void; - Rotate(A1: gp_Ax1, Ang: Standard_Real): void; - Scale(P: gp_Pnt, S: Standard_Real): void; - Translate_1(V: gp_Vec): void; - Translate_2(P1: gp_Pnt, P2: gp_Pnt): void; - Transform(T: gp_Trsf): void; - Mirrored_1(P: gp_Pnt): Handle_Geom_Geometry; - Mirrored_2(A1: gp_Ax1): Handle_Geom_Geometry; - Mirrored_3(A2: gp_Ax2): Handle_Geom_Geometry; - Rotated(A1: gp_Ax1, Ang: Standard_Real): Handle_Geom_Geometry; - Scaled(P: gp_Pnt, S: Standard_Real): Handle_Geom_Geometry; - Transformed(T: gp_Trsf): Handle_Geom_Geometry; - Translated_1(V: gp_Vec): Handle_Geom_Geometry; - Translated_2(P1: gp_Pnt, P2: gp_Pnt): Handle_Geom_Geometry; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Handle_Geom_Geometry { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Geometry): void; - get(): Geom_Geometry; - delete(): void; -} - - export declare class Handle_Geom_Geometry_1 extends Handle_Geom_Geometry { - constructor(); - } - - export declare class Handle_Geom_Geometry_2 extends Handle_Geom_Geometry { - constructor(thePtr: Geom_Geometry); - } - - export declare class Handle_Geom_Geometry_3 extends Handle_Geom_Geometry { - constructor(theHandle: Handle_Geom_Geometry); - } - - export declare class Handle_Geom_Geometry_4 extends Handle_Geom_Geometry { - constructor(theHandle: Handle_Geom_Geometry); - } - -export declare class Geom_Hyperbola extends Geom_Conic { - SetHypr(H: gp_Hypr): void; - SetMajorRadius(MajorRadius: Standard_Real): void; - SetMinorRadius(MinorRadius: Standard_Real): void; - Hypr(): gp_Hypr; - ReversedParameter(U: Standard_Real): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Asymptote1(): gp_Ax1; - Asymptote2(): gp_Ax1; - ConjugateBranch1(): gp_Hypr; - ConjugateBranch2(): gp_Hypr; - Directrix1(): gp_Ax1; - Directrix2(): gp_Ax1; - Eccentricity(): Standard_Real; - Focal(): Standard_Real; - Focus1(): gp_Pnt; - Focus2(): gp_Pnt; - MajorRadius(): Standard_Real; - MinorRadius(): Standard_Real; - OtherBranch(): gp_Hypr; - Parameter(): Standard_Real; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Hyperbola_1 extends Geom_Hyperbola { - constructor(H: gp_Hypr); - } - - export declare class Geom_Hyperbola_2 extends Geom_Hyperbola { - constructor(A2: gp_Ax2, MajorRadius: Standard_Real, MinorRadius: Standard_Real); - } - -export declare class Geom_Line extends Geom_Curve { - SetLin(L: gp_Lin): void; - SetDirection(V: gp_Dir): void; - SetLocation(P: gp_Pnt): void; - SetPosition(A1: gp_Ax1): void; - Lin(): gp_Lin; - Position(): gp_Ax1; - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Continuity(): GeomAbs_Shape; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformedParameter(U: Standard_Real, T: gp_Trsf): Standard_Real; - ParametricTransformation(T: gp_Trsf): Standard_Real; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Line_1 extends Geom_Line { - constructor(A1: gp_Ax1); - } - - export declare class Geom_Line_2 extends Geom_Line { - constructor(L: gp_Lin); - } - - export declare class Geom_Line_3 extends Geom_Line { - constructor(P: gp_Pnt, V: gp_Dir); - } - -export declare class Handle_Geom_Line { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Line): void; - get(): Geom_Line; - delete(): void; -} - - export declare class Handle_Geom_Line_1 extends Handle_Geom_Line { - constructor(); - } - - export declare class Handle_Geom_Line_2 extends Handle_Geom_Line { - constructor(thePtr: Geom_Line); - } - - export declare class Handle_Geom_Line_3 extends Handle_Geom_Line { - constructor(theHandle: Handle_Geom_Line); - } - - export declare class Handle_Geom_Line_4 extends Handle_Geom_Line { - constructor(theHandle: Handle_Geom_Line); - } - -export declare class Geom_OffsetCurve extends Geom_Curve { - constructor(C: Handle_Geom_Curve, Offset: Standard_Real, V: gp_Dir, isNotCheckC0: Standard_Boolean) - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - SetBasisCurve(C: Handle_Geom_Curve, isNotCheckC0: Standard_Boolean): void; - SetDirection(V: gp_Dir): void; - SetOffsetValue(D: Standard_Real): void; - BasisCurve(): Handle_Geom_Curve; - Continuity(): GeomAbs_Shape; - Direction(): gp_Dir; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - Offset(): Standard_Real; - IsClosed(): Standard_Boolean; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Transform(T: gp_Trsf): void; - TransformedParameter(U: Standard_Real, T: gp_Trsf): Standard_Real; - ParametricTransformation(T: gp_Trsf): Standard_Real; - Copy(): Handle_Geom_Geometry; - GetBasisCurveContinuity(): GeomAbs_Shape; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_OffsetSurface extends Geom_Surface { - constructor(S: Handle_Geom_Surface, Offset: Standard_Real, isNotCheckC0: Standard_Boolean) - SetBasisSurface(S: Handle_Geom_Surface, isNotCheckC0: Standard_Boolean): void; - SetOffsetValue(D: Standard_Real): void; - Offset(): Standard_Real; - BasisSurface(): Handle_Geom_Surface; - OsculatingSurface(): Handle_Geom_OsculatingSurface; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Continuity(): GeomAbs_Shape; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Copy(): Handle_Geom_Geometry; - Surface(): Handle_Geom_Surface; - UOsculatingSurface(U: Standard_Real, V: Standard_Real, IsOpposite: Standard_Boolean, UOsculSurf: Handle_Geom_BSplineSurface): Standard_Boolean; - VOsculatingSurface(U: Standard_Real, V: Standard_Real, IsOpposite: Standard_Boolean, VOsculSurf: Handle_Geom_BSplineSurface): Standard_Boolean; - GetBasisSurfContinuity(): GeomAbs_Shape; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_Parabola extends Geom_Conic { - SetFocal(Focal: Standard_Real): void; - SetParab(Prb: gp_Parab): void; - Parab(): gp_Parab; - ReversedParameter(U: Standard_Real): Standard_Real; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Directrix(): gp_Ax1; - Eccentricity(): Standard_Real; - Focus(): gp_Pnt; - Focal(): Standard_Real; - Parameter(): Standard_Real; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformedParameter(U: Standard_Real, T: gp_Trsf): Standard_Real; - ParametricTransformation(T: gp_Trsf): Standard_Real; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Parabola_1 extends Geom_Parabola { - constructor(Prb: gp_Parab); - } - - export declare class Geom_Parabola_2 extends Geom_Parabola { - constructor(A2: gp_Ax2, Focal: Standard_Real); - } - - export declare class Geom_Parabola_3 extends Geom_Parabola { - constructor(D: gp_Ax1, F: gp_Pnt); - } - -export declare class Geom_Plane extends Geom_ElementarySurface { - SetPln(Pl: gp_Pln): void; - Pln(): gp_Pln; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Coefficients(A: Standard_Real, B: Standard_Real, C: Standard_Real, D: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_Plane_1 extends Geom_Plane { - constructor(A3: gp_Ax3); - } - - export declare class Geom_Plane_2 extends Geom_Plane { - constructor(Pl: gp_Pln); - } - - export declare class Geom_Plane_3 extends Geom_Plane { - constructor(P: gp_Pnt, V: gp_Dir); - } - - export declare class Geom_Plane_4 extends Geom_Plane { - constructor(A: Standard_Real, B: Standard_Real, C: Standard_Real, D: Standard_Real); - } - -export declare class Geom_RectangularTrimmedSurface extends Geom_BoundedSurface { - SetTrim_1(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, USense: Standard_Boolean, VSense: Standard_Boolean): void; - SetTrim_2(Param1: Standard_Real, Param2: Standard_Real, UTrim: Standard_Boolean, Sense: Standard_Boolean): void; - BasisSurface(): Handle_Geom_Surface; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Continuity(): GeomAbs_Shape; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_RectangularTrimmedSurface_1 extends Geom_RectangularTrimmedSurface { - constructor(S: Handle_Geom_Surface, U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real, USense: Standard_Boolean, VSense: Standard_Boolean); - } - - export declare class Geom_RectangularTrimmedSurface_2 extends Geom_RectangularTrimmedSurface { - constructor(S: Handle_Geom_Surface, Param1: Standard_Real, Param2: Standard_Real, UTrim: Standard_Boolean, Sense: Standard_Boolean); - } - -export declare class Geom_SphericalSurface extends Geom_ElementarySurface { - SetRadius(R: Standard_Real): void; - SetSphere(S: gp_Sphere): void; - Sphere(): gp_Sphere; - UReversedParameter(U: Standard_Real): Standard_Real; - VReversedParameter(V: Standard_Real): Standard_Real; - Area(): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Coefficients(A1: Standard_Real, A2: Standard_Real, A3: Standard_Real, B1: Standard_Real, B2: Standard_Real, B3: Standard_Real, C1: Standard_Real, C2: Standard_Real, C3: Standard_Real, D: Standard_Real): void; - Radius(): Standard_Real; - Volume(): Standard_Real; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_SphericalSurface_1 extends Geom_SphericalSurface { - constructor(A3: gp_Ax3, Radius: Standard_Real); - } - - export declare class Geom_SphericalSurface_2 extends Geom_SphericalSurface { - constructor(S: gp_Sphere); - } - -export declare class Geom_Surface extends Geom_Geometry { - UReverse(): void; - UReversed(): Handle_Geom_Surface; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversed(): Handle_Geom_Surface; - VReversedParameter(V: Standard_Real): Standard_Real; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - Continuity(): GeomAbs_Shape; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Value(U: Standard_Real, V: Standard_Real): gp_Pnt; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Handle_Geom_Surface { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_Surface): void; - get(): Geom_Surface; - delete(): void; -} - - export declare class Handle_Geom_Surface_1 extends Handle_Geom_Surface { - constructor(); - } - - export declare class Handle_Geom_Surface_2 extends Handle_Geom_Surface { - constructor(thePtr: Geom_Surface); - } - - export declare class Handle_Geom_Surface_3 extends Handle_Geom_Surface { - constructor(theHandle: Handle_Geom_Surface); - } - - export declare class Handle_Geom_Surface_4 extends Handle_Geom_Surface { - constructor(theHandle: Handle_Geom_Surface); - } - -export declare class Geom_SurfaceOfLinearExtrusion extends Geom_SweptSurface { - constructor(C: Handle_Geom_Curve, V: gp_Dir) - SetDirection(V: gp_Dir): void; - SetBasisCurve(C: Handle_Geom_Curve): void; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_SurfaceOfRevolution extends Geom_SweptSurface { - constructor(C: Handle_Geom_Curve, A1: gp_Ax1) - SetAxis(A1: gp_Ax1): void; - SetDirection(V: gp_Dir): void; - SetBasisCurve(C: Handle_Geom_Curve): void; - SetLocation(P: gp_Pnt): void; - Axis(): gp_Ax1; - Location(): gp_Pnt; - ReferencePlane(): gp_Ax2; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_SweptSurface extends Geom_Surface { - Continuity(): GeomAbs_Shape; - Direction(): gp_Dir; - BasisCurve(): Handle_Geom_Curve; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Geom_ToroidalSurface extends Geom_ElementarySurface { - SetMajorRadius(MajorRadius: Standard_Real): void; - SetMinorRadius(MinorRadius: Standard_Real): void; - SetTorus(T: gp_Torus): void; - Torus(): gp_Torus; - UReversedParameter(U: Standard_Real): Standard_Real; - VReversedParameter(U: Standard_Real): Standard_Real; - Area(): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Coefficients(Coef: IntTools_CArray1OfReal): void; - MajorRadius(): Standard_Real; - MinorRadius(): Standard_Real; - Volume(): Standard_Real; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Geom_ToroidalSurface_1 extends Geom_ToroidalSurface { - constructor(A3: gp_Ax3, MajorRadius: Standard_Real, MinorRadius: Standard_Real); - } - - export declare class Geom_ToroidalSurface_2 extends Geom_ToroidalSurface { - constructor(T: gp_Torus); - } - -export declare class Geom_TrimmedCurve extends Geom_BoundedCurve { - constructor(C: Handle_Geom_Curve, U1: Standard_Real, U2: Standard_Real, Sense: Standard_Boolean, theAdjustPeriodic: Standard_Boolean) - Reverse(): void; - ReversedParameter(U: Standard_Real): Standard_Real; - SetTrim(U1: Standard_Real, U2: Standard_Real, Sense: Standard_Boolean, theAdjustPeriodic: Standard_Boolean): void; - BasisCurve(): Handle_Geom_Curve; - Continuity(): GeomAbs_Shape; - IsCN(N: Graphic3d_ZLayerId): Standard_Boolean; - EndPoint(): gp_Pnt; - FirstParameter(): Standard_Real; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - LastParameter(): Standard_Real; - StartPoint(): gp_Pnt; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V1: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Transform(T: gp_Trsf): void; - TransformedParameter(U: Standard_Real, T: gp_Trsf): Standard_Real; - ParametricTransformation(T: gp_Trsf): Standard_Real; - Copy(): Handle_Geom_Geometry; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Handle_Geom_TrimmedCurve { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom_TrimmedCurve): void; - get(): Geom_TrimmedCurve; - delete(): void; -} - - export declare class Handle_Geom_TrimmedCurve_1 extends Handle_Geom_TrimmedCurve { - constructor(); - } - - export declare class Handle_Geom_TrimmedCurve_2 extends Handle_Geom_TrimmedCurve { - constructor(thePtr: Geom_TrimmedCurve); - } - - export declare class Handle_Geom_TrimmedCurve_3 extends Handle_Geom_TrimmedCurve { - constructor(theHandle: Handle_Geom_TrimmedCurve); - } - - export declare class Handle_Geom_TrimmedCurve_4 extends Handle_Geom_TrimmedCurve { - constructor(theHandle: Handle_Geom_TrimmedCurve); - } - -export declare class Handle_Geom2d_Curve { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Geom2d_Curve): void; - get(): Geom2d_Curve; - delete(): void; -} - - export declare class Handle_Geom2d_Curve_1 extends Handle_Geom2d_Curve { - constructor(); - } - - export declare class Handle_Geom2d_Curve_2 extends Handle_Geom2d_Curve { - constructor(thePtr: Geom2d_Curve); - } - - export declare class Handle_Geom2d_Curve_3 extends Handle_Geom2d_Curve { - constructor(theHandle: Handle_Geom2d_Curve); - } - - export declare class Handle_Geom2d_Curve_4 extends Handle_Geom2d_Curve { - constructor(theHandle: Handle_Geom2d_Curve); - } - -export declare class GeomAPI_ExtremaCurveCurve { - Init_1(C1: Handle_Geom_Curve, C2: Handle_Geom_Curve): void; - Init_2(C1: Handle_Geom_Curve, C2: Handle_Geom_Curve, U1min: Standard_Real, U1max: Standard_Real, U2min: Standard_Real, U2max: Standard_Real): void; - NbExtrema(): Graphic3d_ZLayerId; - Points(Index: Graphic3d_ZLayerId, P1: gp_Pnt, P2: gp_Pnt): void; - Parameters(Index: Graphic3d_ZLayerId, U1: Standard_Real, U2: Standard_Real): void; - Distance(Index: Graphic3d_ZLayerId): Standard_Real; - IsParallel(): Standard_Boolean; - NearestPoints(P1: gp_Pnt, P2: gp_Pnt): void; - LowerDistanceParameters(U1: Standard_Real, U2: Standard_Real): void; - LowerDistance(): Standard_Real; - TotalNearestPoints(P1: gp_Pnt, P2: gp_Pnt): Standard_Boolean; - TotalLowerDistanceParameters(U1: Standard_Real, U2: Standard_Real): Standard_Boolean; - TotalLowerDistance(): Standard_Real; - delete(): void; -} - - export declare class GeomAPI_ExtremaCurveCurve_1 extends GeomAPI_ExtremaCurveCurve { - constructor(); - } - - export declare class GeomAPI_ExtremaCurveCurve_2 extends GeomAPI_ExtremaCurveCurve { - constructor(C1: Handle_Geom_Curve, C2: Handle_Geom_Curve); - } - - export declare class GeomAPI_ExtremaCurveCurve_3 extends GeomAPI_ExtremaCurveCurve { - constructor(C1: Handle_Geom_Curve, C2: Handle_Geom_Curve, U1min: Standard_Real, U1max: Standard_Real, U2min: Standard_Real, U2max: Standard_Real); - } - -export declare class GeomAPI_ExtremaCurveSurface { - Init_1(Curve: Handle_Geom_Curve, Surface: Handle_Geom_Surface): void; - Init_2(Curve: Handle_Geom_Curve, Surface: Handle_Geom_Surface, Wmin: Standard_Real, Wmax: Standard_Real, Umin: Standard_Real, Umax: Standard_Real, Vmin: Standard_Real, Vmax: Standard_Real): void; - NbExtrema(): Graphic3d_ZLayerId; - Points(Index: Graphic3d_ZLayerId, P1: gp_Pnt, P2: gp_Pnt): void; - Parameters(Index: Graphic3d_ZLayerId, W: Standard_Real, U: Standard_Real, V: Standard_Real): void; - Distance(Index: Graphic3d_ZLayerId): Standard_Real; - IsParallel(): Standard_Boolean; - NearestPoints(PC: gp_Pnt, PS: gp_Pnt): void; - LowerDistanceParameters(W: Standard_Real, U: Standard_Real, V: Standard_Real): void; - LowerDistance(): Standard_Real; - delete(): void; -} - - export declare class GeomAPI_ExtremaCurveSurface_1 extends GeomAPI_ExtremaCurveSurface { - constructor(); - } - - export declare class GeomAPI_ExtremaCurveSurface_2 extends GeomAPI_ExtremaCurveSurface { - constructor(Curve: Handle_Geom_Curve, Surface: Handle_Geom_Surface); - } - - export declare class GeomAPI_ExtremaCurveSurface_3 extends GeomAPI_ExtremaCurveSurface { - constructor(Curve: Handle_Geom_Curve, Surface: Handle_Geom_Surface, Wmin: Standard_Real, Wmax: Standard_Real, Umin: Standard_Real, Umax: Standard_Real, Vmin: Standard_Real, Vmax: Standard_Real); - } - -export declare class GeomAPI_ExtremaSurfaceSurface { - Init_1(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface): void; - Init_2(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, U1min: Standard_Real, U1max: Standard_Real, V1min: Standard_Real, V1max: Standard_Real, U2min: Standard_Real, U2max: Standard_Real, V2min: Standard_Real, V2max: Standard_Real): void; - NbExtrema(): Graphic3d_ZLayerId; - Points(Index: Graphic3d_ZLayerId, P1: gp_Pnt, P2: gp_Pnt): void; - Parameters(Index: Graphic3d_ZLayerId, U1: Standard_Real, V1: Standard_Real, U2: Standard_Real, V2: Standard_Real): void; - Distance(Index: Graphic3d_ZLayerId): Standard_Real; - IsParallel(): Standard_Boolean; - NearestPoints(P1: gp_Pnt, P2: gp_Pnt): void; - LowerDistanceParameters(U1: Standard_Real, V1: Standard_Real, U2: Standard_Real, V2: Standard_Real): void; - LowerDistance(): Standard_Real; - Extrema(): Extrema_ExtSS; - delete(): void; -} - - export declare class GeomAPI_ExtremaSurfaceSurface_1 extends GeomAPI_ExtremaSurfaceSurface { - constructor(); - } - - export declare class GeomAPI_ExtremaSurfaceSurface_2 extends GeomAPI_ExtremaSurfaceSurface { - constructor(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface); - } - - export declare class GeomAPI_ExtremaSurfaceSurface_3 extends GeomAPI_ExtremaSurfaceSurface { - constructor(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, U1min: Standard_Real, U1max: Standard_Real, V1min: Standard_Real, V1max: Standard_Real, U2min: Standard_Real, U2max: Standard_Real, V2min: Standard_Real, V2max: Standard_Real); - } - -export declare class GeomAPI_IntCS { - Perform(C: Handle_Geom_Curve, S: Handle_Geom_Surface): void; - IsDone(): Standard_Boolean; - NbPoints(): Graphic3d_ZLayerId; - Point(Index: Graphic3d_ZLayerId): gp_Pnt; - Parameters_1(Index: Graphic3d_ZLayerId, U: Standard_Real, V: Standard_Real, W: Standard_Real): void; - NbSegments(): Graphic3d_ZLayerId; - Segment(Index: Graphic3d_ZLayerId): Handle_Geom_Curve; - Parameters_2(Index: Graphic3d_ZLayerId, U1: Standard_Real, V1: Standard_Real, U2: Standard_Real, V2: Standard_Real): void; - delete(): void; -} - - export declare class GeomAPI_IntCS_1 extends GeomAPI_IntCS { - constructor(); - } - - export declare class GeomAPI_IntCS_2 extends GeomAPI_IntCS { - constructor(C: Handle_Geom_Curve, S: Handle_Geom_Surface); - } - -export declare class GeomAPI_IntSS { - Perform(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, Tol: Standard_Real): void; - IsDone(): Standard_Boolean; - NbLines(): Graphic3d_ZLayerId; - Line(Index: Graphic3d_ZLayerId): Handle_Geom_Curve; - delete(): void; -} - - export declare class GeomAPI_IntSS_1 extends GeomAPI_IntSS { - constructor(); - } - - export declare class GeomAPI_IntSS_2 extends GeomAPI_IntSS { - constructor(S1: Handle_Geom_Surface, S2: Handle_Geom_Surface, Tol: Standard_Real); - } - -export declare class GeomAPI_Interpolate { - Load_1(InitialTangent: gp_Vec, FinalTangent: gp_Vec, Scale: Standard_Boolean): void; - Load_2(Tangents: TColgp_Array1OfVec, TangentFlags: Handle_TColStd_HArray1OfBoolean, Scale: Standard_Boolean): void; - Perform(): void; - Curve(): Handle_Geom_BSplineCurve; - IsDone(): Standard_Boolean; - delete(): void; -} - - export declare class GeomAPI_Interpolate_1 extends GeomAPI_Interpolate { - constructor(Points: Handle_TColgp_HArray1OfPnt, PeriodicFlag: Standard_Boolean, Tolerance: Standard_Real); - } - - export declare class GeomAPI_Interpolate_2 extends GeomAPI_Interpolate { - constructor(Points: Handle_TColgp_HArray1OfPnt, Parameters: Handle_TColStd_HArray1OfReal, PeriodicFlag: Standard_Boolean, Tolerance: Standard_Real); - } - -export declare class GeomAPI_PointsToBSpline { - Init_1(Points: TColgp_Array1OfPnt, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Init_2(Points: TColgp_Array1OfPnt, ParType: Approx_ParametrizationType, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Init_3(Points: TColgp_Array1OfPnt, Parameters: IntTools_CArray1OfReal, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Init_4(Points: TColgp_Array1OfPnt, Weight1: Standard_Real, Weight2: Standard_Real, Weight3: Standard_Real, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Curve(): Handle_Geom_BSplineCurve; - IsDone(): Standard_Boolean; - delete(): void; -} - - export declare class GeomAPI_PointsToBSpline_1 extends GeomAPI_PointsToBSpline { - constructor(); - } - - export declare class GeomAPI_PointsToBSpline_2 extends GeomAPI_PointsToBSpline { - constructor(Points: TColgp_Array1OfPnt, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSpline_3 extends GeomAPI_PointsToBSpline { - constructor(Points: TColgp_Array1OfPnt, ParType: Approx_ParametrizationType, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSpline_4 extends GeomAPI_PointsToBSpline { - constructor(Points: TColgp_Array1OfPnt, Parameters: IntTools_CArray1OfReal, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSpline_5 extends GeomAPI_PointsToBSpline { - constructor(Points: TColgp_Array1OfPnt, Weight1: Standard_Real, Weight2: Standard_Real, Weight3: Standard_Real, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - -export declare class GeomAPI_PointsToBSplineSurface { - Init_1(Points: TColgp_Array2OfPnt, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Interpolate_1(Points: TColgp_Array2OfPnt, thePeriodic: Standard_Boolean): void; - Interpolate_2(Points: TColgp_Array2OfPnt, ParType: Approx_ParametrizationType, thePeriodic: Standard_Boolean): void; - Init_2(ZPoints: TColStd_Array2OfReal, X0: Standard_Real, dX: Standard_Real, Y0: Standard_Real, dY: Standard_Real, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Interpolate_3(ZPoints: TColStd_Array2OfReal, X0: Standard_Real, dX: Standard_Real, Y0: Standard_Real, dY: Standard_Real): void; - Init_3(Points: TColgp_Array2OfPnt, ParType: Approx_ParametrizationType, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real, thePeriodic: Standard_Boolean): void; - Init_4(Points: TColgp_Array2OfPnt, Weight1: Standard_Real, Weight2: Standard_Real, Weight3: Standard_Real, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real): void; - Surface(): Handle_Geom_BSplineSurface; - IsDone(): Standard_Boolean; - delete(): void; -} - - export declare class GeomAPI_PointsToBSplineSurface_1 extends GeomAPI_PointsToBSplineSurface { - constructor(); - } - - export declare class GeomAPI_PointsToBSplineSurface_2 extends GeomAPI_PointsToBSplineSurface { - constructor(Points: TColgp_Array2OfPnt, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSplineSurface_3 extends GeomAPI_PointsToBSplineSurface { - constructor(Points: TColgp_Array2OfPnt, ParType: Approx_ParametrizationType, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSplineSurface_4 extends GeomAPI_PointsToBSplineSurface { - constructor(Points: TColgp_Array2OfPnt, Weight1: Standard_Real, Weight2: Standard_Real, Weight3: Standard_Real, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - - export declare class GeomAPI_PointsToBSplineSurface_5 extends GeomAPI_PointsToBSplineSurface { - constructor(ZPoints: TColStd_Array2OfReal, X0: Standard_Real, dX: Standard_Real, Y0: Standard_Real, dY: Standard_Real, DegMin: Graphic3d_ZLayerId, DegMax: Graphic3d_ZLayerId, Continuity: GeomAbs_Shape, Tol3D: Standard_Real); - } - -export declare class GeomAPI_ProjectPointOnCurve { - Init_1(P: gp_Pnt, Curve: Handle_Geom_Curve): void; - Init_2(P: gp_Pnt, Curve: Handle_Geom_Curve, Umin: Standard_Real, Usup: Standard_Real): void; - Init_3(Curve: Handle_Geom_Curve, Umin: Standard_Real, Usup: Standard_Real): void; - Perform(P: gp_Pnt): void; - NbPoints(): Graphic3d_ZLayerId; - Point(Index: Graphic3d_ZLayerId): gp_Pnt; - Parameter_1(Index: Graphic3d_ZLayerId): Standard_Real; - Parameter_2(Index: Graphic3d_ZLayerId, U: Standard_Real): void; - Distance(Index: Graphic3d_ZLayerId): Standard_Real; - NearestPoint(): gp_Pnt; - LowerDistanceParameter(): Standard_Real; - LowerDistance(): Standard_Real; - Extrema(): Extrema_ExtPC; - delete(): void; -} - - export declare class GeomAPI_ProjectPointOnCurve_1 extends GeomAPI_ProjectPointOnCurve { - constructor(); - } - - export declare class GeomAPI_ProjectPointOnCurve_2 extends GeomAPI_ProjectPointOnCurve { - constructor(P: gp_Pnt, Curve: Handle_Geom_Curve); - } - - export declare class GeomAPI_ProjectPointOnCurve_3 extends GeomAPI_ProjectPointOnCurve { - constructor(P: gp_Pnt, Curve: Handle_Geom_Curve, Umin: Standard_Real, Usup: Standard_Real); - } - -export declare class GeomAPI_ProjectPointOnSurf { - Init_1(P: gp_Pnt, Surface: Handle_Geom_Surface, Tolerance: Standard_Real, Algo: Extrema_ExtAlgo): void; - Init_2(P: gp_Pnt, Surface: Handle_Geom_Surface, Algo: Extrema_ExtAlgo): void; - Init_3(P: gp_Pnt, Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Tolerance: Standard_Real, Algo: Extrema_ExtAlgo): void; - Init_4(P: gp_Pnt, Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Algo: Extrema_ExtAlgo): void; - Init_5(Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Tolerance: Standard_Real, Algo: Extrema_ExtAlgo): void; - Init_6(Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Algo: Extrema_ExtAlgo): void; - SetExtremaAlgo(theAlgo: Extrema_ExtAlgo): void; - SetExtremaFlag(theExtFlag: Extrema_ExtFlag): void; - Perform(P: gp_Pnt): void; - IsDone(): Standard_Boolean; - NbPoints(): Graphic3d_ZLayerId; - Point(Index: Graphic3d_ZLayerId): gp_Pnt; - Parameters(Index: Graphic3d_ZLayerId, U: Standard_Real, V: Standard_Real): void; - Distance(Index: Graphic3d_ZLayerId): Standard_Real; - NearestPoint(): gp_Pnt; - LowerDistanceParameters(U: Standard_Real, V: Standard_Real): void; - LowerDistance(): Standard_Real; - delete(): void; -} - - export declare class GeomAPI_ProjectPointOnSurf_1 extends GeomAPI_ProjectPointOnSurf { - constructor(); - } - - export declare class GeomAPI_ProjectPointOnSurf_2 extends GeomAPI_ProjectPointOnSurf { - constructor(P: gp_Pnt, Surface: Handle_Geom_Surface, Algo: Extrema_ExtAlgo); - } - - export declare class GeomAPI_ProjectPointOnSurf_3 extends GeomAPI_ProjectPointOnSurf { - constructor(P: gp_Pnt, Surface: Handle_Geom_Surface, Tolerance: Standard_Real, Algo: Extrema_ExtAlgo); - } - - export declare class GeomAPI_ProjectPointOnSurf_4 extends GeomAPI_ProjectPointOnSurf { - constructor(P: gp_Pnt, Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Tolerance: Standard_Real, Algo: Extrema_ExtAlgo); - } - - export declare class GeomAPI_ProjectPointOnSurf_5 extends GeomAPI_ProjectPointOnSurf { - constructor(P: gp_Pnt, Surface: Handle_Geom_Surface, Umin: Standard_Real, Usup: Standard_Real, Vmin: Standard_Real, Vsup: Standard_Real, Algo: Extrema_ExtAlgo); - } - -export declare type GeomAbs_CurveType = { - GeomAbs_Line: {}; - GeomAbs_Circle: {}; - GeomAbs_Ellipse: {}; - GeomAbs_Hyperbola: {}; - GeomAbs_Parabola: {}; - GeomAbs_BezierCurve: {}; - GeomAbs_BSplineCurve: {}; - GeomAbs_OffsetCurve: {}; - GeomAbs_OtherCurve: {}; -} - -export declare type GeomAbs_JoinType = { - GeomAbs_Arc: {}; - GeomAbs_Tangent: {}; - GeomAbs_Intersection: {}; -} - -export declare type GeomAbs_Shape = { - GeomAbs_C0: {}; - GeomAbs_G1: {}; - GeomAbs_C1: {}; - GeomAbs_G2: {}; - GeomAbs_C2: {}; - GeomAbs_C3: {}; - GeomAbs_CN: {}; -} - -export declare type GeomAbs_SurfaceType = { - GeomAbs_Plane: {}; - GeomAbs_Cylinder: {}; - GeomAbs_Cone: {}; - GeomAbs_Sphere: {}; - GeomAbs_Torus: {}; - GeomAbs_BezierSurface: {}; - GeomAbs_BSplineSurface: {}; - GeomAbs_SurfaceOfRevolution: {}; - GeomAbs_SurfaceOfExtrusion: {}; - GeomAbs_OffsetSurface: {}; - GeomAbs_OtherSurface: {}; -} - -export declare class GeomAdaptor_Curve extends Adaptor3d_Curve { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - ShallowCopy(): Handle_Adaptor3d_Curve; - Reset(): void; - Load_1(theCurve: Handle_Geom_Curve): void; - Load_2(theCurve: Handle_Geom_Curve, theUFirst: Standard_Real, theULast: Standard_Real): void; - Curve(): Handle_Geom_Curve; - FirstParameter(): Standard_Real; - LastParameter(): Standard_Real; - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Trim(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real): Handle_Adaptor3d_Curve; - IsClosed(): Standard_Boolean; - IsPeriodic(): Standard_Boolean; - Period(): Standard_Real; - Value(U: Standard_Real): gp_Pnt; - D0(U: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, P: gp_Pnt, V: gp_Vec): void; - D2(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void; - D3(U: Standard_Real, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec): void; - DN(U: Standard_Real, N: Graphic3d_ZLayerId): gp_Vec; - Resolution(R3d: Standard_Real): Standard_Real; - GetType(): GeomAbs_CurveType; - Line(): gp_Lin; - Circle(): gp_Circ; - Ellipse(): gp_Elips; - Hyperbola(): gp_Hypr; - Parabola(): gp_Parab; - Degree(): Graphic3d_ZLayerId; - IsRational(): Standard_Boolean; - NbPoles(): Graphic3d_ZLayerId; - NbKnots(): Graphic3d_ZLayerId; - Bezier(): Handle_Geom_BezierCurve; - BSpline(): Handle_Geom_BSplineCurve; - OffsetCurve(): Handle_Geom_OffsetCurve; - delete(): void; -} - - export declare class GeomAdaptor_Curve_1 extends GeomAdaptor_Curve { - constructor(); - } - - export declare class GeomAdaptor_Curve_2 extends GeomAdaptor_Curve { - constructor(theCurve: Handle_Geom_Curve); - } - - export declare class GeomAdaptor_Curve_3 extends GeomAdaptor_Curve { - constructor(theCurve: Handle_Geom_Curve, theUFirst: Standard_Real, theULast: Standard_Real); - } - -export declare type GeomFill_Trihedron = { - GeomFill_IsCorrectedFrenet: {}; - GeomFill_IsFixed: {}; - GeomFill_IsFrenet: {}; - GeomFill_IsConstantNormal: {}; - GeomFill_IsDarboux: {}; - GeomFill_IsGuideAC: {}; - GeomFill_IsGuidePlan: {}; - GeomFill_IsGuideACWithContact: {}; - GeomFill_IsGuidePlanWithContact: {}; - GeomFill_IsDiscreteTrihedron: {}; -} - -export declare class GeomLib { - constructor(); - static To3d(Position: gp_Ax2, Curve2d: Handle_Geom2d_Curve): Handle_Geom_Curve; - static GTransform(Curve: Handle_Geom2d_Curve, GTrsf: gp_GTrsf2d): Handle_Geom2d_Curve; - static SameRange(Tolerance: Standard_Real, Curve2dPtr: Handle_Geom2d_Curve, First: Standard_Real, Last: Standard_Real, RequestedFirst: Standard_Real, RequestedLast: Standard_Real, NewCurve2dPtr: Handle_Geom2d_Curve): void; - static BuildCurve3d(Tolerance: Standard_Real, CurvePtr: Adaptor3d_CurveOnSurface, FirstParameter: Standard_Real, LastParameter: Standard_Real, NewCurvePtr: Handle_Geom_Curve, MaxDeviation: Standard_Real, AverageDeviation: Standard_Real, Continuity: GeomAbs_Shape, MaxDegree: Graphic3d_ZLayerId, MaxSegment: Graphic3d_ZLayerId): void; - static AdjustExtremity(Curve: Handle_Geom_BoundedCurve, P1: gp_Pnt, P2: gp_Pnt, T1: gp_Vec, T2: gp_Vec): void; - static ExtendCurveToPoint(Curve: Handle_Geom_BoundedCurve, Point: gp_Pnt, Cont: Graphic3d_ZLayerId, After: Standard_Boolean): void; - static ExtendSurfByLength(Surf: Handle_Geom_BoundedSurface, Length: Standard_Real, Cont: Graphic3d_ZLayerId, InU: Standard_Boolean, After: Standard_Boolean): void; - static AxeOfInertia(Points: TColgp_Array1OfPnt, Axe: gp_Ax2, IsSingular: Standard_Boolean, Tol: Standard_Real): void; - static Inertia(Points: TColgp_Array1OfPnt, Bary: gp_Pnt, XDir: gp_Dir, YDir: gp_Dir, Xgap: Standard_Real, YGap: Standard_Real, ZGap: Standard_Real): void; - static RemovePointsFromArray(NumPoints: Graphic3d_ZLayerId, InParameters: IntTools_CArray1OfReal, OutParameters: Handle_TColStd_HArray1OfReal): void; - static DensifyArray1OfReal(MinNumPoints: Graphic3d_ZLayerId, InParameters: IntTools_CArray1OfReal, OutParameters: Handle_TColStd_HArray1OfReal): void; - static FuseIntervals(Interval1: IntTools_CArray1OfReal, Interval2: IntTools_CArray1OfReal, Fusion: TColStd_SequenceOfReal, Confusion: Standard_Real, IsAdjustToFirstInterval: Standard_Boolean): void; - static EvalMaxParametricDistance(Curve: Adaptor3d_Curve, AReferenceCurve: Adaptor3d_Curve, Tolerance: Standard_Real, Parameters: IntTools_CArray1OfReal, MaxDistance: Standard_Real): void; - static EvalMaxDistanceAlongParameter(Curve: Adaptor3d_Curve, AReferenceCurve: Adaptor3d_Curve, Tolerance: Standard_Real, Parameters: IntTools_CArray1OfReal, MaxDistance: Standard_Real): void; - static CancelDenominatorDerivative(BSurf: Handle_Geom_BSplineSurface, UDirection: Standard_Boolean, VDirection: Standard_Boolean): void; - static NormEstim(S: Handle_Geom_Surface, UV: gp_Pnt2d, Tol: Standard_Real, N: gp_Dir): Graphic3d_ZLayerId; - static IsClosed(S: Handle_Geom_Surface, Tol: Standard_Real, isUClosed: Standard_Boolean, isVClosed: Standard_Boolean): void; - static IsBSplUClosed(S: Handle_Geom_BSplineSurface, U1: Standard_Real, U2: Standard_Real, Tol: Standard_Real): Standard_Boolean; - static IsBSplVClosed(S: Handle_Geom_BSplineSurface, V1: Standard_Real, V2: Standard_Real, Tol: Standard_Real): Standard_Boolean; - static IsBzUClosed(S: Handle_Geom_BezierSurface, U1: Standard_Real, U2: Standard_Real, Tol: Standard_Real): Standard_Boolean; - static IsBzVClosed(S: Handle_Geom_BezierSurface, V1: Standard_Real, V2: Standard_Real, Tol: Standard_Real): Standard_Boolean; - static isIsoLine(theC2D: Handle_Adaptor2d_Curve2d, theIsU: Standard_Boolean, theParam: Standard_Real, theIsForward: Standard_Boolean): Standard_Boolean; - static buildC3dOnIsoLine(theC2D: Handle_Adaptor2d_Curve2d, theSurf: Handle_Adaptor3d_Surface, theFirst: Standard_Real, theLast: Standard_Real, theTolerance: Standard_Real, theIsU: Standard_Boolean, theParam: Standard_Real, theIsForward: Standard_Boolean): Handle_Geom_Curve; - delete(): void; -} - -export declare class GeomLib_IsPlanarSurface { - constructor(S: Handle_Geom_Surface, Tol: Standard_Real) - IsPlanar(): Standard_Boolean; - Plan(): gp_Pln; - delete(): void; -} - -export declare class GeomLib_Tool { - constructor(); - static Parameter_1(Curve: Handle_Geom_Curve, Point: gp_Pnt, MaxDist: Standard_Real, U: Standard_Real): Standard_Boolean; - static Parameters(Surface: Handle_Geom_Surface, Point: gp_Pnt, MaxDist: Standard_Real, U: Standard_Real, V: Standard_Real): Standard_Boolean; - static Parameter_2(Curve: Handle_Geom2d_Curve, Point: gp_Pnt2d, MaxDist: Standard_Real, U: Standard_Real): Standard_Boolean; - delete(): void; -} - -export declare class GeomPlate_Surface extends Geom_Surface { - constructor(Surfinit: Handle_Geom_Surface, Surfinter: Plate_Plate) - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - TransformParameters(U: Standard_Real, V: Standard_Real, T: gp_Trsf): void; - ParametricTransformation(T: gp_Trsf): gp_GTrsf2d; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - UPeriod(): Standard_Real; - IsVPeriodic(): Standard_Boolean; - VPeriod(): Standard_Real; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - Continuity(): GeomAbs_Shape; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Copy(): Handle_Geom_Geometry; - Transform(T: gp_Trsf): void; - CallSurfinit(): Handle_Geom_Surface; - SetBounds(Umin: Standard_Real, Umax: Standard_Real, Vmin: Standard_Real, Vmax: Standard_Real): void; - RealBounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - Constraints(Seq: TColgp_SequenceOfXY): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class GeomProjLib { - constructor(); - static Curve2d_1(C: Handle_Geom_Curve, First: Standard_Real, Last: Standard_Real, S: Handle_Geom_Surface, UFirst: Standard_Real, ULast: Standard_Real, VFirst: Standard_Real, VLast: Standard_Real, Tolerance: Standard_Real): Handle_Geom2d_Curve; - static Curve2d_2(C: Handle_Geom_Curve, First: Standard_Real, Last: Standard_Real, S: Handle_Geom_Surface, Tolerance: Standard_Real): Handle_Geom2d_Curve; - static Curve2d_3(C: Handle_Geom_Curve, First: Standard_Real, Last: Standard_Real, S: Handle_Geom_Surface): Handle_Geom2d_Curve; - static Curve2d_4(C: Handle_Geom_Curve, S: Handle_Geom_Surface): Handle_Geom2d_Curve; - static Curve2d_5(C: Handle_Geom_Curve, S: Handle_Geom_Surface, UDeb: Standard_Real, UFin: Standard_Real, VDeb: Standard_Real, VFin: Standard_Real): Handle_Geom2d_Curve; - static Curve2d_6(C: Handle_Geom_Curve, S: Handle_Geom_Surface, UDeb: Standard_Real, UFin: Standard_Real, VDeb: Standard_Real, VFin: Standard_Real, Tolerance: Standard_Real): Handle_Geom2d_Curve; - static Project(C: Handle_Geom_Curve, S: Handle_Geom_Surface): Handle_Geom_Curve; - static ProjectOnPlane(Curve: Handle_Geom_Curve, Plane: Handle_Geom_Plane, Dir: gp_Dir, KeepParametrization: Standard_Boolean): Handle_Geom_Curve; - delete(): void; -} - -export declare type IFSelect_ReturnStatus = { - IFSelect_RetVoid: {}; - IFSelect_RetDone: {}; - IFSelect_RetError: {}; - IFSelect_RetFail: {}; - IFSelect_RetStop: {}; -} - -export declare class IGESControl_Controller extends XSControl_Controller { - constructor(modefnes: Standard_Boolean) - NewModel(): Handle_Interface_InterfaceModel; - ActorRead(model: Handle_Interface_InterfaceModel): Handle_Transfer_ActorOfTransientProcess; - TransferWriteShape(shape: TopoDS_Shape, FP: Handle_Transfer_FinderProcess, model: Handle_Interface_InterfaceModel, modetrans: Graphic3d_ZLayerId, theProgress: Message_ProgressRange): IFSelect_ReturnStatus; - static Init(): Standard_Boolean; - Customise(WS: Handle_XSControl_WorkSession): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class IGESControl_Reader extends XSControl_Reader { - SetReadVisible(ReadRoot: Standard_Boolean): void; - GetReadVisible(): Standard_Boolean; - IGESModel(): Handle_IGESData_IGESModel; - NbRootsForTransfer(): Graphic3d_ZLayerId; - PrintTransferInfo(failwarn: IFSelect_PrintFail, mode: IFSelect_PrintCount): void; - delete(): void; -} - - export declare class IGESControl_Reader_1 extends IGESControl_Reader { - constructor(); - } - - export declare class IGESControl_Reader_2 extends IGESControl_Reader { - constructor(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean); - } - -export declare class IGESControl_Writer { - Model(): Handle_IGESData_IGESModel; - TransferProcess(): Handle_Transfer_FinderProcess; - SetTransferProcess(TP: Handle_Transfer_FinderProcess): void; - AddShape(sh: TopoDS_Shape, theProgress: Message_ProgressRange): Standard_Boolean; - AddGeom(geom: Handle_Standard_Transient): Standard_Boolean; - AddEntity(ent: Handle_IGESData_IGESEntity): Standard_Boolean; - ComputeModel(): void; - Write_1(S: Standard_OStream, fnes: Standard_Boolean): Standard_Boolean; - Write_2(file: Standard_CString, fnes: Standard_Boolean): Standard_Boolean; - delete(): void; -} - - export declare class IGESControl_Writer_1 extends IGESControl_Writer { - constructor(); - } - - export declare class IGESControl_Writer_2 extends IGESControl_Writer { - constructor(unit: Standard_CString, modecr: Graphic3d_ZLayerId); - } - - export declare class IGESControl_Writer_3 extends IGESControl_Writer { - constructor(model: Handle_IGESData_IGESModel, modecr: Graphic3d_ZLayerId); - } - -export declare class Interface_Static extends Interface_TypedValue { - PrintStatic(S: Standard_OStream): void; - Family(): Standard_CString; - SetWild(wildcard: Handle_Interface_Static): void; - Wild(): Handle_Interface_Static; - SetUptodate(): void; - UpdatedStatus(): Standard_Boolean; - static Init_1(family: Standard_CString, name: Standard_CString, type: Interface_ParamType, init: Standard_CString): Standard_Boolean; - static Init_2(family: Standard_CString, name: Standard_CString, type: Standard_Character, init: Standard_CString): Standard_Boolean; - static Static(name: Standard_CString): Handle_Interface_Static; - static IsPresent(name: Standard_CString): Standard_Boolean; - static CDef(name: Standard_CString, part: Standard_CString): Standard_CString; - static IDef(name: Standard_CString, part: Standard_CString): Graphic3d_ZLayerId; - static IsSet(name: Standard_CString, proper: Standard_Boolean): Standard_Boolean; - static CVal(name: Standard_CString): Standard_CString; - static IVal(name: Standard_CString): Graphic3d_ZLayerId; - static RVal(name: Standard_CString): Standard_Real; - static SetCVal(name: Standard_CString, val: Standard_CString): Standard_Boolean; - static SetIVal(name: Standard_CString, val: Graphic3d_ZLayerId): Standard_Boolean; - static SetRVal(name: Standard_CString, val: Standard_Real): Standard_Boolean; - static Update(name: Standard_CString): Standard_Boolean; - static IsUpdated(name: Standard_CString): Standard_Boolean; - static Items(mode: Graphic3d_ZLayerId, criter: Standard_CString): Handle_TColStd_HSequenceOfHAsciiString; - static Standards(): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Interface_Static_1 extends Interface_Static { - constructor(family: Standard_CString, name: Standard_CString, type: Interface_ParamType, init: Standard_CString); - } - - export declare class Interface_Static_2 extends Interface_Static { - constructor(family: Standard_CString, name: Standard_CString, other: Handle_Interface_Static); - } - -export declare class Interface_TypedValue extends MoniTool_TypedValue { - constructor(name: Standard_CString, type: Interface_ParamType, init: Standard_CString) - Type(): Interface_ParamType; - static ParamTypeToValueType(typ: Interface_ParamType): MoniTool_ValueType; - static ValueTypeToParamType(typ: MoniTool_ValueType): Interface_ParamType; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Law_BSpFunc extends Law_Function { - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Value(X: Standard_Real): Standard_Real; - D1(X: Standard_Real, F: Standard_Real, D: Standard_Real): void; - D2(X: Standard_Real, F: Standard_Real, D: Standard_Real, D2: Standard_Real): void; - Trim(PFirst: Standard_Real, PLast: Standard_Real, Tol: Standard_Real): Handle_Law_Function; - Bounds(PFirst: Standard_Real, PLast: Standard_Real): void; - Curve(): Handle_Law_BSpline; - SetCurve(C: Handle_Law_BSpline): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Law_BSpFunc_1 extends Law_BSpFunc { - constructor(); - } - - export declare class Law_BSpFunc_2 extends Law_BSpFunc { - constructor(C: Handle_Law_BSpline, First: Standard_Real, Last: Standard_Real); - } - -export declare class Law_Composite extends Law_Function { - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Value(X: Standard_Real): Standard_Real; - D1(X: Standard_Real, F: Standard_Real, D: Standard_Real): void; - D2(X: Standard_Real, F: Standard_Real, D: Standard_Real, D2: Standard_Real): void; - Trim(PFirst: Standard_Real, PLast: Standard_Real, Tol: Standard_Real): Handle_Law_Function; - Bounds(PFirst: Standard_Real, PLast: Standard_Real): void; - ChangeElementaryLaw(W: Standard_Real): Handle_Law_Function; - ChangeLaws(): Law_Laws; - IsPeriodic(): Standard_Boolean; - SetPeriodic(): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class Law_Composite_1 extends Law_Composite { - constructor(); - } - - export declare class Law_Composite_2 extends Law_Composite { - constructor(First: Standard_Real, Last: Standard_Real, Tol: Standard_Real); - } - -export declare class Handle_Law_Function { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Law_Function): void; - get(): Law_Function; - delete(): void; -} - - export declare class Handle_Law_Function_1 extends Handle_Law_Function { - constructor(); - } - - export declare class Handle_Law_Function_2 extends Handle_Law_Function { - constructor(thePtr: Law_Function); - } - - export declare class Handle_Law_Function_3 extends Handle_Law_Function { - constructor(theHandle: Handle_Law_Function); - } - - export declare class Handle_Law_Function_4 extends Handle_Law_Function { - constructor(theHandle: Handle_Law_Function); - } - -export declare class Law_Function extends Standard_Transient { - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Value(X: Standard_Real): Standard_Real; - D1(X: Standard_Real, F: Standard_Real, D: Standard_Real): void; - D2(X: Standard_Real, F: Standard_Real, D: Standard_Real, D2: Standard_Real): void; - Trim(PFirst: Standard_Real, PLast: Standard_Real, Tol: Standard_Real): Handle_Law_Function; - Bounds(PFirst: Standard_Real, PLast: Standard_Real): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Law_Interpol extends Law_BSpFunc { - constructor() - Set_1(ParAndRad: TColgp_Array1OfPnt2d, Periodic: Standard_Boolean): void; - SetInRelative_1(ParAndRad: TColgp_Array1OfPnt2d, Ud: Standard_Real, Uf: Standard_Real, Periodic: Standard_Boolean): void; - Set_2(ParAndRad: TColgp_Array1OfPnt2d, Dd: Standard_Real, Df: Standard_Real, Periodic: Standard_Boolean): void; - SetInRelative_2(ParAndRad: TColgp_Array1OfPnt2d, Ud: Standard_Real, Uf: Standard_Real, Dd: Standard_Real, Df: Standard_Real, Periodic: Standard_Boolean): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Law_Linear extends Law_Function { - constructor() - Set(Pdeb: Standard_Real, Valdeb: Standard_Real, Pfin: Standard_Real, Valfin: Standard_Real): void; - Continuity(): GeomAbs_Shape; - NbIntervals(S: GeomAbs_Shape): Graphic3d_ZLayerId; - Intervals(T: IntTools_CArray1OfReal, S: GeomAbs_Shape): void; - Value(X: Standard_Real): Standard_Real; - D1(X: Standard_Real, F: Standard_Real, D: Standard_Real): void; - D2(X: Standard_Real, F: Standard_Real, D: Standard_Real, D2: Standard_Real): void; - Trim(PFirst: Standard_Real, PLast: Standard_Real, Tol: Standard_Real): Handle_Law_Function; - Bounds(PFirst: Standard_Real, PLast: Standard_Real): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Law_S extends Law_BSpFunc { - constructor() - Set_1(Pdeb: Standard_Real, Valdeb: Standard_Real, Pfin: Standard_Real, Valfin: Standard_Real): void; - Set_2(Pdeb: Standard_Real, Valdeb: Standard_Real, Ddeb: Standard_Real, Pfin: Standard_Real, Valfin: Standard_Real, Dfin: Standard_Real): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class Message_ProgressRange { - UserBreak(): Standard_Boolean; - More(): Standard_Boolean; - IsActive(): Standard_Boolean; - Close(): void; - delete(): void; -} - - export declare class Message_ProgressRange_1 extends Message_ProgressRange { - constructor(); - } - - export declare class Message_ProgressRange_2 extends Message_ProgressRange { - constructor(theOther: Message_ProgressRange); - } - -export declare class MoniTool_TypedValue extends Standard_Transient { - Name(): Standard_CString; - ValueType(): MoniTool_ValueType; - Definition(): XCAFDoc_PartId; - SetDefinition(deftext: Standard_CString): void; - Print(S: Standard_OStream): void; - PrintValue(S: Standard_OStream): void; - AddDef(initext: Standard_CString): Standard_Boolean; - SetLabel(label: Standard_CString): void; - Label(): Standard_CString; - SetMaxLength(max: Graphic3d_ZLayerId): void; - MaxLength(): Graphic3d_ZLayerId; - SetIntegerLimit(max: Standard_Boolean, val: Graphic3d_ZLayerId): void; - IntegerLimit(max: Standard_Boolean, val: Graphic3d_ZLayerId): Standard_Boolean; - SetRealLimit(max: Standard_Boolean, val: Standard_Real): void; - RealLimit(max: Standard_Boolean, val: Standard_Real): Standard_Boolean; - SetUnitDef(def: Standard_CString): void; - UnitDef(): Standard_CString; - StartEnum(start: Graphic3d_ZLayerId, match: Standard_Boolean): void; - AddEnum(v1: Standard_CString, v2: Standard_CString, v3: Standard_CString, v4: Standard_CString, v5: Standard_CString, v6: Standard_CString, v7: Standard_CString, v8: Standard_CString, v9: Standard_CString, v10: Standard_CString): void; - AddEnumValue(val: Standard_CString, num: Graphic3d_ZLayerId): void; - EnumDef(startcase: Graphic3d_ZLayerId, endcase: Graphic3d_ZLayerId, match: Standard_Boolean): Standard_Boolean; - EnumVal(num: Graphic3d_ZLayerId): Standard_CString; - EnumCase(val: Standard_CString): Graphic3d_ZLayerId; - SetObjectType(typ: Handle_Standard_Type): void; - ObjectType(): Handle_Standard_Type; - SetInterpret(func: MoniTool_ValueInterpret): void; - HasInterpret(): Standard_Boolean; - SetSatisfies(func: MoniTool_ValueSatisfies, name: Standard_CString): void; - SatisfiesName(): Standard_CString; - IsSetValue(): Standard_Boolean; - CStringValue(): Standard_CString; - HStringValue(): Handle_TCollection_HAsciiString; - Interpret(hval: Handle_TCollection_HAsciiString, native: Standard_Boolean): Handle_TCollection_HAsciiString; - Satisfies(hval: Handle_TCollection_HAsciiString): Standard_Boolean; - ClearValue(): void; - SetCStringValue(val: Standard_CString): Standard_Boolean; - SetHStringValue(hval: Handle_TCollection_HAsciiString): Standard_Boolean; - IntegerValue(): Graphic3d_ZLayerId; - SetIntegerValue(ival: Graphic3d_ZLayerId): Standard_Boolean; - RealValue(): Standard_Real; - SetRealValue(rval: Standard_Real): Standard_Boolean; - ObjectValue(): Handle_Standard_Transient; - GetObjectValue(val: Handle_Standard_Transient): void; - SetObjectValue(obj: Handle_Standard_Transient): Standard_Boolean; - ObjectTypeName(): Standard_CString; - static AddLib(tv: Handle_MoniTool_TypedValue, def: Standard_CString): Standard_Boolean; - static Lib(def: Standard_CString): Handle_MoniTool_TypedValue; - static FromLib(def: Standard_CString): Handle_MoniTool_TypedValue; - static LibList(): Handle_TColStd_HSequenceOfAsciiString; - static StaticValue(name: Standard_CString): Handle_MoniTool_TypedValue; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class MoniTool_TypedValue_1 extends MoniTool_TypedValue { - constructor(name: Standard_CString, type: MoniTool_ValueType, init: Standard_CString); - } - - export declare class MoniTool_TypedValue_2 extends MoniTool_TypedValue { - constructor(other: Handle_MoniTool_TypedValue); - } - -export declare class NCollection_BaseList { - Extent(): Graphic3d_ZLayerId; - IsEmpty(): Standard_Boolean; - Allocator(): Handle_NCollection_BaseAllocator; - delete(): void; -} - -export declare class NCollection_BaseMap { - NbBuckets(): Graphic3d_ZLayerId; - Extent(): Graphic3d_ZLayerId; - IsEmpty(): Standard_Boolean; - Statistics(S: Standard_OStream): void; - Allocator(): Handle_NCollection_BaseAllocator; - delete(): void; -} - -export declare class NCollection_BaseSequence { - IsEmpty(): Standard_Boolean; - Length(): Graphic3d_ZLayerId; - Allocator(): Handle_NCollection_BaseAllocator; - delete(): void; -} - -export declare class Poly_Array1OfTriangle { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: Poly_Triangle): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: Poly_Array1OfTriangle): Poly_Array1OfTriangle; - Move(theOther: Poly_Array1OfTriangle): Poly_Array1OfTriangle; - First(): Poly_Triangle; - ChangeFirst(): Poly_Triangle; - Last(): Poly_Triangle; - ChangeLast(): Poly_Triangle; - Value(theIndex: Standard_Integer): Poly_Triangle; - ChangeValue(theIndex: Standard_Integer): Poly_Triangle; - SetValue(theIndex: Standard_Integer, theItem: Poly_Triangle): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class Poly_Array1OfTriangle_1 extends Poly_Array1OfTriangle { - constructor(); - } - - export declare class Poly_Array1OfTriangle_2 extends Poly_Array1OfTriangle { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class Poly_Array1OfTriangle_3 extends Poly_Array1OfTriangle { - constructor(theOther: Poly_Array1OfTriangle); - } - - export declare class Poly_Array1OfTriangle_4 extends Poly_Array1OfTriangle { - constructor(theOther: Poly_Array1OfTriangle); - } - - export declare class Poly_Array1OfTriangle_5 extends Poly_Array1OfTriangle { - constructor(theBegin: Poly_Triangle, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class Poly_Connect { - Load(theTriangulation: Handle_Poly_Triangulation): void; - Triangulation(): Handle_Poly_Triangulation; - Triangle(N: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - Triangles(T: Graphic3d_ZLayerId, t1: Graphic3d_ZLayerId, t2: Graphic3d_ZLayerId, t3: Graphic3d_ZLayerId): void; - Nodes(T: Graphic3d_ZLayerId, n1: Graphic3d_ZLayerId, n2: Graphic3d_ZLayerId, n3: Graphic3d_ZLayerId): void; - Initialize(N: Graphic3d_ZLayerId): void; - More(): Standard_Boolean; - Next(): void; - Value(): Graphic3d_ZLayerId; - delete(): void; -} - - export declare class Poly_Connect_1 extends Poly_Connect { - constructor(); - } - - export declare class Poly_Connect_2 extends Poly_Connect { - constructor(theTriangulation: Handle_Poly_Triangulation); - } - -export declare class Handle_Poly_PolygonOnTriangulation { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Poly_PolygonOnTriangulation): void; - get(): Poly_PolygonOnTriangulation; - delete(): void; -} - - export declare class Handle_Poly_PolygonOnTriangulation_1 extends Handle_Poly_PolygonOnTriangulation { - constructor(); - } - - export declare class Handle_Poly_PolygonOnTriangulation_2 extends Handle_Poly_PolygonOnTriangulation { - constructor(thePtr: Poly_PolygonOnTriangulation); - } - - export declare class Handle_Poly_PolygonOnTriangulation_3 extends Handle_Poly_PolygonOnTriangulation { - constructor(theHandle: Handle_Poly_PolygonOnTriangulation); - } - - export declare class Handle_Poly_PolygonOnTriangulation_4 extends Handle_Poly_PolygonOnTriangulation { - constructor(theHandle: Handle_Poly_PolygonOnTriangulation); - } - -export declare class Poly_PolygonOnTriangulation extends Standard_Transient { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - Copy(): Handle_Poly_PolygonOnTriangulation; - Deflection_1(): Standard_Real; - Deflection_2(theDefl: Standard_Real): void; - NbNodes(): Graphic3d_ZLayerId; - Node(theIndex: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - SetNode(theIndex: Graphic3d_ZLayerId, theNode: Graphic3d_ZLayerId): void; - HasParameters(): Standard_Boolean; - Parameter(theIndex: Graphic3d_ZLayerId): Standard_Real; - SetParameter(theIndex: Graphic3d_ZLayerId, theValue: Standard_Real): void; - SetParameters(theParameters: Handle_TColStd_HArray1OfReal): void; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - Nodes(): TColStd_Array1OfInteger; - Parameters(): Handle_TColStd_HArray1OfReal; - ChangeNodes(): TColStd_Array1OfInteger; - ChangeParameters(): IntTools_CArray1OfReal; - delete(): void; -} - - export declare class Poly_PolygonOnTriangulation_1 extends Poly_PolygonOnTriangulation { - constructor(theNbNodes: Graphic3d_ZLayerId, theHasParams: Standard_Boolean); - } - - export declare class Poly_PolygonOnTriangulation_2 extends Poly_PolygonOnTriangulation { - constructor(Nodes: TColStd_Array1OfInteger); - } - - export declare class Poly_PolygonOnTriangulation_3 extends Poly_PolygonOnTriangulation { - constructor(Nodes: TColStd_Array1OfInteger, Parameters: IntTools_CArray1OfReal); - } - -export declare class Poly_Triangle { - Set_1(theN1: Graphic3d_ZLayerId, theN2: Graphic3d_ZLayerId, theN3: Graphic3d_ZLayerId): void; - Set_2(theIndex: Graphic3d_ZLayerId, theNode: Graphic3d_ZLayerId): void; - Get(theN1: Graphic3d_ZLayerId, theN2: Graphic3d_ZLayerId, theN3: Graphic3d_ZLayerId): void; - Value(theIndex: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - ChangeValue(theIndex: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - delete(): void; -} - - export declare class Poly_Triangle_1 extends Poly_Triangle { - constructor(); - } - - export declare class Poly_Triangle_2 extends Poly_Triangle { - constructor(theN1: Graphic3d_ZLayerId, theN2: Graphic3d_ZLayerId, theN3: Graphic3d_ZLayerId); - } - -export declare class Handle_Poly_Triangulation { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: Poly_Triangulation): void; - get(): Poly_Triangulation; - delete(): void; -} - - export declare class Handle_Poly_Triangulation_1 extends Handle_Poly_Triangulation { - constructor(); - } - - export declare class Handle_Poly_Triangulation_2 extends Handle_Poly_Triangulation { - constructor(thePtr: Poly_Triangulation); - } - - export declare class Handle_Poly_Triangulation_3 extends Handle_Poly_Triangulation { - constructor(theHandle: Handle_Poly_Triangulation); - } - - export declare class Handle_Poly_Triangulation_4 extends Handle_Poly_Triangulation { - constructor(theHandle: Handle_Poly_Triangulation); - } - -export declare class Poly_Triangulation extends Standard_Transient { - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - Copy(): Handle_Poly_Triangulation; - Deflection_1(): Standard_Real; - Deflection_2(theDeflection: Standard_Real): void; - Parameters_1(): Handle_Poly_TriangulationParameters; - Parameters_2(theParams: Handle_Poly_TriangulationParameters): void; - Clear(): void; - HasGeometry(): Standard_Boolean; - NbNodes(): Graphic3d_ZLayerId; - NbTriangles(): Graphic3d_ZLayerId; - HasUVNodes(): Standard_Boolean; - HasNormals(): Standard_Boolean; - Node(theIndex: Graphic3d_ZLayerId): gp_Pnt; - SetNode(theIndex: Graphic3d_ZLayerId, thePnt: gp_Pnt): void; - UVNode(theIndex: Graphic3d_ZLayerId): gp_Pnt2d; - SetUVNode(theIndex: Graphic3d_ZLayerId, thePnt: gp_Pnt2d): void; - Triangle(theIndex: Graphic3d_ZLayerId): Poly_Triangle; - SetTriangle(theIndex: Graphic3d_ZLayerId, theTriangle: Poly_Triangle): void; - Normal_1(theIndex: Graphic3d_ZLayerId): gp_Dir; - Normal_2(theIndex: Graphic3d_ZLayerId, theVec3: gp_Vec3f): void; - SetNormal_1(theIndex: Graphic3d_ZLayerId, theNormal: gp_Vec3f): void; - SetNormal_2(theIndex: Graphic3d_ZLayerId, theNormal: gp_Dir): void; - MeshPurpose(): Poly_MeshPurpose; - SetMeshPurpose(thePurpose: Poly_MeshPurpose): void; - CachedMinMax(): Bnd_Box; - SetCachedMinMax(theBox: Bnd_Box): void; - HasCachedMinMax(): Standard_Boolean; - UpdateCachedMinMax(): void; - MinMax(theBox: Bnd_Box, theTrsf: gp_Trsf, theIsAccurate: Standard_Boolean): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - IsDoublePrecision(): Standard_Boolean; - SetDoublePrecision(theIsDouble: Standard_Boolean): void; - ResizeNodes(theNbNodes: Graphic3d_ZLayerId, theToCopyOld: Standard_Boolean): void; - ResizeTriangles(theNbTriangles: Graphic3d_ZLayerId, theToCopyOld: Standard_Boolean): void; - AddUVNodes(): void; - RemoveUVNodes(): void; - AddNormals(): void; - RemoveNormals(): void; - ComputeNormals(): void; - MapNodeArray(): Handle_TColgp_HArray1OfPnt; - MapTriangleArray(): Handle_Poly_HArray1OfTriangle; - MapUVNodeArray(): Handle_TColgp_HArray1OfPnt2d; - MapNormalArray(): Handle_TShort_HArray1OfShortReal; - InternalTriangles(): Poly_Array1OfTriangle; - InternalNodes(): Poly_ArrayOfNodes; - InternalUVNodes(): Poly_ArrayOfUVNodes; - InternalNormals(): any; - SetNormals(theNormals: Handle_TShort_HArray1OfShortReal): void; - Triangles(): Poly_Array1OfTriangle; - ChangeTriangles(): Poly_Array1OfTriangle; - ChangeTriangle(theIndex: Graphic3d_ZLayerId): Poly_Triangle; - NbDeferredNodes(): Graphic3d_ZLayerId; - NbDeferredTriangles(): Graphic3d_ZLayerId; - HasDeferredData(): Standard_Boolean; - LoadDeferredData(theFileSystem: any): Standard_Boolean; - DetachedLoadDeferredData(theFileSystem: any): Handle_Poly_Triangulation; - UnloadDeferredData(): Standard_Boolean; - delete(): void; -} - - export declare class Poly_Triangulation_1 extends Poly_Triangulation { - constructor(); - } - - export declare class Poly_Triangulation_2 extends Poly_Triangulation { - constructor(theNbNodes: Graphic3d_ZLayerId, theNbTriangles: Graphic3d_ZLayerId, theHasUVNodes: Standard_Boolean, theHasNormals: Standard_Boolean); - } - - export declare class Poly_Triangulation_3 extends Poly_Triangulation { - constructor(Nodes: TColgp_Array1OfPnt, Triangles: Poly_Array1OfTriangle); - } - - export declare class Poly_Triangulation_4 extends Poly_Triangulation { - constructor(Nodes: TColgp_Array1OfPnt, UVNodes: TColgp_Array1OfPnt2d, Triangles: Poly_Array1OfTriangle); - } - - export declare class Poly_Triangulation_5 extends Poly_Triangulation { - constructor(theTriangulation: Handle_Poly_Triangulation); - } - -export declare class Precision { - constructor(); - static Angular(): Standard_Real; - static Confusion(): Standard_Real; - static SquareConfusion(): Standard_Real; - static Intersection(): Standard_Real; - static Approximation(): Standard_Real; - static Parametric_1(P: Standard_Real, T: Standard_Real): Standard_Real; - static PConfusion_1(T: Standard_Real): Standard_Real; - static SquarePConfusion(): Standard_Real; - static PIntersection_1(T: Standard_Real): Standard_Real; - static PApproximation_1(T: Standard_Real): Standard_Real; - static Parametric_2(P: Standard_Real): Standard_Real; - static PConfusion_2(): Standard_Real; - static PIntersection_2(): Standard_Real; - static PApproximation_2(): Standard_Real; - static IsInfinite(R: Standard_Real): Standard_Boolean; - static IsPositiveInfinite(R: Standard_Real): Standard_Boolean; - static IsNegativeInfinite(R: Standard_Real): Standard_Boolean; - static Infinite(): Standard_Real; - delete(): void; -} - -export declare class ProjLib { - constructor(); - static Project_1(Pl: gp_Pln, P: gp_Pnt): gp_Pnt2d; - static Project_2(Pl: gp_Pln, L: gp_Lin): gp_Lin2d; - static Project_3(Pl: gp_Pln, C: gp_Circ): gp_Circ2d; - static Project_4(Pl: gp_Pln, E: gp_Elips): gp_Elips2d; - static Project_5(Pl: gp_Pln, P: gp_Parab): gp_Parab2d; - static Project_6(Pl: gp_Pln, H: gp_Hypr): gp_Hypr2d; - static Project_7(Cy: gp_Cylinder, P: gp_Pnt): gp_Pnt2d; - static Project_8(Cy: gp_Cylinder, L: gp_Lin): gp_Lin2d; - static Project_9(Cy: gp_Cylinder, Ci: gp_Circ): gp_Lin2d; - static Project_10(Co: gp_Cone, P: gp_Pnt): gp_Pnt2d; - static Project_11(Co: gp_Cone, L: gp_Lin): gp_Lin2d; - static Project_12(Co: gp_Cone, Ci: gp_Circ): gp_Lin2d; - static Project_13(Sp: gp_Sphere, P: gp_Pnt): gp_Pnt2d; - static Project_14(Sp: gp_Sphere, Ci: gp_Circ): gp_Lin2d; - static Project_15(To: gp_Torus, P: gp_Pnt): gp_Pnt2d; - static Project_16(To: gp_Torus, Ci: gp_Circ): gp_Lin2d; - static MakePCurveOfType(PC: ProjLib_HProjectedCurve, aC: Handle_Geom2d_Curve): void; - static IsAnaSurf(theAS: Handle_Adaptor3d_Surface): Standard_Boolean; - delete(): void; -} - -export declare class STEPControl_Reader extends XSControl_Reader { - StepModel(): Handle_StepData_StepModel; - TransferRoot(num: Graphic3d_ZLayerId, theProgress: Message_ProgressRange): Standard_Boolean; - NbRootsForTransfer(): Graphic3d_ZLayerId; - FileUnits(theUnitLengthNames: TColStd_SequenceOfAsciiString, theUnitAngleNames: TColStd_SequenceOfAsciiString, theUnitSolidAngleNames: TColStd_SequenceOfAsciiString): void; - SetSystemLengthUnit(theLengthUnit: Standard_Real): void; - SystemLengthUnit(): Standard_Real; - delete(): void; -} - - export declare class STEPControl_Reader_1 extends STEPControl_Reader { - constructor(); - } - - export declare class STEPControl_Reader_2 extends STEPControl_Reader { - constructor(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean); - } - -export declare type STEPControl_StepModelType = { - STEPControl_AsIs: {}; - STEPControl_ManifoldSolidBrep: {}; - STEPControl_BrepWithVoids: {}; - STEPControl_FacetedBrep: {}; - STEPControl_FacetedBrepAndBrepWithVoids: {}; - STEPControl_ShellBasedSurfaceModel: {}; - STEPControl_GeometricCurveSet: {}; - STEPControl_Hybrid: {}; -} - -export declare class STEPControl_Writer { - SetTolerance(Tol: Standard_Real): void; - UnsetTolerance(): void; - SetWS(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean): void; - WS(): Handle_XSControl_WorkSession; - Model(newone: Standard_Boolean): Handle_StepData_StepModel; - Transfer(sh: TopoDS_Shape, mode: STEPControl_StepModelType, compgraph: Standard_Boolean, theProgress: Message_ProgressRange): IFSelect_ReturnStatus; - Write(filename: Standard_CString): IFSelect_ReturnStatus; - PrintStatsTransfer(what: Graphic3d_ZLayerId, mode: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class STEPControl_Writer_1 extends STEPControl_Writer { - constructor(); - } - - export declare class STEPControl_Writer_2 extends STEPControl_Writer { - constructor(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean); - } - -export declare class ShapeAnalysis { - constructor(); - static OuterWire(face: TopoDS_Face): TopoDS_Wire; - static TotCross2D(sewd: Handle_ShapeExtend_WireData, aFace: TopoDS_Face): Standard_Real; - static ContourArea(theWire: TopoDS_Wire): Standard_Real; - static IsOuterBound(face: TopoDS_Face): Standard_Boolean; - static AdjustByPeriod(Val: Standard_Real, ToVal: Standard_Real, Period: Standard_Real): Standard_Real; - static AdjustToPeriod(Val: Standard_Real, ValMin: Standard_Real, ValMax: Standard_Real): Standard_Real; - static FindBounds(shape: TopoDS_Shape, V1: TopoDS_Vertex, V2: TopoDS_Vertex): void; - static GetFaceUVBounds(F: TopoDS_Face, Umin: Standard_Real, Umax: Standard_Real, Vmin: Standard_Real, Vmax: Standard_Real): void; - delete(): void; -} - -export declare class ShapeAnalysis_Edge { - constructor() - HasCurve3d(edge: TopoDS_Edge): Standard_Boolean; - Curve3d(edge: TopoDS_Edge, C3d: Handle_Geom_Curve, cf: Standard_Real, cl: Standard_Real, orient: Standard_Boolean): Standard_Boolean; - IsClosed3d(edge: TopoDS_Edge): Standard_Boolean; - HasPCurve_1(edge: TopoDS_Edge, face: TopoDS_Face): Standard_Boolean; - HasPCurve_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location): Standard_Boolean; - PCurve_1(edge: TopoDS_Edge, face: TopoDS_Face, C2d: Handle_Geom2d_Curve, cf: Standard_Real, cl: Standard_Real, orient: Standard_Boolean): Standard_Boolean; - PCurve_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location, C2d: Handle_Geom2d_Curve, cf: Standard_Real, cl: Standard_Real, orient: Standard_Boolean): Standard_Boolean; - BoundUV_1(edge: TopoDS_Edge, face: TopoDS_Face, first: gp_Pnt2d, last: gp_Pnt2d): Standard_Boolean; - BoundUV_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location, first: gp_Pnt2d, last: gp_Pnt2d): Standard_Boolean; - IsSeam_1(edge: TopoDS_Edge, face: TopoDS_Face): Standard_Boolean; - IsSeam_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location): Standard_Boolean; - FirstVertex(edge: TopoDS_Edge): TopoDS_Vertex; - LastVertex(edge: TopoDS_Edge): TopoDS_Vertex; - GetEndTangent2d_1(edge: TopoDS_Edge, face: TopoDS_Face, atEnd: Standard_Boolean, pos: gp_Pnt2d, tang: gp_Vec2d, dparam: Standard_Real): Standard_Boolean; - GetEndTangent2d_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location, atEnd: Standard_Boolean, pos: gp_Pnt2d, tang: gp_Vec2d, dparam: Standard_Real): Standard_Boolean; - CheckVerticesWithCurve3d(edge: TopoDS_Edge, preci: Standard_Real, vtx: Graphic3d_ZLayerId): Standard_Boolean; - CheckVerticesWithPCurve_1(edge: TopoDS_Edge, face: TopoDS_Face, preci: Standard_Real, vtx: Graphic3d_ZLayerId): Standard_Boolean; - CheckVerticesWithPCurve_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location, preci: Standard_Real, vtx: Graphic3d_ZLayerId): Standard_Boolean; - CheckVertexTolerance_1(edge: TopoDS_Edge, face: TopoDS_Face, toler1: Standard_Real, toler2: Standard_Real): Standard_Boolean; - CheckVertexTolerance_2(edge: TopoDS_Edge, toler1: Standard_Real, toler2: Standard_Real): Standard_Boolean; - CheckCurve3dWithPCurve_1(edge: TopoDS_Edge, face: TopoDS_Face): Standard_Boolean; - CheckCurve3dWithPCurve_2(edge: TopoDS_Edge, surface: Handle_Geom_Surface, location: TopLoc_Location): Standard_Boolean; - Status(status: ShapeExtend_Status): Standard_Boolean; - CheckSameParameter_1(edge: TopoDS_Edge, maxdev: Standard_Real, NbControl: Graphic3d_ZLayerId): Standard_Boolean; - CheckSameParameter_2(theEdge: TopoDS_Edge, theFace: TopoDS_Face, theMaxdev: Standard_Real, theNbControl: Graphic3d_ZLayerId): Standard_Boolean; - CheckPCurveRange(theFirst: Standard_Real, theLast: Standard_Real, thePC: Handle_Geom2d_Curve): Standard_Boolean; - CheckOverlapping(theEdge1: TopoDS_Edge, theEdge2: TopoDS_Edge, theTolOverlap: Standard_Real, theDomainDist: Standard_Real): Standard_Boolean; - delete(): void; -} - -export declare class ShapeAnalysis_WireOrder { - SetMode(mode3d: Standard_Boolean, tol: Standard_Real): void; - Tolerance(): Standard_Real; - Clear(): void; - Add_1(start3d: gp_XYZ, end3d: gp_XYZ): void; - Add_2(start2d: gp_XY, end2d: gp_XY): void; - NbEdges(): Graphic3d_ZLayerId; - KeepLoopsMode(): Standard_Boolean; - Perform(closed: Standard_Boolean): void; - IsDone(): Standard_Boolean; - Status(): Graphic3d_ZLayerId; - Ordered(n: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - XYZ(num: Graphic3d_ZLayerId, start3d: gp_XYZ, end3d: gp_XYZ): void; - XY(num: Graphic3d_ZLayerId, start2d: gp_XY, end2d: gp_XY): void; - Gap(num: Graphic3d_ZLayerId): Standard_Real; - SetChains(gap: Standard_Real): void; - NbChains(): Graphic3d_ZLayerId; - Chain(num: Graphic3d_ZLayerId, n1: Graphic3d_ZLayerId, n2: Graphic3d_ZLayerId): void; - SetCouples(gap: Standard_Real): void; - NbCouples(): Graphic3d_ZLayerId; - Couple(num: Graphic3d_ZLayerId, n1: Graphic3d_ZLayerId, n2: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class ShapeAnalysis_WireOrder_1 extends ShapeAnalysis_WireOrder { - constructor(); - } - - export declare class ShapeAnalysis_WireOrder_2 extends ShapeAnalysis_WireOrder { - constructor(mode3d: Standard_Boolean, tol: Standard_Real); - } - -export declare class ShapeBuild_ReShape extends BRepTools_ReShape { - constructor() - Apply_1(shape: TopoDS_Shape, until: TopAbs_ShapeEnum, buildmode: Graphic3d_ZLayerId): TopoDS_Shape; - Apply_2(shape: TopoDS_Shape, until: TopAbs_ShapeEnum): TopoDS_Shape; - Status_1(shape: TopoDS_Shape, newsh: TopoDS_Shape, last: Standard_Boolean): Graphic3d_ZLayerId; - Status_2(status: ShapeExtend_Status): Standard_Boolean; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class ShapeExtend_CompositeSurface extends Geom_Surface { - Init_1(GridSurf: Handle_TColGeom_HArray2OfSurface, param: ShapeExtend_Parametrisation): Standard_Boolean; - Init_2(GridSurf: Handle_TColGeom_HArray2OfSurface, UJoints: IntTools_CArray1OfReal, VJoints: IntTools_CArray1OfReal): Standard_Boolean; - NbUPatches(): Graphic3d_ZLayerId; - NbVPatches(): Graphic3d_ZLayerId; - Patch_1(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId): Handle_Geom_Surface; - Patches(): Handle_TColGeom_HArray2OfSurface; - UJointValues(): Handle_TColStd_HArray1OfReal; - VJointValues(): Handle_TColStd_HArray1OfReal; - UJointValue(i: Graphic3d_ZLayerId): Standard_Real; - VJointValue(j: Graphic3d_ZLayerId): Standard_Real; - SetUJointValues(UJoints: IntTools_CArray1OfReal): Standard_Boolean; - SetVJointValues(VJoints: IntTools_CArray1OfReal): Standard_Boolean; - SetUFirstValue(UFirst: Standard_Real): void; - SetVFirstValue(VFirst: Standard_Real): void; - LocateUParameter(U: Standard_Real): Graphic3d_ZLayerId; - LocateVParameter(V: Standard_Real): Graphic3d_ZLayerId; - LocateUVPoint(pnt: gp_Pnt2d, i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId): void; - Patch_2(U: Standard_Real, V: Standard_Real): Handle_Geom_Surface; - Patch_3(pnt: gp_Pnt2d): Handle_Geom_Surface; - ULocalToGlobal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, u: Standard_Real): Standard_Real; - VLocalToGlobal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, v: Standard_Real): Standard_Real; - LocalToGlobal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, uv: gp_Pnt2d): gp_Pnt2d; - UGlobalToLocal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, U: Standard_Real): Standard_Real; - VGlobalToLocal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, V: Standard_Real): Standard_Real; - GlobalToLocal(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, UV: gp_Pnt2d): gp_Pnt2d; - GlobalToLocalTransformation(i: Graphic3d_ZLayerId, j: Graphic3d_ZLayerId, uFact: Standard_Real, Trsf: gp_Trsf2d): Standard_Boolean; - Transform(T: gp_Trsf): void; - Copy(): Handle_Geom_Geometry; - UReverse(): void; - UReversedParameter(U: Standard_Real): Standard_Real; - VReverse(): void; - VReversedParameter(V: Standard_Real): Standard_Real; - Bounds(U1: Standard_Real, U2: Standard_Real, V1: Standard_Real, V2: Standard_Real): void; - IsUClosed(): Standard_Boolean; - IsVClosed(): Standard_Boolean; - IsUPeriodic(): Standard_Boolean; - IsVPeriodic(): Standard_Boolean; - UIso(U: Standard_Real): Handle_Geom_Curve; - VIso(V: Standard_Real): Handle_Geom_Curve; - Continuity(): GeomAbs_Shape; - IsCNu(N: Graphic3d_ZLayerId): Standard_Boolean; - IsCNv(N: Graphic3d_ZLayerId): Standard_Boolean; - D0(U: Standard_Real, V: Standard_Real, P: gp_Pnt): void; - D1(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec): void; - D2(U: Standard_Real, V: Standard_Real, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec): void; - D3(U: Standard_Real, V: Standard_Real, 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; - DN(U: Standard_Real, V: Standard_Real, Nu: Graphic3d_ZLayerId, Nv: Graphic3d_ZLayerId): gp_Vec; - Value(pnt: gp_Pnt2d): gp_Pnt; - ComputeJointValues(param: ShapeExtend_Parametrisation): void; - CheckConnectivity(prec: Standard_Real): Standard_Boolean; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class ShapeExtend_CompositeSurface_1 extends ShapeExtend_CompositeSurface { - constructor(); - } - - export declare class ShapeExtend_CompositeSurface_2 extends ShapeExtend_CompositeSurface { - constructor(GridSurf: Handle_TColGeom_HArray2OfSurface, param: ShapeExtend_Parametrisation); - } - - export declare class ShapeExtend_CompositeSurface_3 extends ShapeExtend_CompositeSurface { - constructor(GridSurf: Handle_TColGeom_HArray2OfSurface, UJoints: IntTools_CArray1OfReal, VJoints: IntTools_CArray1OfReal); - } - -export declare class ShapeFix_EdgeConnect { - constructor() - Add_1(aFirst: TopoDS_Edge, aSecond: TopoDS_Edge): void; - Add_2(aShape: TopoDS_Shape): void; - Build(): void; - Clear(): void; - delete(): void; -} - -export declare class ShapeFix_Face extends ShapeFix_Root { - ClearModes(): void; - Init_1(face: TopoDS_Face): void; - Init_2(surf: Handle_Geom_Surface, preci: Standard_Real, fwd: Standard_Boolean): void; - Init_3(surf: Handle_ShapeAnalysis_Surface, preci: Standard_Real, fwd: Standard_Boolean): void; - SetMsgRegistrator(msgreg: Handle_ShapeExtend_BasicMsgRegistrator): void; - SetPrecision(preci: Standard_Real): void; - SetMinTolerance(mintol: Standard_Real): void; - SetMaxTolerance(maxtol: Standard_Real): void; - FixWireMode(): Graphic3d_ZLayerId; - FixOrientationMode(): Graphic3d_ZLayerId; - FixAddNaturalBoundMode(): Graphic3d_ZLayerId; - FixMissingSeamMode(): Graphic3d_ZLayerId; - FixSmallAreaWireMode(): Graphic3d_ZLayerId; - RemoveSmallAreaFaceMode(): Graphic3d_ZLayerId; - FixIntersectingWiresMode(): Graphic3d_ZLayerId; - FixLoopWiresMode(): Graphic3d_ZLayerId; - FixSplitFaceMode(): Graphic3d_ZLayerId; - AutoCorrectPrecisionMode(): Graphic3d_ZLayerId; - FixPeriodicDegeneratedMode(): Graphic3d_ZLayerId; - Face(): TopoDS_Face; - Result(): TopoDS_Shape; - Add(wire: TopoDS_Wire): void; - Perform(): Standard_Boolean; - FixOrientation_1(): Standard_Boolean; - FixOrientation_2(MapWires: TopTools_DataMapOfShapeListOfShape): Standard_Boolean; - FixAddNaturalBound(): Standard_Boolean; - FixMissingSeam(): Standard_Boolean; - FixSmallAreaWire(theIsRemoveSmallFace: Standard_Boolean): Standard_Boolean; - FixLoopWire(aResWires: TopTools_SequenceOfShape): Standard_Boolean; - FixIntersectingWires(): Standard_Boolean; - FixWiresTwoCoincEdges(): Standard_Boolean; - FixSplitFace(MapWires: TopTools_DataMapOfShapeListOfShape): Standard_Boolean; - FixPeriodicDegenerated(): Standard_Boolean; - Status(status: ShapeExtend_Status): Standard_Boolean; - FixWireTool(): Handle_ShapeFix_Wire; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class ShapeFix_Face_1 extends ShapeFix_Face { - constructor(); - } - - export declare class ShapeFix_Face_2 extends ShapeFix_Face { - constructor(face: TopoDS_Face); - } - -export declare class ShapeFix_Root extends Standard_Transient { - constructor() - Set(Root: Handle_ShapeFix_Root): void; - SetContext(context: Handle_ShapeBuild_ReShape): void; - Context(): Handle_ShapeBuild_ReShape; - SetMsgRegistrator(msgreg: Handle_ShapeExtend_BasicMsgRegistrator): void; - MsgRegistrator(): Handle_ShapeExtend_BasicMsgRegistrator; - SetPrecision(preci: Standard_Real): void; - Precision(): Standard_Real; - SetMinTolerance(mintol: Standard_Real): void; - MinTolerance(): Standard_Real; - SetMaxTolerance(maxtol: Standard_Real): void; - MaxTolerance(): Standard_Real; - LimitTolerance(toler: Standard_Real): Standard_Real; - SendMsg_1(shape: TopoDS_Shape, message: Message_Msg, gravity: Message_Gravity): void; - SendMsg_2(message: Message_Msg, gravity: Message_Gravity): void; - SendWarning_1(shape: TopoDS_Shape, message: Message_Msg): void; - SendWarning_2(message: Message_Msg): void; - SendFail_1(shape: TopoDS_Shape, message: Message_Msg): void; - SendFail_2(message: Message_Msg): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - -export declare class ShapeFix_Solid extends ShapeFix_Root { - Init(solid: TopoDS_Solid): void; - Perform(theProgress: Message_ProgressRange): Standard_Boolean; - SolidFromShell(shell: TopoDS_Shell): TopoDS_Solid; - Status(status: ShapeExtend_Status): Standard_Boolean; - Solid(): TopoDS_Shape; - FixShellTool(): Handle_ShapeFix_Shell; - SetMsgRegistrator(msgreg: Handle_ShapeExtend_BasicMsgRegistrator): void; - SetPrecision(preci: Standard_Real): void; - SetMinTolerance(mintol: Standard_Real): void; - SetMaxTolerance(maxtol: Standard_Real): void; - FixShellMode(): Graphic3d_ZLayerId; - FixShellOrientationMode(): Graphic3d_ZLayerId; - CreateOpenSolidMode(): Standard_Boolean; - Shape(): TopoDS_Shape; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class ShapeFix_Solid_1 extends ShapeFix_Solid { - constructor(); - } - - export declare class ShapeFix_Solid_2 extends ShapeFix_Solid { - constructor(solid: TopoDS_Solid); - } - -export declare class ShapeFix_Wire extends ShapeFix_Root { - ClearModes(): void; - ClearStatuses(): void; - Init_1(wire: TopoDS_Wire, face: TopoDS_Face, prec: Standard_Real): void; - Init_2(saw: Handle_ShapeAnalysis_Wire): void; - Load_1(wire: TopoDS_Wire): void; - Load_2(sbwd: Handle_ShapeExtend_WireData): void; - SetFace(face: TopoDS_Face): void; - SetSurface_1(surf: Handle_Geom_Surface): void; - SetSurface_2(surf: Handle_Geom_Surface, loc: TopLoc_Location): void; - SetPrecision(prec: Standard_Real): void; - SetMaxTailAngle(theMaxTailAngle: Standard_Real): void; - SetMaxTailWidth(theMaxTailWidth: Standard_Real): void; - IsLoaded(): Standard_Boolean; - IsReady(): Standard_Boolean; - NbEdges(): Graphic3d_ZLayerId; - Wire(): TopoDS_Wire; - WireAPIMake(): TopoDS_Wire; - Analyzer(): Handle_ShapeAnalysis_Wire; - WireData(): Handle_ShapeExtend_WireData; - Face(): TopoDS_Face; - ModifyTopologyMode(): Standard_Boolean; - ModifyGeometryMode(): Standard_Boolean; - ModifyRemoveLoopMode(): Graphic3d_ZLayerId; - ClosedWireMode(): Standard_Boolean; - PreferencePCurveMode(): Standard_Boolean; - FixGapsByRangesMode(): Standard_Boolean; - FixReorderMode(): Graphic3d_ZLayerId; - FixSmallMode(): Graphic3d_ZLayerId; - FixConnectedMode(): Graphic3d_ZLayerId; - FixEdgeCurvesMode(): Graphic3d_ZLayerId; - FixDegeneratedMode(): Graphic3d_ZLayerId; - FixSelfIntersectionMode(): Graphic3d_ZLayerId; - FixLackingMode(): Graphic3d_ZLayerId; - FixGaps3dMode(): Graphic3d_ZLayerId; - FixGaps2dMode(): Graphic3d_ZLayerId; - FixReversed2dMode(): Graphic3d_ZLayerId; - FixRemovePCurveMode(): Graphic3d_ZLayerId; - FixAddPCurveMode(): Graphic3d_ZLayerId; - FixRemoveCurve3dMode(): Graphic3d_ZLayerId; - FixAddCurve3dMode(): Graphic3d_ZLayerId; - FixSeamMode(): Graphic3d_ZLayerId; - FixShiftedMode(): Graphic3d_ZLayerId; - FixSameParameterMode(): Graphic3d_ZLayerId; - FixVertexToleranceMode(): Graphic3d_ZLayerId; - FixNotchedEdgesMode(): Graphic3d_ZLayerId; - FixSelfIntersectingEdgeMode(): Graphic3d_ZLayerId; - FixIntersectingEdgesMode(): Graphic3d_ZLayerId; - FixNonAdjacentIntersectingEdgesMode(): Graphic3d_ZLayerId; - FixTailMode(): Graphic3d_ZLayerId; - Perform(): Standard_Boolean; - FixReorder_1(): Standard_Boolean; - FixSmall_1(lockvtx: Standard_Boolean, precsmall: Standard_Real): Graphic3d_ZLayerId; - FixConnected_1(prec: Standard_Real): Standard_Boolean; - FixEdgeCurves(): Standard_Boolean; - FixDegenerated_1(): Standard_Boolean; - FixSelfIntersection(): Standard_Boolean; - FixLacking_1(force: Standard_Boolean): Standard_Boolean; - FixClosed(prec: Standard_Real): Standard_Boolean; - FixGaps3d(): Standard_Boolean; - FixGaps2d(): Standard_Boolean; - FixReorder_2(wi: ShapeAnalysis_WireOrder): Standard_Boolean; - FixSmall_2(num: Graphic3d_ZLayerId, lockvtx: Standard_Boolean, precsmall: Standard_Real): Standard_Boolean; - FixConnected_2(num: Graphic3d_ZLayerId, prec: Standard_Real): Standard_Boolean; - FixSeam(num: Graphic3d_ZLayerId): Standard_Boolean; - FixShifted(): Standard_Boolean; - FixDegenerated_2(num: Graphic3d_ZLayerId): Standard_Boolean; - FixLacking_2(num: Graphic3d_ZLayerId, force: Standard_Boolean): Standard_Boolean; - FixNotchedEdges(): Standard_Boolean; - FixGap3d(num: Graphic3d_ZLayerId, convert: Standard_Boolean): Standard_Boolean; - FixGap2d(num: Graphic3d_ZLayerId, convert: Standard_Boolean): Standard_Boolean; - FixTails(): Standard_Boolean; - StatusReorder(status: ShapeExtend_Status): Standard_Boolean; - StatusSmall(status: ShapeExtend_Status): Standard_Boolean; - StatusConnected(status: ShapeExtend_Status): Standard_Boolean; - StatusEdgeCurves(status: ShapeExtend_Status): Standard_Boolean; - StatusDegenerated(status: ShapeExtend_Status): Standard_Boolean; - StatusSelfIntersection(status: ShapeExtend_Status): Standard_Boolean; - StatusLacking(status: ShapeExtend_Status): Standard_Boolean; - StatusClosed(status: ShapeExtend_Status): Standard_Boolean; - StatusGaps3d(status: ShapeExtend_Status): Standard_Boolean; - StatusGaps2d(status: ShapeExtend_Status): Standard_Boolean; - StatusNotches(status: ShapeExtend_Status): Standard_Boolean; - StatusRemovedSegment(): Standard_Boolean; - StatusFixTails(status: ShapeExtend_Status): Standard_Boolean; - LastFixStatus(status: ShapeExtend_Status): Standard_Boolean; - FixEdgeTool(): Handle_ShapeFix_Edge; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class ShapeFix_Wire_1 extends ShapeFix_Wire { - constructor(); - } - - export declare class ShapeFix_Wire_2 extends ShapeFix_Wire { - constructor(wire: TopoDS_Wire, face: TopoDS_Face, prec: Standard_Real); - } - -export declare class ShapeUpgrade_UnifySameDomain extends Standard_Transient { - Initialize(aShape: TopoDS_Shape, UnifyEdges: Standard_Boolean, UnifyFaces: Standard_Boolean, ConcatBSplines: Standard_Boolean): void; - AllowInternalEdges(theValue: Standard_Boolean): void; - KeepShape(theShape: TopoDS_Shape): void; - KeepShapes(theShapes: TopTools_MapOfShape): void; - SetSafeInputMode(theValue: Standard_Boolean): void; - SetLinearTolerance(theValue: Standard_Real): void; - SetAngularTolerance(theValue: Standard_Real): void; - Build(): void; - Shape(): TopoDS_Shape; - History_1(): Handle_BRepTools_History; - History_2(): Handle_BRepTools_History; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - delete(): void; -} - - export declare class ShapeUpgrade_UnifySameDomain_1 extends ShapeUpgrade_UnifySameDomain { - constructor(); - } - - export declare class ShapeUpgrade_UnifySameDomain_2 extends ShapeUpgrade_UnifySameDomain { - constructor(aShape: TopoDS_Shape, UnifyEdges: Standard_Boolean, UnifyFaces: Standard_Boolean, ConcatBSplines: Standard_Boolean); - } - -export declare class Standard_Transient { - Delete(): void; - static get_type_name(): Standard_Character; - static get_type_descriptor(): Handle_Standard_Type; - DynamicType(): Handle_Standard_Type; - IsInstance_1(theType: Handle_Standard_Type): Standard_Boolean; - IsInstance_2(theTypeName: Standard_CString): Standard_Boolean; - IsKind_1(theType: Handle_Standard_Type): Standard_Boolean; - IsKind_2(theTypeName: Standard_CString): Standard_Boolean; - This(): Standard_Transient; - GetRefCount(): Graphic3d_ZLayerId; - IncrementRefCounter(): void; - DecrementRefCounter(): Graphic3d_ZLayerId; - delete(): void; -} - - export declare class Standard_Transient_1 extends Standard_Transient { - constructor(); - } - - export declare class Standard_Transient_2 extends Standard_Transient { - constructor(a: Standard_Transient); - } - -export declare class StdPrs_ToolTriangulatedShape { - constructor(); - static IsTriangulated(theShape: TopoDS_Shape): Standard_Boolean; - static IsClosed(theShape: TopoDS_Shape): Standard_Boolean; - static ComputeNormals_1(theFace: TopoDS_Face, theTris: Handle_Poly_Triangulation): void; - static ComputeNormals_2(theFace: TopoDS_Face, theTris: Handle_Poly_Triangulation, thePolyConnect: Poly_Connect): void; - static Normal(theFace: TopoDS_Face, thePolyConnect: Poly_Connect, theNormals: TColgp_Array1OfDir): void; - static GetDeflection(theShape: TopoDS_Shape, theDrawer: Handle_Prs3d_Drawer): Standard_Real; - static IsTessellated(theShape: TopoDS_Shape, theDrawer: Handle_Prs3d_Drawer): Standard_Boolean; - static Tessellate(theShape: TopoDS_Shape, theDrawer: Handle_Prs3d_Drawer): Standard_Boolean; - static ClearOnOwnDeflectionChange(theShape: TopoDS_Shape, theDrawer: Handle_Prs3d_Drawer, theToResetCoeff: Standard_Boolean): void; - delete(): void; -} - -export declare class Handle_StepData_StepModel { - Nullify(): void; - IsNull(): boolean; - reset(thePtr: StepData_StepModel): void; - get(): StepData_StepModel; - delete(): void; -} - - export declare class Handle_StepData_StepModel_1 extends Handle_StepData_StepModel { - constructor(); - } - - export declare class Handle_StepData_StepModel_2 extends Handle_StepData_StepModel { - constructor(thePtr: StepData_StepModel); - } - - export declare class Handle_StepData_StepModel_3 extends Handle_StepData_StepModel { - constructor(theHandle: Handle_StepData_StepModel); - } - - export declare class Handle_StepData_StepModel_4 extends Handle_StepData_StepModel { - constructor(theHandle: Handle_StepData_StepModel); - } - -export declare class StlAPI { - constructor(); - static Write(theShape: TopoDS_Shape, theFile: Standard_CString, theAsciiMode: Standard_Boolean): Standard_Boolean; - static Read(theShape: TopoDS_Shape, aFile: Standard_CString): Standard_Boolean; - delete(): void; -} - -export declare class StlAPI_Reader { - constructor(); - Read(theShape: TopoDS_Shape, theFileName: Standard_CString): Standard_Boolean; - delete(): void; -} - -export declare class StlAPI_Writer { - constructor() - ASCIIMode(): Standard_Boolean; - Write(theShape: TopoDS_Shape, theFileName: Standard_CString, theProgress: Message_ProgressRange): Standard_Boolean; - delete(): void; -} - -export declare class TColStd_Array1OfBoolean { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: Standard_Boolean): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColStd_Array1OfBoolean): TColStd_Array1OfBoolean; - Move(theOther: TColStd_Array1OfBoolean): TColStd_Array1OfBoolean; - First(): Standard_Boolean; - ChangeFirst(): Standard_Boolean; - Last(): Standard_Boolean; - ChangeLast(): Standard_Boolean; - Value(theIndex: Standard_Integer): Standard_Boolean; - ChangeValue(theIndex: Standard_Integer): Standard_Boolean; - SetValue(theIndex: Standard_Integer, theItem: Standard_Boolean): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColStd_Array1OfBoolean_1 extends TColStd_Array1OfBoolean { - constructor(); - } - - export declare class TColStd_Array1OfBoolean_2 extends TColStd_Array1OfBoolean { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColStd_Array1OfBoolean_3 extends TColStd_Array1OfBoolean { - constructor(theOther: TColStd_Array1OfBoolean); - } - - export declare class TColStd_Array1OfBoolean_4 extends TColStd_Array1OfBoolean { - constructor(theOther: TColStd_Array1OfBoolean); - } - - export declare class TColStd_Array1OfBoolean_5 extends TColStd_Array1OfBoolean { - constructor(theBegin: Standard_Boolean, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColStd_Array1OfInteger { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: Standard_Integer): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColStd_Array1OfInteger): TColStd_Array1OfInteger; - Move(theOther: TColStd_Array1OfInteger): TColStd_Array1OfInteger; - First(): Standard_Integer; - ChangeFirst(): Standard_Integer; - Last(): Standard_Integer; - ChangeLast(): Standard_Integer; - Value(theIndex: Standard_Integer): Standard_Integer; - ChangeValue(theIndex: Standard_Integer): Standard_Integer; - SetValue(theIndex: Standard_Integer, theItem: Standard_Integer): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColStd_Array1OfInteger_1 extends TColStd_Array1OfInteger { - constructor(); - } - - export declare class TColStd_Array1OfInteger_2 extends TColStd_Array1OfInteger { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColStd_Array1OfInteger_3 extends TColStd_Array1OfInteger { - constructor(theOther: TColStd_Array1OfInteger); - } - - export declare class TColStd_Array1OfInteger_4 extends TColStd_Array1OfInteger { - constructor(theOther: TColStd_Array1OfInteger); - } - - export declare class TColStd_Array1OfInteger_5 extends TColStd_Array1OfInteger { - constructor(theBegin: Standard_Integer, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColStd_Array1OfReal { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: Standard_Real): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColStd_Array1OfReal): TColStd_Array1OfReal; - Move(theOther: TColStd_Array1OfReal): TColStd_Array1OfReal; - First(): Standard_Real; - ChangeFirst(): Standard_Real; - Last(): Standard_Real; - ChangeLast(): Standard_Real; - Value(theIndex: Standard_Integer): Standard_Real; - ChangeValue(theIndex: Standard_Integer): Standard_Real; - SetValue(theIndex: Standard_Integer, theItem: Standard_Real): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColStd_Array1OfReal_1 extends TColStd_Array1OfReal { - constructor(); - } - - export declare class TColStd_Array1OfReal_2 extends TColStd_Array1OfReal { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColStd_Array1OfReal_3 extends TColStd_Array1OfReal { - constructor(theOther: TColStd_Array1OfReal); - } - - export declare class TColStd_Array1OfReal_4 extends TColStd_Array1OfReal { - constructor(theOther: TColStd_Array1OfReal); - } - - export declare class TColStd_Array1OfReal_5 extends TColStd_Array1OfReal { - constructor(theBegin: Standard_Real, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColgp_Array1OfDir { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: gp_Dir): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColgp_Array1OfDir): TColgp_Array1OfDir; - Move(theOther: TColgp_Array1OfDir): TColgp_Array1OfDir; - First(): gp_Dir; - ChangeFirst(): gp_Dir; - Last(): gp_Dir; - ChangeLast(): gp_Dir; - Value(theIndex: Standard_Integer): gp_Dir; - ChangeValue(theIndex: Standard_Integer): gp_Dir; - SetValue(theIndex: Standard_Integer, theItem: gp_Dir): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColgp_Array1OfDir_1 extends TColgp_Array1OfDir { - constructor(); - } - - export declare class TColgp_Array1OfDir_2 extends TColgp_Array1OfDir { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColgp_Array1OfDir_3 extends TColgp_Array1OfDir { - constructor(theOther: TColgp_Array1OfDir); - } - - export declare class TColgp_Array1OfDir_4 extends TColgp_Array1OfDir { - constructor(theOther: TColgp_Array1OfDir); - } - - export declare class TColgp_Array1OfDir_5 extends TColgp_Array1OfDir { - constructor(theBegin: gp_Dir, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColgp_Array1OfPnt { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: gp_Pnt): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColgp_Array1OfPnt): TColgp_Array1OfPnt; - Move(theOther: TColgp_Array1OfPnt): TColgp_Array1OfPnt; - First(): gp_Pnt; - ChangeFirst(): gp_Pnt; - Last(): gp_Pnt; - ChangeLast(): gp_Pnt; - Value(theIndex: Standard_Integer): gp_Pnt; - ChangeValue(theIndex: Standard_Integer): gp_Pnt; - SetValue(theIndex: Standard_Integer, theItem: gp_Pnt): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColgp_Array1OfPnt_1 extends TColgp_Array1OfPnt { - constructor(); - } - - export declare class TColgp_Array1OfPnt_2 extends TColgp_Array1OfPnt { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColgp_Array1OfPnt_3 extends TColgp_Array1OfPnt { - constructor(theOther: TColgp_Array1OfPnt); - } - - export declare class TColgp_Array1OfPnt_4 extends TColgp_Array1OfPnt { - constructor(theOther: TColgp_Array1OfPnt); - } - - export declare class TColgp_Array1OfPnt_5 extends TColgp_Array1OfPnt { - constructor(theBegin: gp_Pnt, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColgp_Array1OfVec { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Init(theValue: gp_Vec): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsDeletable(): Standard_Boolean; - IsAllocated(): Standard_Boolean; - Assign(theOther: TColgp_Array1OfVec): TColgp_Array1OfVec; - Move(theOther: TColgp_Array1OfVec): TColgp_Array1OfVec; - First(): gp_Vec; - ChangeFirst(): gp_Vec; - Last(): gp_Vec; - ChangeLast(): gp_Vec; - Value(theIndex: Standard_Integer): gp_Vec; - ChangeValue(theIndex: Standard_Integer): gp_Vec; - SetValue(theIndex: Standard_Integer, theItem: gp_Vec): void; - Resize(theLower: Standard_Integer, theUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColgp_Array1OfVec_1 extends TColgp_Array1OfVec { - constructor(); - } - - export declare class TColgp_Array1OfVec_2 extends TColgp_Array1OfVec { - constructor(theLower: Standard_Integer, theUpper: Standard_Integer); - } - - export declare class TColgp_Array1OfVec_3 extends TColgp_Array1OfVec { - constructor(theOther: TColgp_Array1OfVec); - } - - export declare class TColgp_Array1OfVec_4 extends TColgp_Array1OfVec { - constructor(theOther: TColgp_Array1OfVec); - } - - export declare class TColgp_Array1OfVec_5 extends TColgp_Array1OfVec { - constructor(theBegin: gp_Vec, theLower: Standard_Integer, theUpper: Standard_Integer); - } - -export declare class TColgp_Array2OfPnt { - Init(theValue: gp_Pnt): void; - Size(): Standard_Integer; - Length(): Standard_Integer; - NbRows(): Standard_Integer; - NbColumns(): Standard_Integer; - RowLength(): Standard_Integer; - ColLength(): Standard_Integer; - LowerRow(): Standard_Integer; - UpperRow(): Standard_Integer; - LowerCol(): Standard_Integer; - UpperCol(): Standard_Integer; - IsDeletable(): Standard_Boolean; - Assign(theOther: TColgp_Array2OfPnt): TColgp_Array2OfPnt; - Move(theOther: TColgp_Array2OfPnt): TColgp_Array2OfPnt; - Value(theRow: Standard_Integer, theCol: Standard_Integer): gp_Pnt; - ChangeValue(theRow: Standard_Integer, theCol: Standard_Integer): gp_Pnt; - SetValue(theRow: Standard_Integer, theCol: Standard_Integer, theItem: gp_Pnt): void; - Resize(theRowLower: Standard_Integer, theRowUpper: Standard_Integer, theColLower: Standard_Integer, theColUpper: Standard_Integer, theToCopyData: Standard_Boolean): void; - delete(): void; -} - - export declare class TColgp_Array2OfPnt_1 extends TColgp_Array2OfPnt { - constructor(); - } - - export declare class TColgp_Array2OfPnt_2 extends TColgp_Array2OfPnt { - constructor(theRowLower: Standard_Integer, theRowUpper: Standard_Integer, theColLower: Standard_Integer, theColUpper: Standard_Integer); - } - - export declare class TColgp_Array2OfPnt_3 extends TColgp_Array2OfPnt { - constructor(theOther: TColgp_Array2OfPnt); - } - - export declare class TColgp_Array2OfPnt_4 extends TColgp_Array2OfPnt { - constructor(theOther: TColgp_Array2OfPnt); - } - - export declare class TColgp_Array2OfPnt_5 extends TColgp_Array2OfPnt { - constructor(theBegin: gp_Pnt, theRowLower: Standard_Integer, theRowUpper: Standard_Integer, theColLower: Standard_Integer, theColUpper: Standard_Integer); - } - -export declare type TopAbs_Orientation = { - TopAbs_FORWARD: {}; - TopAbs_REVERSED: {}; - TopAbs_INTERNAL: {}; - TopAbs_EXTERNAL: {}; -} - -export declare type TopAbs_ShapeEnum = { - TopAbs_COMPOUND: {}; - TopAbs_COMPSOLID: {}; - TopAbs_SOLID: {}; - TopAbs_SHELL: {}; - TopAbs_FACE: {}; - TopAbs_WIRE: {}; - TopAbs_EDGE: {}; - TopAbs_VERTEX: {}; - TopAbs_SHAPE: {}; -} - -export declare class TopExp { - constructor(); - static MapShapes_1(S: TopoDS_Shape, T: TopAbs_ShapeEnum, M: TopTools_IndexedMapOfShape): void; - static MapShapes_2(S: TopoDS_Shape, M: TopTools_IndexedMapOfShape, cumOri: Standard_Boolean, cumLoc: Standard_Boolean): void; - static MapShapes_3(S: TopoDS_Shape, M: TopTools_MapOfShape, cumOri: Standard_Boolean, cumLoc: Standard_Boolean): void; - static MapShapesAndAncestors(S: TopoDS_Shape, TS: TopAbs_ShapeEnum, TA: TopAbs_ShapeEnum, M: TopTools_IndexedDataMapOfShapeListOfShape): void; - static MapShapesAndUniqueAncestors(S: TopoDS_Shape, TS: TopAbs_ShapeEnum, TA: TopAbs_ShapeEnum, M: TopTools_IndexedDataMapOfShapeListOfShape, useOrientation: Standard_Boolean): void; - static FirstVertex(E: TopoDS_Edge, CumOri: Standard_Boolean): TopoDS_Vertex; - static LastVertex(E: TopoDS_Edge, CumOri: Standard_Boolean): TopoDS_Vertex; - static Vertices_1(E: TopoDS_Edge, Vfirst: TopoDS_Vertex, Vlast: TopoDS_Vertex, CumOri: Standard_Boolean): void; - static Vertices_2(W: TopoDS_Wire, Vfirst: TopoDS_Vertex, Vlast: TopoDS_Vertex): void; - static CommonVertex(E1: TopoDS_Edge, E2: TopoDS_Edge, V: TopoDS_Vertex): Standard_Boolean; - delete(): void; -} - -export declare class TopExp_Explorer { - Init(S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid: TopAbs_ShapeEnum): void; - More(): Standard_Boolean; - Next(): void; - Value(): TopoDS_Shape; - Current(): TopoDS_Shape; - ReInit(): void; - ExploredShape(): TopoDS_Shape; - Depth(): Graphic3d_ZLayerId; - Clear(): void; - delete(): void; -} - - export declare class TopExp_Explorer_1 extends TopExp_Explorer { - constructor(); - } - - export declare class TopExp_Explorer_2 extends TopExp_Explorer { - constructor(S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid: TopAbs_ShapeEnum); - } - -export declare class TopLoc_Location { - IsIdentity(): Standard_Boolean; - Identity(): void; - FirstDatum(): Handle_TopLoc_Datum3D; - FirstPower(): Graphic3d_ZLayerId; - NextLocation(): TopLoc_Location; - Transformation(): gp_Trsf; - Inverted(): TopLoc_Location; - Multiplied(Other: TopLoc_Location): TopLoc_Location; - Divided(Other: TopLoc_Location): TopLoc_Location; - Predivided(Other: TopLoc_Location): TopLoc_Location; - Powered(pwr: Graphic3d_ZLayerId): TopLoc_Location; - HashCode(theUpperBound: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - IsEqual(Other: TopLoc_Location): Standard_Boolean; - IsDifferent(Other: TopLoc_Location): Standard_Boolean; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - ShallowDump(S: Standard_OStream): void; - Clear(): void; - static ScalePrec(): Standard_Real; - delete(): void; -} - - export declare class TopLoc_Location_1 extends TopLoc_Location { - constructor(); - } - - export declare class TopLoc_Location_2 extends TopLoc_Location { - constructor(T: gp_Trsf); - } - - export declare class TopLoc_Location_3 extends TopLoc_Location { - constructor(D: Handle_TopLoc_Datum3D); - } - -export declare class TopTools_IndexedDataMapOfShapeListOfShape extends NCollection_BaseMap { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Exchange(theOther: TopTools_IndexedDataMapOfShapeListOfShape): void; - Assign(theOther: TopTools_IndexedDataMapOfShapeListOfShape): TopTools_IndexedDataMapOfShapeListOfShape; - ReSize(N: Standard_Integer): void; - Add(theKey1: TopoDS_Shape, theItem: TopTools_ListOfShape): Standard_Integer; - Contains(theKey1: TopoDS_Shape): Standard_Boolean; - Substitute(theIndex: Standard_Integer, theKey1: TopoDS_Shape, theItem: TopTools_ListOfShape): void; - Swap(theIndex1: Standard_Integer, theIndex2: Standard_Integer): void; - RemoveLast(): void; - RemoveFromIndex(theIndex: Standard_Integer): void; - RemoveKey(theKey1: TopoDS_Shape): void; - FindKey(theIndex: Standard_Integer): TopoDS_Shape; - FindFromIndex(theIndex: Standard_Integer): TopTools_ListOfShape; - ChangeFromIndex(theIndex: Standard_Integer): TopTools_ListOfShape; - FindIndex(theKey1: TopoDS_Shape): Standard_Integer; - ChangeFromKey(theKey1: TopoDS_Shape): TopTools_ListOfShape; - Seek(theKey1: TopoDS_Shape): TopTools_ListOfShape; - ChangeSeek(theKey1: TopoDS_Shape): TopTools_ListOfShape; - Clear_1(doReleaseMemory: Standard_Boolean): void; - Clear_2(theAllocator: Handle_NCollection_BaseAllocator): void; - Size(): Standard_Integer; - delete(): void; -} - - export declare class TopTools_IndexedDataMapOfShapeListOfShape_1 extends TopTools_IndexedDataMapOfShapeListOfShape { - constructor(); - } - - export declare class TopTools_IndexedDataMapOfShapeListOfShape_2 extends TopTools_IndexedDataMapOfShapeListOfShape { - constructor(theNbBuckets: Standard_Integer, theAllocator: Handle_NCollection_BaseAllocator); - } - - export declare class TopTools_IndexedDataMapOfShapeListOfShape_3 extends TopTools_IndexedDataMapOfShapeListOfShape { - constructor(theOther: TopTools_IndexedDataMapOfShapeListOfShape); - } - -export declare class TopTools_IndexedMapOfShape extends NCollection_BaseMap { - cbegin(): any; - cend(): any; - Exchange(theOther: TopTools_IndexedMapOfShape): void; - Assign(theOther: TopTools_IndexedMapOfShape): TopTools_IndexedMapOfShape; - ReSize(theExtent: Standard_Integer): void; - Add(theKey1: TopoDS_Shape): Standard_Integer; - Contains(theKey1: TopoDS_Shape): Standard_Boolean; - Substitute(theIndex: Standard_Integer, theKey1: TopoDS_Shape): void; - Swap(theIndex1: Standard_Integer, theIndex2: Standard_Integer): void; - RemoveLast(): void; - RemoveFromIndex(theIndex: Standard_Integer): void; - RemoveKey(theKey1: TopoDS_Shape): Standard_Boolean; - FindKey(theIndex: Standard_Integer): TopoDS_Shape; - FindIndex(theKey1: TopoDS_Shape): Standard_Integer; - Clear_1(doReleaseMemory: Standard_Boolean): void; - Clear_2(theAllocator: Handle_NCollection_BaseAllocator): void; - Size(): Standard_Integer; - delete(): void; -} - - export declare class TopTools_IndexedMapOfShape_1 extends TopTools_IndexedMapOfShape { - constructor(); - } - - export declare class TopTools_IndexedMapOfShape_2 extends TopTools_IndexedMapOfShape { - constructor(theNbBuckets: Standard_Integer, theAllocator: Handle_NCollection_BaseAllocator); - } - - export declare class TopTools_IndexedMapOfShape_3 extends TopTools_IndexedMapOfShape { - constructor(theOther: TopTools_IndexedMapOfShape); - } - -export declare class TopTools_ListOfShape extends NCollection_BaseList { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Size(): Standard_Integer; - Assign(theOther: TopTools_ListOfShape): TopTools_ListOfShape; - Clear(theAllocator: Handle_NCollection_BaseAllocator): void; - First_1(): TopoDS_Shape; - First_2(): TopoDS_Shape; - Last_1(): TopoDS_Shape; - Last_2(): TopoDS_Shape; - Append_1(theItem: TopoDS_Shape): TopoDS_Shape; - Append_3(theOther: TopTools_ListOfShape): void; - Prepend_1(theItem: TopoDS_Shape): TopoDS_Shape; - Prepend_2(theOther: TopTools_ListOfShape): void; - RemoveFirst(): void; - Reverse(): void; - delete(): void; -} - - export declare class TopTools_ListOfShape_1 extends TopTools_ListOfShape { - constructor(); - } - - export declare class TopTools_ListOfShape_2 extends TopTools_ListOfShape { - constructor(theAllocator: Handle_NCollection_BaseAllocator); - } - - export declare class TopTools_ListOfShape_3 extends TopTools_ListOfShape { - constructor(theOther: TopTools_ListOfShape); - } - -export declare class TopTools_SequenceOfShape extends NCollection_BaseSequence { - begin(): any; - end(): any; - cbegin(): any; - cend(): any; - Size(): Standard_Integer; - Length(): Standard_Integer; - Lower(): Standard_Integer; - Upper(): Standard_Integer; - IsEmpty(): Standard_Boolean; - Reverse(): void; - Exchange(I: Standard_Integer, J: Standard_Integer): void; - static delNode(theNode: NCollection_SeqNode, theAl: Handle_NCollection_BaseAllocator): void; - Clear(theAllocator: Handle_NCollection_BaseAllocator): void; - Assign(theOther: TopTools_SequenceOfShape): TopTools_SequenceOfShape; - Remove_2(theIndex: Standard_Integer): void; - Remove_3(theFromIndex: Standard_Integer, theToIndex: Standard_Integer): void; - Append_1(theItem: TopoDS_Shape): void; - Append_2(theSeq: TopTools_SequenceOfShape): void; - Prepend_1(theItem: TopoDS_Shape): void; - Prepend_2(theSeq: TopTools_SequenceOfShape): void; - InsertBefore_1(theIndex: Standard_Integer, theItem: TopoDS_Shape): void; - InsertBefore_2(theIndex: Standard_Integer, theSeq: TopTools_SequenceOfShape): void; - InsertAfter_2(theIndex: Standard_Integer, theSeq: TopTools_SequenceOfShape): void; - InsertAfter_3(theIndex: Standard_Integer, theItem: TopoDS_Shape): void; - Split(theIndex: Standard_Integer, theSeq: TopTools_SequenceOfShape): void; - First(): TopoDS_Shape; - ChangeFirst(): TopoDS_Shape; - Last(): TopoDS_Shape; - ChangeLast(): TopoDS_Shape; - Value(theIndex: Standard_Integer): TopoDS_Shape; - ChangeValue(theIndex: Standard_Integer): TopoDS_Shape; - SetValue(theIndex: Standard_Integer, theItem: TopoDS_Shape): void; - delete(): void; -} - - export declare class TopTools_SequenceOfShape_1 extends TopTools_SequenceOfShape { - constructor(); - } - - export declare class TopTools_SequenceOfShape_2 extends TopTools_SequenceOfShape { - constructor(theAllocator: Handle_NCollection_BaseAllocator); - } - - export declare class TopTools_SequenceOfShape_3 extends TopTools_SequenceOfShape { - constructor(theOther: TopTools_SequenceOfShape); - } - -export declare class TopoDS { - constructor(); - static Vertex_1(S: TopoDS_Shape): TopoDS_Vertex; - static Vertex_2(a0: TopoDS_Shape): TopoDS_Vertex; - static Edge_1(S: TopoDS_Shape): TopoDS_Edge; - static Edge_2(a0: TopoDS_Shape): TopoDS_Edge; - static Wire_1(S: TopoDS_Shape): TopoDS_Wire; - static Wire_2(a0: TopoDS_Shape): TopoDS_Wire; - static Face_1(S: TopoDS_Shape): TopoDS_Face; - static Face_2(a0: TopoDS_Shape): TopoDS_Face; - static Shell_1(S: TopoDS_Shape): TopoDS_Shell; - static Shell_2(a0: TopoDS_Shape): TopoDS_Shell; - static Solid_1(S: TopoDS_Shape): TopoDS_Solid; - static Solid_2(a0: TopoDS_Shape): TopoDS_Solid; - static CompSolid_1(S: TopoDS_Shape): TopoDS_CompSolid; - static CompSolid_2(a0: TopoDS_Shape): TopoDS_CompSolid; - static Compound_1(S: TopoDS_Shape): TopoDS_Compound; - static Compound_2(a0: TopoDS_Shape): TopoDS_Compound; - delete(): void; -} - -export declare class TopoDS_Builder { - constructor(); - MakeWire(W: TopoDS_Wire): void; - MakeShell(S: TopoDS_Shell): void; - MakeSolid(S: TopoDS_Solid): void; - MakeCompSolid(C: TopoDS_CompSolid): void; - MakeCompound(C: TopoDS_Compound): void; - Add(S: TopoDS_Shape, C: TopoDS_Shape): void; - Remove(S: TopoDS_Shape, C: TopoDS_Shape): void; - delete(): void; -} - -export declare class TopoDS_CompSolid extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Compound extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Edge extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Face extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Shape { - constructor() - IsNull(): Standard_Boolean; - Nullify(): void; - Location_1(): TopLoc_Location; - Location_2(theLoc: TopLoc_Location, theRaiseExc: Standard_Boolean): void; - Located(theLoc: TopLoc_Location, theRaiseExc: Standard_Boolean): TopoDS_Shape; - Orientation_1(): TopAbs_Orientation; - Orientation_2(theOrient: TopAbs_Orientation): void; - Oriented(theOrient: TopAbs_Orientation): TopoDS_Shape; - TShape_1(): Handle_TopoDS_TShape; - ShapeType(): TopAbs_ShapeEnum; - Free_1(): Standard_Boolean; - Free_2(theIsFree: Standard_Boolean): void; - Locked_1(): Standard_Boolean; - Locked_2(theIsLocked: Standard_Boolean): void; - Modified_1(): Standard_Boolean; - Modified_2(theIsModified: Standard_Boolean): void; - Checked_1(): Standard_Boolean; - Checked_2(theIsChecked: Standard_Boolean): void; - Orientable_1(): Standard_Boolean; - Orientable_2(theIsOrientable: Standard_Boolean): void; - Closed_1(): Standard_Boolean; - Closed_2(theIsClosed: Standard_Boolean): void; - Infinite_1(): Standard_Boolean; - Infinite_2(theIsInfinite: Standard_Boolean): void; - Convex_1(): Standard_Boolean; - Convex_2(theIsConvex: Standard_Boolean): void; - Move(thePosition: TopLoc_Location, theRaiseExc: Standard_Boolean): void; - Moved(thePosition: TopLoc_Location, theRaiseExc: Standard_Boolean): TopoDS_Shape; - Reverse(): void; - Reversed(): TopoDS_Shape; - Complement(): void; - Complemented(): TopoDS_Shape; - Compose(theOrient: TopAbs_Orientation): void; - Composed(theOrient: TopAbs_Orientation): TopoDS_Shape; - NbChildren(): Graphic3d_ZLayerId; - IsPartner(theOther: TopoDS_Shape): Standard_Boolean; - IsSame(theOther: TopoDS_Shape): Standard_Boolean; - IsEqual(theOther: TopoDS_Shape): Standard_Boolean; - IsNotEqual(theOther: TopoDS_Shape): Standard_Boolean; - HashCode(theUpperBound: Graphic3d_ZLayerId): Graphic3d_ZLayerId; - EmptyCopy(): void; - EmptyCopied(): TopoDS_Shape; - TShape_2(theTShape: Handle_TopoDS_TShape): void; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - -export declare class TopoDS_Shell extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Solid extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Vertex extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class TopoDS_Wire extends TopoDS_Shape { - constructor() - delete(): void; -} - -export declare class XSControl_Reader { - SetNorm(norm: Standard_CString): Standard_Boolean; - SetWS(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean): void; - WS(): Handle_XSControl_WorkSession; - ReadFile(filename: Standard_CString): IFSelect_ReturnStatus; - ReadStream(theName: Standard_CString, theIStream: Standard_IStream): IFSelect_ReturnStatus; - Model(): Handle_Interface_InterfaceModel; - GiveList_1(first: Standard_CString, second: Standard_CString): Handle_TColStd_HSequenceOfTransient; - GiveList_2(first: Standard_CString, ent: Handle_Standard_Transient): Handle_TColStd_HSequenceOfTransient; - NbRootsForTransfer(): Graphic3d_ZLayerId; - RootForTransfer(num: Graphic3d_ZLayerId): Handle_Standard_Transient; - TransferOneRoot(num: Graphic3d_ZLayerId, theProgress: Message_ProgressRange): Standard_Boolean; - TransferOne(num: Graphic3d_ZLayerId, theProgress: Message_ProgressRange): Standard_Boolean; - TransferEntity(start: Handle_Standard_Transient, theProgress: Message_ProgressRange): Standard_Boolean; - TransferList(list: Handle_TColStd_HSequenceOfTransient, theProgress: Message_ProgressRange): Graphic3d_ZLayerId; - TransferRoots(theProgress: Message_ProgressRange): Graphic3d_ZLayerId; - ClearShapes(): void; - NbShapes(): Graphic3d_ZLayerId; - Shape(num: Graphic3d_ZLayerId): TopoDS_Shape; - OneShape(): TopoDS_Shape; - PrintCheckLoad_1(failsonly: Standard_Boolean, mode: IFSelect_PrintCount): void; - PrintCheckLoad_2(theStream: Standard_OStream, failsonly: Standard_Boolean, mode: IFSelect_PrintCount): void; - PrintCheckTransfer_1(failsonly: Standard_Boolean, mode: IFSelect_PrintCount): void; - PrintCheckTransfer_2(theStream: Standard_OStream, failsonly: Standard_Boolean, mode: IFSelect_PrintCount): void; - PrintStatsTransfer_1(what: Graphic3d_ZLayerId, mode: Graphic3d_ZLayerId): void; - PrintStatsTransfer_2(theStream: Standard_OStream, what: Graphic3d_ZLayerId, mode: Graphic3d_ZLayerId): void; - GetStatsTransfer(list: Handle_TColStd_HSequenceOfTransient, nbMapped: Graphic3d_ZLayerId, nbWithResult: Graphic3d_ZLayerId, nbWithFail: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class XSControl_Reader_1 extends XSControl_Reader { - constructor(); - } - - export declare class XSControl_Reader_2 extends XSControl_Reader { - constructor(norm: Standard_CString); - } - - export declare class XSControl_Reader_3 extends XSControl_Reader { - constructor(WS: Handle_XSControl_WorkSession, scratch: Standard_Boolean); - } - -export declare class gp_Ax1 { - SetDirection(theV: gp_Dir): void; - SetLocation(theP: gp_Pnt): void; - Direction(): gp_Dir; - Location(): gp_Pnt; - IsCoaxial(Other: gp_Ax1, AngularTolerance: Standard_Real, LinearTolerance: Standard_Real): Standard_Boolean; - IsNormal(theOther: gp_Ax1, theAngularTolerance: Standard_Real): Standard_Boolean; - IsOpposite(theOther: gp_Ax1, theAngularTolerance: Standard_Real): Standard_Boolean; - IsParallel(theOther: gp_Ax1, theAngularTolerance: Standard_Real): Standard_Boolean; - Angle(theOther: gp_Ax1): Standard_Real; - Reverse(): void; - Reversed(): gp_Ax1; - Mirror_1(P: gp_Pnt): void; - Mirrored_1(P: gp_Pnt): gp_Ax1; - Mirror_2(A1: gp_Ax1): void; - Mirrored_2(A1: gp_Ax1): gp_Ax1; - Mirror_3(A2: gp_Ax2): void; - Mirrored_3(A2: gp_Ax2): gp_Ax1; - Rotate(theA1: gp_Ax1, theAngRad: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAngRad: Standard_Real): gp_Ax1; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Ax1; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Ax1; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Ax1; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax1; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Ax1_1 extends gp_Ax1 { - constructor(); - } - - export declare class gp_Ax1_2 extends gp_Ax1 { - constructor(theP: gp_Pnt, theV: gp_Dir); - } - -export declare class gp_Ax2 { - SetAxis(A1: gp_Ax1): void; - SetDirection(V: gp_Dir): void; - SetLocation(theP: gp_Pnt): void; - SetXDirection(theVx: gp_Dir): void; - SetYDirection(theVy: gp_Dir): void; - Angle(theOther: gp_Ax2): Standard_Real; - Axis(): gp_Ax1; - Direction(): gp_Dir; - Location(): gp_Pnt; - XDirection(): gp_Dir; - YDirection(): gp_Dir; - IsCoplanar_1(Other: gp_Ax2, LinearTolerance: Standard_Real, AngularTolerance: Standard_Real): Standard_Boolean; - IsCoplanar_2(A1: gp_Ax1, LinearTolerance: Standard_Real, AngularTolerance: Standard_Real): Standard_Boolean; - Mirror_1(P: gp_Pnt): void; - Mirrored_1(P: gp_Pnt): gp_Ax2; - Mirror_2(A1: gp_Ax1): void; - Mirrored_2(A1: gp_Ax1): gp_Ax2; - Mirror_3(A2: gp_Ax2): void; - Mirrored_3(A2: gp_Ax2): gp_Ax2; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Ax2; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Ax2; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Ax2; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Ax2; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax2; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Ax2_1 extends gp_Ax2 { - constructor(); - } - - export declare class gp_Ax2_2 extends gp_Ax2 { - constructor(P: gp_Pnt, N: gp_Dir, Vx: gp_Dir); - } - - export declare class gp_Ax2_3 extends gp_Ax2 { - constructor(P: gp_Pnt, V: gp_Dir); - } - -export declare class gp_Ax3 { - XReverse(): void; - YReverse(): void; - ZReverse(): void; - SetAxis(theA1: gp_Ax1): void; - SetDirection(theV: gp_Dir): void; - SetLocation(theP: gp_Pnt): void; - SetXDirection(theVx: gp_Dir): void; - SetYDirection(theVy: gp_Dir): void; - Angle(theOther: gp_Ax3): Standard_Real; - Axis(): gp_Ax1; - Ax2(): gp_Ax2; - Direction(): gp_Dir; - Location(): gp_Pnt; - XDirection(): gp_Dir; - YDirection(): gp_Dir; - Direct(): Standard_Boolean; - IsCoplanar_1(theOther: gp_Ax3, theLinearTolerance: Standard_Real, theAngularTolerance: Standard_Real): Standard_Boolean; - IsCoplanar_2(theA1: gp_Ax1, theLinearTolerance: Standard_Real, theAngularTolerance: Standard_Real): Standard_Boolean; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Ax3; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Ax3; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Ax3; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Ax3; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Ax3; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Ax3; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Ax3; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax3; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Ax3_1 extends gp_Ax3 { - constructor(); - } - - export declare class gp_Ax3_2 extends gp_Ax3 { - constructor(theA: gp_Ax2); - } - - export declare class gp_Ax3_3 extends gp_Ax3 { - constructor(theP: gp_Pnt, theN: gp_Dir, theVx: gp_Dir); - } - - export declare class gp_Ax3_4 extends gp_Ax3 { - constructor(theP: gp_Pnt, theV: gp_Dir); - } - -export declare class gp_Circ { - SetAxis(theA1: gp_Ax1): void; - SetLocation(theP: gp_Pnt): void; - SetPosition(theA2: gp_Ax2): void; - SetRadius(theRadius: Standard_Real): void; - Area(): Standard_Real; - Axis(): gp_Ax1; - Length(): Standard_Real; - Location(): gp_Pnt; - Position(): gp_Ax2; - Radius(): Standard_Real; - XAxis(): gp_Ax1; - YAxis(): gp_Ax1; - Distance(theP: gp_Pnt): Standard_Real; - SquareDistance(theP: gp_Pnt): Standard_Real; - Contains(theP: gp_Pnt, theLinearTolerance: Standard_Real): Standard_Boolean; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Circ; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Circ; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Circ; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Circ; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Circ; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Circ; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Circ; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Circ; - delete(): void; -} - - export declare class gp_Circ_1 extends gp_Circ { - constructor(); - } - - export declare class gp_Circ_2 extends gp_Circ { - constructor(theA2: gp_Ax2, theRadius: Standard_Real); - } - -export declare class gp_Cylinder { - SetAxis(theA1: gp_Ax1): void; - SetLocation(theLoc: gp_Pnt): void; - SetPosition(theA3: gp_Ax3): void; - SetRadius(theR: Standard_Real): void; - UReverse(): void; - VReverse(): void; - Direct(): Standard_Boolean; - Axis(): gp_Ax1; - Coefficients(theA1: Standard_Real, theA2: Standard_Real, theA3: Standard_Real, theB1: Standard_Real, theB2: Standard_Real, theB3: Standard_Real, theC1: Standard_Real, theC2: Standard_Real, theC3: Standard_Real, theD: Standard_Real): void; - Location(): gp_Pnt; - Position(): gp_Ax3; - Radius(): Standard_Real; - XAxis(): gp_Ax1; - YAxis(): gp_Ax1; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Cylinder; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Cylinder; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Cylinder; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Cylinder; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Cylinder; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Cylinder; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Cylinder; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Cylinder; - delete(): void; -} - - export declare class gp_Cylinder_1 extends gp_Cylinder { - constructor(); - } - - export declare class gp_Cylinder_2 extends gp_Cylinder { - constructor(theA3: gp_Ax3, theRadius: Standard_Real); - } - -export declare class gp_Dir { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetZ(theZ: Standard_Real): void; - SetXYZ(theCoord: gp_XYZ): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - Z(): Standard_Real; - XYZ(): gp_XYZ; - IsEqual(theOther: gp_Dir, theAngularTolerance: Standard_Real): Standard_Boolean; - IsNormal(theOther: gp_Dir, theAngularTolerance: Standard_Real): Standard_Boolean; - IsOpposite(theOther: gp_Dir, theAngularTolerance: Standard_Real): Standard_Boolean; - IsParallel(theOther: gp_Dir, theAngularTolerance: Standard_Real): Standard_Boolean; - Angle(theOther: gp_Dir): Standard_Real; - AngleWithRef(theOther: gp_Dir, theVRef: gp_Dir): Standard_Real; - Cross(theRight: gp_Dir): void; - Crossed(theRight: gp_Dir): gp_Dir; - CrossCross(theV1: gp_Dir, theV2: gp_Dir): void; - CrossCrossed(theV1: gp_Dir, theV2: gp_Dir): gp_Dir; - Dot(theOther: gp_Dir): Standard_Real; - DotCross(theV1: gp_Dir, theV2: gp_Dir): Standard_Real; - Reverse(): void; - Reversed(): gp_Dir; - Mirror_1(theV: gp_Dir): void; - Mirrored_1(theV: gp_Dir): gp_Dir; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Dir; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Dir; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Dir; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Dir; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Dir_1 extends gp_Dir { - constructor(); - } - - export declare class gp_Dir_2 extends gp_Dir { - constructor(theV: gp_Vec); - } - - export declare class gp_Dir_3 extends gp_Dir { - constructor(theCoord: gp_XYZ); - } - - export declare class gp_Dir_4 extends gp_Dir { - constructor(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real); - } - -export declare class gp_Dir2d { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXv: Standard_Real, theYv: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetXY(theCoord: gp_XY): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXv: Standard_Real, theYv: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - XY(): gp_XY; - IsEqual(theOther: gp_Dir2d, theAngularTolerance: Standard_Real): Standard_Boolean; - IsNormal(theOther: gp_Dir2d, theAngularTolerance: Standard_Real): Standard_Boolean; - IsOpposite(theOther: gp_Dir2d, theAngularTolerance: Standard_Real): Standard_Boolean; - IsParallel(theOther: gp_Dir2d, theAngularTolerance: Standard_Real): Standard_Boolean; - Angle(theOther: gp_Dir2d): Standard_Real; - Crossed(theRight: gp_Dir2d): Standard_Real; - Dot(theOther: gp_Dir2d): Standard_Real; - Reverse(): void; - Reversed(): gp_Dir2d; - Mirror_1(theV: gp_Dir2d): void; - Mirrored_1(theV: gp_Dir2d): gp_Dir2d; - Mirror_2(theA: gp_Ax2d): void; - Mirrored_2(theA: gp_Ax2d): gp_Dir2d; - Rotate(Ang: Standard_Real): void; - Rotated(theAng: Standard_Real): gp_Dir2d; - Transform(theT: gp_Trsf2d): void; - Transformed(theT: gp_Trsf2d): gp_Dir2d; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class gp_Dir2d_1 extends gp_Dir2d { - constructor(); - } - - export declare class gp_Dir2d_2 extends gp_Dir2d { - constructor(theV: gp_Vec2d); - } - - export declare class gp_Dir2d_3 extends gp_Dir2d { - constructor(theCoord: gp_XY); - } - - export declare class gp_Dir2d_4 extends gp_Dir2d { - constructor(theXv: Standard_Real, theYv: Standard_Real); - } - -export declare class gp_Elips { - SetAxis(theA1: gp_Ax1): void; - SetLocation(theP: gp_Pnt): void; - SetMajorRadius(theMajorRadius: Standard_Real): void; - SetMinorRadius(theMinorRadius: Standard_Real): void; - SetPosition(theA2: gp_Ax2): void; - Area(): Standard_Real; - Axis(): gp_Ax1; - Directrix1(): gp_Ax1; - Directrix2(): gp_Ax1; - Eccentricity(): Standard_Real; - Focal(): Standard_Real; - Focus1(): gp_Pnt; - Focus2(): gp_Pnt; - Location(): gp_Pnt; - MajorRadius(): Standard_Real; - MinorRadius(): Standard_Real; - Parameter(): Standard_Real; - Position(): gp_Ax2; - XAxis(): gp_Ax1; - YAxis(): gp_Ax1; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Elips; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Elips; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Elips; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Elips; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Elips; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Elips; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Elips; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Elips; - delete(): void; -} - - export declare class gp_Elips_1 extends gp_Elips { - constructor(); - } - - export declare class gp_Elips_2 extends gp_Elips { - constructor(theA2: gp_Ax2, theMajorRadius: Standard_Real, theMinorRadius: Standard_Real); - } - -export declare class gp_GTrsf { - SetAffinity_1(theA1: gp_Ax1, theRatio: Standard_Real): void; - SetAffinity_2(theA2: gp_Ax2, theRatio: Standard_Real): void; - SetValue(theRow: Graphic3d_ZLayerId, theCol: Graphic3d_ZLayerId, theValue: Standard_Real): void; - SetVectorialPart(theMatrix: gp_Mat): void; - SetTranslationPart(theCoord: gp_XYZ): void; - SetTrsf(theT: gp_Trsf): void; - IsNegative(): Standard_Boolean; - IsSingular(): Standard_Boolean; - Form(): gp_TrsfForm; - SetForm(): void; - TranslationPart(): gp_XYZ; - VectorialPart(): gp_Mat; - Value(theRow: Graphic3d_ZLayerId, theCol: Graphic3d_ZLayerId): Standard_Real; - Invert(): void; - Inverted(): gp_GTrsf; - Multiplied(theT: gp_GTrsf): gp_GTrsf; - Multiply(theT: gp_GTrsf): void; - PreMultiply(theT: gp_GTrsf): void; - Power(theN: Graphic3d_ZLayerId): void; - Powered(theN: Graphic3d_ZLayerId): gp_GTrsf; - Transforms_1(theCoord: gp_XYZ): void; - Transforms_2(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real): void; - Trsf(): gp_Trsf; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class gp_GTrsf_1 extends gp_GTrsf { - constructor(); - } - - export declare class gp_GTrsf_2 extends gp_GTrsf { - constructor(theT: gp_Trsf); - } - - export declare class gp_GTrsf_3 extends gp_GTrsf { - constructor(theM: gp_Mat, theV: gp_XYZ); - } - -export declare class gp_Lin { - Reverse(): void; - Reversed(): gp_Lin; - SetDirection(theV: gp_Dir): void; - SetLocation(theP: gp_Pnt): void; - SetPosition(theA1: gp_Ax1): void; - Direction(): gp_Dir; - Location(): gp_Pnt; - Position(): gp_Ax1; - Angle(theOther: gp_Lin): Standard_Real; - Contains(theP: gp_Pnt, theLinearTolerance: Standard_Real): Standard_Boolean; - Distance_1(theP: gp_Pnt): Standard_Real; - Distance_2(theOther: gp_Lin): Standard_Real; - SquareDistance_1(theP: gp_Pnt): Standard_Real; - SquareDistance_2(theOther: gp_Lin): Standard_Real; - Normal(theP: gp_Pnt): gp_Lin; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Lin; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Lin; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Lin; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Lin; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Lin; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Lin; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Lin; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Lin; - delete(): void; -} - - export declare class gp_Lin_1 extends gp_Lin { - constructor(); - } - - export declare class gp_Lin_2 extends gp_Lin { - constructor(theA1: gp_Ax1); - } - - export declare class gp_Lin_3 extends gp_Lin { - constructor(theP: gp_Pnt, theV: gp_Dir); - } - -export declare class gp_Pln { - Coefficients(theA: Standard_Real, theB: Standard_Real, theC: Standard_Real, theD: Standard_Real): void; - SetAxis(theA1: gp_Ax1): void; - SetLocation(theLoc: gp_Pnt): void; - SetPosition(theA3: gp_Ax3): void; - UReverse(): void; - VReverse(): void; - Direct(): Standard_Boolean; - Axis(): gp_Ax1; - Location(): gp_Pnt; - Position(): gp_Ax3; - Distance_1(theP: gp_Pnt): Standard_Real; - Distance_2(theL: gp_Lin): Standard_Real; - Distance_3(theOther: gp_Pln): Standard_Real; - SquareDistance_1(theP: gp_Pnt): Standard_Real; - SquareDistance_2(theL: gp_Lin): Standard_Real; - SquareDistance_3(theOther: gp_Pln): Standard_Real; - XAxis(): gp_Ax1; - YAxis(): gp_Ax1; - Contains_1(theP: gp_Pnt, theLinearTolerance: Standard_Real): Standard_Boolean; - Contains_2(theL: gp_Lin, theLinearTolerance: Standard_Real, theAngularTolerance: Standard_Real): Standard_Boolean; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Pln; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Pln; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Pln; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Pln; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Pln; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Pln; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Pln; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Pln; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class gp_Pln_1 extends gp_Pln { - constructor(); - } - - export declare class gp_Pln_2 extends gp_Pln { - constructor(theA3: gp_Ax3); - } - - export declare class gp_Pln_3 extends gp_Pln { - constructor(theP: gp_Pnt, theV: gp_Dir); - } - - export declare class gp_Pln_4 extends gp_Pln { - constructor(theA: Standard_Real, theB: Standard_Real, theC: Standard_Real, theD: Standard_Real); - } - -export declare class gp_Pnt { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXp: Standard_Real, theYp: Standard_Real, theZp: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetZ(theZ: Standard_Real): void; - SetXYZ(theCoord: gp_XYZ): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXp: Standard_Real, theYp: Standard_Real, theZp: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - Z(): Standard_Real; - XYZ(): gp_XYZ; - Coord_3(): gp_XYZ; - ChangeCoord(): gp_XYZ; - BaryCenter(theAlpha: Standard_Real, theP: gp_Pnt, theBeta: Standard_Real): void; - IsEqual(theOther: gp_Pnt, theLinearTolerance: Standard_Real): Standard_Boolean; - Distance(theOther: gp_Pnt): Standard_Real; - SquareDistance(theOther: gp_Pnt): Standard_Real; - Mirror_1(theP: gp_Pnt): void; - Mirrored_1(theP: gp_Pnt): gp_Pnt; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Pnt; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Pnt; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Pnt; - Scale(theP: gp_Pnt, theS: Standard_Real): void; - Scaled(theP: gp_Pnt, theS: Standard_Real): gp_Pnt; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Pnt; - Translate_1(theV: gp_Vec): void; - Translated_1(theV: gp_Vec): gp_Pnt; - Translate_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - Translated_2(theP1: gp_Pnt, theP2: gp_Pnt): gp_Pnt; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Pnt_1 extends gp_Pnt { - constructor(); - } - - export declare class gp_Pnt_2 extends gp_Pnt { - constructor(theCoord: gp_XYZ); - } - - export declare class gp_Pnt_3 extends gp_Pnt { - constructor(theXp: Standard_Real, theYp: Standard_Real, theZp: Standard_Real); - } - -export declare class gp_Pnt2d { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXp: Standard_Real, theYp: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetXY(theCoord: gp_XY): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXp: Standard_Real, theYp: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - XY(): gp_XY; - Coord_3(): gp_XY; - ChangeCoord(): gp_XY; - IsEqual(theOther: gp_Pnt2d, theLinearTolerance: Standard_Real): Standard_Boolean; - Distance(theOther: gp_Pnt2d): Standard_Real; - SquareDistance(theOther: gp_Pnt2d): Standard_Real; - Mirror_1(theP: gp_Pnt2d): void; - Mirrored_1(theP: gp_Pnt2d): gp_Pnt2d; - Mirror_2(theA: gp_Ax2d): void; - Mirrored_2(theA: gp_Ax2d): gp_Pnt2d; - Rotate(theP: gp_Pnt2d, theAng: Standard_Real): void; - Rotated(theP: gp_Pnt2d, theAng: Standard_Real): gp_Pnt2d; - Scale(theP: gp_Pnt2d, theS: Standard_Real): void; - Scaled(theP: gp_Pnt2d, theS: Standard_Real): gp_Pnt2d; - Transform(theT: gp_Trsf2d): void; - Transformed(theT: gp_Trsf2d): gp_Pnt2d; - Translate_1(theV: gp_Vec2d): void; - Translated_1(theV: gp_Vec2d): gp_Pnt2d; - Translate_2(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void; - Translated_2(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Pnt2d; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class gp_Pnt2d_1 extends gp_Pnt2d { - constructor(); - } - - export declare class gp_Pnt2d_2 extends gp_Pnt2d { - constructor(theCoord: gp_XY); - } - - export declare class gp_Pnt2d_3 extends gp_Pnt2d { - constructor(theXp: Standard_Real, theYp: Standard_Real); - } - -export declare class gp_Quaternion { - IsEqual(theOther: gp_Quaternion): Standard_Boolean; - SetRotation_1(theVecFrom: gp_Vec, theVecTo: gp_Vec): void; - SetRotation_2(theVecFrom: gp_Vec, theVecTo: gp_Vec, theHelpCrossVec: gp_Vec): void; - SetVectorAndAngle(theAxis: gp_Vec, theAngle: Standard_Real): void; - GetVectorAndAngle(theAxis: gp_Vec, theAngle: Standard_Real): void; - SetMatrix(theMat: gp_Mat): void; - GetMatrix(): gp_Mat; - SetEulerAngles(theOrder: gp_EulerSequence, theAlpha: Standard_Real, theBeta: Standard_Real, theGamma: Standard_Real): void; - GetEulerAngles(theOrder: gp_EulerSequence, theAlpha: Standard_Real, theBeta: Standard_Real, theGamma: Standard_Real): void; - Set_1(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real, theW: Standard_Real): void; - Set_2(theQuaternion: gp_Quaternion): void; - X(): Standard_Real; - Y(): Standard_Real; - Z(): Standard_Real; - W(): Standard_Real; - SetIdent(): void; - Reverse(): void; - Reversed(): gp_Quaternion; - Invert(): void; - Inverted(): gp_Quaternion; - SquareNorm(): Standard_Real; - Norm(): Standard_Real; - Scale(theScale: Standard_Real): void; - Scaled(theScale: Standard_Real): gp_Quaternion; - StabilizeLength(): void; - Normalize(): void; - Normalized(): gp_Quaternion; - Negated(): gp_Quaternion; - Added(theOther: gp_Quaternion): gp_Quaternion; - Subtracted(theOther: gp_Quaternion): gp_Quaternion; - Multiplied(theOther: gp_Quaternion): gp_Quaternion; - Add(theOther: gp_Quaternion): void; - Subtract(theOther: gp_Quaternion): void; - Multiply_1(theOther: gp_Quaternion): void; - Dot(theOther: gp_Quaternion): Standard_Real; - GetRotationAngle(): Standard_Real; - Multiply_2(theVec: gp_Vec): gp_Vec; - delete(): void; -} - - export declare class gp_Quaternion_1 extends gp_Quaternion { - constructor(); - } - - export declare class gp_Quaternion_2 extends gp_Quaternion { - constructor(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real, theW: Standard_Real); - } - - export declare class gp_Quaternion_3 extends gp_Quaternion { - constructor(theVecFrom: gp_Vec, theVecTo: gp_Vec); - } - - export declare class gp_Quaternion_4 extends gp_Quaternion { - constructor(theVecFrom: gp_Vec, theVecTo: gp_Vec, theHelpCrossVec: gp_Vec); - } - - export declare class gp_Quaternion_5 extends gp_Quaternion { - constructor(theAxis: gp_Vec, theAngle: Standard_Real); - } - - export declare class gp_Quaternion_6 extends gp_Quaternion { - constructor(theMat: gp_Mat); - } - -export declare class gp_Trsf { - SetMirror_1(theP: gp_Pnt): void; - SetMirror_2(theA1: gp_Ax1): void; - SetMirror_3(theA2: gp_Ax2): void; - SetRotation_1(theA1: gp_Ax1, theAng: Standard_Real): void; - SetRotation_2(theR: gp_Quaternion): void; - SetRotationPart(theR: gp_Quaternion): void; - SetScale(theP: gp_Pnt, theS: Standard_Real): void; - SetDisplacement(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void; - SetTransformation_1(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void; - SetTransformation_2(theToSystem: gp_Ax3): void; - SetTransformation_3(R: gp_Quaternion, theT: gp_Vec): void; - SetTranslation_1(theV: gp_Vec): void; - SetTranslation_2(theP1: gp_Pnt, theP2: gp_Pnt): void; - SetTranslationPart(theV: gp_Vec): void; - SetScaleFactor(theS: Standard_Real): void; - SetForm(theP: gp_TrsfForm): void; - SetValues(a11: Standard_Real, a12: Standard_Real, a13: Standard_Real, a14: Standard_Real, a21: Standard_Real, a22: Standard_Real, a23: Standard_Real, a24: Standard_Real, a31: Standard_Real, a32: Standard_Real, a33: Standard_Real, a34: Standard_Real): void; - IsNegative(): Standard_Boolean; - Form(): gp_TrsfForm; - ScaleFactor(): Standard_Real; - TranslationPart(): gp_XYZ; - GetRotation_1(theAxis: gp_XYZ, theAngle: Standard_Real): Standard_Boolean; - GetRotation_2(): gp_Quaternion; - VectorialPart(): gp_Mat; - HVectorialPart(): gp_Mat; - Value(theRow: Graphic3d_ZLayerId, theCol: Graphic3d_ZLayerId): Standard_Real; - Invert(): void; - Inverted(): gp_Trsf; - Multiplied(theT: gp_Trsf): gp_Trsf; - Multiply(theT: gp_Trsf): void; - PreMultiply(theT: gp_Trsf): void; - Power(theN: Graphic3d_ZLayerId): void; - Powered(theN: Graphic3d_ZLayerId): gp_Trsf; - Transforms_1(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real): void; - Transforms_2(theCoord: gp_XYZ): void; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_Trsf_1 extends gp_Trsf { - constructor(); - } - - export declare class gp_Trsf_2 extends gp_Trsf { - constructor(theT: gp_Trsf2d); - } - -export declare class gp_Vec { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetZ(theZ: Standard_Real): void; - SetXYZ(theCoord: gp_XYZ): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - Z(): Standard_Real; - XYZ(): gp_XYZ; - IsEqual(theOther: gp_Vec, theLinearTolerance: Standard_Real, theAngularTolerance: Standard_Real): Standard_Boolean; - IsNormal(theOther: gp_Vec, theAngularTolerance: Standard_Real): Standard_Boolean; - IsOpposite(theOther: gp_Vec, theAngularTolerance: Standard_Real): Standard_Boolean; - IsParallel(theOther: gp_Vec, theAngularTolerance: Standard_Real): Standard_Boolean; - Angle(theOther: gp_Vec): Standard_Real; - AngleWithRef(theOther: gp_Vec, theVRef: gp_Vec): Standard_Real; - Magnitude(): Standard_Real; - SquareMagnitude(): Standard_Real; - Add(theOther: gp_Vec): void; - Added(theOther: gp_Vec): gp_Vec; - Subtract(theRight: gp_Vec): void; - Subtracted(theRight: gp_Vec): gp_Vec; - Multiply(theScalar: Standard_Real): void; - Multiplied(theScalar: Standard_Real): gp_Vec; - Divide(theScalar: Standard_Real): void; - Divided(theScalar: Standard_Real): gp_Vec; - Cross(theRight: gp_Vec): void; - Crossed(theRight: gp_Vec): gp_Vec; - CrossMagnitude(theRight: gp_Vec): Standard_Real; - CrossSquareMagnitude(theRight: gp_Vec): Standard_Real; - CrossCross(theV1: gp_Vec, theV2: gp_Vec): void; - CrossCrossed(theV1: gp_Vec, theV2: gp_Vec): gp_Vec; - Dot(theOther: gp_Vec): Standard_Real; - DotCross(theV1: gp_Vec, theV2: gp_Vec): Standard_Real; - Normalize(): void; - Normalized(): gp_Vec; - Reverse(): void; - Reversed(): gp_Vec; - SetLinearForm_1(theA1: Standard_Real, theV1: gp_Vec, theA2: Standard_Real, theV2: gp_Vec, theA3: Standard_Real, theV3: gp_Vec, theV4: gp_Vec): void; - SetLinearForm_2(theA1: Standard_Real, theV1: gp_Vec, theA2: Standard_Real, theV2: gp_Vec, theA3: Standard_Real, theV3: gp_Vec): void; - SetLinearForm_3(theA1: Standard_Real, theV1: gp_Vec, theA2: Standard_Real, theV2: gp_Vec, theV3: gp_Vec): void; - SetLinearForm_4(theA1: Standard_Real, theV1: gp_Vec, theA2: Standard_Real, theV2: gp_Vec): void; - SetLinearForm_5(theA1: Standard_Real, theV1: gp_Vec, theV2: gp_Vec): void; - SetLinearForm_6(theV1: gp_Vec, theV2: gp_Vec): void; - Mirror_1(theV: gp_Vec): void; - Mirrored_1(theV: gp_Vec): gp_Vec; - Mirror_2(theA1: gp_Ax1): void; - Mirrored_2(theA1: gp_Ax1): gp_Vec; - Mirror_3(theA2: gp_Ax2): void; - Mirrored_3(theA2: gp_Ax2): gp_Vec; - Rotate(theA1: gp_Ax1, theAng: Standard_Real): void; - Rotated(theA1: gp_Ax1, theAng: Standard_Real): gp_Vec; - Scale(theS: Standard_Real): void; - Scaled(theS: Standard_Real): gp_Vec; - Transform(theT: gp_Trsf): void; - Transformed(theT: gp_Trsf): gp_Vec; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - delete(): void; -} - - export declare class gp_Vec_1 extends gp_Vec { - constructor(); - } - - export declare class gp_Vec_2 extends gp_Vec { - constructor(theV: gp_Dir); - } - - export declare class gp_Vec_3 extends gp_Vec { - constructor(theCoord: gp_XYZ); - } - - export declare class gp_Vec_4 extends gp_Vec { - constructor(theXv: Standard_Real, theYv: Standard_Real, theZv: Standard_Real); - } - - export declare class gp_Vec_5 extends gp_Vec { - constructor(theP1: gp_Pnt, theP2: gp_Pnt); - } - -export declare class gp_Vec2d { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theXv: Standard_Real, theYv: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetXY(theCoord: gp_XY): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theXv: Standard_Real, theYv: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - XY(): gp_XY; - IsEqual(theOther: gp_Vec2d, theLinearTolerance: Standard_Real, theAngularTolerance: Standard_Real): Standard_Boolean; - IsNormal(theOther: gp_Vec2d, theAngularTolerance: Standard_Real): Standard_Boolean; - IsOpposite(theOther: gp_Vec2d, theAngularTolerance: Standard_Real): Standard_Boolean; - IsParallel(theOther: gp_Vec2d, theAngularTolerance: Standard_Real): Standard_Boolean; - Angle(theOther: gp_Vec2d): Standard_Real; - Magnitude(): Standard_Real; - SquareMagnitude(): Standard_Real; - Add(theOther: gp_Vec2d): void; - Added(theOther: gp_Vec2d): gp_Vec2d; - Crossed(theRight: gp_Vec2d): Standard_Real; - CrossMagnitude(theRight: gp_Vec2d): Standard_Real; - CrossSquareMagnitude(theRight: gp_Vec2d): Standard_Real; - Divide(theScalar: Standard_Real): void; - Divided(theScalar: Standard_Real): gp_Vec2d; - Dot(theOther: gp_Vec2d): Standard_Real; - GetNormal(): gp_Vec2d; - Multiply(theScalar: Standard_Real): void; - Multiplied(theScalar: Standard_Real): gp_Vec2d; - Normalize(): void; - Normalized(): gp_Vec2d; - Reverse(): void; - Reversed(): gp_Vec2d; - Subtract(theRight: gp_Vec2d): void; - Subtracted(theRight: gp_Vec2d): gp_Vec2d; - SetLinearForm_1(theA1: Standard_Real, theV1: gp_Vec2d, theA2: Standard_Real, theV2: gp_Vec2d, theV3: gp_Vec2d): void; - SetLinearForm_2(theA1: Standard_Real, theV1: gp_Vec2d, theA2: Standard_Real, theV2: gp_Vec2d): void; - SetLinearForm_3(theA1: Standard_Real, theV1: gp_Vec2d, theV2: gp_Vec2d): void; - SetLinearForm_4(theV1: gp_Vec2d, theV2: gp_Vec2d): void; - Mirror_1(theV: gp_Vec2d): void; - Mirrored_1(theV: gp_Vec2d): gp_Vec2d; - Mirror_2(theA1: gp_Ax2d): void; - Mirrored_2(theA1: gp_Ax2d): gp_Vec2d; - Rotate(theAng: Standard_Real): void; - Rotated(theAng: Standard_Real): gp_Vec2d; - Scale(theS: Standard_Real): void; - Scaled(theS: Standard_Real): gp_Vec2d; - Transform(theT: gp_Trsf2d): void; - Transformed(theT: gp_Trsf2d): gp_Vec2d; - delete(): void; -} - - export declare class gp_Vec2d_1 extends gp_Vec2d { - constructor(); - } - - export declare class gp_Vec2d_2 extends gp_Vec2d { - constructor(theV: gp_Dir2d); - } - - export declare class gp_Vec2d_3 extends gp_Vec2d { - constructor(theCoord: gp_XY); - } - - export declare class gp_Vec2d_4 extends gp_Vec2d { - constructor(theXv: Standard_Real, theYv: Standard_Real); - } - - export declare class gp_Vec2d_5 extends gp_Vec2d { - constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d); - } - -export declare class gp_XY { - SetCoord_1(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetCoord_2(theX: Standard_Real, theY: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - ChangeCoord(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theX: Standard_Real, theY: Standard_Real): void; - X(): Standard_Real; - Y(): Standard_Real; - Modulus(): Standard_Real; - SquareModulus(): Standard_Real; - IsEqual(theOther: gp_XY, theTolerance: Standard_Real): Standard_Boolean; - Add(theOther: gp_XY): void; - Added(theOther: gp_XY): gp_XY; - Crossed(theOther: gp_XY): Standard_Real; - CrossMagnitude(theRight: gp_XY): Standard_Real; - CrossSquareMagnitude(theRight: gp_XY): Standard_Real; - Divide(theScalar: Standard_Real): void; - Divided(theScalar: Standard_Real): gp_XY; - Dot(theOther: gp_XY): Standard_Real; - Multiply_1(theScalar: Standard_Real): void; - Multiply_2(theOther: gp_XY): void; - Multiply_3(theMatrix: gp_Mat2d): void; - Multiplied_1(theScalar: Standard_Real): gp_XY; - Multiplied_2(theOther: gp_XY): gp_XY; - Multiplied_3(theMatrix: gp_Mat2d): gp_XY; - Normalize(): void; - Normalized(): gp_XY; - Reverse(): void; - Reversed(): gp_XY; - SetLinearForm_1(theA1: Standard_Real, theXY1: gp_XY, theA2: Standard_Real, theXY2: gp_XY): void; - SetLinearForm_2(theA1: Standard_Real, theXY1: gp_XY, theA2: Standard_Real, theXY2: gp_XY, theXY3: gp_XY): void; - SetLinearForm_3(theA1: Standard_Real, theXY1: gp_XY, theXY2: gp_XY): void; - SetLinearForm_4(theXY1: gp_XY, theXY2: gp_XY): void; - Subtract(theOther: gp_XY): void; - Subtracted(theOther: gp_XY): gp_XY; - delete(): void; -} - - export declare class gp_XY_1 extends gp_XY { - constructor(); - } - - export declare class gp_XY_2 extends gp_XY { - constructor(theX: Standard_Real, theY: Standard_Real); - } - -export declare class gp_XYZ { - SetCoord_1(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real): void; - SetCoord_2(theIndex: Graphic3d_ZLayerId, theXi: Standard_Real): void; - SetX(theX: Standard_Real): void; - SetY(theY: Standard_Real): void; - SetZ(theZ: Standard_Real): void; - Coord_1(theIndex: Graphic3d_ZLayerId): Standard_Real; - ChangeCoord(theIndex: Graphic3d_ZLayerId): Standard_Real; - Coord_2(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real): void; - GetData(): Standard_Real; - ChangeData(): Standard_Real; - X(): Standard_Real; - Y(): Standard_Real; - Z(): Standard_Real; - Modulus(): Standard_Real; - SquareModulus(): Standard_Real; - IsEqual(theOther: gp_XYZ, theTolerance: Standard_Real): Standard_Boolean; - Add(theOther: gp_XYZ): void; - Added(theOther: gp_XYZ): gp_XYZ; - Cross(theOther: gp_XYZ): void; - Crossed(theOther: gp_XYZ): gp_XYZ; - CrossMagnitude(theRight: gp_XYZ): Standard_Real; - CrossSquareMagnitude(theRight: gp_XYZ): Standard_Real; - CrossCross(theCoord1: gp_XYZ, theCoord2: gp_XYZ): void; - CrossCrossed(theCoord1: gp_XYZ, theCoord2: gp_XYZ): gp_XYZ; - Divide(theScalar: Standard_Real): void; - Divided(theScalar: Standard_Real): gp_XYZ; - Dot(theOther: gp_XYZ): Standard_Real; - DotCross(theCoord1: gp_XYZ, theCoord2: gp_XYZ): Standard_Real; - Multiply_1(theScalar: Standard_Real): void; - Multiply_2(theOther: gp_XYZ): void; - Multiply_3(theMatrix: gp_Mat): void; - Multiplied_1(theScalar: Standard_Real): gp_XYZ; - Multiplied_2(theOther: gp_XYZ): gp_XYZ; - Multiplied_3(theMatrix: gp_Mat): gp_XYZ; - Normalize(): void; - Normalized(): gp_XYZ; - Reverse(): void; - Reversed(): gp_XYZ; - Subtract(theOther: gp_XYZ): void; - Subtracted(theOther: gp_XYZ): gp_XYZ; - SetLinearForm_1(theA1: Standard_Real, theXYZ1: gp_XYZ, theA2: Standard_Real, theXYZ2: gp_XYZ, theA3: Standard_Real, theXYZ3: gp_XYZ, theXYZ4: gp_XYZ): void; - SetLinearForm_2(theA1: Standard_Real, theXYZ1: gp_XYZ, theA2: Standard_Real, theXYZ2: gp_XYZ, theA3: Standard_Real, theXYZ3: gp_XYZ): void; - SetLinearForm_3(theA1: Standard_Real, theXYZ1: gp_XYZ, theA2: Standard_Real, theXYZ2: gp_XYZ, theXYZ3: gp_XYZ): void; - SetLinearForm_4(theA1: Standard_Real, theXYZ1: gp_XYZ, theA2: Standard_Real, theXYZ2: gp_XYZ): void; - SetLinearForm_5(theA1: Standard_Real, theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void; - SetLinearForm_6(theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void; - DumpJson(theOStream: Standard_OStream, theDepth: Graphic3d_ZLayerId): void; - InitFromJson(theSStream: Standard_SStream, theStreamPos: Graphic3d_ZLayerId): Standard_Boolean; - delete(): void; -} - - export declare class gp_XYZ_1 extends gp_XYZ { - constructor(); - } - - export declare class gp_XYZ_2 extends gp_XYZ { - constructor(theX: Standard_Real, theY: Standard_Real, theZ: Standard_Real); - } - -type Standard_Boolean = boolean; -type Standard_Byte = number; -type Standard_Character = number; -type Standard_CString = string; -type Standard_Integer = number; -type Standard_Real = number; -type Standard_ShortReal = number; -type Standard_Size = number; - -declare namespace FS { - interface Lookup { - path: string; - node: FSNode; - } - - interface FSStream {} - interface FSNode {} - interface ErrnoError {} - - let ignorePermissions: boolean; - let trackingDelegate: any; - let tracking: any; - let genericErrors: any; - - // - // paths - // - function lookupPath(path: string, opts: any): Lookup; - function getPath(node: FSNode): string; - - // - // nodes - // - function isFile(mode: number): boolean; - function isDir(mode: number): boolean; - function isLink(mode: number): boolean; - function isChrdev(mode: number): boolean; - function isBlkdev(mode: number): boolean; - function isFIFO(mode: number): boolean; - function isSocket(mode: number): boolean; - - // - // devices - // - function major(dev: number): number; - function minor(dev: number): number; - function makedev(ma: number, mi: number): number; - function registerDevice(dev: number, ops: any): void; - - // - // core - // - function syncfs(populate: boolean, callback: (e: any) => any): void; - function syncfs(callback: (e: any) => any, populate?: boolean): void; - function mount(type: any, opts: any, mountpoint: string): any; - function unmount(mountpoint: string): void; - - function mkdir(path: string, mode?: number): any; - function mkdev(path: string, mode?: number, dev?: number): any; - function symlink(oldpath: string, newpath: string): any; - function rename(old_path: string, new_path: string): void; - function rmdir(path: string): void; - function readdir(path: string): any; - function unlink(path: string): void; - function readlink(path: string): string; - function stat(path: string, dontFollow?: boolean): any; - function lstat(path: string): any; - function chmod(path: string, mode: number, dontFollow?: boolean): void; - function lchmod(path: string, mode: number): void; - function fchmod(fd: number, mode: number): void; - function chown(path: string, uid: number, gid: number, dontFollow?: boolean): void; - function lchown(path: string, uid: number, gid: number): void; - function fchown(fd: number, uid: number, gid: number): void; - function truncate(path: string, len: number): void; - function ftruncate(fd: number, len: number): void; - function utime(path: string, atime: number, mtime: number): void; - function open(path: string, flags: string, mode?: number, fd_start?: number, fd_end?: number): FSStream; - function close(stream: FSStream): void; - function llseek(stream: FSStream, offset: number, whence: number): any; - function read(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number): number; - function write( - stream: FSStream, - buffer: ArrayBufferView, - offset: number, - length: number, - position?: number, - canOwn?: boolean, - ): number; - function allocate(stream: FSStream, offset: number, length: number): void; - function mmap( - stream: FSStream, - buffer: ArrayBufferView, - offset: number, - length: number, - position: number, - prot: number, - flags: number, - ): any; - function ioctl(stream: FSStream, cmd: any, arg: any): any; - function readFile(path: string, opts: { encoding: 'binary'; flags?: string }): Uint8Array; - function readFile(path: string, opts: { encoding: 'utf8'; flags?: string }): string; - function readFile(path: string, opts?: { flags?: string }): Uint8Array; - function writeFile(path: string, data: string | ArrayBufferView, opts?: { flags?: string }): void; - - // - // module-level FS code - // - function cwd(): string; - function chdir(path: string): void; - function init( - input: null | (() => number | null), - output: null | ((c: number) => any), - error: null | ((c: number) => any), - ): void; - - function createLazyFile( - parent: string | FSNode, - name: string, - url: string, - canRead: boolean, - canWrite: boolean, - ): FSNode; - function createPreloadedFile( - parent: string | FSNode, - name: string, - url: string, - canRead: boolean, - canWrite: boolean, - onload?: () => void, - onerror?: () => void, - dontCreateFile?: boolean, - canOwn?: boolean, - ): void; - function createDataFile( - parent: string | FSNode, - name: string, - data: ArrayBufferView | string, - canRead: boolean, - canWrite: boolean, - canOwn: boolean, - ): FSNode; - interface AnalysisResults { - isRoot: boolean, - exists: boolean, - error: Error, - name: string, - path: any, - object: any, - parentExists: boolean, - parentPath: any, - parentObject: any - } - function analyzePath(path: string): AnalysisResults; -} - - -export type OpenCascadeInstance = {FS: typeof FS} & { - Adaptor3d_Curve: typeof Adaptor3d_Curve; - Adaptor3d_Surface: typeof Adaptor3d_Surface; - BOPAlgo_GlueEnum: BOPAlgo_GlueEnum; - BOPAlgo_Options: typeof BOPAlgo_Options; - BOPAlgo_Options_1: typeof BOPAlgo_Options_1; - BOPAlgo_Options_2: typeof BOPAlgo_Options_2; - BOPTools_AlgoTools3D: typeof BOPTools_AlgoTools3D; - BRep_Builder: typeof BRep_Builder; - BRep_Tool: typeof BRep_Tool; - BRepAdaptor_CompCurve: typeof BRepAdaptor_CompCurve; - BRepAdaptor_CompCurve_1: typeof BRepAdaptor_CompCurve_1; - BRepAdaptor_CompCurve_2: typeof BRepAdaptor_CompCurve_2; - BRepAdaptor_CompCurve_3: typeof BRepAdaptor_CompCurve_3; - BRepAdaptor_Curve: typeof BRepAdaptor_Curve; - BRepAdaptor_Curve_1: typeof BRepAdaptor_Curve_1; - BRepAdaptor_Curve_2: typeof BRepAdaptor_Curve_2; - BRepAdaptor_Curve_3: typeof BRepAdaptor_Curve_3; - BRepAdaptor_Surface: typeof BRepAdaptor_Surface; - BRepAdaptor_Surface_1: typeof BRepAdaptor_Surface_1; - BRepAdaptor_Surface_2: typeof BRepAdaptor_Surface_2; - BRepAlgoAPI_Algo: typeof BRepAlgoAPI_Algo; - BRepAlgoAPI_BooleanOperation: typeof BRepAlgoAPI_BooleanOperation; - BRepAlgoAPI_BooleanOperation_1: typeof BRepAlgoAPI_BooleanOperation_1; - BRepAlgoAPI_BooleanOperation_2: typeof BRepAlgoAPI_BooleanOperation_2; - BRepAlgoAPI_BuilderAlgo: typeof BRepAlgoAPI_BuilderAlgo; - BRepAlgoAPI_BuilderAlgo_1: typeof BRepAlgoAPI_BuilderAlgo_1; - BRepAlgoAPI_BuilderAlgo_2: typeof BRepAlgoAPI_BuilderAlgo_2; - BRepAlgoAPI_Common: typeof BRepAlgoAPI_Common; - BRepAlgoAPI_Common_1: typeof BRepAlgoAPI_Common_1; - BRepAlgoAPI_Common_2: typeof BRepAlgoAPI_Common_2; - BRepAlgoAPI_Common_3: typeof BRepAlgoAPI_Common_3; - BRepAlgoAPI_Common_4: typeof BRepAlgoAPI_Common_4; - BRepAlgoAPI_Cut: typeof BRepAlgoAPI_Cut; - BRepAlgoAPI_Cut_1: typeof BRepAlgoAPI_Cut_1; - BRepAlgoAPI_Cut_2: typeof BRepAlgoAPI_Cut_2; - BRepAlgoAPI_Cut_3: typeof BRepAlgoAPI_Cut_3; - BRepAlgoAPI_Cut_4: typeof BRepAlgoAPI_Cut_4; - BRepAlgoAPI_Fuse: typeof BRepAlgoAPI_Fuse; - BRepAlgoAPI_Fuse_1: typeof BRepAlgoAPI_Fuse_1; - BRepAlgoAPI_Fuse_2: typeof BRepAlgoAPI_Fuse_2; - BRepAlgoAPI_Fuse_3: typeof BRepAlgoAPI_Fuse_3; - BRepAlgoAPI_Fuse_4: typeof BRepAlgoAPI_Fuse_4; - BRepAlgoAPI_Section: typeof BRepAlgoAPI_Section; - BRepAlgoAPI_Section_1: typeof BRepAlgoAPI_Section_1; - BRepAlgoAPI_Section_2: typeof BRepAlgoAPI_Section_2; - BRepAlgoAPI_Section_3: typeof BRepAlgoAPI_Section_3; - BRepAlgoAPI_Section_4: typeof BRepAlgoAPI_Section_4; - BRepAlgoAPI_Section_5: typeof BRepAlgoAPI_Section_5; - BRepAlgoAPI_Section_6: typeof BRepAlgoAPI_Section_6; - BRepAlgoAPI_Section_7: typeof BRepAlgoAPI_Section_7; - BRepAlgoAPI_Section_8: typeof BRepAlgoAPI_Section_8; - BRepBndLib: typeof BRepBndLib; - BRepBuilderAPI_Command: typeof BRepBuilderAPI_Command; - BRepBuilderAPI_MakeEdge: typeof BRepBuilderAPI_MakeEdge; - BRepBuilderAPI_MakeEdge_1: typeof BRepBuilderAPI_MakeEdge_1; - BRepBuilderAPI_MakeEdge_2: typeof BRepBuilderAPI_MakeEdge_2; - BRepBuilderAPI_MakeEdge_3: typeof BRepBuilderAPI_MakeEdge_3; - BRepBuilderAPI_MakeEdge_4: typeof BRepBuilderAPI_MakeEdge_4; - BRepBuilderAPI_MakeEdge_5: typeof BRepBuilderAPI_MakeEdge_5; - BRepBuilderAPI_MakeEdge_6: typeof BRepBuilderAPI_MakeEdge_6; - BRepBuilderAPI_MakeEdge_7: typeof BRepBuilderAPI_MakeEdge_7; - BRepBuilderAPI_MakeEdge_8: typeof BRepBuilderAPI_MakeEdge_8; - BRepBuilderAPI_MakeEdge_9: typeof BRepBuilderAPI_MakeEdge_9; - BRepBuilderAPI_MakeEdge_10: typeof BRepBuilderAPI_MakeEdge_10; - BRepBuilderAPI_MakeEdge_11: typeof BRepBuilderAPI_MakeEdge_11; - BRepBuilderAPI_MakeEdge_12: typeof BRepBuilderAPI_MakeEdge_12; - BRepBuilderAPI_MakeEdge_13: typeof BRepBuilderAPI_MakeEdge_13; - BRepBuilderAPI_MakeEdge_14: typeof BRepBuilderAPI_MakeEdge_14; - BRepBuilderAPI_MakeEdge_15: typeof BRepBuilderAPI_MakeEdge_15; - BRepBuilderAPI_MakeEdge_16: typeof BRepBuilderAPI_MakeEdge_16; - BRepBuilderAPI_MakeEdge_17: typeof BRepBuilderAPI_MakeEdge_17; - BRepBuilderAPI_MakeEdge_18: typeof BRepBuilderAPI_MakeEdge_18; - BRepBuilderAPI_MakeEdge_19: typeof BRepBuilderAPI_MakeEdge_19; - BRepBuilderAPI_MakeEdge_20: typeof BRepBuilderAPI_MakeEdge_20; - BRepBuilderAPI_MakeEdge_21: typeof BRepBuilderAPI_MakeEdge_21; - BRepBuilderAPI_MakeEdge_22: typeof BRepBuilderAPI_MakeEdge_22; - BRepBuilderAPI_MakeEdge_23: typeof BRepBuilderAPI_MakeEdge_23; - BRepBuilderAPI_MakeEdge_24: typeof BRepBuilderAPI_MakeEdge_24; - BRepBuilderAPI_MakeEdge_25: typeof BRepBuilderAPI_MakeEdge_25; - BRepBuilderAPI_MakeEdge_26: typeof BRepBuilderAPI_MakeEdge_26; - BRepBuilderAPI_MakeEdge_27: typeof BRepBuilderAPI_MakeEdge_27; - BRepBuilderAPI_MakeEdge_28: typeof BRepBuilderAPI_MakeEdge_28; - BRepBuilderAPI_MakeEdge_29: typeof BRepBuilderAPI_MakeEdge_29; - BRepBuilderAPI_MakeEdge_30: typeof BRepBuilderAPI_MakeEdge_30; - BRepBuilderAPI_MakeEdge_31: typeof BRepBuilderAPI_MakeEdge_31; - BRepBuilderAPI_MakeEdge_32: typeof BRepBuilderAPI_MakeEdge_32; - BRepBuilderAPI_MakeEdge_33: typeof BRepBuilderAPI_MakeEdge_33; - BRepBuilderAPI_MakeEdge_34: typeof BRepBuilderAPI_MakeEdge_34; - BRepBuilderAPI_MakeEdge_35: typeof BRepBuilderAPI_MakeEdge_35; - BRepBuilderAPI_MakeFace: typeof BRepBuilderAPI_MakeFace; - BRepBuilderAPI_MakeFace_1: typeof BRepBuilderAPI_MakeFace_1; - BRepBuilderAPI_MakeFace_2: typeof BRepBuilderAPI_MakeFace_2; - BRepBuilderAPI_MakeFace_3: typeof BRepBuilderAPI_MakeFace_3; - BRepBuilderAPI_MakeFace_4: typeof BRepBuilderAPI_MakeFace_4; - BRepBuilderAPI_MakeFace_5: typeof BRepBuilderAPI_MakeFace_5; - BRepBuilderAPI_MakeFace_6: typeof BRepBuilderAPI_MakeFace_6; - BRepBuilderAPI_MakeFace_7: typeof BRepBuilderAPI_MakeFace_7; - BRepBuilderAPI_MakeFace_8: typeof BRepBuilderAPI_MakeFace_8; - BRepBuilderAPI_MakeFace_9: typeof BRepBuilderAPI_MakeFace_9; - BRepBuilderAPI_MakeFace_10: typeof BRepBuilderAPI_MakeFace_10; - BRepBuilderAPI_MakeFace_11: typeof BRepBuilderAPI_MakeFace_11; - BRepBuilderAPI_MakeFace_12: typeof BRepBuilderAPI_MakeFace_12; - BRepBuilderAPI_MakeFace_13: typeof BRepBuilderAPI_MakeFace_13; - BRepBuilderAPI_MakeFace_14: typeof BRepBuilderAPI_MakeFace_14; - BRepBuilderAPI_MakeFace_15: typeof BRepBuilderAPI_MakeFace_15; - BRepBuilderAPI_MakeFace_16: typeof BRepBuilderAPI_MakeFace_16; - BRepBuilderAPI_MakeFace_17: typeof BRepBuilderAPI_MakeFace_17; - BRepBuilderAPI_MakeFace_18: typeof BRepBuilderAPI_MakeFace_18; - BRepBuilderAPI_MakeFace_19: typeof BRepBuilderAPI_MakeFace_19; - BRepBuilderAPI_MakeFace_20: typeof BRepBuilderAPI_MakeFace_20; - BRepBuilderAPI_MakeFace_21: typeof BRepBuilderAPI_MakeFace_21; - BRepBuilderAPI_MakeFace_22: typeof BRepBuilderAPI_MakeFace_22; - BRepBuilderAPI_MakePolygon: typeof BRepBuilderAPI_MakePolygon; - BRepBuilderAPI_MakePolygon_1: typeof BRepBuilderAPI_MakePolygon_1; - BRepBuilderAPI_MakePolygon_2: typeof BRepBuilderAPI_MakePolygon_2; - BRepBuilderAPI_MakePolygon_3: typeof BRepBuilderAPI_MakePolygon_3; - BRepBuilderAPI_MakePolygon_4: typeof BRepBuilderAPI_MakePolygon_4; - BRepBuilderAPI_MakePolygon_5: typeof BRepBuilderAPI_MakePolygon_5; - BRepBuilderAPI_MakePolygon_6: typeof BRepBuilderAPI_MakePolygon_6; - BRepBuilderAPI_MakePolygon_7: typeof BRepBuilderAPI_MakePolygon_7; - BRepBuilderAPI_MakeShape: typeof BRepBuilderAPI_MakeShape; - BRepBuilderAPI_MakeSolid: typeof BRepBuilderAPI_MakeSolid; - BRepBuilderAPI_MakeSolid_1: typeof BRepBuilderAPI_MakeSolid_1; - BRepBuilderAPI_MakeSolid_2: typeof BRepBuilderAPI_MakeSolid_2; - BRepBuilderAPI_MakeSolid_3: typeof BRepBuilderAPI_MakeSolid_3; - BRepBuilderAPI_MakeSolid_4: typeof BRepBuilderAPI_MakeSolid_4; - BRepBuilderAPI_MakeSolid_5: typeof BRepBuilderAPI_MakeSolid_5; - BRepBuilderAPI_MakeSolid_6: typeof BRepBuilderAPI_MakeSolid_6; - BRepBuilderAPI_MakeSolid_7: typeof BRepBuilderAPI_MakeSolid_7; - BRepBuilderAPI_MakeVertex: typeof BRepBuilderAPI_MakeVertex; - BRepBuilderAPI_MakeWire: typeof BRepBuilderAPI_MakeWire; - BRepBuilderAPI_MakeWire_1: typeof BRepBuilderAPI_MakeWire_1; - BRepBuilderAPI_MakeWire_2: typeof BRepBuilderAPI_MakeWire_2; - BRepBuilderAPI_MakeWire_3: typeof BRepBuilderAPI_MakeWire_3; - BRepBuilderAPI_MakeWire_4: typeof BRepBuilderAPI_MakeWire_4; - BRepBuilderAPI_MakeWire_5: typeof BRepBuilderAPI_MakeWire_5; - BRepBuilderAPI_MakeWire_6: typeof BRepBuilderAPI_MakeWire_6; - BRepBuilderAPI_MakeWire_7: typeof BRepBuilderAPI_MakeWire_7; - BRepBuilderAPI_ModifyShape: typeof BRepBuilderAPI_ModifyShape; - BRepBuilderAPI_Sewing: typeof BRepBuilderAPI_Sewing; - BRepBuilderAPI_Transform: typeof BRepBuilderAPI_Transform; - BRepBuilderAPI_Transform_1: typeof BRepBuilderAPI_Transform_1; - BRepBuilderAPI_Transform_2: typeof BRepBuilderAPI_Transform_2; - BRepBuilderAPI_TransitionMode: BRepBuilderAPI_TransitionMode; - BRepBuilderAPI_WireError: BRepBuilderAPI_WireError; - BRepCheck_Analyzer: typeof BRepCheck_Analyzer; - BRepExtrema_DistShapeShape: typeof BRepExtrema_DistShapeShape; - BRepExtrema_DistShapeShape_1: typeof BRepExtrema_DistShapeShape_1; - BRepExtrema_DistShapeShape_2: typeof BRepExtrema_DistShapeShape_2; - BRepExtrema_DistShapeShape_3: typeof BRepExtrema_DistShapeShape_3; - BRepExtrema_ExtCC: typeof BRepExtrema_ExtCC; - BRepExtrema_ExtCC_1: typeof BRepExtrema_ExtCC_1; - BRepExtrema_ExtCC_2: typeof BRepExtrema_ExtCC_2; - BRepFeat_Form: typeof BRepFeat_Form; - BRepFeat_Gluer: typeof BRepFeat_Gluer; - BRepFeat_Gluer_1: typeof BRepFeat_Gluer_1; - BRepFeat_Gluer_2: typeof BRepFeat_Gluer_2; - BRepFeat_MakeDPrism: typeof BRepFeat_MakeDPrism; - BRepFeat_MakeDPrism_1: typeof BRepFeat_MakeDPrism_1; - BRepFeat_MakeDPrism_2: typeof BRepFeat_MakeDPrism_2; - BRepFeat_MakePipe: typeof BRepFeat_MakePipe; - BRepFeat_MakePipe_1: typeof BRepFeat_MakePipe_1; - BRepFeat_MakePipe_2: typeof BRepFeat_MakePipe_2; - BRepFeat_MakePrism: typeof BRepFeat_MakePrism; - BRepFeat_MakePrism_1: typeof BRepFeat_MakePrism_1; - BRepFeat_MakePrism_2: typeof BRepFeat_MakePrism_2; - BRepFeat_MakeRevol: typeof BRepFeat_MakeRevol; - BRepFeat_MakeRevol_1: typeof BRepFeat_MakeRevol_1; - BRepFeat_MakeRevol_2: typeof BRepFeat_MakeRevol_2; - BRepFeat_MakeRevolutionForm: typeof BRepFeat_MakeRevolutionForm; - BRepFeat_MakeRevolutionForm_1: typeof BRepFeat_MakeRevolutionForm_1; - BRepFeat_MakeRevolutionForm_2: typeof BRepFeat_MakeRevolutionForm_2; - BRepFeat_RibSlot: typeof BRepFeat_RibSlot; - BRepFeat_SplitShape: typeof BRepFeat_SplitShape; - BRepFeat_SplitShape_1: typeof BRepFeat_SplitShape_1; - BRepFeat_SplitShape_2: typeof BRepFeat_SplitShape_2; - BRepFill_TypeOfContact: BRepFill_TypeOfContact; - BRepFilletAPI_LocalOperation: typeof BRepFilletAPI_LocalOperation; - BRepFilletAPI_MakeChamfer: typeof BRepFilletAPI_MakeChamfer; - BRepFilletAPI_MakeFillet: typeof BRepFilletAPI_MakeFillet; - BRepGProp: typeof BRepGProp; - BRepGProp_Face: typeof BRepGProp_Face; - BRepGProp_Face_1: typeof BRepGProp_Face_1; - BRepGProp_Face_2: typeof BRepGProp_Face_2; - BRepLib: typeof BRepLib; - BRepMesh_DiscretRoot: typeof BRepMesh_DiscretRoot; - BRepMesh_IncrementalMesh: typeof BRepMesh_IncrementalMesh; - BRepMesh_IncrementalMesh_1: typeof BRepMesh_IncrementalMesh_1; - BRepMesh_IncrementalMesh_2: typeof BRepMesh_IncrementalMesh_2; - BRepMesh_IncrementalMesh_3: typeof BRepMesh_IncrementalMesh_3; - BRepOffset_Mode: BRepOffset_Mode; - BRepOffsetAPI_DraftAngle: typeof BRepOffsetAPI_DraftAngle; - BRepOffsetAPI_DraftAngle_1: typeof BRepOffsetAPI_DraftAngle_1; - BRepOffsetAPI_DraftAngle_2: typeof BRepOffsetAPI_DraftAngle_2; - BRepOffsetAPI_MakeFilling: typeof BRepOffsetAPI_MakeFilling; - BRepOffsetAPI_MakeOffset: typeof BRepOffsetAPI_MakeOffset; - BRepOffsetAPI_MakeOffset_1: typeof BRepOffsetAPI_MakeOffset_1; - BRepOffsetAPI_MakeOffset_2: typeof BRepOffsetAPI_MakeOffset_2; - BRepOffsetAPI_MakeOffset_3: typeof BRepOffsetAPI_MakeOffset_3; - BRepOffsetAPI_MakeOffsetShape: typeof BRepOffsetAPI_MakeOffsetShape; - BRepOffsetAPI_MakePipe: typeof BRepOffsetAPI_MakePipe; - BRepOffsetAPI_MakePipe_1: typeof BRepOffsetAPI_MakePipe_1; - BRepOffsetAPI_MakePipe_2: typeof BRepOffsetAPI_MakePipe_2; - BRepOffsetAPI_MakePipeShell: typeof BRepOffsetAPI_MakePipeShell; - BRepOffsetAPI_MakeThickSolid: typeof BRepOffsetAPI_MakeThickSolid; - BRepOffsetAPI_ThruSections: typeof BRepOffsetAPI_ThruSections; - BRepPrimAPI_MakeBox: typeof BRepPrimAPI_MakeBox; - BRepPrimAPI_MakeBox_1: typeof BRepPrimAPI_MakeBox_1; - BRepPrimAPI_MakeBox_2: typeof BRepPrimAPI_MakeBox_2; - BRepPrimAPI_MakeBox_3: typeof BRepPrimAPI_MakeBox_3; - BRepPrimAPI_MakeBox_4: typeof BRepPrimAPI_MakeBox_4; - BRepPrimAPI_MakeBox_5: typeof BRepPrimAPI_MakeBox_5; - BRepPrimAPI_MakeCylinder: typeof BRepPrimAPI_MakeCylinder; - BRepPrimAPI_MakeCylinder_1: typeof BRepPrimAPI_MakeCylinder_1; - BRepPrimAPI_MakeCylinder_2: typeof BRepPrimAPI_MakeCylinder_2; - BRepPrimAPI_MakeCylinder_3: typeof BRepPrimAPI_MakeCylinder_3; - BRepPrimAPI_MakeCylinder_4: typeof BRepPrimAPI_MakeCylinder_4; - BRepPrimAPI_MakeOneAxis: typeof BRepPrimAPI_MakeOneAxis; - BRepPrimAPI_MakePrism: typeof BRepPrimAPI_MakePrism; - BRepPrimAPI_MakePrism_1: typeof BRepPrimAPI_MakePrism_1; - BRepPrimAPI_MakePrism_2: typeof BRepPrimAPI_MakePrism_2; - BRepPrimAPI_MakeRevol: typeof BRepPrimAPI_MakeRevol; - BRepPrimAPI_MakeRevol_1: typeof BRepPrimAPI_MakeRevol_1; - BRepPrimAPI_MakeRevol_2: typeof BRepPrimAPI_MakeRevol_2; - BRepPrimAPI_MakeRevolution: typeof BRepPrimAPI_MakeRevolution; - BRepPrimAPI_MakeRevolution_1: typeof BRepPrimAPI_MakeRevolution_1; - BRepPrimAPI_MakeRevolution_2: typeof BRepPrimAPI_MakeRevolution_2; - BRepPrimAPI_MakeRevolution_3: typeof BRepPrimAPI_MakeRevolution_3; - BRepPrimAPI_MakeRevolution_4: typeof BRepPrimAPI_MakeRevolution_4; - BRepPrimAPI_MakeRevolution_5: typeof BRepPrimAPI_MakeRevolution_5; - BRepPrimAPI_MakeRevolution_6: typeof BRepPrimAPI_MakeRevolution_6; - BRepPrimAPI_MakeRevolution_7: typeof BRepPrimAPI_MakeRevolution_7; - BRepPrimAPI_MakeRevolution_8: typeof BRepPrimAPI_MakeRevolution_8; - BRepPrimAPI_MakeSphere: typeof BRepPrimAPI_MakeSphere; - BRepPrimAPI_MakeSphere_1: typeof BRepPrimAPI_MakeSphere_1; - BRepPrimAPI_MakeSphere_2: typeof BRepPrimAPI_MakeSphere_2; - BRepPrimAPI_MakeSphere_3: typeof BRepPrimAPI_MakeSphere_3; - BRepPrimAPI_MakeSphere_4: typeof BRepPrimAPI_MakeSphere_4; - BRepPrimAPI_MakeSphere_5: typeof BRepPrimAPI_MakeSphere_5; - BRepPrimAPI_MakeSphere_6: typeof BRepPrimAPI_MakeSphere_6; - BRepPrimAPI_MakeSphere_7: typeof BRepPrimAPI_MakeSphere_7; - BRepPrimAPI_MakeSphere_8: typeof BRepPrimAPI_MakeSphere_8; - BRepPrimAPI_MakeSphere_9: typeof BRepPrimAPI_MakeSphere_9; - BRepPrimAPI_MakeSphere_10: typeof BRepPrimAPI_MakeSphere_10; - BRepPrimAPI_MakeSphere_11: typeof BRepPrimAPI_MakeSphere_11; - BRepPrimAPI_MakeSphere_12: typeof BRepPrimAPI_MakeSphere_12; - BRepPrimAPI_MakeSweep: typeof BRepPrimAPI_MakeSweep; - BRepPrimAPI_MakeTorus: typeof BRepPrimAPI_MakeTorus; - BRepPrimAPI_MakeTorus_1: typeof BRepPrimAPI_MakeTorus_1; - BRepPrimAPI_MakeTorus_2: typeof BRepPrimAPI_MakeTorus_2; - BRepPrimAPI_MakeTorus_3: typeof BRepPrimAPI_MakeTorus_3; - BRepPrimAPI_MakeTorus_4: typeof BRepPrimAPI_MakeTorus_4; - BRepPrimAPI_MakeTorus_5: typeof BRepPrimAPI_MakeTorus_5; - BRepPrimAPI_MakeTorus_6: typeof BRepPrimAPI_MakeTorus_6; - BRepPrimAPI_MakeTorus_7: typeof BRepPrimAPI_MakeTorus_7; - BRepPrimAPI_MakeTorus_8: typeof BRepPrimAPI_MakeTorus_8; - BRepTools: typeof BRepTools; - BRepTools_Quilt: typeof BRepTools_Quilt; - BRepTools_ReShape: typeof BRepTools_ReShape; - Bnd_Box: typeof Bnd_Box; - Bnd_Box_1: typeof Bnd_Box_1; - Bnd_Box_2: typeof Bnd_Box_2; - Bnd_OBB: typeof Bnd_OBB; - Bnd_OBB_1: typeof Bnd_OBB_1; - Bnd_OBB_2: typeof Bnd_OBB_2; - Bnd_OBB_3: typeof Bnd_OBB_3; - ChFi3d_FilletShape: ChFi3d_FilletShape; - ChFiDS_ChamfMode: ChFiDS_ChamfMode; - Convert_ParameterisationType: Convert_ParameterisationType; - Extrema_ExtAlgo: Extrema_ExtAlgo; - Extrema_ExtCC: typeof Extrema_ExtCC; - Extrema_ExtCC_1: typeof Extrema_ExtCC_1; - Extrema_ExtCC_2: typeof Extrema_ExtCC_2; - Extrema_ExtCC_3: typeof Extrema_ExtCC_3; - Extrema_ExtCS: typeof Extrema_ExtCS; - Extrema_ExtCS_1: typeof Extrema_ExtCS_1; - Extrema_ExtCS_2: typeof Extrema_ExtCS_2; - Extrema_ExtCS_3: typeof Extrema_ExtCS_3; - Extrema_ExtPC: typeof Extrema_ExtPC; - Extrema_ExtPC_1: typeof Extrema_ExtPC_1; - Extrema_ExtPC_2: typeof Extrema_ExtPC_2; - Extrema_ExtPC_3: typeof Extrema_ExtPC_3; - Extrema_ExtPS: typeof Extrema_ExtPS; - Extrema_ExtPS_1: typeof Extrema_ExtPS_1; - Extrema_ExtPS_2: typeof Extrema_ExtPS_2; - Extrema_ExtPS_3: typeof Extrema_ExtPS_3; - Extrema_ExtSS: typeof Extrema_ExtSS; - Extrema_ExtSS_1: typeof Extrema_ExtSS_1; - Extrema_ExtSS_2: typeof Extrema_ExtSS_2; - Extrema_ExtSS_3: typeof Extrema_ExtSS_3; - Extrema_POnCurv: typeof Extrema_POnCurv; - Extrema_POnCurv_1: typeof Extrema_POnCurv_1; - Extrema_POnCurv_2: typeof Extrema_POnCurv_2; - Extrema_POnSurf: typeof Extrema_POnSurf; - Extrema_POnSurf_1: typeof Extrema_POnSurf_1; - Extrema_POnSurf_2: typeof Extrema_POnSurf_2; - GC_MakeArcOfCircle: typeof GC_MakeArcOfCircle; - GC_MakeArcOfCircle_1: typeof GC_MakeArcOfCircle_1; - GC_MakeArcOfCircle_2: typeof GC_MakeArcOfCircle_2; - GC_MakeArcOfCircle_3: typeof GC_MakeArcOfCircle_3; - GC_MakeArcOfCircle_4: typeof GC_MakeArcOfCircle_4; - GC_MakeArcOfCircle_5: typeof GC_MakeArcOfCircle_5; - GC_MakeArcOfEllipse: typeof GC_MakeArcOfEllipse; - GC_MakeArcOfEllipse_1: typeof GC_MakeArcOfEllipse_1; - GC_MakeArcOfEllipse_2: typeof GC_MakeArcOfEllipse_2; - GC_MakeArcOfEllipse_3: typeof GC_MakeArcOfEllipse_3; - GC_Root: typeof GC_Root; - GCPnts_AbscissaPoint: typeof GCPnts_AbscissaPoint; - GCPnts_AbscissaPoint_1: typeof GCPnts_AbscissaPoint_1; - GCPnts_AbscissaPoint_2: typeof GCPnts_AbscissaPoint_2; - GCPnts_AbscissaPoint_3: typeof GCPnts_AbscissaPoint_3; - GCPnts_AbscissaPoint_4: typeof GCPnts_AbscissaPoint_4; - GCPnts_AbscissaPoint_5: typeof GCPnts_AbscissaPoint_5; - GCPnts_AbscissaPoint_6: typeof GCPnts_AbscissaPoint_6; - GCPnts_AbscissaPoint_7: typeof GCPnts_AbscissaPoint_7; - GCPnts_AbscissaPoint_8: typeof GCPnts_AbscissaPoint_8; - GCPnts_AbscissaPoint_9: typeof GCPnts_AbscissaPoint_9; - GCPnts_TangentialDeflection: typeof GCPnts_TangentialDeflection; - GCPnts_TangentialDeflection_1: typeof GCPnts_TangentialDeflection_1; - GCPnts_TangentialDeflection_2: typeof GCPnts_TangentialDeflection_2; - GCPnts_TangentialDeflection_3: typeof GCPnts_TangentialDeflection_3; - GCPnts_TangentialDeflection_4: typeof GCPnts_TangentialDeflection_4; - GCPnts_TangentialDeflection_5: typeof GCPnts_TangentialDeflection_5; - GCPnts_UniformAbscissa: typeof GCPnts_UniformAbscissa; - GCPnts_UniformAbscissa_1: typeof GCPnts_UniformAbscissa_1; - GCPnts_UniformAbscissa_2: typeof GCPnts_UniformAbscissa_2; - GCPnts_UniformAbscissa_3: typeof GCPnts_UniformAbscissa_3; - GCPnts_UniformAbscissa_4: typeof GCPnts_UniformAbscissa_4; - GCPnts_UniformAbscissa_5: typeof GCPnts_UniformAbscissa_5; - GCPnts_UniformAbscissa_6: typeof GCPnts_UniformAbscissa_6; - GCPnts_UniformAbscissa_7: typeof GCPnts_UniformAbscissa_7; - GCPnts_UniformAbscissa_8: typeof GCPnts_UniformAbscissa_8; - GCPnts_UniformAbscissa_9: typeof GCPnts_UniformAbscissa_9; - GProp_GProps: typeof GProp_GProps; - GProp_GProps_1: typeof GProp_GProps_1; - GProp_GProps_2: typeof GProp_GProps_2; - Geom_BSplineCurve: typeof Geom_BSplineCurve; - Geom_BSplineCurve_1: typeof Geom_BSplineCurve_1; - Geom_BSplineCurve_2: typeof Geom_BSplineCurve_2; - Handle_Geom_BSplineCurve: typeof Handle_Geom_BSplineCurve; - Handle_Geom_BSplineCurve_1: typeof Handle_Geom_BSplineCurve_1; - Handle_Geom_BSplineCurve_2: typeof Handle_Geom_BSplineCurve_2; - Handle_Geom_BSplineCurve_3: typeof Handle_Geom_BSplineCurve_3; - Handle_Geom_BSplineCurve_4: typeof Handle_Geom_BSplineCurve_4; - Geom_BSplineSurface: typeof Geom_BSplineSurface; - Geom_BSplineSurface_1: typeof Geom_BSplineSurface_1; - Geom_BSplineSurface_2: typeof Geom_BSplineSurface_2; - Handle_Geom_BSplineSurface: typeof Handle_Geom_BSplineSurface; - Handle_Geom_BSplineSurface_1: typeof Handle_Geom_BSplineSurface_1; - Handle_Geom_BSplineSurface_2: typeof Handle_Geom_BSplineSurface_2; - Handle_Geom_BSplineSurface_3: typeof Handle_Geom_BSplineSurface_3; - Handle_Geom_BSplineSurface_4: typeof Handle_Geom_BSplineSurface_4; - Geom_BezierCurve: typeof Geom_BezierCurve; - Geom_BezierCurve_1: typeof Geom_BezierCurve_1; - Geom_BezierCurve_2: typeof Geom_BezierCurve_2; - Handle_Geom_BezierCurve: typeof Handle_Geom_BezierCurve; - Handle_Geom_BezierCurve_1: typeof Handle_Geom_BezierCurve_1; - Handle_Geom_BezierCurve_2: typeof Handle_Geom_BezierCurve_2; - Handle_Geom_BezierCurve_3: typeof Handle_Geom_BezierCurve_3; - Handle_Geom_BezierCurve_4: typeof Handle_Geom_BezierCurve_4; - Geom_BezierSurface: typeof Geom_BezierSurface; - Geom_BezierSurface_1: typeof Geom_BezierSurface_1; - Geom_BezierSurface_2: typeof Geom_BezierSurface_2; - Geom_BoundedCurve: typeof Geom_BoundedCurve; - Geom_BoundedSurface: typeof Geom_BoundedSurface; - Geom_Circle: typeof Geom_Circle; - Geom_Circle_1: typeof Geom_Circle_1; - Geom_Circle_2: typeof Geom_Circle_2; - Handle_Geom_Circle: typeof Handle_Geom_Circle; - Handle_Geom_Circle_1: typeof Handle_Geom_Circle_1; - Handle_Geom_Circle_2: typeof Handle_Geom_Circle_2; - Handle_Geom_Circle_3: typeof Handle_Geom_Circle_3; - Handle_Geom_Circle_4: typeof Handle_Geom_Circle_4; - Geom_Conic: typeof Geom_Conic; - Handle_Geom_Conic: typeof Handle_Geom_Conic; - Handle_Geom_Conic_1: typeof Handle_Geom_Conic_1; - Handle_Geom_Conic_2: typeof Handle_Geom_Conic_2; - Handle_Geom_Conic_3: typeof Handle_Geom_Conic_3; - Handle_Geom_Conic_4: typeof Handle_Geom_Conic_4; - Geom_ConicalSurface: typeof Geom_ConicalSurface; - Geom_ConicalSurface_1: typeof Geom_ConicalSurface_1; - Geom_ConicalSurface_2: typeof Geom_ConicalSurface_2; - Geom_Curve: typeof Geom_Curve; - Handle_Geom_Curve: typeof Handle_Geom_Curve; - Handle_Geom_Curve_1: typeof Handle_Geom_Curve_1; - Handle_Geom_Curve_2: typeof Handle_Geom_Curve_2; - Handle_Geom_Curve_3: typeof Handle_Geom_Curve_3; - Handle_Geom_Curve_4: typeof Handle_Geom_Curve_4; - Geom_CylindricalSurface: typeof Geom_CylindricalSurface; - Geom_CylindricalSurface_1: typeof Geom_CylindricalSurface_1; - Geom_CylindricalSurface_2: typeof Geom_CylindricalSurface_2; - Geom_ElementarySurface: typeof Geom_ElementarySurface; - Geom_Ellipse: typeof Geom_Ellipse; - Geom_Ellipse_1: typeof Geom_Ellipse_1; - Geom_Ellipse_2: typeof Geom_Ellipse_2; - Geom_Geometry: typeof Geom_Geometry; - Handle_Geom_Geometry: typeof Handle_Geom_Geometry; - Handle_Geom_Geometry_1: typeof Handle_Geom_Geometry_1; - Handle_Geom_Geometry_2: typeof Handle_Geom_Geometry_2; - Handle_Geom_Geometry_3: typeof Handle_Geom_Geometry_3; - Handle_Geom_Geometry_4: typeof Handle_Geom_Geometry_4; - Geom_Hyperbola: typeof Geom_Hyperbola; - Geom_Hyperbola_1: typeof Geom_Hyperbola_1; - Geom_Hyperbola_2: typeof Geom_Hyperbola_2; - Geom_Line: typeof Geom_Line; - Geom_Line_1: typeof Geom_Line_1; - Geom_Line_2: typeof Geom_Line_2; - Geom_Line_3: typeof Geom_Line_3; - Handle_Geom_Line: typeof Handle_Geom_Line; - Handle_Geom_Line_1: typeof Handle_Geom_Line_1; - Handle_Geom_Line_2: typeof Handle_Geom_Line_2; - Handle_Geom_Line_3: typeof Handle_Geom_Line_3; - Handle_Geom_Line_4: typeof Handle_Geom_Line_4; - Geom_OffsetCurve: typeof Geom_OffsetCurve; - Geom_OffsetSurface: typeof Geom_OffsetSurface; - Geom_Parabola: typeof Geom_Parabola; - Geom_Parabola_1: typeof Geom_Parabola_1; - Geom_Parabola_2: typeof Geom_Parabola_2; - Geom_Parabola_3: typeof Geom_Parabola_3; - Geom_Plane: typeof Geom_Plane; - Geom_Plane_1: typeof Geom_Plane_1; - Geom_Plane_2: typeof Geom_Plane_2; - Geom_Plane_3: typeof Geom_Plane_3; - Geom_Plane_4: typeof Geom_Plane_4; - Geom_RectangularTrimmedSurface: typeof Geom_RectangularTrimmedSurface; - Geom_RectangularTrimmedSurface_1: typeof Geom_RectangularTrimmedSurface_1; - Geom_RectangularTrimmedSurface_2: typeof Geom_RectangularTrimmedSurface_2; - Geom_SphericalSurface: typeof Geom_SphericalSurface; - Geom_SphericalSurface_1: typeof Geom_SphericalSurface_1; - Geom_SphericalSurface_2: typeof Geom_SphericalSurface_2; - Geom_Surface: typeof Geom_Surface; - Handle_Geom_Surface: typeof Handle_Geom_Surface; - Handle_Geom_Surface_1: typeof Handle_Geom_Surface_1; - Handle_Geom_Surface_2: typeof Handle_Geom_Surface_2; - Handle_Geom_Surface_3: typeof Handle_Geom_Surface_3; - Handle_Geom_Surface_4: typeof Handle_Geom_Surface_4; - Geom_SurfaceOfLinearExtrusion: typeof Geom_SurfaceOfLinearExtrusion; - Geom_SurfaceOfRevolution: typeof Geom_SurfaceOfRevolution; - Geom_SweptSurface: typeof Geom_SweptSurface; - Geom_ToroidalSurface: typeof Geom_ToroidalSurface; - Geom_ToroidalSurface_1: typeof Geom_ToroidalSurface_1; - Geom_ToroidalSurface_2: typeof Geom_ToroidalSurface_2; - Geom_TrimmedCurve: typeof Geom_TrimmedCurve; - Handle_Geom_TrimmedCurve: typeof Handle_Geom_TrimmedCurve; - Handle_Geom_TrimmedCurve_1: typeof Handle_Geom_TrimmedCurve_1; - Handle_Geom_TrimmedCurve_2: typeof Handle_Geom_TrimmedCurve_2; - Handle_Geom_TrimmedCurve_3: typeof Handle_Geom_TrimmedCurve_3; - Handle_Geom_TrimmedCurve_4: typeof Handle_Geom_TrimmedCurve_4; - Handle_Geom2d_Curve: typeof Handle_Geom2d_Curve; - Handle_Geom2d_Curve_1: typeof Handle_Geom2d_Curve_1; - Handle_Geom2d_Curve_2: typeof Handle_Geom2d_Curve_2; - Handle_Geom2d_Curve_3: typeof Handle_Geom2d_Curve_3; - Handle_Geom2d_Curve_4: typeof Handle_Geom2d_Curve_4; - GeomAPI_ExtremaCurveCurve: typeof GeomAPI_ExtremaCurveCurve; - GeomAPI_ExtremaCurveCurve_1: typeof GeomAPI_ExtremaCurveCurve_1; - GeomAPI_ExtremaCurveCurve_2: typeof GeomAPI_ExtremaCurveCurve_2; - GeomAPI_ExtremaCurveCurve_3: typeof GeomAPI_ExtremaCurveCurve_3; - GeomAPI_ExtremaCurveSurface: typeof GeomAPI_ExtremaCurveSurface; - GeomAPI_ExtremaCurveSurface_1: typeof GeomAPI_ExtremaCurveSurface_1; - GeomAPI_ExtremaCurveSurface_2: typeof GeomAPI_ExtremaCurveSurface_2; - GeomAPI_ExtremaCurveSurface_3: typeof GeomAPI_ExtremaCurveSurface_3; - GeomAPI_ExtremaSurfaceSurface: typeof GeomAPI_ExtremaSurfaceSurface; - GeomAPI_ExtremaSurfaceSurface_1: typeof GeomAPI_ExtremaSurfaceSurface_1; - GeomAPI_ExtremaSurfaceSurface_2: typeof GeomAPI_ExtremaSurfaceSurface_2; - GeomAPI_ExtremaSurfaceSurface_3: typeof GeomAPI_ExtremaSurfaceSurface_3; - GeomAPI_IntCS: typeof GeomAPI_IntCS; - GeomAPI_IntCS_1: typeof GeomAPI_IntCS_1; - GeomAPI_IntCS_2: typeof GeomAPI_IntCS_2; - GeomAPI_IntSS: typeof GeomAPI_IntSS; - GeomAPI_IntSS_1: typeof GeomAPI_IntSS_1; - GeomAPI_IntSS_2: typeof GeomAPI_IntSS_2; - GeomAPI_Interpolate: typeof GeomAPI_Interpolate; - GeomAPI_Interpolate_1: typeof GeomAPI_Interpolate_1; - GeomAPI_Interpolate_2: typeof GeomAPI_Interpolate_2; - GeomAPI_PointsToBSpline: typeof GeomAPI_PointsToBSpline; - GeomAPI_PointsToBSpline_1: typeof GeomAPI_PointsToBSpline_1; - GeomAPI_PointsToBSpline_2: typeof GeomAPI_PointsToBSpline_2; - GeomAPI_PointsToBSpline_3: typeof GeomAPI_PointsToBSpline_3; - GeomAPI_PointsToBSpline_4: typeof GeomAPI_PointsToBSpline_4; - GeomAPI_PointsToBSpline_5: typeof GeomAPI_PointsToBSpline_5; - GeomAPI_PointsToBSplineSurface: typeof GeomAPI_PointsToBSplineSurface; - GeomAPI_PointsToBSplineSurface_1: typeof GeomAPI_PointsToBSplineSurface_1; - GeomAPI_PointsToBSplineSurface_2: typeof GeomAPI_PointsToBSplineSurface_2; - GeomAPI_PointsToBSplineSurface_3: typeof GeomAPI_PointsToBSplineSurface_3; - GeomAPI_PointsToBSplineSurface_4: typeof GeomAPI_PointsToBSplineSurface_4; - GeomAPI_PointsToBSplineSurface_5: typeof GeomAPI_PointsToBSplineSurface_5; - GeomAPI_ProjectPointOnCurve: typeof GeomAPI_ProjectPointOnCurve; - GeomAPI_ProjectPointOnCurve_1: typeof GeomAPI_ProjectPointOnCurve_1; - GeomAPI_ProjectPointOnCurve_2: typeof GeomAPI_ProjectPointOnCurve_2; - GeomAPI_ProjectPointOnCurve_3: typeof GeomAPI_ProjectPointOnCurve_3; - GeomAPI_ProjectPointOnSurf: typeof GeomAPI_ProjectPointOnSurf; - GeomAPI_ProjectPointOnSurf_1: typeof GeomAPI_ProjectPointOnSurf_1; - GeomAPI_ProjectPointOnSurf_2: typeof GeomAPI_ProjectPointOnSurf_2; - GeomAPI_ProjectPointOnSurf_3: typeof GeomAPI_ProjectPointOnSurf_3; - GeomAPI_ProjectPointOnSurf_4: typeof GeomAPI_ProjectPointOnSurf_4; - GeomAPI_ProjectPointOnSurf_5: typeof GeomAPI_ProjectPointOnSurf_5; - GeomAbs_CurveType: GeomAbs_CurveType; - GeomAbs_JoinType: GeomAbs_JoinType; - GeomAbs_Shape: GeomAbs_Shape; - GeomAbs_SurfaceType: GeomAbs_SurfaceType; - GeomAdaptor_Curve: typeof GeomAdaptor_Curve; - GeomAdaptor_Curve_1: typeof GeomAdaptor_Curve_1; - GeomAdaptor_Curve_2: typeof GeomAdaptor_Curve_2; - GeomAdaptor_Curve_3: typeof GeomAdaptor_Curve_3; - GeomFill_Trihedron: GeomFill_Trihedron; - GeomLib: typeof GeomLib; - GeomLib_IsPlanarSurface: typeof GeomLib_IsPlanarSurface; - GeomLib_Tool: typeof GeomLib_Tool; - GeomPlate_Surface: typeof GeomPlate_Surface; - GeomProjLib: typeof GeomProjLib; - IFSelect_ReturnStatus: IFSelect_ReturnStatus; - IGESControl_Controller: typeof IGESControl_Controller; - IGESControl_Reader: typeof IGESControl_Reader; - IGESControl_Reader_1: typeof IGESControl_Reader_1; - IGESControl_Reader_2: typeof IGESControl_Reader_2; - IGESControl_Writer: typeof IGESControl_Writer; - IGESControl_Writer_1: typeof IGESControl_Writer_1; - IGESControl_Writer_2: typeof IGESControl_Writer_2; - IGESControl_Writer_3: typeof IGESControl_Writer_3; - Interface_Static: typeof Interface_Static; - Interface_Static_1: typeof Interface_Static_1; - Interface_Static_2: typeof Interface_Static_2; - Interface_TypedValue: typeof Interface_TypedValue; - Law_BSpFunc: typeof Law_BSpFunc; - Law_BSpFunc_1: typeof Law_BSpFunc_1; - Law_BSpFunc_2: typeof Law_BSpFunc_2; - Law_Composite: typeof Law_Composite; - Law_Composite_1: typeof Law_Composite_1; - Law_Composite_2: typeof Law_Composite_2; - Handle_Law_Function: typeof Handle_Law_Function; - Handle_Law_Function_1: typeof Handle_Law_Function_1; - Handle_Law_Function_2: typeof Handle_Law_Function_2; - Handle_Law_Function_3: typeof Handle_Law_Function_3; - Handle_Law_Function_4: typeof Handle_Law_Function_4; - Law_Function: typeof Law_Function; - Law_Interpol: typeof Law_Interpol; - Law_Linear: typeof Law_Linear; - Law_S: typeof Law_S; - Message_ProgressRange: typeof Message_ProgressRange; - Message_ProgressRange_1: typeof Message_ProgressRange_1; - Message_ProgressRange_2: typeof Message_ProgressRange_2; - MoniTool_TypedValue: typeof MoniTool_TypedValue; - MoniTool_TypedValue_1: typeof MoniTool_TypedValue_1; - MoniTool_TypedValue_2: typeof MoniTool_TypedValue_2; - NCollection_BaseList: typeof NCollection_BaseList; - NCollection_BaseMap: typeof NCollection_BaseMap; - NCollection_BaseSequence: typeof NCollection_BaseSequence; - Poly_Array1OfTriangle: typeof Poly_Array1OfTriangle; - Poly_Array1OfTriangle_1: typeof Poly_Array1OfTriangle_1; - Poly_Array1OfTriangle_2: typeof Poly_Array1OfTriangle_2; - Poly_Array1OfTriangle_3: typeof Poly_Array1OfTriangle_3; - Poly_Array1OfTriangle_4: typeof Poly_Array1OfTriangle_4; - Poly_Array1OfTriangle_5: typeof Poly_Array1OfTriangle_5; - Poly_Connect: typeof Poly_Connect; - Poly_Connect_1: typeof Poly_Connect_1; - Poly_Connect_2: typeof Poly_Connect_2; - Handle_Poly_PolygonOnTriangulation: typeof Handle_Poly_PolygonOnTriangulation; - Handle_Poly_PolygonOnTriangulation_1: typeof Handle_Poly_PolygonOnTriangulation_1; - Handle_Poly_PolygonOnTriangulation_2: typeof Handle_Poly_PolygonOnTriangulation_2; - Handle_Poly_PolygonOnTriangulation_3: typeof Handle_Poly_PolygonOnTriangulation_3; - Handle_Poly_PolygonOnTriangulation_4: typeof Handle_Poly_PolygonOnTriangulation_4; - Poly_PolygonOnTriangulation: typeof Poly_PolygonOnTriangulation; - Poly_PolygonOnTriangulation_1: typeof Poly_PolygonOnTriangulation_1; - Poly_PolygonOnTriangulation_2: typeof Poly_PolygonOnTriangulation_2; - Poly_PolygonOnTriangulation_3: typeof Poly_PolygonOnTriangulation_3; - Poly_Triangle: typeof Poly_Triangle; - Poly_Triangle_1: typeof Poly_Triangle_1; - Poly_Triangle_2: typeof Poly_Triangle_2; - Handle_Poly_Triangulation: typeof Handle_Poly_Triangulation; - Handle_Poly_Triangulation_1: typeof Handle_Poly_Triangulation_1; - Handle_Poly_Triangulation_2: typeof Handle_Poly_Triangulation_2; - Handle_Poly_Triangulation_3: typeof Handle_Poly_Triangulation_3; - Handle_Poly_Triangulation_4: typeof Handle_Poly_Triangulation_4; - Poly_Triangulation: typeof Poly_Triangulation; - Poly_Triangulation_1: typeof Poly_Triangulation_1; - Poly_Triangulation_2: typeof Poly_Triangulation_2; - Poly_Triangulation_3: typeof Poly_Triangulation_3; - Poly_Triangulation_4: typeof Poly_Triangulation_4; - Poly_Triangulation_5: typeof Poly_Triangulation_5; - Precision: typeof Precision; - ProjLib: typeof ProjLib; - STEPControl_Reader: typeof STEPControl_Reader; - STEPControl_Reader_1: typeof STEPControl_Reader_1; - STEPControl_Reader_2: typeof STEPControl_Reader_2; - STEPControl_StepModelType: STEPControl_StepModelType; - STEPControl_Writer: typeof STEPControl_Writer; - STEPControl_Writer_1: typeof STEPControl_Writer_1; - STEPControl_Writer_2: typeof STEPControl_Writer_2; - ShapeAnalysis: typeof ShapeAnalysis; - ShapeAnalysis_Edge: typeof ShapeAnalysis_Edge; - ShapeAnalysis_WireOrder: typeof ShapeAnalysis_WireOrder; - ShapeAnalysis_WireOrder_1: typeof ShapeAnalysis_WireOrder_1; - ShapeAnalysis_WireOrder_2: typeof ShapeAnalysis_WireOrder_2; - ShapeBuild_ReShape: typeof ShapeBuild_ReShape; - ShapeExtend_CompositeSurface: typeof ShapeExtend_CompositeSurface; - ShapeExtend_CompositeSurface_1: typeof ShapeExtend_CompositeSurface_1; - ShapeExtend_CompositeSurface_2: typeof ShapeExtend_CompositeSurface_2; - ShapeExtend_CompositeSurface_3: typeof ShapeExtend_CompositeSurface_3; - ShapeFix_EdgeConnect: typeof ShapeFix_EdgeConnect; - ShapeFix_Face: typeof ShapeFix_Face; - ShapeFix_Face_1: typeof ShapeFix_Face_1; - ShapeFix_Face_2: typeof ShapeFix_Face_2; - ShapeFix_Root: typeof ShapeFix_Root; - ShapeFix_Solid: typeof ShapeFix_Solid; - ShapeFix_Solid_1: typeof ShapeFix_Solid_1; - ShapeFix_Solid_2: typeof ShapeFix_Solid_2; - ShapeFix_Wire: typeof ShapeFix_Wire; - ShapeFix_Wire_1: typeof ShapeFix_Wire_1; - ShapeFix_Wire_2: typeof ShapeFix_Wire_2; - ShapeUpgrade_UnifySameDomain: typeof ShapeUpgrade_UnifySameDomain; - ShapeUpgrade_UnifySameDomain_1: typeof ShapeUpgrade_UnifySameDomain_1; - ShapeUpgrade_UnifySameDomain_2: typeof ShapeUpgrade_UnifySameDomain_2; - Standard_Transient: typeof Standard_Transient; - Standard_Transient_1: typeof Standard_Transient_1; - Standard_Transient_2: typeof Standard_Transient_2; - StdPrs_ToolTriangulatedShape: typeof StdPrs_ToolTriangulatedShape; - Handle_StepData_StepModel: typeof Handle_StepData_StepModel; - Handle_StepData_StepModel_1: typeof Handle_StepData_StepModel_1; - Handle_StepData_StepModel_2: typeof Handle_StepData_StepModel_2; - Handle_StepData_StepModel_3: typeof Handle_StepData_StepModel_3; - Handle_StepData_StepModel_4: typeof Handle_StepData_StepModel_4; - StlAPI: typeof StlAPI; - StlAPI_Reader: typeof StlAPI_Reader; - StlAPI_Writer: typeof StlAPI_Writer; - TColStd_Array1OfBoolean: typeof TColStd_Array1OfBoolean; - TColStd_Array1OfBoolean_1: typeof TColStd_Array1OfBoolean_1; - TColStd_Array1OfBoolean_2: typeof TColStd_Array1OfBoolean_2; - TColStd_Array1OfBoolean_3: typeof TColStd_Array1OfBoolean_3; - TColStd_Array1OfBoolean_4: typeof TColStd_Array1OfBoolean_4; - TColStd_Array1OfBoolean_5: typeof TColStd_Array1OfBoolean_5; - TColStd_Array1OfInteger: typeof TColStd_Array1OfInteger; - TColStd_Array1OfInteger_1: typeof TColStd_Array1OfInteger_1; - TColStd_Array1OfInteger_2: typeof TColStd_Array1OfInteger_2; - TColStd_Array1OfInteger_3: typeof TColStd_Array1OfInteger_3; - TColStd_Array1OfInteger_4: typeof TColStd_Array1OfInteger_4; - TColStd_Array1OfInteger_5: typeof TColStd_Array1OfInteger_5; - TColStd_Array1OfReal: typeof TColStd_Array1OfReal; - TColStd_Array1OfReal_1: typeof TColStd_Array1OfReal_1; - TColStd_Array1OfReal_2: typeof TColStd_Array1OfReal_2; - TColStd_Array1OfReal_3: typeof TColStd_Array1OfReal_3; - TColStd_Array1OfReal_4: typeof TColStd_Array1OfReal_4; - TColStd_Array1OfReal_5: typeof TColStd_Array1OfReal_5; - TColgp_Array1OfDir: typeof TColgp_Array1OfDir; - TColgp_Array1OfDir_1: typeof TColgp_Array1OfDir_1; - TColgp_Array1OfDir_2: typeof TColgp_Array1OfDir_2; - TColgp_Array1OfDir_3: typeof TColgp_Array1OfDir_3; - TColgp_Array1OfDir_4: typeof TColgp_Array1OfDir_4; - TColgp_Array1OfDir_5: typeof TColgp_Array1OfDir_5; - TColgp_Array1OfPnt: typeof TColgp_Array1OfPnt; - TColgp_Array1OfPnt_1: typeof TColgp_Array1OfPnt_1; - TColgp_Array1OfPnt_2: typeof TColgp_Array1OfPnt_2; - TColgp_Array1OfPnt_3: typeof TColgp_Array1OfPnt_3; - TColgp_Array1OfPnt_4: typeof TColgp_Array1OfPnt_4; - TColgp_Array1OfPnt_5: typeof TColgp_Array1OfPnt_5; - TColgp_Array1OfVec: typeof TColgp_Array1OfVec; - TColgp_Array1OfVec_1: typeof TColgp_Array1OfVec_1; - TColgp_Array1OfVec_2: typeof TColgp_Array1OfVec_2; - TColgp_Array1OfVec_3: typeof TColgp_Array1OfVec_3; - TColgp_Array1OfVec_4: typeof TColgp_Array1OfVec_4; - TColgp_Array1OfVec_5: typeof TColgp_Array1OfVec_5; - TColgp_Array2OfPnt: typeof TColgp_Array2OfPnt; - TColgp_Array2OfPnt_1: typeof TColgp_Array2OfPnt_1; - TColgp_Array2OfPnt_2: typeof TColgp_Array2OfPnt_2; - TColgp_Array2OfPnt_3: typeof TColgp_Array2OfPnt_3; - TColgp_Array2OfPnt_4: typeof TColgp_Array2OfPnt_4; - TColgp_Array2OfPnt_5: typeof TColgp_Array2OfPnt_5; - TopAbs_Orientation: TopAbs_Orientation; - TopAbs_ShapeEnum: TopAbs_ShapeEnum; - TopExp: typeof TopExp; - TopExp_Explorer: typeof TopExp_Explorer; - TopExp_Explorer_1: typeof TopExp_Explorer_1; - TopExp_Explorer_2: typeof TopExp_Explorer_2; - TopLoc_Location: typeof TopLoc_Location; - TopLoc_Location_1: typeof TopLoc_Location_1; - TopLoc_Location_2: typeof TopLoc_Location_2; - TopLoc_Location_3: typeof TopLoc_Location_3; - TopTools_IndexedDataMapOfShapeListOfShape: typeof TopTools_IndexedDataMapOfShapeListOfShape; - TopTools_IndexedDataMapOfShapeListOfShape_1: typeof TopTools_IndexedDataMapOfShapeListOfShape_1; - TopTools_IndexedDataMapOfShapeListOfShape_2: typeof TopTools_IndexedDataMapOfShapeListOfShape_2; - TopTools_IndexedDataMapOfShapeListOfShape_3: typeof TopTools_IndexedDataMapOfShapeListOfShape_3; - TopTools_IndexedMapOfShape: typeof TopTools_IndexedMapOfShape; - TopTools_IndexedMapOfShape_1: typeof TopTools_IndexedMapOfShape_1; - TopTools_IndexedMapOfShape_2: typeof TopTools_IndexedMapOfShape_2; - TopTools_IndexedMapOfShape_3: typeof TopTools_IndexedMapOfShape_3; - TopTools_ListOfShape: typeof TopTools_ListOfShape; - TopTools_ListOfShape_1: typeof TopTools_ListOfShape_1; - TopTools_ListOfShape_2: typeof TopTools_ListOfShape_2; - TopTools_ListOfShape_3: typeof TopTools_ListOfShape_3; - TopTools_SequenceOfShape: typeof TopTools_SequenceOfShape; - TopTools_SequenceOfShape_1: typeof TopTools_SequenceOfShape_1; - TopTools_SequenceOfShape_2: typeof TopTools_SequenceOfShape_2; - TopTools_SequenceOfShape_3: typeof TopTools_SequenceOfShape_3; - TopoDS: typeof TopoDS; - TopoDS_Builder: typeof TopoDS_Builder; - TopoDS_CompSolid: typeof TopoDS_CompSolid; - TopoDS_Compound: typeof TopoDS_Compound; - TopoDS_Edge: typeof TopoDS_Edge; - TopoDS_Face: typeof TopoDS_Face; - TopoDS_Shape: typeof TopoDS_Shape; - TopoDS_Shell: typeof TopoDS_Shell; - TopoDS_Solid: typeof TopoDS_Solid; - TopoDS_Vertex: typeof TopoDS_Vertex; - TopoDS_Wire: typeof TopoDS_Wire; - XSControl_Reader: typeof XSControl_Reader; - XSControl_Reader_1: typeof XSControl_Reader_1; - XSControl_Reader_2: typeof XSControl_Reader_2; - XSControl_Reader_3: typeof XSControl_Reader_3; - gp_Ax1: typeof gp_Ax1; - gp_Ax1_1: typeof gp_Ax1_1; - gp_Ax1_2: typeof gp_Ax1_2; - gp_Ax2: typeof gp_Ax2; - gp_Ax2_1: typeof gp_Ax2_1; - gp_Ax2_2: typeof gp_Ax2_2; - gp_Ax2_3: typeof gp_Ax2_3; - gp_Ax3: typeof gp_Ax3; - gp_Ax3_1: typeof gp_Ax3_1; - gp_Ax3_2: typeof gp_Ax3_2; - gp_Ax3_3: typeof gp_Ax3_3; - gp_Ax3_4: typeof gp_Ax3_4; - gp_Circ: typeof gp_Circ; - gp_Circ_1: typeof gp_Circ_1; - gp_Circ_2: typeof gp_Circ_2; - gp_Cylinder: typeof gp_Cylinder; - gp_Cylinder_1: typeof gp_Cylinder_1; - gp_Cylinder_2: typeof gp_Cylinder_2; - gp_Dir: typeof gp_Dir; - gp_Dir_1: typeof gp_Dir_1; - gp_Dir_2: typeof gp_Dir_2; - gp_Dir_3: typeof gp_Dir_3; - gp_Dir_4: typeof gp_Dir_4; - gp_Dir2d: typeof gp_Dir2d; - gp_Dir2d_1: typeof gp_Dir2d_1; - gp_Dir2d_2: typeof gp_Dir2d_2; - gp_Dir2d_3: typeof gp_Dir2d_3; - gp_Dir2d_4: typeof gp_Dir2d_4; - gp_Elips: typeof gp_Elips; - gp_Elips_1: typeof gp_Elips_1; - gp_Elips_2: typeof gp_Elips_2; - gp_GTrsf: typeof gp_GTrsf; - gp_GTrsf_1: typeof gp_GTrsf_1; - gp_GTrsf_2: typeof gp_GTrsf_2; - gp_GTrsf_3: typeof gp_GTrsf_3; - gp_Lin: typeof gp_Lin; - gp_Lin_1: typeof gp_Lin_1; - gp_Lin_2: typeof gp_Lin_2; - gp_Lin_3: typeof gp_Lin_3; - gp_Pln: typeof gp_Pln; - gp_Pln_1: typeof gp_Pln_1; - gp_Pln_2: typeof gp_Pln_2; - gp_Pln_3: typeof gp_Pln_3; - gp_Pln_4: typeof gp_Pln_4; - gp_Pnt: typeof gp_Pnt; - gp_Pnt_1: typeof gp_Pnt_1; - gp_Pnt_2: typeof gp_Pnt_2; - gp_Pnt_3: typeof gp_Pnt_3; - gp_Pnt2d: typeof gp_Pnt2d; - gp_Pnt2d_1: typeof gp_Pnt2d_1; - gp_Pnt2d_2: typeof gp_Pnt2d_2; - gp_Pnt2d_3: typeof gp_Pnt2d_3; - gp_Quaternion: typeof gp_Quaternion; - gp_Quaternion_1: typeof gp_Quaternion_1; - gp_Quaternion_2: typeof gp_Quaternion_2; - gp_Quaternion_3: typeof gp_Quaternion_3; - gp_Quaternion_4: typeof gp_Quaternion_4; - gp_Quaternion_5: typeof gp_Quaternion_5; - gp_Quaternion_6: typeof gp_Quaternion_6; - gp_Trsf: typeof gp_Trsf; - gp_Trsf_1: typeof gp_Trsf_1; - gp_Trsf_2: typeof gp_Trsf_2; - gp_Vec: typeof gp_Vec; - gp_Vec_1: typeof gp_Vec_1; - gp_Vec_2: typeof gp_Vec_2; - gp_Vec_3: typeof gp_Vec_3; - gp_Vec_4: typeof gp_Vec_4; - gp_Vec_5: typeof gp_Vec_5; - gp_Vec2d: typeof gp_Vec2d; - gp_Vec2d_1: typeof gp_Vec2d_1; - gp_Vec2d_2: typeof gp_Vec2d_2; - gp_Vec2d_3: typeof gp_Vec2d_3; - gp_Vec2d_4: typeof gp_Vec2d_4; - gp_Vec2d_5: typeof gp_Vec2d_5; - gp_XY: typeof gp_XY; - gp_XY_1: typeof gp_XY_1; - gp_XY_2: typeof gp_XY_2; - gp_XYZ: typeof gp_XYZ; - gp_XYZ_1: typeof gp_XYZ_1; - gp_XYZ_2: typeof gp_XYZ_2; -}; - -declare function init(): Promise; - -export default init; diff --git a/packages/chili-occ/occ-wasm/chili_occ.js b/packages/chili-occ/occ-wasm/chili_occ.js deleted file mode 100644 index 87617034..00000000 --- a/packages/chili-occ/occ-wasm/chili_occ.js +++ /dev/null @@ -1,16 +0,0 @@ - -var Module = (() => { - var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; - if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; - return ( -function(Module) { - Module = Module || {}; - -var Module=typeof Module!="undefined"?Module:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}var fs;var nodePath;var requireNodeFS;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}requireNodeFS=()=>{if(!nodePath){fs=require("fs");nodePath=require("path")}};read_=function shell_read(filename,binary){requireNodeFS();filename=nodePath["normalize"](filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{requireNodeFS();filename=nodePath["normalize"](filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var POINTER_SIZE=4;var tempRet0=0;var setTempRet0=value=>{tempRet0=value};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):undefined;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){{if(Module["onAbort"]){Module["onAbort"](what)}}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="chili_occ.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["oa"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["va"];addOnInit(Module["asm"]["pa"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function OSD_MemInfo_getModuleHeapLength(){return Module.HEAP8.length}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func=="number"){if(callback.arg===undefined){getWasmTableEntry(func)()}else{getWasmTableEntry(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ___cxa_allocate_exception(size){return _malloc(size+24)+24}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return function(){return crypto_module["randomBytes"](1)[0]}}catch(e){}}return function(){abort("randomDevice")}}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{path=PATH_FS.resolve(FS.cwd(),path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(p=>!!p),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{return null}},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(8);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_chmod(path,mode){try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~4352;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}return name}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError("Cannot register type '"+name+"' twice")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":8,"readValueFromPointer":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError("Unknown boolean type size: "+name)}return this["fromWireType"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function attachFinalizer(handle){if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}return getWasmTableEntry(ptr).apply(null,args)}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction)}return fp}var UnboundTypeError=undefined;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+typeof constructor+" which is not a function")}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}};function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(handle){var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":function(destructors,value){return Emval.toHandle(value)},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})}function enumReadValueFromPointer(name,shift,signed){switch(shift){case 0:return function(pointer){var heap=signed?HEAP8:HEAPU8;return this["fromWireType"](heap[pointer])};case 1:return function(pointer){var heap=signed?HEAP16:HEAPU16;return this["fromWireType"](heap[pointer>>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function _embind_repr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;ilengthBytesUTF8(value)}else{getLength=()=>value.length}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;iHEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function __emscripten_date_now(){return Date.now()}var nowIsMonotonic=true;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);HEAP32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}function emval_allocateDestructors(destructorsRef){var destructors=[];HEAP32[destructorsRef>>2]=Emval.toHandle(destructors);return destructors}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol}var emval_methodCallers=[];function __emval_call_method(caller,handle,methodName,destructorsRef,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);return caller(handle,methodName,emval_allocateDestructors(destructorsRef),args)}function emval_get_global(){if(typeof globalThis=="object"){return globalThis}return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return Emval.toHandle(emval_get_global())}else{name=getStringOrSymbol(name);return Emval.toHandle(emval_get_global()[name])}}function emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a}var emval_registeredMethods=[];function __emval_get_method_caller(argCount,argTypes){var types=emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v))}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value}function __emval_take_value(type,argv){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](argv);return Emval.toHandle(v)}function __emval_typeof(handle){handle=Emval.toValue(handle);return Emval.toHandle(typeof handle)}function __localtime_js(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __munmap_js(addr,len,prot,flags,fd,offset){try{var stream=FS.getStream(fd);if(stream){if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}FS.munmap(stream)}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function _tzset_impl(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAP32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function __tzset_js(timezone,daylight,tzname){if(__tzset_js.called)return;__tzset_js.called=true;_tzset_impl(timezone,daylight,tzname)}function _abort(){abort("")}function getHeapMax(){return 2147483648}function _emscripten_get_heap_max(){return getHeapMax()}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=()=>{var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=()=>performance.now();function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _exit(status){exit(status)}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>2]=nameBuf;var aliasesBuf=_malloc(4);HEAPU32[aliasesBuf>>2]=0;HEAPU32[ret+4>>2]=aliasesBuf;var afinet=2;HEAP32[ret+8>>2]=afinet;HEAP32[ret+12>>2]=4;var addrListBuf=_malloc(12);HEAPU32[addrListBuf>>2]=addrListBuf+8;HEAPU32[addrListBuf+4>>2]=0;HEAP32[addrListBuf+8>>2]=inetPton4(DNS.lookup_name(name));HEAPU32[ret+16>>2]=addrListBuf;return ret}function _gethostbyname(name){return getHostByName(UTF8ToString(name))}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){ext["drawBuffersWEBGL"](n,bufs)};return 1}}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"))}var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;function fixedGetContext(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver=="webgl"==gl instanceof WebGLRenderingContext?gl:null}canvas.getContext=fixedGetContext}var ctx=canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault=="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents=="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);{GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes("lose_context")&&!ext.includes("debug")){GLctx.getExtension(ext)}})}};function webglGetLeftBracePos(name){return name.slice(-1)=="]"&&name.lastIndexOf("[")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex0?"["+webglLoc+"]":""))}return webglLoc}else{GL.recordError(1282)}}function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _glUniform2fv(location,count,value){if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}var __miniTempWebGLIntBuffers=[];function _glUniform2iv(location,count,value){if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(webglGetUniformLocation(location),view)}function _glUniform3fv(location,count,value){if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(webglGetUniformLocation(location),view)}function _glUniform3iv(location,count,value){if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(webglGetUniformLocation(location),view)}function _glUniform4fv(location,count,value){if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}function _glUniform4iv(location,count,value){if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var GLctx;var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"ga":OSD_MemInfo_getModuleHeapLength,"k":___assert_fail,"a":___cxa_allocate_exception,"b":___cxa_throw,"R":___syscall_chmod,"S":___syscall_faccessat,"p":___syscall_fcntl64,"L":___syscall_fstat64,"U":___syscall_ioctl,"I":___syscall_lstat64,"J":___syscall_newfstatat,"t":___syscall_openat,"K":___syscall_stat64,"z":__embind_register_bigint,"W":__embind_register_bool,"d":__embind_register_class,"f":__embind_register_class_class_function,"e":__embind_register_class_constructor,"c":__embind_register_class_function,"V":__embind_register_emval,"g":__embind_register_enum,"h":__embind_register_enum_value,"w":__embind_register_float,"j":__embind_register_integer,"i":__embind_register_memory_view,"v":__embind_register_std_string,"q":__embind_register_std_wstring,"X":__embind_register_void,"O":__emscripten_date_now,"N":__emscripten_get_now_is_monotonic,"m":__emval_as,"ka":__emval_call_method,"x":__emval_decref,"la":__emval_get_global,"ja":__emval_get_method_caller,"r":__emval_get_property,"F":__emval_incref,"ia":__emval_new_cstring,"ma":__emval_run_destructors,"n":__emval_set_property,"l":__emval_take_value,"na":__emval_typeof,"P":__localtime_js,"E":__munmap_js,"Q":__tzset_js,"s":_abort,"D":_emscripten_get_heap_max,"M":_emscripten_memcpy_big,"C":_emscripten_resize_heap,"G":_environ_get,"H":_environ_sizes_get,"fa":_exit,"o":_fd_close,"T":_fd_read,"y":_fd_seek,"u":_fd_write,"ha":_gethostbyname,"ea":_glGetUniformLocation,"ca":_glUniform1f,"da":_glUniform1i,"_":_glUniform2fv,"ba":_glUniform2iv,"Z":_glUniform3fv,"aa":_glUniform3iv,"Y":_glUniform4fv,"$":_glUniform4iv,"A":_setTempRet0,"B":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["pa"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["qa"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["ra"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["sa"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["ta"]).apply(null,arguments)};var ___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=function(){return(___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=Module["asm"]["ua"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["wa"]).apply(null,arguments)};var _emscripten_builtin_memalign=Module["_emscripten_builtin_memalign"]=function(){return(_emscripten_builtin_memalign=Module["_emscripten_builtin_memalign"]=Module["asm"]["xa"]).apply(null,arguments)};var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=function(){return(___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=Module["asm"]["ya"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["za"]).apply(null,arguments)};var dynCall_viijii=Module["dynCall_viijii"]=function(){return(dynCall_viijii=Module["dynCall_viijii"]=Module["asm"]["Aa"]).apply(null,arguments)};var dynCall_iiiiij=Module["dynCall_iiiiij"]=function(){return(dynCall_iiiiij=Module["dynCall_iiiiij"]=Module["asm"]["Ba"]).apply(null,arguments)};var dynCall_iiiiijj=Module["dynCall_iiiiijj"]=function(){return(dynCall_iiiiijj=Module["dynCall_iiiiijj"]=Module["asm"]["Ca"]).apply(null,arguments)};var dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=function(){return(dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=Module["asm"]["Da"]).apply(null,arguments)};var dynCall_viiiiji=Module["dynCall_viiiiji"]=function(){return(dynCall_viiiiji=Module["dynCall_viiiiji"]=Module["asm"]["Ea"]).apply(null,arguments)};Module["FS"]=FS;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){EXITSTATUS=status;procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); - - - return Module.ready -} -); -})(); -export default Module; \ No newline at end of file diff --git a/packages/chili-occ/occ-wasm/chili_occ.wasm b/packages/chili-occ/occ-wasm/chili_occ.wasm deleted file mode 100755 index cfc129aa..00000000 Binary files a/packages/chili-occ/occ-wasm/chili_occ.wasm and /dev/null differ diff --git a/packages/chili-occ/occ-wasm/initOpenCascade.js b/packages/chili-occ/occ-wasm/initOpenCascade.js deleted file mode 100644 index 78236d67..00000000 --- a/packages/chili-occ/occ-wasm/initOpenCascade.js +++ /dev/null @@ -1,32 +0,0 @@ -import ocFullJS from "./chili_occ.js"; -import ocFullWasm from "./chili_occ.wasm"; - -const initOpenCascade = ({ - mainJS = ocFullJS, - mainWasm = ocFullWasm, - worker = undefined, - libs = [], - module = {}, -} = {}) => { - return new Promise((resolve, reject) => { - new mainJS({ - locateFile(path) { - if (path.endsWith('.wasm')) { - return mainWasm; - } - if (path.endsWith('.worker.js') && !!worker) { - return worker; - } - return path; - }, - ...module - }).then(async oc => { - for (let lib of libs) { - await oc.loadDynamicLibrary(lib, { loadAsync: true, global: true, nodelete: true, allowUndefined: false }); - } - resolve(oc); - }); - }); -}; - -export default initOpenCascade; diff --git a/packages/chili-occ/package.json b/packages/chili-occ/package.json deleted file mode 100644 index 4206cae6..00000000 --- a/packages/chili-occ/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "chili-occ", - "version": "0.3.0", - "description": "", - "main": "src/index.ts", - "devDependencies": { - "chili-geo": "*", - "opencascade.js": "2.0.0-beta.94e2944" - } -} diff --git a/packages/chili-occ/src/converter/pntConverter.ts b/packages/chili-occ/src/converter/pntConverter.ts deleted file mode 100644 index f49847cb..00000000 --- a/packages/chili-occ/src/converter/pntConverter.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { IConverter, Result } from "chili-core"; -import { gp_Pnt } from "../../occ-wasm/chili_occ"; - -export class PntConverter implements IConverter { - convert(value: gp_Pnt): Result { - return Result.ok(`${value.X()},${value.Y()},${value.Z()}`); - } - convertBack(value: string): Result { - let vs = value - .split(",") - .map((x) => Number(x)) - .filter((x) => !isNaN(x)); - if (vs.length !== 3) { - return Result.err(`${value} convert to XYZ error`); - } - return Result.ok(new occ.gp_Pnt_3(vs[0], vs[1], vs[2])); - } -} diff --git a/packages/chili-occ/src/index.ts b/packages/chili-occ/src/index.ts deleted file mode 100644 index 37f85776..00000000 --- a/packages/chili-occ/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -export * from "./occ"; -export * from "./shapeFactory"; diff --git a/packages/chili-occ/src/occ.ts b/packages/chili-occ/src/occ.ts deleted file mode 100644 index df4f0758..00000000 --- a/packages/chili-occ/src/occ.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import myinit, { OpenCascadeInstance } from "../occ-wasm/chili_occ"; -import mywasm from "../occ-wasm/chili_occ.wasm"; -import init from "../occ-wasm/initOpenCascade"; - -declare global { - var occ: OpenCascadeInstance; -} - -export async function initMyOcc({ worker = undefined, libs = [], module = {} } = {}) { - let oc = await init({ - mainJS: myinit, - mainWasm: mywasm, - worker, - libs, - module, - }); - global.occ = oc; - return oc; -} diff --git a/packages/chili-occ/src/occConverter.ts b/packages/chili-occ/src/occConverter.ts deleted file mode 100644 index 7e5a1427..00000000 --- a/packages/chili-occ/src/occConverter.ts +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { IShape, IShapeConverter, Result, gc } from "chili-core"; -import { OccHelps } from "./occHelps"; -import { OccShape } from "./occShape"; - -export class OccShapeConverter implements IShapeConverter { - convertToBrep(shape: IShape): Result { - if (!(shape instanceof OccShape)) return Result.err("shape is not an OccShape"); - const fileName = "blob.brep"; - const progress = new occ.Message_ProgressRange_1(); - occ.BRepTools.Write_3(shape.shape, fileName, progress); - const file = occ.FS.readFile("/" + fileName, { encoding: "utf8" }); - occ.FS.unlink("/" + fileName); - - progress.delete(); - return Result.ok(file); - } - - convertFromBrep(brep: string): Result { - return gc((c) => { - const fileName = `blob.brep`; - occ.FS.createDataFile("/", fileName, brep, true, true, true); - const progress = c(new occ.Message_ProgressRange_1()); - const builder = c(new occ.BRep_Builder()); - const shape = new occ.TopoDS_Shape(); - occ.BRepTools.Read_2(shape, fileName, builder, progress); - occ.FS.unlink("/" + fileName); - return Result.ok(OccHelps.wrapShape(shape)); - }); - } - - convertToIGES(...shapes: IShape[]): Result { - return gc((c) => { - const fileName = "blob.iges"; - let writer = c(new occ.IGESControl_Writer_1()); - const progress = c(new occ.Message_ProgressRange_1()); - for (const s of shapes) { - if (s instanceof OccShape) { - writer.AddShape(s.shape, progress); - } else { - throw new Error("Unsupported shape type"); - } - } - writer.ComputeModel(); - let success = writer.Write_2(fileName, false); - const file = occ.FS.readFile("/" + fileName, { encoding: "utf8" }); - occ.FS.unlink("/" + fileName); - return success ? Result.ok(file) : Result.err("export IGES error"); - }); - } - - convertFromIGES(data: Uint8Array) { - return this.convertFrom("iges", data); - } - - convertToSTEP(...shapes: IShape[]): Result { - return gc((c) => { - const fileName = "blob.step"; - let writer = c(new occ.STEPControl_Writer_1()); - const progress = c(new occ.Message_ProgressRange_1()); - for (const s of shapes) { - if (s instanceof OccShape) { - let status = writer.Transfer(s.shape, 0 as any, true, progress); - if (status !== occ.IFSelect_ReturnStatus.IFSelect_RetDone) { - return Result.err("Transfer failed"); - } - } else { - return Result.err("Unsupported shape type"); - } - } - let result = writer.Write(fileName); - let stepFileText = occ.FS.readFile("/" + fileName, { encoding: "utf8" }); - occ.FS.unlink("/" + fileName); - if (result === occ.IFSelect_ReturnStatus.IFSelect_RetDone) { - return Result.ok(stepFileText); - } else { - return Result.err("WRITE STEP FILE FAILED."); - } - }); - } - - convertFromSTEP(data: Uint8Array) { - return this.convertFrom("step", data); - } - - /** - * 如果原 IWire 仅由一个 IEdge 组成,则从 IWre 反序列化时,会变为 IEdge。暂时认为不是 bug!!! - * @param format - * @param data - * @returns - */ - private convertFrom(format: "step" | "iges", data: Uint8Array): Result { - return gc((c) => { - const fileName = `blob.${format}`; - let reader = c( - format === "step" ? new occ.STEPControl_Reader_1() : new occ.IGESControl_Reader_1(), - ); - occ.FS.createDataFile("/", fileName, data, true, true, true); - let readResult = reader.ReadFile(fileName); - occ.FS.unlink("/" + fileName); - if (readResult === occ.IFSelect_ReturnStatus.IFSelect_RetDone) { - const progress = c(new occ.Message_ProgressRange_1()); - reader.TransferRoots(progress); - let shapes: IShape[] = []; - for (let i = 1; i <= reader.NbShapes(); i++) { - let shape = reader.Shape(i); - if (shape instanceof occ.TopoDS_Shape) { - shapes.push(OccHelps.wrapShape(shape)); - } - } - return Result.ok(shapes); - } else { - return Result.err(`Cannot load ${format}`); - } - }); - } -} diff --git a/packages/chili-occ/src/occCurve.ts b/packages/chili-occ/src/occCurve.ts deleted file mode 100644 index 27822b8d..00000000 --- a/packages/chili-occ/src/occCurve.ts +++ /dev/null @@ -1,680 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - Continuity, - CurveType, - IBSplineCurve, - IBezierCurve, - IBoundedCurve, - ICircle, - IConic, - ICurve, - IDisposable, - IEdge, - IEllipse, - IGeometry, - IHyperbola, - ILine, - IOffsetCurve, - IParabola, - ITrimmedCurve, - Ray, - XYZ, - gc, -} from "chili-core"; -import { - GCPnts_UniformAbscissa, - GeomAdaptor_Curve, - Geom_BSplineCurve, - Geom_BezierCurve, - Geom_BoundedCurve, - Geom_Circle, - Geom_Conic, - Geom_Curve, - Geom_Ellipse, - Geom_Hyperbola, - Geom_Line, - Geom_OffsetCurve, - Geom_Parabola, - Geom_TrimmedCurve, -} from "../occ-wasm/chili_occ"; -import { OccGeometry } from "./occGeometry"; -import { OccHelps } from "./occHelps"; -import { OccEdge } from "./occShape"; - -export class OccCurve extends OccGeometry implements ICurve, IDisposable { - readonly curveType: CurveType; - - constructor(readonly curve: Geom_Curve) { - super(curve); - this.curveType = OccHelps.getCurveType(curve); - } - - override copy(): IGeometry { - return OccHelps.wrapCurve(this.curve); - } - - makeEdge(): IEdge { - return gc((c) => { - let curve = new occ.Handle_Geom_Curve_2(this.curve); - let builder = c(new occ.BRepBuilderAPI_MakeEdge_24(curve)); - return new OccEdge(builder.Edge()); - }); - } - - nearestExtrema(curve: ICurve | Ray): - | { - isParallel: boolean; - distance: number; - p1: XYZ; - p2: XYZ; - u1: number; - u2: number; - } - | undefined { - return gc((c) => { - if (curve instanceof Ray) { - let pnt = c(OccHelps.toPnt(curve.location)); - let dir = c(OccHelps.toDir(curve.direction)); - curve = c(new OccLine(new occ.Geom_Line_3(pnt, dir))); - } else if (!(curve instanceof OccCurve)) { - throw new Error("nearestFromCurve: curve is not an OccCurve"); - } - - return this.nearestExtremaCurve(curve as OccCurve); - }); - } - - private nearestExtremaCurve(curve: OccCurve) { - return gc((c) => { - let curve1 = new occ.Handle_Geom_Curve_2(this.curve); - let curve2 = new occ.Handle_Geom_Curve_2(curve.curve); - let cc = c(new occ.GeomAPI_ExtremaCurveCurve_2(curve1, curve2)); - if (cc.NbExtrema() === 0) { - return undefined; - } - let distance = cc.LowerDistance(); - let isParallel = cc.IsParallel(); - let u1: any = { current: 0 }; - let u2: any = { current: 0 }; - let p1 = c(new occ.gp_Pnt_1()); - let p2 = c(new occ.gp_Pnt_1()); - cc.NearestPoints(p1, p2); - cc.LowerDistanceParameters(u1, u2); - return { - isParallel, - distance, - p1: OccHelps.toXYZ(p1), - p2: OccHelps.toXYZ(p2), - u1: u1.current, - u2: u2.current, - }; - }); - } - - private adaptorCurve(curve: Geom_Curve) { - let geom_curve = new occ.Handle_Geom_Curve_2(curve); - return new occ.GeomAdaptor_Curve_2(geom_curve); - } - - private uniformAbscissa(ctor: (adaptor: GeomAdaptor_Curve) => GCPnts_UniformAbscissa) { - return gc((c) => { - let adaptor = c(this.adaptorCurve(this.curve)); - let gc = c(ctor(adaptor)); - let points: XYZ[] = []; - if (gc.IsDone()) { - for (let i = 1; i <= gc.NbPoints(); i++) { - let pnt = c(this.curve.Value(gc.Parameter(i))); - points.push(OccHelps.toXYZ(pnt)); - } - } - return points; - }); - } - - uniformAbscissaByLength(length: number): XYZ[] { - return gc((c) => { - return this.uniformAbscissa((adaptor) => - c(new occ.GCPnts_UniformAbscissa_2(adaptor, length, 1e-3)), - ); - }); - } - - uniformAbscissaByCount(curveCount: number): XYZ[] { - return gc((c) => { - return this.uniformAbscissa((adaptor) => - c(new occ.GCPnts_UniformAbscissa_2(adaptor, curveCount + 1, 1e-3)), - ); - }); - } - - length(): number { - return gc((c) => { - let curve = c(this.adaptorCurve(this.curve)); - return occ.GCPnts_AbscissaPoint.Length_1(curve); - }); - } - - trim(u1: number, u2: number): ITrimmedCurve { - let curve = new occ.Handle_Geom_Curve_2(this.curve); - let trimmedCurve = new occ.Geom_TrimmedCurve(curve, u1, u2, true, true); - return new OccTrimmedCurve(trimmedCurve); - } - - reverse() { - this.curve.Reverse(); - } - - reversed(): ICurve { - return OccHelps.wrapCurve(this.curve.Reversed().get()); - } - - isClosed(): boolean { - return this.curve.IsClosed(); - } - - period(): number { - return this.curve.Period(); - } - - isPeriodic(): boolean { - return this.curve.IsPeriodic(); - } - - continutity(): Continuity { - let cni = this.curve.Continuity(); - return OccHelps.convertContinuity(cni); - } - - nearestFromPoint(point: XYZ) { - return gc((c) => { - let api = c( - new occ.GeomAPI_ProjectPointOnCurve_2( - c(OccHelps.toPnt(point)), - new occ.Handle_Geom_Curve_2(this.curve), - ), - ); - if (api.NbPoints() > 0) { - return { - point: OccHelps.toXYZ(c(api.NearestPoint())), - distance: api.LowerDistance(), - parameter: api.LowerDistanceParameter(), - }; - } - - let start = this.value(this.curve.FirstParameter()); - let end = this.value(this.curve.LastParameter()); - let distStart = point.distanceTo(start); - let distEnd = point.distanceTo(end); - if (distStart < distEnd) { - return { - point: start, - distance: distStart, - parameter: this.curve.FirstParameter(), - }; - } else { - return { - point: end, - distance: distEnd, - parameter: this.curve.LastParameter(), - }; - } - }); - } - - value(parameter: number): XYZ { - return gc((c) => { - let p = c(this.curve.Value(parameter)); - return OccHelps.toXYZ(p); - }); - } - - firstParameter() { - return this.curve.FirstParameter(); - } - - lastParameter() { - return this.curve.LastParameter(); - } - - parameter(point: XYZ, tolerance: number): number | undefined { - return gc((c) => { - let parameter: any = { current: 0 }; - if ( - occ.GeomLib_Tool.Parameter_1( - new occ.Handle_Geom_Curve_2(this.curve), - c(OccHelps.toPnt(point)), - tolerance, - parameter, - ) - ) { - return parameter.current; - } - - return undefined; - }); - } - - project(point: XYZ): XYZ[] { - return gc((c) => { - let result = new Array(); - let api = c( - new occ.GeomAPI_ProjectPointOnCurve_2( - c(OccHelps.toPnt(point)), - new occ.Handle_Geom_Curve_2(this.curve), - ), - ); - for (let i = 1; i <= api.NbPoints(); i++) { - let point = c(api.Point(i)); - result.push(OccHelps.toXYZ(point)); - } - - result.sort((a, b) => a.distanceTo(point) - b.distanceTo(point)); - return result; - }); - } - - isCN(n: number): boolean { - return this.curve.IsCN(n); - } - - d0(u: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - this.curve.D0(u, pnt); - return OccHelps.toXYZ(pnt); - }); - } - - d1(u: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let vec = c(new occ.gp_Vec_1()); - this.curve.D1(u, pnt, vec); - return { - point: OccHelps.toXYZ(pnt), - vec: OccHelps.toXYZ(vec), - }; - }); - } - - d2(u: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let vec1 = c(new occ.gp_Vec_1()); - let vec2 = c(new occ.gp_Vec_1()); - this.curve.D2(u, pnt, vec1, vec2); - return { - point: OccHelps.toXYZ(pnt), - vec1: OccHelps.toXYZ(vec1), - vec2: OccHelps.toXYZ(vec2), - }; - }); - } - - d3(u: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let vec1 = c(new occ.gp_Vec_1()); - let vec2 = c(new occ.gp_Vec_1()); - let vec3 = c(new occ.gp_Vec_1()); - this.curve.D3(u, pnt, vec1, vec2, vec3); - return { - point: OccHelps.toXYZ(pnt), - vec1: OccHelps.toXYZ(vec1), - vec2: OccHelps.toXYZ(vec2), - vec3: OccHelps.toXYZ(vec3), - }; - }); - } - - dn(u: number, n: number) { - return gc((c) => { - return OccHelps.toXYZ(c(this.curve.DN(u, n))); - }); - } -} - -export class OccLine extends OccCurve implements ILine { - constructor(private line: Geom_Line) { - super(line); - } - - get direction(): XYZ { - return gc((c) => { - let lin = c(this.lin()); - return OccHelps.toXYZ(c(lin.Direction())); - }); - } - - set direction(value: XYZ) { - gc((c) => { - this.line.SetDirection(c(OccHelps.toDir(value))); - }); - } - - get location(): XYZ { - return gc((c) => { - let lin = c(this.lin()); - return OccHelps.toXYZ(c(lin.Location())); - }); - } - - set location(value: XYZ) { - gc((c) => { - this.line.SetLocation(c(OccHelps.toPnt(value))); - }); - } - - private lin() { - return this.line.Lin(); - } -} - -export class OccConic extends OccCurve implements IConic { - constructor(private conion: Geom_Conic) { - super(conion); - } - get axis(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(c(this.conion.Axis()).Direction())); - }); - } - get xAxis(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(c(this.conion.XAxis()).Direction())); - }); - } - get yAxis(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(c(this.conion.YAxis()).Direction())); - }); - } - eccentricity(): number { - return this.conion.Eccentricity(); - } -} - -export class OccCircle extends OccConic implements ICircle { - constructor(private circle: Geom_Circle) { - super(circle); - } - - get center(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.circle.Location())); - }); - } - - set center(value: XYZ) { - gc((c) => { - this.circle.SetLocation(c(OccHelps.toPnt(value))); - }); - } - - get radius(): number { - return this.circle.Radius(); - } - - set radius(value: number) { - this.circle.SetRadius(value); - } -} - -export class OccEllipse extends OccConic implements IEllipse { - constructor(private ellipse: Geom_Ellipse) { - super(ellipse); - } - - get center(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.ellipse.Location())); - }); - } - set center(value: XYZ) { - gc((c) => { - this.ellipse.SetLocation(c(OccHelps.toPnt(value))); - }); - } - - get focus1(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.ellipse.Focus1()))); - } - get focus2(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.ellipse.Focus2()))); - } - - get majorRadius(): number { - return this.ellipse.MajorRadius(); - } - set majorRadius(value: number) { - this.ellipse.SetMajorRadius(value); - } - - get minorRadius(): number { - return this.ellipse.MinorRadius(); - } - set minorRadius(value: number) { - this.ellipse.SetMinorRadius(value); - } - - area(): number { - return gc((c) => { - return c(this.ellipse.Elips()).Area(); - }); - } -} - -export class OccHyperbola extends OccConic implements IHyperbola { - constructor(private hyperbola: Geom_Hyperbola) { - super(hyperbola); - } - focal(): number { - return this.hyperbola.Focal(); - } - get location(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.hyperbola.Location())); - }); - } - set location(value: XYZ) { - gc((c) => { - this.hyperbola.SetLocation(c(OccHelps.toPnt(value))); - }); - } - - get focus1(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.hyperbola.Focus1()))); - } - get focus2(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.hyperbola.Focus2()))); - } - get majorRadius(): number { - return this.hyperbola.MajorRadius(); - } - set majorRadius(value: number) { - this.hyperbola.SetMajorRadius(value); - } - - get minorRadius(): number { - return this.hyperbola.MinorRadius(); - } - set minorRadius(value: number) { - this.hyperbola.SetMinorRadius(value); - } -} - -export class OccParabola extends OccConic implements IParabola { - constructor(private parabola: Geom_Parabola) { - super(parabola); - } - focal(): number { - return this.parabola.Focal(); - } - - get focus(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.parabola.Focus()))); - } - - get directrix() { - return gc((c) => OccHelps.toXYZ(c(c(this.parabola.Directrix().Location())))); - } -} - -export class OccBoundedCurve extends OccCurve implements IBoundedCurve { - constructor(private boundedCurve: Geom_BoundedCurve) { - super(boundedCurve); - } - - startPoint(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.boundedCurve.StartPoint()))); - } - - endPoint(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.boundedCurve.EndPoint()))); - } -} - -export class OccTrimmedCurve extends OccBoundedCurve implements ITrimmedCurve { - constructor(private trimmedCurve: Geom_TrimmedCurve) { - super(trimmedCurve); - } - - setTrim(u1: number, u2: number): void { - this.trimmedCurve.SetTrim(u1, u2, true, true); - } - - basisCurve(): ICurve { - return OccHelps.wrapCurve(this.trimmedCurve.BasisCurve().get()); - } -} - -export class OccOffsetCurve extends OccCurve implements IOffsetCurve { - constructor(private offsetCurve: Geom_OffsetCurve) { - super(offsetCurve); - } - - basisCurve(): ICurve { - return OccHelps.wrapCurve(this.offsetCurve.BasisCurve().get()); - } - - offset(): number { - return this.offsetCurve.Offset(); - } - - direction(): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.offsetCurve.Direction()))); - } -} - -export class OccBezierCurve extends OccBoundedCurve implements IBezierCurve { - constructor(private bezier: Geom_BezierCurve) { - super(bezier); - } - - weight(index: number): number { - return this.bezier.Weight(index); - } - - insertPoleAfter(index: number, point: XYZ, weight: number | undefined): void { - gc((c) => { - if (weight === undefined) { - this.bezier.InsertPoleAfter_1(index, c(OccHelps.toPnt(point))); - } else { - this.bezier.InsertPoleAfter_2(index, c(OccHelps.toPnt(point)), weight); - } - }); - } - - insertPoleBefore(index: number, point: XYZ, weight: number | undefined): void { - gc((c) => { - if (weight === undefined) { - this.bezier.InsertPoleBefore_1(index, c(OccHelps.toPnt(point))); - } else { - this.bezier.InsertPoleBefore_2(index, c(OccHelps.toPnt(point)), weight); - } - }); - } - - removePole(index: number): void { - this.bezier.RemovePole(index); - } - - setPole(index: number, point: XYZ, weight: number | undefined): void { - gc((c) => { - if (weight === undefined) { - this.bezier.SetPole_1(index, c(OccHelps.toPnt(point))); - } else { - this.bezier.SetPole_2(index, c(OccHelps.toPnt(point)), weight); - } - }); - } - - setWeight(index: number, weight: number): void { - this.setWeight(index, weight); - } - - nbPoles(): number { - return this.bezier.NbPoles(); - } - - pole(index: number): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.bezier.Pole(index)))); - } - - degree(): number { - return this.bezier.Degree(); - } - - poles(): XYZ[] { - return gc((c) => { - let result: XYZ[] = []; - let pls = c(this.bezier.Poles_2()); - for (let i = 1; i <= pls.Length(); i++) { - result.push(OccHelps.toXYZ(c(pls.Value(i)))); - } - return result; - }); - } -} - -export class OccBSplineCurve extends OccBoundedCurve implements IBSplineCurve { - constructor(private bspline: Geom_BSplineCurve) { - super(bspline); - } - nbKnots(): number { - return this.bspline.NbKnots(); - } - knot(index: number): number { - return this.bspline.Knot(index); - } - setKnot(index: number, value: number): void { - this.bspline.SetKnot_1(index, value); - } - nbPoles(): number { - return this.bspline.NbPoles(); - } - pole(index: number): XYZ { - return gc((c) => OccHelps.toXYZ(c(this.bspline.Pole(index)))); - } - poles(): XYZ[] { - return gc((c) => { - let result: XYZ[] = []; - let pls = c(this.bspline.Poles_2()); - for (let i = 1; i <= pls.Length(); i++) { - result.push(OccHelps.toXYZ(c(pls.Value(i)))); - } - return result; - }); - } - weight(index: number): number { - return this.bspline.Weight(index); - } - setWeight(index: number, value: number): void { - this.bspline.SetWeight(index, value); - } - - degree(): number { - return this.bspline.Degree(); - } -} diff --git a/packages/chili-occ/src/occGeometry.ts b/packages/chili-occ/src/occGeometry.ts deleted file mode 100644 index 5c7a98c7..00000000 --- a/packages/chili-occ/src/occGeometry.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { GeometryType, IGeometry } from "chili-core"; -import { Geom_Geometry } from "../occ-wasm/chili_occ"; - -export abstract class OccGeometry implements IGeometry { - private _geometryType: GeometryType; - get geometryType(): GeometryType { - return this._geometryType; - } - constructor(readonly geometry: Geom_Geometry) { - this._geometryType = this.getGeometryType(geometry); - } - - private getGeometryType(geometry: Geom_Geometry) { - let isKind = (type: string) => geometry.IsKind_2(type); - - if (isKind("Geom_Curve")) { - return GeometryType.Curve; - } else if (isKind("Geom_Surface")) { - return GeometryType.Surface; - } - - throw new Error("Unknown geometry type"); - } - - dispose() { - this.geometry.delete(); - } - - abstract copy(): IGeometry; -} diff --git a/packages/chili-occ/src/occHelps.ts b/packages/chili-occ/src/occHelps.ts deleted file mode 100644 index 4ca2713d..00000000 --- a/packages/chili-occ/src/occHelps.ts +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - Continuity, - CurveType, - ICurve, - IShape, - ISurface, - Id, - JoinType, - Matrix4, - Orientation, - Plane, - ShapeType, - SurfaceType, - XYZ, - gc, -} from "chili-core"; -import { - GeomAbs_JoinType, - GeomAbs_Shape, - Geom_BSplineCurve, - Geom_BezierCurve, - Geom_Circle, - Geom_Curve, - Geom_Ellipse, - Geom_Hyperbola, - Geom_Line, - Geom_OffsetCurve, - Geom_Parabola, - Geom_Surface, - Geom_TrimmedCurve, - TopAbs_ShapeEnum, - TopTools_ListOfShape, - TopoDS_Shape, - gp_Ax2, - gp_Ax3, - gp_Dir, - gp_Pln, - gp_Pnt, - gp_Trsf, - gp_Vec, -} from "../occ-wasm/chili_occ"; - -import { - OccBSplineCurve, - OccBezierCurve, - OccCircle, - OccEllipse, - OccHyperbola, - OccLine, - OccOffsetCurve, - OccParabola, - OccTrimmedCurve, -} from "./occCurve"; -import { - OccCompound, - OccCompoundSolid, - OccEdge, - OccFace, - OccShape, - OccShell, - OccSolid, - OccVertex, - OccWire, -} from "./occShape"; -import { - OccBSplineSurface, - OccBezierSurface, - OccCompositeSurface, - OccConicalSurface, - OccCylindricalSurface, - OccOffsetSurface, - OccPlane, - OccPlateSurface, - OccRectangularSurface, - OccSphericalSurface, - OccSurfaceOfLinearExtrusion, - OccSurfaceOfRevolution, - OccToroidalSurface, -} from "./occSurface"; - -export class OccHelps { - static toXYZ(p: gp_Pnt | gp_Dir | gp_Vec): XYZ { - return new XYZ(p.X(), p.Y(), p.Z()); - } - - static toDir(value: XYZ) { - return new occ.gp_Dir_4(value.x, value.y, value.z); - } - - static toPnt(value: XYZ) { - return new occ.gp_Pnt_3(value.x, value.y, value.z); - } - - static toVec(value: XYZ) { - return new occ.gp_Vec_4(value.x, value.y, value.z); - } - - static fromAx23(ax: gp_Ax2 | gp_Ax3): Plane { - return gc((c) => { - return new Plane( - OccHelps.toXYZ(c(ax.Location())), - OccHelps.toXYZ(c(ax.Direction())), - OccHelps.toXYZ(c(ax.XDirection())), - ); - }); - } - - static toAx2(plane: Plane): gp_Ax2 { - return gc((c) => { - return new occ.gp_Ax2_2( - c(OccHelps.toPnt(plane.origin)), - c(OccHelps.toDir(plane.normal)), - c(OccHelps.toDir(plane.xvec)), - ); - }); - } - - static toAx3(plane: Plane): gp_Ax3 { - return gc((c) => { - return new occ.gp_Ax3_3( - c(OccHelps.toPnt(plane.origin)), - c(OccHelps.toDir(plane.normal)), - c(OccHelps.toDir(plane.xvec)), - ); - }); - } - - static fromPln(pln: gp_Pln): Plane { - return gc((c) => { - let ax3 = c(pln.Position()); - return this.fromAx23(ax3); - }); - } - - static toPln(plane: Plane): gp_Pln { - return gc((c) => { - return new occ.gp_Pln_2(c(OccHelps.toAx3(plane))); - }); - } - - static hashCode(shape: TopoDS_Shape) { - return shape.HashCode(2147483647); // max int - } - - static convertFromMatrix(matrix: Matrix4): gp_Trsf { - const arr = matrix.toArray(); - let trsf = new occ.gp_Trsf_1(); - trsf.SetValues( - arr[0], - arr[4], - arr[8], - arr[12], - arr[1], - arr[5], - arr[9], - arr[13], - arr[2], - arr[6], - arr[10], - arr[14], - ); - return trsf; - } - - static convertToMatrix(matrix: gp_Trsf): Matrix4 { - const arr: number[] = [ - matrix.Value(1, 1), - matrix.Value(2, 1), - matrix.Value(3, 1), - 0, - matrix.Value(1, 2), - matrix.Value(2, 2), - matrix.Value(3, 2), - 0, - matrix.Value(1, 3), - matrix.Value(2, 3), - matrix.Value(3, 3), - 0, - matrix.Value(1, 4), - matrix.Value(2, 4), - matrix.Value(3, 4), - 1, - ]; - return Matrix4.fromArray(arr); - } - - static getCurveType(curve: Geom_Curve): CurveType { - let isType = (type: string) => curve.IsInstance_2(type); - if (isType("Geom_Line")) return CurveType.Line; - else if (isType("Geom_Circle")) return CurveType.Circle; - else if (isType("Geom_Ellipse")) return CurveType.Ellipse; - else if (isType("Geom_Hyperbola")) return CurveType.Hyperbola; - else if (isType("Geom_Parabola")) return CurveType.Parabola; - else if (isType("Geom_BezierCurve")) return CurveType.BezierCurve; - else if (isType("Geom_BSplineCurve")) return CurveType.BSplineCurve; - else if (isType("Geom_OffsetCurve")) return CurveType.OffsetCurve; - else if (isType("Geom_TrimmedCurve")) return CurveType.TrimmedCurve; - - throw new Error("Unknown curve type"); - } - - static getSurfaceType(surface: Geom_Surface): SurfaceType { - let isType = (type: string) => surface.IsInstance_2(type); - if (isType("GeomPlate_Surface")) return SurfaceType.Plate; - else if (isType("Geom_Plane")) return SurfaceType.Plane; - else if (isType("Geom_SurfaceOfLinearExtrusion")) return SurfaceType.Extrusion; - else if (isType("Geom_SurfaceOfRevolution")) return SurfaceType.Revolution; - else if (isType("Geom_OffsetSurface")) return SurfaceType.Offset; - else if (isType("Geom_BSplineSurface")) return SurfaceType.BSpline; - else if (isType("Geom_BezierSurface")) return SurfaceType.Bezier; - else if (isType("Geom_CylindricalSurface")) return SurfaceType.Cylinder; - else if (isType("Geom_ConicalSurface")) return SurfaceType.Conical; - else if (isType("Geom_SphericalSurface")) return SurfaceType.Spherical; - else if (isType("Geom_RectangularTrimmedSurface")) return SurfaceType.RectangularTrimmed; - else if (isType("Geom_ToroidalSurface")) return SurfaceType.Toroidal; - else if (isType("ShapeExtent_CompositeSurface")) return SurfaceType.Composite; - - throw new Error("Unknown surface type"); - } - - static getShapeType(shape: TopoDS_Shape): ShapeType { - switch (shape.ShapeType()) { - case occ.TopAbs_ShapeEnum.TopAbs_COMPOUND: - return ShapeType.Compound; - case occ.TopAbs_ShapeEnum.TopAbs_COMPSOLID: - return ShapeType.CompoundSolid; - case occ.TopAbs_ShapeEnum.TopAbs_SOLID: - return ShapeType.Solid; - case occ.TopAbs_ShapeEnum.TopAbs_SHELL: - return ShapeType.Shell; - case occ.TopAbs_ShapeEnum.TopAbs_FACE: - return ShapeType.Face; - case occ.TopAbs_ShapeEnum.TopAbs_WIRE: - return ShapeType.Wire; - case occ.TopAbs_ShapeEnum.TopAbs_EDGE: - return ShapeType.Edge; - case occ.TopAbs_ShapeEnum.TopAbs_VERTEX: - return ShapeType.Vertex; - default: - return ShapeType.Shape; - } - } - - static getOrientation(shape: TopoDS_Shape): Orientation { - switch (shape.Orientation_1()) { - case occ.TopAbs_Orientation.TopAbs_FORWARD: - return Orientation.FORWARD; - case occ.TopAbs_Orientation.TopAbs_REVERSED: - return Orientation.REVERSED; - case occ.TopAbs_Orientation.TopAbs_INTERNAL: - return Orientation.INTERNAL; - case occ.TopAbs_Orientation.TopAbs_EXTERNAL: - return Orientation.EXTERNAL; - default: - return Orientation.FORWARD; - } - } - - static getJoinType(joinType: JoinType) { - switch (joinType) { - case JoinType.arc: - return occ.GeomAbs_JoinType.GeomAbs_Arc as GeomAbs_JoinType; - case JoinType.intersection: - return occ.GeomAbs_JoinType.GeomAbs_Intersection as GeomAbs_JoinType; - case JoinType.tangent: - return occ.GeomAbs_JoinType.GeomAbs_Tangent as GeomAbs_JoinType; - default: - throw new Error("Unknown join type: " + joinType); - } - } - - static getShapeEnum(shapeType: ShapeType): TopAbs_ShapeEnum { - switch (shapeType) { - case ShapeType.Compound: - return occ.TopAbs_ShapeEnum.TopAbs_COMPOUND as TopAbs_ShapeEnum; - case ShapeType.CompoundSolid: - return occ.TopAbs_ShapeEnum.TopAbs_COMPSOLID as TopAbs_ShapeEnum; - case ShapeType.Solid: - return occ.TopAbs_ShapeEnum.TopAbs_SOLID as TopAbs_ShapeEnum; - case ShapeType.Shell: - return occ.TopAbs_ShapeEnum.TopAbs_SHELL as TopAbs_ShapeEnum; - case ShapeType.Face: - return occ.TopAbs_ShapeEnum.TopAbs_FACE as TopAbs_ShapeEnum; - case ShapeType.Wire: - return occ.TopAbs_ShapeEnum.TopAbs_WIRE as TopAbs_ShapeEnum; - case ShapeType.Edge: - return occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum; - case ShapeType.Vertex: - return occ.TopAbs_ShapeEnum.TopAbs_VERTEX as TopAbs_ShapeEnum; - case ShapeType.Shape: - return occ.TopAbs_ShapeEnum.TopAbs_SHAPE as TopAbs_ShapeEnum; - default: - throw new Error("Unknown shape type: " + shapeType); - } - } - - static wrapShape(shape: TopoDS_Shape, id: string = Id.generate()): IShape { - switch (shape.ShapeType()) { - case occ.TopAbs_ShapeEnum.TopAbs_COMPOUND: - return new OccCompound(occ.TopoDS.Compound_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_COMPSOLID: - return new OccCompoundSolid(occ.TopoDS.CompSolid_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_SOLID: - return new OccSolid(occ.TopoDS.Solid_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_SHELL: - return new OccShell(occ.TopoDS.Shell_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_FACE: - return new OccFace(occ.TopoDS.Face_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_WIRE: - return new OccWire(occ.TopoDS.Wire_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_EDGE: - return new OccEdge(occ.TopoDS.Edge_1(shape), id); - case occ.TopAbs_ShapeEnum.TopAbs_VERTEX: - return new OccVertex(occ.TopoDS.Vertex_1(shape), id); - default: - return new OccShape(shape, id); - } - } - - static wrapSurface(surface: Geom_Surface): ISurface { - let isType = (type: string) => surface.IsInstance_2(type); - let actualSurface = surface as any; - if (isType("GeomPlate_Surface")) return new OccPlateSurface(actualSurface); - else if (isType("Geom_Plane")) return new OccPlane(actualSurface); - else if (isType("Geom_SurfaceOfLinearExtrusion")) - return new OccSurfaceOfLinearExtrusion(actualSurface); - else if (isType("Geom_SurfaceOfRevolution")) return new OccSurfaceOfRevolution(actualSurface); - else if (isType("Geom_OffsetSurface")) return new OccOffsetSurface(actualSurface); - else if (isType("Geom_BSplineSurface")) return new OccBSplineSurface(actualSurface); - else if (isType("Geom_BezierSurface")) return new OccBezierSurface(actualSurface); - else if (isType("Geom_CylindricalSurface")) return new OccCylindricalSurface(actualSurface); - else if (isType("Geom_ConicalSurface")) return new OccConicalSurface(actualSurface); - else if (isType("Geom_SphericalSurface")) return new OccSphericalSurface(actualSurface); - else if (isType("Geom_RectangularTrimmedSurface")) return new OccRectangularSurface(actualSurface); - else if (isType("Geom_ToroidalSurface")) return new OccToroidalSurface(actualSurface); - else if (isType("ShapeExtent_CompositeSurface")) return new OccCompositeSurface(actualSurface); - - throw new Error("Unknown surface type: " + surface.DynamicType().Name); - } - - static wrapCurve(curve: Geom_Curve): ICurve { - let isType = (type: string) => curve.IsInstance_2(type); - if (isType("Geom_Line")) return new OccLine(curve as Geom_Line); - else if (isType("Geom_Circle")) return new OccCircle(curve as Geom_Circle); - else if (isType("Geom_Ellipse")) return new OccEllipse(curve as Geom_Ellipse); - else if (isType("Geom_Hyperbola")) return new OccHyperbola(curve as Geom_Hyperbola); - else if (isType("Geom_Parabola")) return new OccParabola(curve as Geom_Parabola); - else if (isType("Geom_BezierCurve")) return new OccBezierCurve(curve as Geom_BezierCurve); - else if (isType("Geom_BSplineCurve")) return new OccBSplineCurve(curve as Geom_BSplineCurve); - else if (isType("Geom_OffsetCurve")) return new OccOffsetCurve(curve as Geom_OffsetCurve); - else if (isType("Geom_TrimmedCurve")) return new OccTrimmedCurve(curve as Geom_TrimmedCurve); - - throw new Error("Unknown curve type: " + curve.DynamicType().Name); - } - - static getActualShape(shape: TopoDS_Shape): TopoDS_Shape { - switch (shape.ShapeType()) { - case occ.TopAbs_ShapeEnum.TopAbs_COMPOUND: - return occ.TopoDS.Compound_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_COMPSOLID: - return occ.TopoDS.CompSolid_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_SOLID: - return occ.TopoDS.Solid_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_SHELL: - return occ.TopoDS.Shell_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_FACE: - return occ.TopoDS.Face_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_WIRE: - return occ.TopoDS.Wire_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_EDGE: - return occ.TopoDS.Edge_1(shape); - case occ.TopAbs_ShapeEnum.TopAbs_VERTEX: - return occ.TopoDS.Vertex_1(shape); - default: - return shape; - } - } - - static convertContinuity(cni: GeomAbs_Shape) { - switch (cni) { - case occ.GeomAbs_Shape.GeomAbs_C0: - return Continuity.C0; - case occ.GeomAbs_Shape.GeomAbs_G1: - return Continuity.G1; - case occ.GeomAbs_Shape.GeomAbs_C1: - return Continuity.C1; - case occ.GeomAbs_Shape.GeomAbs_G2: - return Continuity.G2; - case occ.GeomAbs_Shape.GeomAbs_C2: - return Continuity.C2; - case occ.GeomAbs_Shape.GeomAbs_C3: - return Continuity.C3; - case occ.GeomAbs_Shape.GeomAbs_CN: - return Continuity.CN; - default: - throw new Error("unknown continuity"); - } - } - - static fromArray(shapes: IShape[]): TopTools_ListOfShape { - let listOfShape = new occ.TopTools_ListOfShape_1(); - shapes.forEach((shape) => { - if (!(shape instanceof OccShape)) { - throw new Error("The OCC kernel only supports OCC geometries."); - } - listOfShape.Append_1(shape.shape); - }); - return listOfShape; - } - - static toArray(shapes: TopTools_ListOfShape): IShape[] { - const arr: IShape[] = []; - while (!shapes.IsEmpty()) { - let first = shapes.First_1(); - arr.push(this.wrapShape(first)); - shapes.RemoveFirst(); - } - return arr; - } - - static *mapShapes(shape: TopoDS_Shape, shapeType: TopAbs_ShapeEnum) { - let indexShape = new occ.TopTools_IndexedMapOfShape_1(); - occ.TopExp.MapShapes_1(shape, shapeType, indexShape); - for (let i = 1; i <= indexShape.Extent(); i++) { - const item = indexShape.FindKey(i); - yield this.getActualShape(item); - } - - indexShape.delete(); - } - - static findAncestors(subShape: TopoDS_Shape, from: TopoDS_Shape, ancestorType: TopAbs_ShapeEnum) { - return gc((c) => { - let map = c(new occ.TopTools_IndexedDataMapOfShapeListOfShape_1()); - occ.TopExp.MapShapesAndAncestors(from, subShape.ShapeType(), ancestorType, map); - const index = map.FindIndex(subShape); - let item = c(map.FindFromIndex(index)); - let shapes: TopoDS_Shape[] = []; - while (!item.IsEmpty()) { - shapes.push(this.getActualShape(item.Last_1())); - item.RemoveFirst(); - } - return shapes; - }); - } - - static *iterShapes( - shape: TopoDS_Shape, - shapeType: TopAbs_ShapeEnum, - unique: boolean, - ): IterableIterator { - const explorer = new occ.TopExp_Explorer_2( - shape, - shapeType, - occ.TopAbs_ShapeEnum.TopAbs_SHAPE as TopAbs_ShapeEnum, - ); - const hashes = unique ? new Map() : undefined; - while (explorer.More()) { - const item = this.getActualShape(explorer.Current()); - if (unique) { - const hash = OccHelps.hashCode(item); - if (!hashes!.has(hash)) { - hashes!.set(hash, true); - yield item; - } - } else { - yield item; - } - explorer.Next(); - } - - explorer.delete(); - } -} diff --git a/packages/chili-occ/src/occMesh.ts b/packages/chili-occ/src/occMesh.ts deleted file mode 100644 index 68853b62..00000000 --- a/packages/chili-occ/src/occMesh.ts +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - EdgeMeshData, - EdgeMeshDataBuilder, - FaceMeshData, - FaceMeshDataBuilder, - IShapeMeshData, - MeshDataBuilder, - gc, -} from "chili-core"; -import { - Handle_Poly_Triangulation, - Poly_Triangulation, - TopAbs_Orientation, - TopAbs_ShapeEnum, - TopoDS_Edge, - TopoDS_Face, - gp_Trsf, -} from "../occ-wasm/chili_occ"; - -import { OccHelps } from "./occHelps"; -import { OccShape } from "./occShape"; - -export class OccMesh implements IShapeMeshData { - private maxDeviation: number = 8; - private _lines?: EdgeMeshData; - private _faces?: FaceMeshData; - - constructor(readonly shape: OccShape) { - new occ.BRepMesh_IncrementalMesh_2(shape.shape, 0.1, false, 0.1, false).delete(); - } - - updateMeshShape(): void { - this.updateEdgeMeshShapes(); - this.updateFaceMeshShapes(); - } - - get edges(): EdgeMeshData | undefined { - if (!this._lines) this._lines = this.edgeMeshs(); - return this._lines; - } - - get faces(): FaceMeshData | undefined { - if (!this._faces) this._faces = this.faceMeshs(); - return this._faces; - } - - private edgeMeshs() { - return gc((c) => { - let shapes = OccHelps.iterShapes( - this.shape.shape, - occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum, - true, - ); - let builder = new EdgeMeshDataBuilder(); - for (const e of shapes) { - this.addEdgeMesh(e as TopoDS_Edge, builder); - } - let lines = builder.build(); - if (lines.positions.length === 0) return undefined; - let matrix = OccHelps.convertToMatrix( - c(c(this.shape.shape.Location_1()).Transformation()), - ).invert()!; - lines.positions = matrix.ofPoints(lines.positions); - return lines; - }); - } - - private updateEdgeMeshShapes() { - if (!this._lines) return; - let shapes = OccHelps.iterShapes( - this.shape.shape, - occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum, - true, - ); - let i = 0; - for (const shape of shapes) { - this._lines.groups[i].shape = OccHelps.wrapShape(shape, this._lines.groups[i].shape.id); - i++; - } - } - - private addEdgeMesh(edge: TopoDS_Edge, builder: EdgeMeshDataBuilder) { - gc((c) => { - let adaptorCurve = c(new occ.BRepAdaptor_Curve_2(edge)); - let tangDef = c( - new occ.GCPnts_TangentialDeflection_2( - adaptorCurve, - this.maxDeviation, - 0.1, - 2, - 1.0e-9, - 1.0e-7, - ), - ); - builder.newGroup(); - for (let i = 0; i < tangDef.NbPoints(); i++) { - let vertex = c(tangDef.Value(i + 1)); - builder.addPosition(vertex.X(), vertex.Y(), vertex.Z()); - } - builder.endGroup(OccHelps.wrapShape(edge)); - }); - } - - private faceMeshs() { - return gc((c) => { - let shapes = OccHelps.iterShapes( - this.shape.shape, - occ.TopAbs_ShapeEnum.TopAbs_FACE as TopAbs_ShapeEnum, - true, - ); - let builder = new FaceMeshDataBuilder(); - for (const f of shapes) { - this.addFaceMesh(f as TopoDS_Face, builder); - } - let faces = builder.build(); - if (faces.positions.length === 0) return undefined; - let matrix = OccHelps.convertToMatrix( - c(c(this.shape.shape.Location_1()).Transformation()), - ).invert()!; - faces.positions = matrix.ofPoints(faces.positions); - faces.normals = matrix.ofVectors(faces.normals); - return faces; - }); - } - - private updateFaceMeshShapes() { - if (!this._faces) return; - let shapes = OccHelps.iterShapes( - this.shape.shape, - occ.TopAbs_ShapeEnum.TopAbs_FACE as TopAbs_ShapeEnum, - true, - ); - let i = 0; - for (const shape of shapes) { - this._faces.groups[i].shape = OccHelps.wrapShape(shape, this._faces.groups[i].shape.id); - i++; - } - } - - private addFaceMesh(face: TopoDS_Face, builder: FaceMeshDataBuilder) { - gc((c) => { - builder.newGroup(); - let location = c(new occ.TopLoc_Location_1()); - let handlePoly = c(occ.BRep_Tool.Triangulation(face, location, 0)); - if (handlePoly.IsNull()) return undefined; - let poly = handlePoly.get(); - let trsf = c(location.Transformation()); - this.addNodes(poly, trsf, builder); - this.addUVs(poly, builder); - this.addTriangles(poly, face.Orientation_1(), builder); - this.addNormals(handlePoly, trsf, face, poly.NbNodes(), builder); - builder.endGroup(OccHelps.wrapShape(face)); - }); - } - - private addTriangles( - poly: Poly_Triangulation, - orientation: TopAbs_Orientation, - builder: FaceMeshDataBuilder, - ) { - gc((c) => { - for (let index = 1; index <= poly.NbTriangles(); index++) { - let triangle = c(poly.Triangle(index)); - let [c1, c2, c3] = [triangle.Value(1) - 1, triangle.Value(2) - 1, triangle.Value(3) - 1]; - if (orientation === occ.TopAbs_Orientation.TopAbs_REVERSED) { - builder.addIndices(c2, c1, c3); - } else { - builder.addIndices(c1, c2, c3); - } - } - }); - } - - private addUVs(poly: Poly_Triangulation, builder: FaceMeshDataBuilder) { - gc((c) => { - let us = [], - vs = []; - for (let index = 1; index <= poly.NbNodes(); index++) { - us.push(c(poly.UVNode(index)).X()); - vs.push(c(poly.UVNode(index)).Y()); - } - let minU = Math.min(...us), - maxU = Math.max(...us); - let minV = Math.min(...vs), - maxV = Math.max(...vs); - for (let index = 0; index < us.length; index++) { - builder.addUV((us[index] - minU) / (maxU - minU), (vs[index] - minV) / (maxV - minV)); - } - }); - } - - private addNodes(poly: Poly_Triangulation, transform: gp_Trsf, builder: MeshDataBuilder) { - gc((c) => { - for (let index = 1; index <= poly.NbNodes(); index++) { - const pnt = c(c(poly.Node(index)).Transformed(transform)); - builder.addPosition(pnt.X(), pnt.Y(), pnt.Z()); - } - }); - } - - private addNormals( - poly: Handle_Poly_Triangulation, - transform: gp_Trsf, - face: TopoDS_Face, - length: number, - builder: FaceMeshDataBuilder, - ) { - gc((c) => { - let array = c(new occ.TColgp_Array1OfDir_2(1, length)); - let pc = c(new occ.Poly_Connect_2(poly)); - occ.StdPrs_ToolTriangulatedShape.Normal(face, pc, array); - for (let i = 0; i < length; i++) { - let normal = c(c(array.Value(i + 1)).Transformed(transform)); - builder.addNormal(normal.X(), normal.Y(), normal.Z()); - } - }); - } -} diff --git a/packages/chili-occ/src/occShape.ts b/packages/chili-occ/src/occShape.ts deleted file mode 100644 index 4ae078ef..00000000 --- a/packages/chili-occ/src/occShape.ts +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - ICompound, - ICompoundSolid, - ICurve, - IEdge, - IFace, - IShape, - IShapeMeshData, - IShell, - ISolid, - ISurface, - ITrimmedCurve, - IVertex, - IWire, - Id, - JoinType, - Matrix4, - Orientation, - Plane, - Ray, - Result, - SerializedProperties, - Serializer, - ShapeType, - XYZ, - gc, -} from "chili-core"; -import { TopoDS_Edge, TopoDS_Face, TopoDS_Shape, TopoDS_Vertex, TopoDS_Wire } from "../occ-wasm/chili_occ"; - -import { OccShapeConverter } from "./occConverter"; -import { OccCurve, OccTrimmedCurve } from "./occCurve"; -import { OccHelps } from "./occHelps"; -import { OccMesh } from "./occMesh"; -import { OccSurface } from "./occSurface"; - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccShape implements IShape { - readonly shapeType: ShapeType; - - private _id: string; - get id() { - return this._id; - } - - protected _shape: TopoDS_Shape; - get shape() { - return this._shape; - } - - protected _mesh: IShapeMeshData | undefined; - get mesh(): IShapeMeshData { - if (this._mesh === undefined) { - this._mesh = new OccMesh(this); - } - return this._mesh; - } - - constructor(shape: TopoDS_Shape, id?: string) { - this._id = id ?? Id.generate(); - this._shape = shape; - this.shapeType = OccHelps.getShapeType(shape); - } - dispose(): void { - this._shape.delete(); - this._shape = null as any; - } - - isNull(): boolean { - return occ.BOPTools_AlgoTools3D.IsEmptyShape(this.shape); - } - - isClosed(): boolean { - return occ.BRep_Tool.IsClosed_1(this.shape); - } - - section(shape: IShape | Plane): IShape { - return gc((c) => { - if (shape instanceof OccShape) { - let s = c(new occ.BRepAlgoAPI_Section_3(this.shape, shape.shape, true)); - return OccHelps.wrapShape(s.Shape()); - } else if (shape instanceof Plane) { - let pln = c(OccHelps.toPln(shape)); - let s = c(new occ.BRepAlgoAPI_Section_5(this.shape, pln, true)); - return OccHelps.wrapShape(s.Shape()); - } - - throw new Error("Invalid section"); - }); - } - - get matrix() { - return gc((c) => { - return OccHelps.convertToMatrix(c(c(this.shape.Location_1()).Transformation())); - }); - } - - set matrix(value: Matrix4) { - gc((c) => { - let trsf = c(OccHelps.convertFromMatrix(value)); - this.shape.Location_2(c(new occ.TopLoc_Location_2(trsf)), false); - this._mesh?.updateMeshShape(); - }); - } - - static serialize(target: OccShape): SerializedProperties { - return { - shape: new OccShapeConverter().convertToBrep(target).ok(), - id: target.id, - }; - } - - static deserialize(shape: string, id: string) { - let tshape = new OccShapeConverter().convertFromBrep(shape).ok() as OccShape; - tshape._id = id; - return tshape; - } - - findAncestor(ancestorType: ShapeType, fromShape: IShape): IShape[] { - if (!(fromShape instanceof OccShape)) { - throw new Error(`${fromShape} is not an OccShape`); - } - let occType = OccHelps.getShapeEnum(ancestorType); - return OccHelps.findAncestors(this.shape, fromShape.shape, occType).map((x) => - OccHelps.wrapShape(x), - ); - } - - findSubShapes(shapeType: ShapeType): IShape[] { - let result = new Array(); - let iter = OccHelps.mapShapes(this.shape, OccHelps.getShapeEnum(shapeType)); - for (const it of iter) { - result.push(OccHelps.wrapShape(it)); - } - - return result; - } - - orientation(): Orientation { - return OccHelps.getOrientation(this._shape); - } - - isPartner(other: IShape): boolean { - if (other instanceof OccShape) return this.shape.IsPartner(other.shape); - return false; - } - - isSame(other: IShape): boolean { - if (other instanceof OccShape) return this.shape.IsSame(other.shape); - return false; - } - - isEqual(other: IShape): boolean { - if (other instanceof OccShape) return this.shape.IsEqual(other.shape); - return false; - } - - split(edges: (IEdge | IWire)[]): IShape { - return gc((c) => { - let shapes = c(new occ.TopTools_SequenceOfShape_1()); - edges.forEach((shape) => { - shapes.Append_1((shape as unknown as OccShape).shape); - }); - - let spliter = c(new occ.BRepFeat_SplitShape_2(this.shape)); - spliter.Add_1(shapes); - let message = c(new occ.Message_ProgressRange_1()); - spliter.Build(message); - if (!spliter.IsDone()) { - throw new Error("Failed to split shape"); - } - return OccHelps.wrapShape(spliter.Shape()); - }); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccVertex extends OccShape implements IVertex { - constructor(shape: TopoDS_Vertex, id?: string) { - super(shape, id); - } - - point() { - return gc((c) => { - let pnt = c(occ.BRep_Tool.Pnt(this.shape)); - return OccHelps.toXYZ(pnt); - }); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccEdge extends OccShape implements IEdge { - constructor(shape: TopoDS_Edge, id?: string) { - super(shape, id); - } - - update(curve: ICurve) { - gc((c) => { - if (!(curve instanceof OccCurve)) { - throw new Error("Invalid curve"); - } - let builder = c(new occ.BRepBuilderAPI_MakeEdge_24(new occ.Handle_Geom_Curve_2(curve.curve))); - this._shape = builder.Edge(); - this._mesh = undefined; - }); - } - - trim(start: number, end: number): IEdge { - return gc((c) => { - let s: any = { current: 0 }; - let e: any = { current: 0 }; - let curve = c(occ.BRep_Tool.Curve_2(this.shape, s, e)); - let edge = c(new occ.BRepBuilderAPI_MakeEdge_25(curve, start, end)); - return new OccEdge(edge.Edge()); - }); - } - - intersect(other: IEdge | Ray): { parameter: number; point: XYZ }[] { - return gc((c) => { - if (other instanceof Ray) { - let start = c(OccHelps.toPnt(other.location)); - let end = c(OccHelps.toPnt(other.location.add(other.direction.multiply(1e22)))); - let shape = c(new occ.BRepBuilderAPI_MakeEdge_3(start, end)); - return this.intersectToEdge(c(shape.Edge())); - } - if (other instanceof OccEdge) { - return this.intersectToEdge(other.shape); - } - console.warn("不支持的类型"); - return []; - }); - } - - private intersectToEdge(edge: TopoDS_Edge) { - return gc((c) => { - let cc = c(new occ.BRepExtrema_ExtCC_2(this.shape, edge)); - if (!cc.IsDone() || cc.NbExt() === 0 || cc.IsParallel()) { - return []; - } - - let result = []; - for (let i = 1; i <= cc.NbExt(); i++) { - if (cc.SquareDistance(i) <= occ.Precision.Confusion()) { - result.push({ - parameter: cc.ParameterOnE1(i), - point: OccHelps.toXYZ(c(cc.PointOnE1(i))), - }); - } - } - return result; - }); - } - - length(): number { - return gc((c) => { - let curve = c(new occ.BRepAdaptor_Curve_2(this.shape)); - return occ.GCPnts_AbscissaPoint.Length_3(curve, occ.Precision.Confusion()); - }); - } - - offset(distance: number, dir: XYZ): Result { - return gc((c) => { - let s: any = { current: 0 }; - let e: any = { current: 0 }; - let curve = occ.BRep_Tool.Curve_2(this.shape, s, e); - let trimmedCurve = new occ.Handle_Geom_Curve_2( - new occ.Geom_TrimmedCurve(curve, s.current, e.current, true, true), - ); - let brepOffset = new occ.Geom_OffsetCurve(trimmedCurve, distance, OccHelps.toDir(dir), true); - let offsetCurve = new occ.Handle_Geom_Curve_2(brepOffset); - let edge = c(new occ.BRepBuilderAPI_MakeEdge_24(offsetCurve)); - return Result.ok(new OccEdge(edge.Edge())); - }); - } - - curve(): ITrimmedCurve { - let s: any = { current: 0 }; - let e: any = { current: 0 }; - let curve = occ.BRep_Tool.Curve_2(this.shape, s, e); - return new OccTrimmedCurve(new occ.Geom_TrimmedCurve(curve, s.current, e.current, true, true)); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccWire extends OccShape implements IWire { - constructor(shape: TopoDS_Wire, id?: string) { - super(shape, id); - } - - offset(distance: number, joinType: JoinType): Result { - return gc((c) => { - let brepOffset = c( - new occ.BRepOffsetAPI_MakeOffset_3(this.shape, OccHelps.getJoinType(joinType), false), - ); - try { - brepOffset.Perform(distance, 0.0); - } catch (e) { - console.error(e); - - return Result.err("Offset error"); - } - return Result.ok(OccHelps.wrapShape(brepOffset.Shape())); - }); - } - - toFace(): Result { - return gc((c) => { - let make = c(new occ.BRepBuilderAPI_MakeFace_15(this.shape, true)); - if (make.IsDone()) { - return Result.ok(new OccFace(make.Face())); - } - return Result.err("Wire to face error"); - }); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccFace extends OccShape implements IFace { - constructor(shape: TopoDS_Face, id?: string) { - super(shape, id); - } - - segmentsOfEdgeOnFace(edge: IEdge): { start: number; end: number } | undefined { - let first: any = { current: 0 }; - let last: any = { current: 0 }; - if ( - occ.BRep_Tool.CurveOnSurface_1(this.shape, (edge as OccEdge).shape, first, last, false).IsNull() - ) { - return undefined; - } - - return { - start: first.current, - end: last.current, - }; - } - - normal(u: number, v: number): [point: XYZ, normal: XYZ] { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let dir = c(new occ.gp_Vec_1()); - let a = c(new occ.BRepGProp_Face_2(this.shape, false)); - a.Normal(u, v, pnt, dir); - return [OccHelps.toXYZ(pnt), OccHelps.toXYZ(dir).normalize()!]; - }); - } - - outerWire(): IWire { - let wire = occ.ShapeAnalysis.OuterWire(this.shape); - return new OccWire(wire); - } - - update(surface: ISurface) { - if (!(surface instanceof OccSurface)) { - return Result.err("Invalid surface"); - } - let builder = new occ.BRepBuilderAPI_MakeFace_8( - new occ.Handle_Geom_Surface_2(surface.surface), - 1e-3, - ); - this._shape = builder.Face(); - this._mesh = undefined; - builder.delete(); - } - - surface(): ISurface { - let surface = occ.BRep_Tool.Surface_2(this.shape); - return OccHelps.wrapSurface(surface.get()); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccShell extends OccShape implements IShell {} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccSolid extends OccShape implements ISolid {} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccCompound extends OccShape implements ICompound { - static fromShapes(...shapes: IShape[]): Result { - let compound = new occ.TopoDS_Compound(); - let builder = new occ.BRep_Builder(); - builder.MakeCompound(compound); - for (let shape of shapes) { - if (shape instanceof OccShape) { - builder.Add(compound, shape.shape); - } - } - builder.delete(); - return Result.ok(new OccCompound(compound)); - } -} - -@Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) -export class OccCompoundSolid extends OccShape implements ICompoundSolid {} diff --git a/packages/chili-occ/src/occSurface.ts b/packages/chili-occ/src/occSurface.ts deleted file mode 100644 index ea0f1895..00000000 --- a/packages/chili-occ/src/occSurface.ts +++ /dev/null @@ -1,544 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - Continuity, - IBSplineSurface, - IBezierSurface, - IBoundedSurface, - ICompositeSurface, - IConicalSurface, - ICurve, - ICylindricalSurface, - IElementarySurface, - IGeometry, - IOffsetSurface, - IPlaneSurface, - IPlateSurface, - IRectangularTrimmedSurface, - ISphericalSurface, - ISurface, - ISurfaceOfLinearExtrusion, - ISurfaceOfRevolution, - ISweptSurface, - IToroidalSurface, - Plane, - XYZ, - gc, -} from "chili-core"; -import { - Extrema_ExtAlgo, - GeomPlate_Surface, - Geom_BSplineSurface, - Geom_BezierSurface, - Geom_ConicalSurface, - Geom_CylindricalSurface, - Geom_ElementarySurface, - Geom_OffsetSurface, - Geom_Plane, - Geom_RectangularTrimmedSurface, - Geom_SphericalSurface, - Geom_Surface, - Geom_SurfaceOfLinearExtrusion, - Geom_SurfaceOfRevolution, - Geom_SweptSurface, - Geom_ToroidalSurface, - ShapeExtend_CompositeSurface, -} from "../occ-wasm/chili_occ"; -import { OccCurve } from "./occCurve"; -import { OccGeometry } from "./occGeometry"; -import { OccHelps } from "./occHelps"; -import { OccFace } from "./occShape"; - -export class OccSurface extends OccGeometry implements ISurface { - constructor(readonly surface: Geom_Surface) { - super(surface); - } - - override copy(): IGeometry { - return OccHelps.wrapSurface(this.surface); - } - - projectCurve(curve: ICurve): ICurve | undefined { - if (!(curve instanceof OccCurve)) return undefined; - let surface = new occ.Handle_Geom_Surface_2(this.surface); - let testCurve = new occ.Handle_Geom_Curve_2(curve.curve); - let result = occ.GeomProjLib.Project(testCurve, surface); - if (result.IsNull()) return undefined; - return OccHelps.wrapCurve(result.get()); - } - - project(point: XYZ): XYZ[] { - return gc((c) => { - let api = c( - new occ.GeomAPI_ProjectPointOnSurf_2( - c(OccHelps.toPnt(point)), - new occ.Handle_Geom_Surface_2(this.surface), - occ.Extrema_ExtAlgo.Extrema_ExtAlgo_Grad as Extrema_ExtAlgo, - ), - ); - - let result = new Array(); - for (let i = 1; i <= api.NbPoints(); i++) { - let point = c(api.Point(i)); - result.push(OccHelps.toXYZ(point)); - } - result.sort((a, b) => a.distanceTo(point) - b.distanceTo(point)); - return result; - }); - } - - isPlanar(): boolean { - return gc((c) => { - let surface = new occ.Handle_Geom_Surface_2(this.surface); - let lib = c(new occ.GeomLib_IsPlanarSurface(surface, 1e-7)); - return lib.IsPlanar(); - }); - } - - parameter(point: XYZ, maxDistance: number): { u: number; v: number } | undefined { - return gc((c) => { - let u: any = { current: 0 }; - let v: any = { current: 0 }; - if ( - occ.GeomLib_Tool.Parameters( - new occ.Handle_Geom_Surface_2(this.surface), - c(OccHelps.toPnt(point)), - maxDistance, - u, - v, - ) - ) { - return { - u: u.current, - v: v.current, - }; - } - - return undefined; - }); - } - - nearestPoint(point: XYZ): [XYZ, number] | undefined { - return gc((c) => { - let api = c( - new occ.GeomAPI_ProjectPointOnSurf_2( - c(OccHelps.toPnt(point)), - new occ.Handle_Geom_Surface_2(this.surface), - occ.Extrema_ExtAlgo.Extrema_ExtAlgo_Grad as Extrema_ExtAlgo, - ), - ); - if (api.IsDone()) { - return [OccHelps.toXYZ(c(api.NearestPoint())), api.LowerDistance()]; - } - return undefined; - }); - } - - continuity(): Continuity { - return OccHelps.convertContinuity(this.surface.Continuity()); - } - - uIso(u: number): ICurve { - let curve = this.surface.UIso(u); - return OccHelps.wrapCurve(curve.get()); - } - vIso(v: number): ICurve { - let curve = this.surface.VIso(v); - return OccHelps.wrapCurve(curve.get()); - } - isUClosed(): boolean { - return this.surface.IsUClosed(); - } - isVClosed(): boolean { - return this.surface.IsVClosed(); - } - isUPreiodic(): boolean { - return this.surface.IsUPeriodic(); - } - isVPreiodic(): boolean { - return this.surface.IsVPeriodic(); - } - vPeriod(): number { - return this.surface.VPeriod(); - } - uPeriod(): number { - return this.surface.UPeriod(); - } - bounds() { - let u1: any = { current: 0 }; - let u2: any = { current: 0 }; - let v1: any = { current: 0 }; - let v2: any = { current: 0 }; - this.surface.Bounds(u1, u2, v1, v2); - return { - u1: u1.current, - u2: u2.current, - v1: v1.current, - v2: v2.current, - }; - } - isCNu(n: number): boolean { - return this.surface.IsCNu(n); - } - isCNv(n: number): boolean { - return this.surface.IsCNv(n); - } - d0(u: number, v: number): XYZ { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - this.surface.D0(u, v, pnt); - return OccHelps.toXYZ(pnt); - }); - } - d1( - u: number, - v: number, - ): { - point: XYZ; - d1u: XYZ; - d1v: XYZ; - } { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let d1u = c(new occ.gp_Vec_1()); - let d1v = c(new occ.gp_Vec_1()); - this.surface.D1(u, v, pnt, d1u, d1v); - return { - point: OccHelps.toXYZ(pnt), - d1u: OccHelps.toXYZ(d1u), - d1v: OccHelps.toXYZ(d1v), - }; - }); - } - d2(u: number, v: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let d1u = c(new occ.gp_Vec_1()); - let d1v = c(new occ.gp_Vec_1()); - let d2u = c(new occ.gp_Vec_1()); - let d2v = c(new occ.gp_Vec_1()); - let d2uv = c(new occ.gp_Vec_1()); - this.surface.D2(u, v, pnt, d1u, d1v, d2u, d2v, d2uv); - - return { - point: OccHelps.toXYZ(pnt), - d1u: OccHelps.toXYZ(d1u), - d1v: OccHelps.toXYZ(d1v), - d2u: OccHelps.toXYZ(d2u), - d2v: OccHelps.toXYZ(d2v), - d2uv: OccHelps.toXYZ(d2uv), - }; - }); - } - d3(u: number, v: number) { - return gc((c) => { - let pnt = c(new occ.gp_Pnt_1()); - let d1u = c(new occ.gp_Vec_1()); - let d1v = c(new occ.gp_Vec_1()); - let d2u = c(new occ.gp_Vec_1()); - let d2v = c(new occ.gp_Vec_1()); - let d2uv = c(new occ.gp_Vec_1()); - let d3u = c(new occ.gp_Vec_1()); - let d3v = c(new occ.gp_Vec_1()); - let d3uuv = c(new occ.gp_Vec_1()); - let d3uvv = c(new occ.gp_Vec_1()); - this.surface.D3(u, v, pnt, d1u, d1v, d2u, d2v, d2uv, d3u, d3v, d3uuv, d3uvv); - - return { - point: OccHelps.toXYZ(pnt), - d1u: OccHelps.toXYZ(d1u), - d1v: OccHelps.toXYZ(d1v), - d2u: OccHelps.toXYZ(d2u), - d2v: OccHelps.toXYZ(d2v), - d2uv: OccHelps.toXYZ(d2uv), - d3u: OccHelps.toXYZ(d3u), - d3v: OccHelps.toXYZ(d3v), - d3uuv: OccHelps.toXYZ(d3uuv), - d3uvv: OccHelps.toXYZ(d3uvv), - }; - }); - } - dn(u: number, v: number, nu: number, nv: number): XYZ { - return gc((c) => { - let vec = c(this.surface.DN(u, v, nu, nv)); - return OccHelps.toXYZ(vec); - }); - } - value(u: number, v: number): XYZ { - return gc((c) => { - let pnt = c(this.surface.Value(u, v)); - return OccHelps.toXYZ(pnt); - }); - } - makeFace() { - return gc((c) => { - let surface = c(new occ.Handle_Geom_Surface_2(this.surface)); - let builder = c(new occ.BRepBuilderAPI_MakeFace_8(surface, 1e-3)); - return new OccFace(builder.Face()); - }); - } -} - -export class OccPlateSurface extends OccSurface implements IPlateSurface { - constructor(private plateSurface: GeomPlate_Surface) { - super(plateSurface); - } - - setBounds(u1: number, u2: number, v1: number, v2: number): void { - this.plateSurface.SetBounds(u1, u2, v1, v2); - } -} - -export class OccBoundedSurface extends OccSurface implements IBoundedSurface {} - -export class OccElementarySurface extends OccSurface implements IElementarySurface { - constructor(private elementarySurface: Geom_ElementarySurface) { - super(elementarySurface); - } - - get location() { - return gc((c) => OccHelps.toXYZ(c(this.elementarySurface.Location()))); - } - set location(value: XYZ) { - gc((c) => { - this.elementarySurface.SetLocation(c(OccHelps.toPnt(value))); - }); - } - - get axis() { - return gc((c) => { - return OccHelps.toXYZ(c(c(this.elementarySurface.Axis()).Direction())); - }); - } - set axis(value: XYZ) { - gc((c) => { - let pnt = c(this.elementarySurface.Location()); - let axis = c(new occ.gp_Ax1_2(pnt, c(OccHelps.toDir(value)))); - this.elementarySurface.SetAxis(axis); - }); - } - get coordinates() { - return gc((c) => { - return OccHelps.fromAx23(c(this.elementarySurface.Position())); - }); - } - set coordinates(value: Plane) { - gc((c) => { - this.elementarySurface.SetPosition(c(OccHelps.toAx3(value))); - }); - } -} - -export class OccOffsetSurface extends OccSurface implements IOffsetSurface { - constructor(private offsetSurface: Geom_OffsetSurface) { - super(offsetSurface); - } - get offset(): number { - return this.offsetSurface.Offset(); - } - set offset(value: number) { - this.offsetSurface.SetOffsetValue(value); - } - get basisSurface() { - return OccHelps.wrapSurface(this.offsetSurface.BasisSurface().get()); - } - set basisSurface(value: ISurface) { - if (value instanceof OccSurface) { - let surface = new occ.Handle_Geom_Surface_2(value.surface); - this.offsetSurface.SetBasisSurface(surface, true); - } - throw new Error("Invalid surface type"); - } -} - -export class OccSweptSurface extends OccSurface implements ISweptSurface { - constructor(private sweptSurface: Geom_SweptSurface) { - super(sweptSurface); - } - direction(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.sweptSurface.Direction())); - }); - } - basisCurve(): ICurve { - return OccHelps.wrapCurve(this.sweptSurface.BasisCurve().get()); - } -} - -export class OccCompositeSurface extends OccSurface implements ICompositeSurface { - constructor(compositeSurface: ShapeExtend_CompositeSurface) { - super(compositeSurface as any); - } -} - -export class OccBSplineSurface extends OccSurface implements IBSplineSurface { - constructor(private bsplineSurface: Geom_BSplineSurface) { - super(bsplineSurface); - } -} - -export class OccBezierSurface extends OccSurface implements IBezierSurface { - constructor(private bezierSurface: Geom_BezierSurface) { - super(bezierSurface); - } -} - -export class OccRectangularSurface extends OccSurface implements IRectangularTrimmedSurface { - constructor(private rectangularSurface: Geom_RectangularTrimmedSurface) { - super(rectangularSurface); - } - basisSurface(): ISurface { - return OccHelps.wrapSurface(this.rectangularSurface.BasisSurface().get()); - } - setUTrim(u1: number, u2: number): void { - this.rectangularSurface.SetTrim_2(u1, u2, true, true); - } - setVTrim(v1: number, v2: number): void { - this.rectangularSurface.SetTrim_2(v1, v2, false, true); - } - setTrim(u1: number, u2: number, v1: number, v2: number): void { - this.rectangularSurface.SetTrim_1(u1, u2, v1, v2, true, true); - } -} - -export class OccConicalSurface extends OccElementarySurface implements IConicalSurface { - constructor(private conicalSurface: Geom_ConicalSurface) { - super(conicalSurface); - } - get semiAngle(): number { - return this.conicalSurface.SemiAngle(); - } - set semiAngle(value: number) { - this.conicalSurface.SetSemiAngle(value); - } - setRadius(value: number) { - return this.conicalSurface.SetRadius(value); - } - apex(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.conicalSurface.Apex())); - }); - } - refRadius(): number { - return this.conicalSurface.RefRadius(); - } -} - -export class OccCylindricalSurface extends OccElementarySurface implements ICylindricalSurface { - constructor(private cylindricalSurface: Geom_CylindricalSurface) { - super(cylindricalSurface); - } - get radius(): number { - return this.cylindricalSurface.Radius(); - } - set radius(value: number) { - this.cylindricalSurface.SetRadius(value); - } -} - -export class OccPlane extends OccElementarySurface implements IPlaneSurface { - constructor(private geom_plane: Geom_Plane) { - super(geom_plane); - } - get plane(): Plane { - return gc((c) => { - return OccHelps.fromPln(c(this.geom_plane.Pln())); - }); - } - set plane(value: Plane) { - gc((c) => { - this.geom_plane.SetPln(c(OccHelps.toPln(value))); - }); - } -} - -export class OccSphericalSurface extends OccElementarySurface implements ISphericalSurface { - constructor(private sphericalSurface: Geom_SphericalSurface) { - super(sphericalSurface); - } - get radius(): number { - return this.sphericalSurface.Radius(); - } - set radius(value: number) { - this.sphericalSurface.SetRadius(value); - } - area(): number { - return this.sphericalSurface.Area(); - } - volume(): number { - return this.sphericalSurface.Volume(); - } -} - -export class OccToroidalSurface extends OccElementarySurface implements IToroidalSurface { - constructor(private toroidalSurface: Geom_ToroidalSurface) { - super(toroidalSurface); - } - area(): number { - return this.toroidalSurface.Area(); - } - volume(): number { - return this.toroidalSurface.Volume(); - } - get majorRadius(): number { - return this.toroidalSurface.MajorRadius(); - } - set majorRadius(value: number) { - this.toroidalSurface.SetMajorRadius(value); - } - get minorRadius(): number { - return this.toroidalSurface.MinorRadius(); - } - set minorRadius(value: number) { - this.toroidalSurface.SetMinorRadius(value); - } -} - -export class OccSurfaceOfLinearExtrusion extends OccSweptSurface implements ISurfaceOfLinearExtrusion { - constructor(private surfaceOfLinearExtrusion: Geom_SurfaceOfLinearExtrusion) { - super(surfaceOfLinearExtrusion); - } - setDirection(direction: XYZ) { - gc((c) => { - this.surfaceOfLinearExtrusion.SetDirection(c(OccHelps.toDir(direction))); - }); - } - setBasisCurve(curve: ICurve) { - if (!(curve instanceof OccCurve)) { - throw new Error("curve must be an OccCurve"); - } - this.surfaceOfLinearExtrusion.SetBasisCurve(new occ.Handle_Geom_Curve_2(curve.curve)); - } -} - -export class OccSurfaceOfRevolution extends OccSweptSurface implements ISurfaceOfRevolution { - constructor(private surfaceOfRevolution: Geom_SurfaceOfRevolution) { - super(surfaceOfRevolution); - } - get location(): XYZ { - return gc((c) => { - return OccHelps.toXYZ(c(this.surfaceOfRevolution.Location())); - }); - } - set location(value: XYZ) { - gc((c) => { - this.surfaceOfRevolution.SetLocation(c(OccHelps.toPnt(value))); - }); - } - referencePlane(): Plane { - return gc((c) => { - return OccHelps.fromAx23(c(this.surfaceOfRevolution.ReferencePlane())); - }); - } - setDirection(direction: XYZ) { - gc((c) => { - this.surfaceOfRevolution.SetDirection(c(OccHelps.toDir(direction))); - }); - } - setBasisCurve(curve: ICurve) { - if (!(curve instanceof OccCurve)) { - throw new Error("curve must be an OccCurve"); - } - this.surfaceOfRevolution.SetBasisCurve(new occ.Handle_Geom_Curve_2(curve.curve)); - } -} diff --git a/packages/chili-occ/src/shapeFactory.ts b/packages/chili-occ/src/shapeFactory.ts deleted file mode 100644 index 71507730..00000000 --- a/packages/chili-occ/src/shapeFactory.ts +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { - ICompound, - IEdge, - IFace, - IShape, - IShapeConverter, - IShapeFactory, - ISolid, - IVertex, - IWire, - MathUtils, - Plane, - Ray, - Result, - XYZ, - gc, -} from "chili-core"; - -import { - BRepAlgoAPI_BooleanOperation, - BRepBuilderAPI_MakeWire, - BRepOffset_Mode, - GeomAbs_JoinType, - Geom_BezierCurve, - Message_ProgressRange, - TopoDS_Shape, -} from "../occ-wasm/chili_occ"; -import { OccShapeConverter } from "./occConverter"; -import { OccHelps } from "./occHelps"; -import { OccCompound, OccEdge, OccFace, OccShape, OccSolid, OccVertex, OccWire } from "./occShape"; - -export class ShapeFactory implements IShapeFactory { - readonly converter: IShapeConverter = new OccShapeConverter(); - - fuse(bottom: IShape, top: IShape): Result { - throw new Error("Method not implemented."); - } - - sweep(profile: IShape, path: IWire): Result { - return gc((c) => { - let spine = (path as OccWire).shape; - let tprofile = (profile as OccShape).shape; - let builder = c(new occ.BRepOffsetAPI_MakePipe_1(spine, tprofile)); - if (builder.IsDone()) { - return Result.ok(OccHelps.wrapShape(builder.Shape())); - } - return Result.err("Failed to create a shape from a profile and a path"); - }); - } - - revolve(profile: IShape, axis: Ray, angle: number): Result { - return gc((c) => { - let tprofile = (profile as OccShape).shape; - let ax1 = c( - new occ.gp_Ax1_2(c(OccHelps.toPnt(axis.location)), c(OccHelps.toDir(axis.direction))), - ); - let builder = c( - new occ.BRepPrimAPI_MakeRevol_1(tprofile, ax1, MathUtils.degToRad(angle), false), - ); - if (builder.IsDone()) { - return Result.ok(OccHelps.wrapShape(builder.Shape())); - } - return Result.err("Failed to revolve profile"); - }); - } - - prism(shape: IShape, vec: XYZ): Result { - return gc((c) => { - if (!(shape instanceof OccShape)) { - return Result.err("Unsupported shape"); - } - let builder = c( - new occ.BRepPrimAPI_MakePrism_1(shape.shape, c(OccHelps.toVec(vec)), false, true), - ); - if (builder.IsDone()) { - return Result.ok(OccHelps.wrapShape(builder.Shape())); - } - return Result.err("Cannot create prism"); - }); - } - - polygon(...points: XYZ[]): Result { - return gc((c) => { - let make = c(new occ.BRepBuilderAPI_MakePolygon_1()); - points.forEach((x) => { - make.Add_1(c(OccHelps.toPnt(x))); - }); - if (make.IsDone()) { - return Result.ok(new OccWire(make.Wire())); - } - return Result.err("Create polygon error"); - }); - } - - arc(normal: XYZ, center: XYZ, start: XYZ, angle: number): Result { - return gc((c) => { - let radius = center.distanceTo(start); - let xvec = start.sub(center); - let ax2 = c( - new occ.gp_Ax2_2( - c(OccHelps.toPnt(center)), - c(OccHelps.toDir(normal)), - c(OccHelps.toDir(xvec)), - ), - ); - let circle = c(new occ.gp_Circ_2(ax2, radius)); - let radians = (angle * Math.PI) / 180; - let [startAngle, endAngle] = [0, radians]; - if (angle < 0) [startAngle, endAngle] = [Math.PI * 2 + radians, Math.PI * 2]; - let builder = c(new occ.BRepBuilderAPI_MakeEdge_9(circle, startAngle, endAngle)); - if (builder.IsDone()) { - return Result.ok(new OccEdge(builder.Edge())); - } - return Result.err("Create arc error"); - }); - } - - bezier(points: XYZ[], weights?: number[]): Result { - return gc((c) => { - let tolPoints = c(new occ.TColgp_Array1OfPnt_2(1, points.length)); - points.forEach((x, i) => { - tolPoints.SetValue(i + 1, c(OccHelps.toPnt(x))); - }); - let bezier: Geom_BezierCurve; - if (weights) { - let tolWeights = c(new occ.TColStd_Array1OfReal_2(1, weights.length)); - weights.forEach((x, i) => { - tolWeights.SetValue(i + 1, x); - }); - bezier = new occ.Geom_BezierCurve_2(tolPoints, tolPoints); - } else { - bezier = new occ.Geom_BezierCurve_1(tolPoints); - } - let edge = c(new occ.BRepBuilderAPI_MakeEdge_24(new occ.Handle_Geom_Curve_2(bezier))); - return Result.ok(new OccEdge(edge.Edge())); - }); - } - - circle(normal: XYZ, center: XYZ, radius: number): Result { - return gc((c) => { - if (MathUtils.almostEqual(radius, 0)) { - return Result.err("Radius cannot be 0"); - } - let ax2 = c(new occ.gp_Ax2_3(OccHelps.toPnt(center), OccHelps.toDir(normal))); - let circ = c(new occ.gp_Circ_2(ax2, radius)); - let make = c(new occ.BRepBuilderAPI_MakeEdge_8(circ)); - if (make.IsDone()) { - return Result.ok(new OccEdge(make.Edge())); - } - return Result.err("Create circle error"); - }); - } - - rect(plane: Plane, dx: number, dy: number): Result { - return gc((c) => { - if (MathUtils.almostEqual(dx, 0) || MathUtils.almostEqual(dy, 0)) { - return Result.err("Length cannot be 0"); - } - let pln = c(OccHelps.toPln(plane)); - let make = c(new occ.BRepBuilderAPI_MakeFace_9(pln, 0, dx, 0, dy)); - if (make.IsDone()) { - return Result.ok(new OccFace(make.Face())); - } - return Result.err("Create rectangle error"); - }); - } - - box(plane: Plane, dx: number, dy: number, dz: number): Result { - return gc((c) => { - if ( - MathUtils.almostEqual(dx, 0) || - MathUtils.almostEqual(dy, 0) || - MathUtils.almostEqual(dz, 0) - ) { - return Result.err("Length cannot be 0"); - } - let pln = c(OccHelps.toPln(plane)); - let faceMake = c(new occ.BRepBuilderAPI_MakeFace_9(pln, 0, dx, 0, dy)); - if (faceMake.IsDone()) { - let vec = c(new occ.gp_Vec_2(c(OccHelps.toDir(plane.normal)))); - vec.Scale(dz); - let prismMake = c(new occ.BRepPrimAPI_MakePrism_1(c(faceMake.Face()), vec, false, false)); - if (prismMake.IsDone()) { - return Result.ok(new OccSolid(prismMake.Shape())); - } - } - return Result.err("Create box error"); - }); - } - - point(point: XYZ): Result { - return gc((c) => { - let build = c(new occ.BRepBuilderAPI_MakeVertex(c(OccHelps.toPnt(point)))); - if (build.IsDone()) { - return Result.ok(new OccVertex(build.Vertex())); - } - return Result.err("error"); - }); - } - - line(start: XYZ, end: XYZ): Result { - return gc((c) => { - let make = c( - new occ.BRepBuilderAPI_MakeEdge_3(c(OccHelps.toPnt(start)), c(OccHelps.toPnt(end))), - ); - if (make.IsDone()) { - return Result.ok(new OccEdge(make.Edge())); - } - return Result.err("error"); - }); - } - - wire(...edges: IEdge[]): Result { - return gc((c) => { - if (edges.length === 0) return Result.err("empty edges"); - if (edges[0] instanceof OccWire) return Result.ok(edges[0]); - let builder = c(new occ.BRepBuilderAPI_MakeWire_1()); - if (edges.length === 1) { - builder.Add_1((edges[0] as OccEdge).shape); - } else { - this.addOrderedEdges(builder, edges); - } - switch (builder.Error()) { - case occ.BRepBuilderAPI_WireError.BRepBuilderAPI_DisconnectedWire: - return Result.err( - "The last edge which you attempted to add was not connected to the wire.", - ); - case occ.BRepBuilderAPI_WireError.BRepBuilderAPI_NonManifoldWire: - return Result.err("The wire with some singularity"); - case occ.BRepBuilderAPI_WireError.BRepBuilderAPI_EmptyWire: - return Result.err("The wire is empty"); - default: - return Result.ok(new OccWire(builder.Wire())); - } - }); - } - - face(...wire: IWire[]): Result { - return gc((c) => { - let builder = c(new occ.BRepBuilderAPI_MakeFace_15((wire[0] as OccWire).shape, true)); - for (let i = 1; i < wire.length; i++) { - if (wire[i] instanceof OccWire) { - builder.Add((wire[i] as OccWire).shape); - } - } - return Result.ok(new OccFace(builder.Face())); - }); - } - - private addOrderedEdges(builder: BRepBuilderAPI_MakeWire, edges: IEdge[]) { - return gc((c) => { - let wireOrder = c(new occ.ShapeAnalysis_WireOrder_1()); - let edgeAnalyser = c(new occ.ShapeAnalysis_Edge()); - for (let edge of edges) { - if (edge instanceof OccEdge) { - let start = c(occ.BRep_Tool.Pnt(c(edgeAnalyser.FirstVertex(edge.shape)))); - let end = c(occ.BRep_Tool.Pnt(c(edgeAnalyser.LastVertex(edge.shape)))); - wireOrder.Add_1(c(start.XYZ()), c(end.XYZ())); - } else { - throw new Error("The OCC kernel only supports OCC geometries."); - } - } - wireOrder.Perform(true); - if (wireOrder.IsDone()) { - for (let i = 1; i <= wireOrder.NbEdges(); i++) { - let index = wireOrder.Ordered(i); - let edge = (edges[Math.abs(index) - 1] as OccEdge).shape; - builder.Add_1(index > 0 ? edge : OccHelps.getActualShape(edge.Reversed())); - } - } - }); - } - - makeThickSolidBySimple(shape: IShape, thickness: number): Result { - return gc((c) => { - if (!(shape instanceof OccShape)) { - throw new Error("The OCC kernel only supports OCC geometries."); - } - - let builder = c(new occ.BRepOffsetAPI_MakeThickSolid()); - builder.MakeThickSolidBySimple(shape.shape, thickness); - if (builder.IsDone()) { - return Result.ok(OccHelps.wrapShape(builder.Shape())); - } - return Result.err("error"); - }); - } - - makeThickSolidByJoin(shape: IShape, closingFaces: IShape[], thickness: number): Result { - if (!(shape instanceof OccShape)) { - throw new Error("The OCC kernel only supports OCC geometries."); - } - - return gc((c) => { - let listOfShape = c(OccHelps.fromArray(closingFaces)); - let builder = c(new occ.BRepOffsetAPI_MakeThickSolid()); - let messageRange = c(new occ.Message_ProgressRange_1()); - builder.MakeThickSolidByJoin( - shape.shape, - listOfShape, - thickness, - 0.00001, - occ.BRepOffset_Mode.BRepOffset_Skin as BRepOffset_Mode, - false, - false, - occ.GeomAbs_JoinType.GeomAbs_Intersection as GeomAbs_JoinType, - false, - messageRange, - ); - if (builder.IsDone()) { - return Result.ok(OccHelps.wrapShape(builder.Shape())); - } - return Result.err("error"); - }); - } - - booleanCommon(shape1: IShape, shape2: IShape): Result { - return this.booleanOperate(shape1, shape2, occ.BRepAlgoAPI_Common_3); - } - - booleanCut(shape1: IShape, shape2: IShape): Result { - return this.booleanOperate(shape1, shape2, occ.BRepAlgoAPI_Cut_3); - } - - booleanFuse(shape1: IShape, shape2: IShape): Result { - return this.booleanOperate(shape1, shape2, occ.BRepAlgoAPI_Fuse_3); - } - - combine(...shapes: IShape[]): Result { - return OccCompound.fromShapes(...shapes); - } - - private booleanOperate( - shape1: IShape, - shape2: IShape, - ctor: new ( - shape1: TopoDS_Shape, - shape2: TopoDS_Shape, - progress: Message_ProgressRange, - ) => BRepAlgoAPI_BooleanOperation, - ) { - return gc((c) => { - let shapes = ShapeFactory.ensureOccShape(shape1, shape2); - const progress = c(new occ.Message_ProgressRange_1()); - let operate = c(new ctor(shapes[0], shapes[1], progress)); - if (operate.IsDone()) { - return Result.ok(OccHelps.wrapShape(operate.Shape())); - } - return Result.err("Failed to perform boolean operation."); - }); - } - - static ensureOccShape(...shapes: IShape[]): TopoDS_Shape[] { - return shapes.map((x) => { - if (!(x instanceof OccShape)) { - throw new Error("The OCC kernel only supports OCC geometries."); - } - return x.shape; - }); - } -} diff --git a/packages/chili-occ/test/occ.test.ts b/packages/chili-occ/test/occ.test.ts deleted file mode 100644 index 2b7f9314..00000000 --- a/packages/chili-occ/test/occ.test.ts +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { expect, test } from "@jest/globals"; -import { CurveType, Matrix4, Plane, Ray, ShapeType, XYZ } from "chili-core"; -import initOpenCascade, { OpenCascadeInstance } from "opencascade.js/dist/node.js"; -import { TopAbs_ShapeEnum, TopoDS_Edge } from "../occ-wasm/chili_occ"; -import { OccCurve } from "../src/occCurve"; -import { OccHelps } from "../src/occHelps"; -import { OccEdge, OccShape, OccSolid } from "../src/occShape"; -import { ShapeFactory } from "../src"; - -let occ: OpenCascadeInstance; - -beforeAll(async () => { - occ = await initOpenCascade(); - global.occ = occ; -}, 30000); - -describe("shape test", () => { - test("test edge", () => { - let start1 = new occ.gp_Pnt_3(0, 0, 0); - let end1 = new occ.gp_Pnt_3(10, 0, 0); - let make1 = new occ.BRepBuilderAPI_MakeEdge_3(start1, end1); - expect(make1.IsDone()).toBeTruthy(); - let edge1 = new OccEdge(make1.Edge()); - expect(edge1.shapeType).toBe(ShapeType.Edge); - let ps = edge1.curve().project(new XYZ(5, 0, 0)); - expect(ps.length).toBe(1); - expect(ps[0].x).toBe(5); - - let start2 = new occ.gp_Pnt_3(5, -5, 0); - let end2 = new occ.gp_Pnt_3(5, 5, 0); - let make2 = new occ.BRepBuilderAPI_MakeEdge_3(start2, end2); - let edge2 = new OccEdge(make2.Edge()); - let intersections = edge2.intersect(edge1); - expect(intersections.length).toBe(1); - expect(intersections[0].point.x).toBe(5); - - let ray = new Ray(XYZ.unitZ.reverse(), XYZ.unitX.add(XYZ.unitZ)); - expect(edge1.intersect(ray)[0].point.isEqualTo(XYZ.unitX)).toBeTruthy(); - }); - - test("test findSubShape", () => { - let start = new occ.gp_Pnt_3(-10, 0, 0); - let end = new occ.gp_Pnt_3(10, 0, 0); - let make = new occ.BRepBuilderAPI_MakeEdge_3(start, end); - let edge = new OccEdge(make.Edge()); - expect(edge.findSubShapes(ShapeType.Edge).length).toBe(1); - expect(edge.findSubShapes(ShapeType.Vertex).length).toBe(2); - expect(edge.findSubShapes(ShapeType.Shape).length).toBe(0); - - let make2 = new occ.BRepPrimAPI_MakeBox_2(10, 10, 10); - let box = new OccSolid(make2.Solid()); - expect(box.findSubShapes(ShapeType.Edge).length).toBe(12); - expect(box.findSubShapes(ShapeType.Face).length).toBe(6); - expect(box.findSubShapes(ShapeType.Vertex).length).toBe(8); - expect(box.findSubShapes(ShapeType.Wire).length).toBe(6); - expect(box.findSubShapes(ShapeType.Shell).length).toBe(1); - expect(box.findSubShapes(ShapeType.Shell)[0].shapeType).toBe(ShapeType.Shell); - expect(box.findSubShapes(ShapeType.Shape).length).toBe(0); - }); - - test("test ancestors", () => { - let make2 = new occ.BRepPrimAPI_MakeBox_2(10, 10, 10); - let box = new OccSolid(make2.Solid()); - let edge = box.findSubShapes(ShapeType.Edge)[0] as any; - let wire = OccHelps.findAncestors(edge.shape, box.shape, OccHelps.getShapeEnum(ShapeType.Wire)); - expect(wire.length).toBe(2); - expect(wire[0].ShapeType()).toBe(OccHelps.getShapeEnum(ShapeType.Wire)); - }); -}); - -describe("geometry test", () => { - test("test edge", () => { - let start = new occ.gp_Pnt_3(-10, 0, 0); - let end = new occ.gp_Pnt_3(10, 0, 0); - let make = new occ.BRepBuilderAPI_MakeEdge_3(start, end); - expect(make.IsDone()).toBeTruthy(); - let edge = new OccEdge(make.Edge()); - let curve = edge.curve(); - expect(curve instanceof OccCurve).toBe(true); - expect(edge.length()).toBe(20); - expect(curve.value(curve.firstParameter()).x).toBe(-10); - expect(curve.value(curve.lastParameter()).x).toBe(10); - expect(curve.curveType).toBe(CurveType.TrimmedCurve); - expect(curve.value(0).x).toBe(-10); - expect(curve.firstParameter()).toBe(0); - expect(curve.lastParameter()).toBe(20); - }); -}); - -describe("curve test", () => { - test("test Geom_Curve", () => { - let ps = new occ.gp_Pnt_3(0, 0, 0); - let pe = new occ.gp_Pnt_3(10, 0, 0); - let e1 = new occ.BRepBuilderAPI_MakeEdge_3(ps, pe).Edge(); - let s: any = { current: 0 }; - let e: any = { current: 0 }; - let c = occ.BRep_Tool.Curve_2(e1, s, e); - expect(s.current).toBe(0); - expect(e.current).toBe(10); - expect(occ.Precision.IsInfinite(c.get().FirstParameter())).toBe(true); - let tc = new occ.Geom_TrimmedCurve(c, s.current, e.current, true, true); - expect(tc.FirstParameter()).toBe(0); - expect(tc.LastParameter()).toBe(10); - - let lin = new occ.gp_Lin_3(ps, new occ.gp_Dir_4(1, 0, 0)); - e1 = new occ.BRepBuilderAPI_MakeEdge_4(lin).Edge(); - c = occ.BRep_Tool.Curve_2(e1, s, e); - tc = new occ.Geom_TrimmedCurve(c, s.current, e.current, true, true); - expect(occ.Precision.IsInfinite(tc.FirstParameter())).toBe(true); - - let ax = new occ.gp_Ax2_2(ps, new occ.gp_Dir_4(0, 0, 1), new occ.gp_Dir_4(1, 0, 0)); - let circ = new occ.gp_Circ_2(ax, 10); - e1 = new occ.BRepBuilderAPI_MakeEdge_8(circ).Edge(); - c = occ.BRep_Tool.Curve_2(e1, s, e); - expect(c.get().FirstParameter()).toBe(0); - expect(c.get().LastParameter() - 6.28 < 0.01).toBeTruthy(); - tc = new occ.Geom_TrimmedCurve(c, s.current, e.current, true, true); - expect(tc.FirstParameter()).toBe(0); - expect(tc.LastParameter() - 6.28 < 0.01).toBeTruthy(); - - e1 = new occ.BRepBuilderAPI_MakeEdge_9(circ, 1, 2).Edge(); - c = occ.BRep_Tool.Curve_2(e1, s, e); - expect(c.get().FirstParameter()).toBe(0); - expect(c.get().LastParameter() - 6.28 < 0.01).toBeTruthy(); - tc = new occ.Geom_TrimmedCurve(c, s.current, e.current, true, true); - expect(tc.FirstParameter()).toBe(1); - expect(tc.LastParameter()).toBe(2); - }); - - describe("test transform", () => { - test("test edge transform", () => { - let ps = new occ.gp_Pnt_3(0, 0, 0); - let pe = new occ.gp_Pnt_3(10, 0, 0); - let e1 = new occ.BRepBuilderAPI_MakeEdge_3(ps, pe).Edge(); - let vertexs1 = OccHelps.iterShapes( - e1, - occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum, - true, - ); - let v11: TopoDS_Edge = vertexs1.next().value; - let v11HasCode = v11.HashCode(1000); - expect(v11.ShapeType()).toBe(occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum); - - let s: any = { current: 0 }; - let e: any = { current: 0 }; - let c1 = occ.BRep_Tool.Curve_2(e1, s, e); - let pnt1 = new occ.gp_Pnt_1(); - c1.get().D0(0, pnt1); - expect(pnt1.X()).toBeCloseTo(0); - - let trsf = e1.Location_1().Transformation(); - trsf.SetTranslation_1(new occ.gp_Vec_4(10, 0, 0)); - e1.Location_2(new occ.TopLoc_Location_2(trsf), true); - let c2 = occ.BRep_Tool.Curve_2(e1, s, e).get(); - let pnt2 = new occ.gp_Pnt_1(); - c2.D0(0, pnt2); - expect(pnt2.X()).toBeCloseTo(10); - - let vertexs2 = OccHelps.iterShapes( - e1, - occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum, - true, - ); - let v12: TopoDS_Edge = vertexs2.next().value; - let v12HasCode = v12.HashCode(1000); - expect(v12.ShapeType()).toBe(occ.TopAbs_ShapeEnum.TopAbs_EDGE as TopAbs_ShapeEnum); - expect(v12HasCode).not.toBe(v11HasCode); - expect(v11.IsEqual(v12)).toBeFalsy(); - expect(v11.IsSame(v12)).toBeFalsy(); - expect(v11.IsPartner(v12)).toBeTruthy(); - expect(v11.Orientation_1() === v12.Orientation_1()).toBeTruthy(); - expect(v11.Location_1().Transformation().TranslationPart().X()).toBe(0); - expect(v12.Location_1().Transformation().TranslationPart().X()).toBe(10); - - let e2 = new occ.BRepBuilderAPI_MakeEdge_3(ps, pe).Edge(); - let e3 = new OccEdge(e2).mesh.edges?.groups.at(0)?.shape as OccEdge; - expect(e3.shape.IsEqual(e2)); - trsf = e2.Location_1().Transformation(); - trsf.SetTranslation_1(new occ.gp_Vec_4(10, 0, 0)); - e2.Location_2(new occ.TopLoc_Location_2(trsf), true); - let c3 = occ.BRep_Tool.Curve_2(e2, s, e); - c3.get().D0(0, pnt2); - expect(pnt2.X()).toBeCloseTo(10); - }); - - test("test mesh transform", () => { - let ps = new occ.gp_Pnt_3(10, 0, 0); - let pe = new occ.gp_Pnt_3(10, 10, 0); - let e1 = new occ.BRepBuilderAPI_MakeEdge_3(ps, pe).Edge(); - let shape = new OccEdge(e1); - shape.matrix = Matrix4.createTranslation(10, 20, 30); - let edge = shape.mesh.edges?.groups.at(0)?.shape as OccEdge; - let p2 = shape.curve().value(0); - expect(p2?.x).toBeCloseTo(20); - expect(edge.curve().value(0).x).toBeCloseTo(20); - }); - }); - - test("test 5000", () => { - let start = performance.now(); - let count = 0; - for (let i = 0; i < 5000; i++) { - let make2 = new occ.BRepPrimAPI_MakeBox_3(new occ.gp_Pnt_1(), 10, 10, 10); - let box = new OccSolid(make2.Solid()); - count += box.mesh.faces!.positions.length; - } - let end = performance.now(); - console.log(`time: ${end - start}ms, count: ${count}`); - }); -}); diff --git a/packages/chili-storage/package.json b/packages/chili-storage/package.json index 07fa10b5..73a3a7b1 100644 --- a/packages/chili-storage/package.json +++ b/packages/chili-storage/package.json @@ -1,6 +1,6 @@ { "name": "chili-storage", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-three/package.json b/packages/chili-three/package.json index 2d9354cb..988381a2 100644 --- a/packages/chili-three/package.json +++ b/packages/chili-three/package.json @@ -1,6 +1,6 @@ { "name": "chili-three", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-three/src/cameraController.ts b/packages/chili-three/src/cameraController.ts index 4d41ca5e..4ea30d89 100644 --- a/packages/chili-three/src/cameraController.ts +++ b/packages/chili-three/src/cameraController.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { ICameraController, IModel, INode, Point, ShapeType } from "chili-core"; +import { GeometryNode, ICameraController, Point, ShapeType } from "chili-core"; import { Box3, Matrix4, OrthographicCamera, PerspectiveCamera, Sphere, Vector3 } from "three"; import { ThreeGeometry } from "./threeGeometry"; import { ThreeHelper } from "./threeHelper"; @@ -134,7 +134,9 @@ export class CameraController implements ICameraController { private getBoundingSphere(context: ThreeVisualContext) { let sphere = new Sphere(); - let shapes = this.view.document.selection.getSelectedNodes().filter((x) => INode.isModelNode(x)); + let shapes = this.view.document.selection + .getSelectedNodes() + .filter((x) => x instanceof GeometryNode); if (shapes.length === 0) { new Box3().setFromObject(context.visualShapes).getBoundingSphere(sphere); return sphere; @@ -142,7 +144,7 @@ export class CameraController implements ICameraController { let box = new Box3(); for (let shape of shapes) { - let threeGeometry = context.getShape(shape as IModel) as ThreeGeometry; + let threeGeometry = context.getShape(shape) as ThreeGeometry; let boundingBox = new Box3().setFromObject(threeGeometry); if (boundingBox) { box.union(boundingBox); @@ -162,11 +164,20 @@ export class CameraController implements ICameraController { let vector = this._target.clone().sub(mouse).multiplyScalar(scale); this._target.add(vector); this._position.copy(this._target.clone().sub(direction.clone().multiplyScalar(1 + scale))); + + this.updateTarget(direction); this.updateCameraNearFar(); this.update(); } + private updateTarget(vector: Vector3) { + let direction = vector.clone().normalize(); + let sphere = this.getBoundingSphere(this.view.document.visual.context as ThreeVisualContext); + let length = sphere.center.sub(this._position).dot(direction); + this._target.copy(this._position.clone().add(direction.multiplyScalar(length))); + } + private updateCameraNearFar() { let distance = this._position.distanceTo(this._target); if (distance < 1000.0) { diff --git a/packages/chili-three/src/threeGeometry.ts b/packages/chili-three/src/threeGeometry.ts index c543c4a2..82bb4de5 100644 --- a/packages/chili-three/src/threeGeometry.ts +++ b/packages/chili-three/src/threeGeometry.ts @@ -3,28 +3,22 @@ import { EdgeMeshData, FaceMeshData, - GeometryEntity, + GeometryNode, + IMeshObject, IVisualGeometry, Matrix4, + ShapeNode, VisualConfig, } from "chili-core"; -import { - BufferGeometry, - DoubleSide, - Float32BufferAttribute, - Material, - Mesh, - MeshLambertMaterial, - Object3D, -} from "three"; +import { DoubleSide, Material, Mesh, MeshLambertMaterial, Object3D } from "three"; import { MeshUtils } from "chili-geo"; import { LineMaterial } from "three/examples/jsm/lines/LineMaterial"; import { LineSegments2 } from "three/examples/jsm/lines/LineSegments2"; import { LineSegmentsGeometry } from "three/examples/jsm/lines/LineSegmentsGeometry"; +import { ThreeGeometryFactory } from "./threeGeometryFactory"; import { ThreeHelper } from "./threeHelper"; import { ThreeVisualContext } from "./threeVisualContext"; -import { ThreeGeometryFactory } from "./threeGeometryFactory"; export class ThreeGeometry extends Object3D implements IVisualGeometry { private _faceMaterial: Material; @@ -60,15 +54,15 @@ export class ThreeGeometry extends Object3D implements IVisualGeometry { } constructor( - readonly geometryEngity: GeometryEntity, + readonly geometryNode: GeometryNode, readonly context: ThreeVisualContext, ) { super(); - this.transform = geometryEngity.matrix; - this._faceMaterial = context.getMaterial(geometryEngity.materialId); + this.transform = geometryNode.matrix; + this._faceMaterial = context.getMaterial(geometryNode.materialId); this.matrixAutoUpdate = false; this.generateShape(); - geometryEngity.onPropertyChanged(this.handleGeometryPropertyChanged); + geometryNode.onPropertyChanged(this.handleGeometryPropertyChanged); } box() { @@ -85,27 +79,27 @@ export class ThreeGeometry extends Object3D implements IVisualGeometry { }; } - private handleGeometryPropertyChanged = (property: keyof GeometryEntity) => { + private handleGeometryPropertyChanged = (property: keyof IMeshObject) => { if (property === "matrix") { - this.transform = this.geometryEngity.matrix; + this.transform = this.geometryNode.matrix; } else if (property === "materialId") { - let material = this.context.getMaterial(this.geometryEngity.materialId); + let material = this.context.getMaterial(this.geometryNode.materialId); this.changeFaceMaterial(material); - } else if (property === "shape") { + } else if ((property as keyof ShapeNode) === "shape") { this.removeSubShapes(); this.generateShape(); } }; private generateShape() { - let mesh = this.geometryEngity.shape.unchecked()?.mesh; + let mesh = this.geometryNode.mesh; if (mesh?.faces?.positions.length) this.initFaces(mesh.faces); if (mesh?.edges?.positions.length) this.initEdges(mesh.edges); } dispose() { this.removeSubShapes(); - this.geometryEngity.removePropertyChanged(this.handleGeometryPropertyChanged); + this.geometryNode.removePropertyChanged(this.handleGeometryPropertyChanged); this._edgeMaterial.dispose(); } @@ -152,7 +146,7 @@ export class ThreeGeometry extends Object3D implements IVisualGeometry { } cloneSubEdge(index: number) { - let positions = MeshUtils.subEdge(this.geometryEngity.shape.ok().mesh.edges!, index); + let positions = MeshUtils.subEdge(this.geometryNode.mesh.edges!, index); if (!positions) return undefined; let buff = new LineSegmentsGeometry(); @@ -163,7 +157,7 @@ export class ThreeGeometry extends Object3D implements IVisualGeometry { } cloneSubFace(index: number) { - let mesh = MeshUtils.subFace(this.geometryEngity.shape.ok().mesh.faces!, index); + let mesh = MeshUtils.subFace(this.geometryNode.mesh.faces!, index); if (!mesh) return undefined; let buff = ThreeGeometryFactory.createFaceBufferGeometry(mesh); diff --git a/packages/chili-three/src/threeHighlighter.ts b/packages/chili-three/src/threeHighlighter.ts index 23340000..e8d1a022 100644 --- a/packages/chili-three/src/threeHighlighter.ts +++ b/packages/chili-three/src/threeHighlighter.ts @@ -129,10 +129,10 @@ export class GeometryState { let points: number[] | undefined = undefined; if (ShapeType.hasFace(type) || ShapeType.hasShell(type)) { - points = MeshUtils.subFaceOutlines(this.geometry.geometryEngity.shape.ok().mesh.faces!, index); + points = MeshUtils.subFaceOutlines(this.geometry.geometryNode.mesh.faces!, index); } if (points === undefined && (ShapeType.hasEdge(type) || ShapeType.hasWire(type))) { - points = MeshUtils.subEdge(this.geometry.geometryEngity.shape.ok().mesh.edges!, index); + points = MeshUtils.subEdge(this.geometry.geometryNode.mesh.edges!, index); } if (!points) { diff --git a/packages/chili-three/src/threeView.ts b/packages/chili-three/src/threeView.ts index 35ac9d3d..69c5c7c5 100644 --- a/packages/chili-three/src/threeView.ts +++ b/packages/chili-three/src/threeView.ts @@ -10,6 +10,7 @@ import { PubSub, Ray, ShapeMeshGroup, + ShapeNode, ShapeType, VisualShapeData, XY, @@ -276,9 +277,8 @@ export class ThreeView extends Observable implements IView { obj: Mesh | LineSegments2, shapeFilter?: IShapeFilter, ) { - if (!(obj.parent instanceof ThreeGeometry) || !obj.parent.visible) return; - let shape = obj.parent.geometryEngity.shape.ok(); - if (cache.has(shape)) return; + let shape = this.getParentShape(obj); + if (shape === undefined || cache.has(shape)) return; const addShape = (indexes: number[]) => { detecteds.push({ @@ -300,6 +300,12 @@ export class ThreeView extends Observable implements IView { addShape([...Array(groups?.length).keys()]); } + private getParentShape(obj: Object3D): IShape | undefined { + if (!obj.parent?.visible || !(obj.parent instanceof ThreeGeometry)) return undefined; + + return (obj.parent.geometryNode as ShapeNode).shape.unchecked(); + } + detected(shapeType: ShapeType, mx: number, my: number, shapeFilter?: IShapeFilter): VisualShapeData[] { let intersections = this.findIntersections(shapeType, mx, my); return ShapeType.isWhole(shapeType) @@ -310,15 +316,15 @@ export class ThreeView extends Observable implements IView { private detectThreeShapes(intersections: Intersection[], shapeFilter?: IShapeFilter): VisualShapeData[] { for (const element of intersections) { const parent = element.object.parent; - if (!(parent instanceof ThreeGeometry)) continue; + if (!(parent instanceof ThreeGeometry) || !(parent.geometryNode instanceof ShapeNode)) continue; - if (shapeFilter && !shapeFilter.allow(parent.geometryEngity.shape.ok())) { + if (shapeFilter && !shapeFilter.allow(parent.geometryNode.shape.value)) { continue; } return [ { owner: parent, - shape: parent.geometryEngity.shape.ok(), + shape: parent.geometryNode.shape.value, point: ThreeHelper.toXYZ(element.pointOnLine ?? element.point), indexes: [], }, @@ -386,7 +392,7 @@ export class ThreeView extends Observable implements IView { groups: ShapeMeshGroup[], parent: ThreeGeometry, ) { - let ancestor = directShape.findAncestor(type, parent.geometryEngity.shape.ok()).at(0); + let ancestor = directShape.findAncestor(type, (parent.geometryNode as ShapeNode).shape.value).at(0); if (!ancestor) return { shape: undefined, indexes: [] }; let indexes: number[] = []; @@ -409,13 +415,13 @@ export class ThreeView extends Observable implements IView { let index: number | undefined = undefined; let groups: ShapeMeshGroup[] | undefined = undefined; if (element.pointOnLine !== undefined) { - groups = parent.geometryEngity.shape.unchecked()?.mesh.edges?.groups; + groups = parent.geometryNode.mesh.edges?.groups; if (groups) { index = ThreeHelper.findGroupIndex(groups, element.faceIndex! * 2)!; shape = groups[index].shape; } } else { - groups = parent.geometryEngity.shape.unchecked()?.mesh.faces?.groups; + groups = parent.geometryNode.mesh.faces?.groups; if (groups) { index = ThreeHelper.findGroupIndex(groups, element.faceIndex! * 3)!; shape = groups[index].shape; diff --git a/packages/chili-three/src/threeVisualContext.ts b/packages/chili-three/src/threeVisualContext.ts index 0a0c2cc9..097dc09c 100644 --- a/packages/chili-three/src/threeVisualContext.ts +++ b/packages/chili-three/src/threeVisualContext.ts @@ -4,7 +4,6 @@ import { CollectionAction, CollectionChangedArgs, IDisposable, - IModel, INode, IShapeFilter, IVisual, @@ -16,6 +15,7 @@ import { NodeAction, NodeRecord, ShapeMeshData, + ShapeNode, ShapeType, XYZ, } from "chili-core"; @@ -37,8 +37,8 @@ import { ThreeGeometryFactory } from "./threeGeometryFactory"; import { ThreeHelper } from "./threeHelper"; export class ThreeVisualContext implements IVisualContext { - private readonly _shapeModelMap = new WeakMap(); - private readonly _modelShapeMap = new WeakMap(); + private readonly _shapeModelMap = new WeakMap(); + private readonly _modelShapeMap = new WeakMap(); private readonly materialMap = new Map(); readonly visualShapes: Group; @@ -63,6 +63,7 @@ export class ThreeVisualContext implements IVisualContext { side: DoubleSide, transparent: true, name: item.name, + opacity: item.opacity, }); material.map = this.loadTexture(item); item.onPropertyChanged(this.onMaterialPropertyChanged); @@ -95,7 +96,7 @@ export class ThreeVisualContext implements IVisualContext { getMaterial(id: string): ThreeMaterial { let material = this.materialMap.get(id); if (!material) { - throw new Error("Material not found"); + throw new Error(`Material not found: ${id}`); } return material; } @@ -132,8 +133,8 @@ export class ThreeVisualContext implements IVisualContext { INode.nodeOrChildrenAppendToNodes(rms, x.node); } }); - this.addModel(adds.filter((x) => !INode.isLinkedListNode(x)) as IModel[]); - this.removeModel(rms.filter((x) => !INode.isLinkedListNode(x)) as IModel[]); + this.addModel(adds.filter((x) => !INode.isLinkedListNode(x))); + this.removeModel(rms.filter((x) => !INode.isLinkedListNode(x))); }; addVisualObject(object: IVisualObject): void { @@ -164,11 +165,11 @@ export class ThreeVisualContext implements IVisualContext { this.scene.remove(this.visualShapes, this.tempShapes); } - getModel(shape: IVisualGeometry): IModel | undefined { + getModel(shape: IVisualGeometry): INode | undefined { return this._shapeModelMap.get(shape); } - redrawModel(models: IModel[]) { + redrawModel(models: INode[]) { this.removeModel(models); this.addModel(models); @@ -179,7 +180,7 @@ export class ThreeVisualContext implements IVisualContext { return this.visualShapes.children.length; } - getShape(model: IModel): IVisualGeometry | undefined { + getShape(model: INode): IVisualGeometry | undefined { return this._modelShapeMap.get(model); } @@ -201,9 +202,10 @@ export class ThreeVisualContext implements IVisualContext { ThreeHelper.fromXYZ(boundingBox.max), ]); return this.shapes().filter((x) => { - if (filter && x.geometryEngity.shape.isOk && !filter.allow(x.geometryEngity.shape.ok())) { + if (filter && x instanceof ShapeNode && x.shape.isOk && !filter.allow(x.shape.value)) { return false; } + let testBox = (x as ThreeGeometry).box(); if (testBox === undefined) { return false; @@ -250,35 +252,29 @@ export class ThreeVisualContext implements IVisualContext { this.tempShapes.remove(shape); } - setVisible(model: IModel, visible: boolean): void { + setVisible(model: INode, visible: boolean): void { let shape = this.getShape(model); if (shape === undefined || shape.visible === visible) return; shape.visible = visible; } - addModel(models: IModel[]) { + addModel(models: INode[]) { models.forEach((model) => { if (this._modelShapeMap.has(model)) return; - if (INode.isModelGroup(model)) { - let childGroup = new Group(); - childGroup.name = model.id; - this.visualShapes.add(childGroup); - return; - } this.displayModel(model); }); } - private displayModel(model: IModel) { - let modelShape = model.geometry.shape.ok(); - if (modelShape === undefined) return; - let threeShape = new ThreeGeometry(model.geometry, this); - this.visualShapes.add(threeShape); - this._shapeModelMap.set(threeShape, model); - this._modelShapeMap.set(model, threeShape); + private displayModel(model: INode) { + if (model instanceof ShapeNode) { + let threeShape = new ThreeGeometry(model as any, this); + this.visualShapes.add(threeShape); + this._shapeModelMap.set(threeShape, model); + this._modelShapeMap.set(model, threeShape); + } } - removeModel(models: IModel[]) { + removeModel(models: INode[]) { models.forEach((m) => { let shape = this._modelShapeMap.get(m); this._modelShapeMap.delete(m); diff --git a/packages/chili-three/test/testEdge.ts b/packages/chili-three/test/testEdge.ts index 1b34bb32..e37b52a7 100644 --- a/packages/chili-three/test/testEdge.ts +++ b/packages/chili-three/test/testEdge.ts @@ -3,6 +3,7 @@ import { ICurve, IDocument, IEdge, + IEqualityComparer, IShape, IShapeMeshData, ITrimmedCurve, @@ -10,7 +11,7 @@ import { LineType, Matrix4, Orientation, - ParameterBody, + ParameterShapeNode, Plane, Ray, Result, @@ -39,6 +40,9 @@ export class TestEdge implements IEdge { isNull(): boolean { throw new Error("Method not implemented."); } + reserve(): void { + throw new Error("Method not implemented."); + } section(shape: IShape | Plane): IShape { throw new Error("Method not implemented."); } @@ -107,8 +111,10 @@ export class TestEdge implements IEdge { } } -export class TestBody extends ParameterBody { - display: I18nKeys = "body.line"; +export class TestNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.line"; + } constructor( document: IDocument, readonly start: XYZ, @@ -117,6 +123,16 @@ export class TestBody extends ParameterBody { super(document); } + protected override setProperty( + property: K, + newValue: this[K], + onPropertyChanged?: ((property: K, oldValue: this[K]) => void) | undefined, + equals?: IEqualityComparer | undefined, + ): boolean { + this.setPrivateValue(property, newValue); + return true; + } + generateShape(): Result { return Result.ok(new TestEdge(this.start, this.end)); } diff --git a/packages/chili-three/test/three.test.ts b/packages/chili-three/test/three.test.ts index 44bd0dbf..3a400728 100644 --- a/packages/chili-three/test/three.test.ts +++ b/packages/chili-three/test/three.test.ts @@ -1,9 +1,9 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { expect, jest, test } from "@jest/globals"; -import { GeometryModel, Material, ParameterGeometryEntity, ShapeType, XY, XYZ } from "chili-core"; +import { Material, ShapeNode, ShapeType, XY, XYZ } from "chili-core"; import { TestDocument } from "./testDocument"; -import { TestBody } from "./testEdge"; +import { TestNode } from "./testEdge"; import { TestView } from "./testView"; jest.mock("../src/threeRenderBuilder", () => ({ @@ -30,9 +30,7 @@ describe("three test", () => { test("test context", () => { let context = doc.visual.context; - let body = new TestBody(doc, XYZ.zero, new XYZ(100, 0, 0)); - let entity = new ParameterGeometryEntity(doc, body); - let model = new GeometryModel(doc, "test model", entity); + let model = new TestNode(doc, XYZ.zero, new XYZ(100, 0, 0)); context.addModel([model]); expect(context.getShape(model)).not.toBeNull(); let mouse = view.worldToScreen(new XYZ(50, 0, 0)); @@ -41,7 +39,7 @@ describe("three test", () => { expect(shapes[0].shape.shapeType).toBe(ShapeType.Edge); let shape = context.getShape(model); - expect(shapes.at(0)?.shape).toEqual(shape?.geometryEngity.shape.ok()); + expect(shapes.at(0)?.shape).toEqual((shape?.geometryNode as ShapeNode).shape.value); expect(context.getModel(shape!)).toEqual(model); context.removeModel([model]); diff --git a/packages/chili-ui/package.json b/packages/chili-ui/package.json index 85ab9904..3d13f97e 100644 --- a/packages/chili-ui/package.json +++ b/packages/chili-ui/package.json @@ -1,6 +1,6 @@ { "name": "chili-ui", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-ui/src/components/flyout/input.ts b/packages/chili-ui/src/components/flyout/input.ts index 304011bd..ed124517 100644 --- a/packages/chili-ui/src/components/flyout/input.ts +++ b/packages/chili-ui/src/components/flyout/input.ts @@ -72,7 +72,7 @@ export class Input extends HTMLElement implements IDisposable { this._completedCallbacks.forEach((x) => x()); } else { this.textbox.readOnly = false; - this.showTip(error.error()); + this.showTip(error.error); } } else if (e.key === "Escape") { this._cancelledCallbacks.forEach((x) => x()); diff --git a/packages/chili-ui/src/components/languageSelector.ts b/packages/chili-ui/src/components/languageSelector.ts index bb73edd5..9087775a 100644 --- a/packages/chili-ui/src/components/languageSelector.ts +++ b/packages/chili-ui/src/components/languageSelector.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18n, Language } from "chili-core"; +import { I18n } from "chili-core"; import { HTMLProps, option, select } from "."; export const LanguageSelector = (props: HTMLProps) => { @@ -16,7 +16,7 @@ export const LanguageSelector = (props: HTMLProps) => { return select( { onchange: (e) => { - let language = (e.target as HTMLSelectElement).selectedIndex as unknown as Language; + let language = (e.target as HTMLSelectElement).selectedIndex; I18n.changeLanguage(language); }, ...props, diff --git a/packages/chili-ui/src/editor.ts b/packages/chili-ui/src/editor.ts index 1ff9ace3..eeefde57 100644 --- a/packages/chili-ui/src/editor.ts +++ b/packages/chili-ui/src/editor.ts @@ -1,9 +1,8 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { Button, CommandKeys, I18nKeys, IApplication } from "chili-core"; +import { Button, CommandKeys, I18nKeys, IApplication, RibbonTab } from "chili-core"; import { div } from "./components"; import style from "./editor.module.css"; -import { DefaultRibbon } from "./profile/ribbon"; import { ProjectView } from "./project"; import { PropertyView } from "./property"; import { Ribbon, RibbonDataContent } from "./ribbon"; @@ -12,16 +11,19 @@ import { Statusbar } from "./statusbar"; import { LayoutViewport } from "./viewport"; let quickCommands: CommandKeys[] = ["doc.save", "doc.saveToFile", "edit.undo", "edit.redo"]; -let ribbonTabs = DefaultRibbon.map((p) => RibbonTabData.fromProfile(p)); export class Editor extends HTMLElement { readonly ribbonContent: RibbonDataContent; - constructor(app: IApplication) { + constructor(app: IApplication, tabs: RibbonTab[]) { super(); let viewport = new LayoutViewport(app); viewport.classList.add(style.viewport); - this.ribbonContent = new RibbonDataContent(app, quickCommands, ribbonTabs); + this.ribbonContent = new RibbonDataContent( + app, + quickCommands, + tabs.map((p) => RibbonTabData.fromProfile(p)), + ); this.append( div( { className: style.root }, diff --git a/packages/chili-ui/src/mainWindow.ts b/packages/chili-ui/src/mainWindow.ts index 5da8e362..fb858a33 100644 --- a/packages/chili-ui/src/mainWindow.ts +++ b/packages/chili-ui/src/mainWindow.ts @@ -1,6 +1,15 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { Button, CommandKeys, I18nKeys, IApplication, IWindow, PubSub, debounce } from "chili-core"; +import { + Button, + CommandKeys, + I18nKeys, + IApplication, + IWindow, + PubSub, + RibbonTab, + debounce, +} from "chili-core"; import { Dialog } from "./dialog"; import { Editor } from "./editor"; import { Home } from "./home"; @@ -14,7 +23,7 @@ export class MainWindow implements IWindow { private _home?: Home; private _editor?: Editor; - constructor() { + constructor(readonly tabs: RibbonTab[]) { this.setTheme("light"); } @@ -54,7 +63,7 @@ export class MainWindow implements IWindow { } private async _initEditor(app: IApplication) { - this._editor = new Editor(app); + this._editor = new Editor(app, this.tabs); } registerHomeCommand(groupName: I18nKeys, command: CommandKeys | Button): void { diff --git a/packages/chili-ui/src/project/tree/tree.ts b/packages/chili-ui/src/project/tree/tree.ts index 5fbf4814..ee365f69 100644 --- a/packages/chili-ui/src/project/tree/tree.ts +++ b/packages/chili-ui/src/project/tree/tree.ts @@ -1,6 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { + GeometryNode, IDocument, INode, INodeChangedObserver, @@ -121,7 +122,7 @@ export class Tree extends HTMLElement implements INodeChangedObserver { private createHTMLElement(document: IDocument, node: INode): TreeItem { let result: TreeItem; if (INode.isLinkedListNode(node)) result = new TreeGroup(document, node); - else if (INode.isModelNode(node)) result = new TreeModel(node); + else if (node instanceof GeometryNode) result = new TreeModel(document, node); else throw new Error("unknown node"); return result; } diff --git a/packages/chili-ui/src/project/tree/treeItem.ts b/packages/chili-ui/src/project/tree/treeItem.ts index efaa7a22..110cdd49 100644 --- a/packages/chili-ui/src/project/tree/treeItem.ts +++ b/packages/chili-ui/src/project/tree/treeItem.ts @@ -33,7 +33,7 @@ export abstract class TreeItem extends HTMLElement { this.node.removePropertyChanged(this.onPropertyChanged); } - private onPropertyChanged = (property: keyof INode, model: INode) => { + private readonly onPropertyChanged = (property: keyof INode, model: INode) => { if (property === "visible") { setSVGIcon(this.visibleIcon, this.getVisibleIcon()); } else if (property === "parentVisible") { diff --git a/packages/chili-ui/src/project/tree/treeModel.ts b/packages/chili-ui/src/project/tree/treeModel.ts index 9b4b01d1..8fccdf2d 100644 --- a/packages/chili-ui/src/project/tree/treeModel.ts +++ b/packages/chili-ui/src/project/tree/treeModel.ts @@ -1,12 +1,12 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { IModel } from "chili-core"; +import { IDocument, INode } from "chili-core"; import { TreeItem } from "./treeItem"; import style from "./treeModel.module.css"; export class TreeModel extends TreeItem { - constructor(node: IModel) { - super(node.document, node); + constructor(document: IDocument, node: INode) { + super(document, node); this.append(this.name, this.visibleIcon); this.classList.add(style.panel); } diff --git a/packages/chili-ui/src/property/colorProperty.ts b/packages/chili-ui/src/property/colorProperty.ts index c9e0f223..b3595540 100644 --- a/packages/chili-ui/src/property/colorProperty.ts +++ b/packages/chili-ui/src/property/colorProperty.ts @@ -41,7 +41,7 @@ export class ColorProperty extends PropertyBase { private setColor = (e: Event) => { let value = (e.target as any).value; - let color = this.converter.convertBack(value).ok(); + let color = this.converter.convertBack(value).value; if (color === undefined) { PubSub.default.pub("showToast", "toast.converter.invalidColor"); return; diff --git a/packages/chili-ui/src/property/input.ts b/packages/chili-ui/src/property/input.ts index 8d6e761a..68d95937 100644 --- a/packages/chili-ui/src/property/input.ts +++ b/packages/chili-ui/src/property/input.ts @@ -35,7 +35,7 @@ class ArrayValueConverter implements IConverter { private getValueString(obj: any): string { let value = obj[this.property.name]; let cvalue = this.converter?.convert(value); - return cvalue?.isOk ? cvalue.ok() : String(value); + return cvalue?.isOk ? cvalue.value : String(value); } private getDefaultValue() { @@ -116,7 +116,7 @@ export class InputProperty extends PropertyBase { } Transaction.excute(this.document, "modify property", () => { this.objects.forEach((x) => { - x[this.property.name] = newValue?.ok(); + x[this.property.name] = newValue?.value; }); this.document.visual.update(); }); diff --git a/packages/chili-ui/src/property/material/materialEditor.ts b/packages/chili-ui/src/property/material/materialEditor.ts index 79963ae1..f1dfc4f3 100644 --- a/packages/chili-ui/src/property/material/materialEditor.ts +++ b/packages/chili-ui/src/property/material/materialEditor.ts @@ -129,7 +129,7 @@ export class MaterialEditor extends HTMLElement { private initEditingControl(material: Material) { const selectTexture = async () => { let file = await readFileAsync(".png, .jpg, .jpeg", false, "readAsDataURL"); - material.texture = file.ok()[0].data as string; + material.texture = file.value[0].data as string; }; let container = div({ className: style.properties, diff --git a/packages/chili-ui/src/property/materialProperty.ts b/packages/chili-ui/src/property/materialProperty.ts index 416d9947..1f61d057 100644 --- a/packages/chili-ui/src/property/materialProperty.ts +++ b/packages/chili-ui/src/property/materialProperty.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, IDocument, Material, Property, PubSub, Transaction } from "chili-core"; +import { GeometryNode, IDocument, Material, Property, PubSub, Transaction } from "chili-core"; import { button, div, localize, span } from "../components"; import style from "./materialProperty.module.css"; import { PropertyBase } from "./propertyBase"; @@ -8,7 +8,7 @@ import { PropertyBase } from "./propertyBase"; export class MaterialProperty extends PropertyBase { constructor( readonly document: IDocument, - objects: GeometryEntity[], + objects: GeometryNode[], readonly property: Property, ) { super(objects); diff --git a/packages/chili-ui/src/property/propertyView.module.css b/packages/chili-ui/src/property/propertyView.module.css index 87cb7af6..80d9099c 100644 --- a/packages/chili-ui/src/property/propertyView.module.css +++ b/packages/chili-ui/src/property/propertyView.module.css @@ -13,14 +13,19 @@ .panel { flex: 1; padding: 10px; + display: flex; + flex-direction: column; + gap: 6px; overflow-y: auto; border-top: 2px solid transparent; border-bottom: 2px solid transparent; background-color: var(--panel-background-color); } -.expander { - margin-top: 6px; +.rootProperties { + display: flex; + flex-direction: column; + gap: 6px; } .name { diff --git a/packages/chili-ui/src/property/propertyView.ts b/packages/chili-ui/src/property/propertyView.ts index 14ee677f..53aa681c 100644 --- a/packages/chili-ui/src/property/propertyView.ts +++ b/packages/chili-ui/src/property/propertyView.ts @@ -1,25 +1,24 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { - GeometryEntity, - GeometryModel, + GeometryNode, I18nKeys, IConverter, IDocument, INode, IView, - ParameterGeometryEntity, + Node, + ParameterShapeNode, Property, PubSub, } from "chili-core"; import { Expander, div, label, localize } from "../components"; -import { InputProperty } from "./input"; import { MatrixConverter } from "./matrixConverter"; import style from "./propertyView.module.css"; import { appendProperty } from "./utils"; export class PropertyView extends HTMLElement { - private panel = div({ className: style.panel }); + private readonly panel = div({ className: style.panel }); constructor(props: { className: string }) { super(); @@ -35,14 +34,14 @@ export class PropertyView extends HTMLElement { PubSub.default.sub("activeViewChanged", this.handleActiveViewChanged); } - private handleActiveViewChanged = (view: IView | undefined) => { + private readonly handleActiveViewChanged = (view: IView | undefined) => { if (view) { let nodes = view.document.selection.getSelectedNodes(); this.handleShowProperties(view.document, nodes); } }; - private handleShowProperties = (document: IDocument, nodes: INode[]) => { + private readonly handleShowProperties = (document: IDocument, nodes: INode[]) => { this.removeProperties(); if (nodes.length === 0) return; this.addModel(document, nodes); @@ -57,36 +56,24 @@ export class PropertyView extends HTMLElement { private addModel(document: IDocument, nodes: INode[]) { if (nodes.length === 0) return; - let properties = div(); - let header = new InputProperty(document, nodes, Property.getProperty(nodes[0], "name")!); - if (INode.isModelNode(nodes[0])) { - appendProperty(properties, document, nodes); - } + let properties = div({ className: style.rootProperties }); + Property.getOwnProperties(Node.prototype).forEach((x) => { + appendProperty(properties, document, nodes, x); + }); - this.panel.append(header, properties); + this.panel.append(properties); } private addGeometry(nodes: INode[], document: IDocument) { - let geometries = nodes.filter((x) => INode.isModelNode(x)).map((x) => (x as GeometryModel).geometry); + let geometries = nodes.filter((x) => x instanceof GeometryNode); if (geometries.length === 0 || !this.isAllElementsOfTypeFirstElement(geometries)) return; - this.addGeneral(document, geometries); this.addTransform(document, geometries); this.addParameters(geometries, document); } - private addGeneral(document: IDocument, geometries: GeometryEntity[]) { - let common = new Expander("common.general"); - this.panel.append(common); - common.classList.add(style.expander); - Property.getOwnProperties(GeometryEntity.prototype).forEach((x) => { - appendProperty(common.contenxtPanel, document, geometries, x); - }); - } - - private addTransform(document: IDocument, geometries: GeometryEntity[]) { + private addTransform(document: IDocument, geometries: GeometryNode[]) { let matrix = new Expander("common.matrix"); this.panel.append(matrix); - matrix.classList.add(style.expander); const addMatrix = (display: I18nKeys, converter: IConverter) => { appendProperty(matrix, document, geometries, { @@ -102,15 +89,12 @@ export class PropertyView extends HTMLElement { addMatrix("transform.rotation", converters.rotate); } - private addParameters(geometries: GeometryEntity[], document: IDocument) { - let entities = geometries - .map((x) => (x as ParameterGeometryEntity).body) - .filter((x) => x !== undefined); + private addParameters(geometries: GeometryNode[], document: IDocument) { + let entities = geometries.filter((x) => x instanceof ParameterShapeNode); if (entities.length === 0 || !this.isAllElementsOfTypeFirstElement(entities)) return; - let parameters = new Expander(entities[0].display); + let parameters = new Expander(entities[0].display()); this.panel.append(parameters); - parameters.classList.add(style.expander); - Property.getProperties(Object.getPrototypeOf(entities[0])).forEach((x) => { + Property.getProperties(Object.getPrototypeOf(entities[0]), Node.prototype).forEach((x) => { appendProperty(parameters.contenxtPanel, document, entities, x); }); } diff --git a/packages/chili-ui/src/ribbon/ribbon.ts b/packages/chili-ui/src/ribbon/ribbon.ts index 9a92575c..e8d9b84c 100644 --- a/packages/chili-ui/src/ribbon/ribbon.ts +++ b/packages/chili-ui/src/ribbon/ribbon.ts @@ -135,7 +135,7 @@ export class Ribbon extends HTMLElement { className: style.icon, icon: "icon-chili", }), - span({ textContent: `Chili3D - v${__APP_VERSION__}` }), + span({ id: "appName", textContent: `Chili3D - v${__APP_VERSION__}` }), ), ), div( diff --git a/packages/chili-ui/src/ribbon/ribbonData.ts b/packages/chili-ui/src/ribbon/ribbonData.ts index cf449dd2..62399f31 100644 --- a/packages/chili-ui/src/ribbon/ribbonData.ts +++ b/packages/chili-ui/src/ribbon/ribbonData.ts @@ -1,5 +1,12 @@ -import { Button, CommandKeys, I18nKeys, Observable, ObservableCollection } from "chili-core"; -import { RibbonGroupProfile, RibbonTabProfile } from "../profile/ribbon"; +import { + Button, + CommandKeys, + I18nKeys, + Observable, + ObservableCollection, + RibbonGroup, + RibbonTab, +} from "chili-core"; export type RibbonCommandData = CommandKeys | ObservableCollection | Button; @@ -20,7 +27,7 @@ export class RibbonGroupData extends Observable { this.items = new ObservableCollection(...items); } - static fromProfile(profile: RibbonGroupProfile) { + static fromProfile(profile: RibbonGroup) { return new RibbonGroupData( profile.groupName, ...profile.items.map((item) => { @@ -47,7 +54,7 @@ export class RibbonTabData extends Observable { this.groups.push(...groups); } - static fromProfile(profile: RibbonTabProfile) { + static fromProfile(profile: RibbonTab) { return new RibbonTabData( profile.tabName, ...profile.groups.map((group) => RibbonGroupData.fromProfile(group)), diff --git a/packages/chili-ui/test/converter.test.ts b/packages/chili-ui/test/converter.test.ts index c8e943e0..4d209904 100644 --- a/packages/chili-ui/test/converter.test.ts +++ b/packages/chili-ui/test/converter.test.ts @@ -13,28 +13,28 @@ describe("converter test", () => { let converter = new XYZConverter(); let xyz = XYZ.unitX; let c = converter.convert(xyz); - expect(c.ok()).toStrictEqual("1,0,0"); - expect(converter.convertBack(c.ok()).ok().x).toBe(1); + expect(c.value).toStrictEqual("1,0,0"); + expect(converter.convertBack(c.value).value.x).toBe(1); expect(converter.convertBack("1").isOk).toBe(false); expect(converter.convertBack("1, 1, 1, 1").isOk).toBe(false); - expect(converter.convertBack("1, 1, 1").ok()).toStrictEqual(new XYZ(1, 1, 1)); + expect(converter.convertBack("1, 1, 1").value).toStrictEqual(new XYZ(1, 1, 1)); }); test("test NumberConverter", () => { let converter = new NumberConverter(); expect(converter.convert(Number.NaN).isOk).toBe(false); - expect(converter.convert(-20).ok()).toBe("-20"); - expect(converter.convert(20).ok()).toBe("20"); - expect(converter.convert(1e3).ok()).toBe("1000"); + expect(converter.convert(-20).value).toBe("-20"); + expect(converter.convert(20).value).toBe("20"); + expect(converter.convert(1e3).value).toBe("1000"); expect(converter.convertBack("NaN").isOk).toBeFalsy(); expect(converter.convertBack("1a").isOk).toBeFalsy(); - expect(converter.convertBack("1E-3").ok()).toBe(0.001); - expect(converter.convertBack("-3").ok()).toBe(-3); + expect(converter.convertBack("1E-3").value).toBe(0.001); + expect(converter.convertBack("-3").value).toBe(-3); }); test("test StringConverter", () => { let converter = new StringConverter(); - expect(converter.convert("").ok()).toBe(""); - expect(converter.convertBack("").ok()).toBe(""); + expect(converter.convert("").value).toBe(""); + expect(converter.convertBack("").value).toBe(""); }); }); diff --git a/packages/chili-vis/package.json b/packages/chili-vis/package.json index abd63d14..ae81e5d1 100644 --- a/packages/chili-vis/package.json +++ b/packages/chili-vis/package.json @@ -1,6 +1,6 @@ { "name": "chili-vis", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-vis/src/modelSelectionEventHandler.ts b/packages/chili-vis/src/modelSelectionEventHandler.ts index 077b87a4..4627c5a4 100644 --- a/packages/chili-vis/src/modelSelectionEventHandler.ts +++ b/packages/chili-vis/src/modelSelectionEventHandler.ts @@ -2,9 +2,8 @@ import { AsyncController, + GeometryNode, IDocument, - IModel, - INode, IShapeFilter, IView, ShapeType, @@ -13,8 +12,8 @@ import { import { SelectionHandler } from "./selectionEventHandler"; export class ModelSelectionHandler extends SelectionHandler { - models(): IModel[] { - return this.document.selection.getSelectedNodes().filter((x) => INode.isModelNode(x)) as IModel[]; + models(): GeometryNode[] { + return this.document.selection.getSelectedNodes().filter((x) => x instanceof GeometryNode); } constructor( @@ -33,7 +32,7 @@ export class ModelSelectionHandler extends SelectionHandler { } let models = shapes .map((x) => view.document.visual.context.getModel(x.owner)) - .filter((x) => x !== undefined) as IModel[]; + .filter((x) => x !== undefined); this.document.selection.setSelection(models, event.shiftKey); return models.length; } diff --git a/packages/chili-vis/src/selectionEventHandler.ts b/packages/chili-vis/src/selectionEventHandler.ts index 9ddc6da2..810eaec8 100644 --- a/packages/chili-vis/src/selectionEventHandler.ts +++ b/packages/chili-vis/src/selectionEventHandler.ts @@ -177,7 +177,7 @@ export abstract class SelectionHandler implements IEventHandler { protected cleanHighlights() { this._highlights?.forEach((x) => { - x.owner.geometryEngity.document.visual.highlighter.removeState( + x.owner.geometryNode.document.visual.highlighter.removeState( x.owner, VisualState.highlighter, this.shapeType, diff --git a/packages/chili-vis/src/shapeSelectionEventHandler.ts b/packages/chili-vis/src/shapeSelectionEventHandler.ts index db6f973d..12208aeb 100644 --- a/packages/chili-vis/src/shapeSelectionEventHandler.ts +++ b/packages/chili-vis/src/shapeSelectionEventHandler.ts @@ -43,12 +43,12 @@ export class ShapeSelectionHandler extends SelectionHandler { private removeSelected(shape: VisualShapeData) { this._shapes.delete(shape); - let highlighter = shape.owner.geometryEngity.document.visual.highlighter; + let highlighter = shape.owner.geometryNode.document.visual.highlighter; highlighter.removeState(shape.owner, VisualState.selected, shape.shape.shapeType, ...shape.indexes); } private addSelected(shape: VisualShapeData) { - let highlighter = shape.owner.geometryEngity.document.visual.highlighter; + let highlighter = shape.owner.geometryNode.document.visual.highlighter; highlighter.addState(shape.owner, VisualState.selected, this.shapeType, ...shape.indexes); this._shapes.add(shape); } diff --git a/packages/chili-wasm/lib/chili-wasm.d.ts b/packages/chili-wasm/lib/chili-wasm.d.ts index 19b9de15..068644b0 100644 --- a/packages/chili-wasm/lib/chili-wasm.d.ts +++ b/packages/chili-wasm/lib/chili-wasm.d.ts @@ -810,11 +810,11 @@ interface EmbindModule { TopoDS_CompSolid: {}; Shape: { sectionSS(_0: TopoDS_Shape, _1: TopoDS_Shape): TopoDS_Shape; - sectionSP(_0: TopoDS_Shape, _1: gp_Pln): TopoDS_Shape; isClosed(_0: TopoDS_Shape): boolean; findAncestor(_0: TopoDS_Shape, _1: TopoDS_Shape, _2: TopAbs_ShapeEnum): Array; findSubShapes(_0: TopoDS_Shape, _1: TopAbs_ShapeEnum): Array; splitByEdgeOrWires(_0: TopoDS_Shape, _1: Array): TopoDS_Shape; + sectionSP(_0: TopoDS_Shape, _1: Ax3): TopoDS_Shape; }; Vertex: { point(_0: TopoDS_Vertex): Vector3 }; Edge: { diff --git a/packages/chili-wasm/lib/chili-wasm.js b/packages/chili-wasm/lib/chili-wasm.js old mode 100755 new mode 100644 index 9fea6094..1703eb1d --- a/packages/chili-wasm/lib/chili-wasm.js +++ b/packages/chili-wasm/lib/chili-wasm.js @@ -219,10 +219,10 @@ var Module = (() => { var info = getWasmImports(); function receiveInstance(instance, module) { wasmExports = instance.exports; - wasmMemory = wasmExports["la"]; + wasmMemory = wasmExports["ja"]; updateMemoryViews(); - wasmTable = wasmExports["qa"]; - addOnInit(wasmExports["ma"]); + wasmTable = wasmExports["oa"]; + addOnInit(wasmExports["ka"]); removeRunDependency("wasm-instantiate"); return wasmExports; } @@ -664,16 +664,9 @@ var Module = (() => { }, }, }; - var zeroMemory = (address, size) => { - HEAPU8.fill(0, address, address + size); - return address; - }; var alignMemory = (size, alignment) => Math.ceil(size / alignment) * alignment; var mmapAlloc = (size) => { - size = alignMemory(size, 65536); - var ptr = _emscripten_builtin_memalign(65536, size); - if (!ptr) return 0; - return zeroMemory(ptr, size); + abort(); }; var MEMFS = { ops_table: null, @@ -2765,19 +2758,6 @@ var Module = (() => { return -e.errno; } } - function ___syscall_mkdirat(dirfd, path, mode) { - try { - path = SYSCALLS.getStr(path); - path = SYSCALLS.calculateAt(dirfd, path); - path = PATH.normalize(path); - if (path[path.length - 1] === "/") path = path.substr(0, path.length - 1); - FS.mkdir(path, mode, 0); - return 0; - } catch (e) { - if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; - return -e.errno; - } - } function ___syscall_newfstatat(dirfd, path, buf, flags) { try { path = SYSCALLS.getStr(path); @@ -4919,661 +4899,6 @@ var Module = (() => { var _emscripten_date_now = () => Date.now(); var getHeapMax = () => 2147483648; var _emscripten_get_heap_max = () => getHeapMax(); - var _emscripten_set_main_loop_timing = (mode, value) => { - Browser.mainLoop.timingMode = mode; - Browser.mainLoop.timingValue = value; - if (!Browser.mainLoop.func) { - return 1; - } - if (!Browser.mainLoop.running) { - Browser.mainLoop.running = true; - } - if (mode == 0) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { - var timeUntilNextTick = - Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now()) | 0; - setTimeout(Browser.mainLoop.runner, timeUntilNextTick); - }; - Browser.mainLoop.method = "timeout"; - } else if (mode == 1) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { - Browser.requestAnimationFrame(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = "rAF"; - } else if (mode == 2) { - if (typeof Browser.setImmediate == "undefined") { - if (typeof setImmediate == "undefined") { - var setImmediates = []; - var emscriptenMainLoopMessageId = "setimmediate"; - var Browser_setImmediate_messageHandler = (event) => { - if ( - event.data === emscriptenMainLoopMessageId || - event.data.target === emscriptenMainLoopMessageId - ) { - event.stopPropagation(); - setImmediates.shift()(); - } - }; - addEventListener("message", Browser_setImmediate_messageHandler, true); - Browser.setImmediate = function Browser_emulated_setImmediate(func) { - setImmediates.push(func); - if (ENVIRONMENT_IS_WORKER) { - Module["setImmediates"] ??= []; - Module["setImmediates"].push(func); - postMessage({ target: emscriptenMainLoopMessageId }); - } else postMessage(emscriptenMainLoopMessageId, "*"); - }; - } else { - Browser.setImmediate = setImmediate; - } - } - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { - Browser.setImmediate(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = "immediate"; - } - return 0; - }; - var setMainLoop = (browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) => { - Browser.mainLoop.func = browserIterationFunc; - Browser.mainLoop.arg = arg; - var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; - function checkIsRunning() { - if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) { - return false; - } - return true; - } - Browser.mainLoop.running = false; - Browser.mainLoop.runner = function Browser_mainLoop_runner() { - if (ABORT) return; - if (Browser.mainLoop.queue.length > 0) { - var start = Date.now(); - var blocker = Browser.mainLoop.queue.shift(); - blocker.func(blocker.arg); - if (Browser.mainLoop.remainingBlockers) { - var remaining = Browser.mainLoop.remainingBlockers; - var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining); - if (blocker.counted) { - Browser.mainLoop.remainingBlockers = next; - } else { - next = next + 0.5; - Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9; - } - } - Browser.mainLoop.updateStatus(); - if (!checkIsRunning()) return; - setTimeout(Browser.mainLoop.runner, 0); - return; - } - if (!checkIsRunning()) return; - Browser.mainLoop.currentFrameNumber = (Browser.mainLoop.currentFrameNumber + 1) | 0; - if ( - Browser.mainLoop.timingMode == 1 && - Browser.mainLoop.timingValue > 1 && - Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0 - ) { - Browser.mainLoop.scheduler(); - return; - } else if (Browser.mainLoop.timingMode == 0) { - Browser.mainLoop.tickStartTime = _emscripten_get_now(); - } - Browser.mainLoop.runIter(browserIterationFunc); - if (!checkIsRunning()) return; - if (typeof SDL == "object") SDL.audio?.queueNewAudioData?.(); - Browser.mainLoop.scheduler(); - }; - if (!noSetTiming) { - if (fps && fps > 0) { - _emscripten_set_main_loop_timing(0, 1e3 / fps); - } else { - _emscripten_set_main_loop_timing(1, 1); - } - Browser.mainLoop.scheduler(); - } - if (simulateInfiniteLoop) { - throw "unwind"; - } - }; - var safeSetTimeout = (func, timeout) => - setTimeout(() => { - callUserCallback(func); - }, timeout); - var warnOnce = (text) => { - warnOnce.shown ||= {}; - if (!warnOnce.shown[text]) { - warnOnce.shown[text] = 1; - err(text); - } - }; - var Browser = { - mainLoop: { - running: false, - scheduler: null, - method: "", - currentlyRunningMainloop: 0, - func: null, - arg: 0, - timingMode: 0, - timingValue: 0, - currentFrameNumber: 0, - queue: [], - pause() { - Browser.mainLoop.scheduler = null; - Browser.mainLoop.currentlyRunningMainloop++; - }, - resume() { - Browser.mainLoop.currentlyRunningMainloop++; - var timingMode = Browser.mainLoop.timingMode; - var timingValue = Browser.mainLoop.timingValue; - var func = Browser.mainLoop.func; - Browser.mainLoop.func = null; - setMainLoop(func, 0, false, Browser.mainLoop.arg, true); - _emscripten_set_main_loop_timing(timingMode, timingValue); - Browser.mainLoop.scheduler(); - }, - updateStatus() { - if (Module["setStatus"]) { - var message = Module["statusMessage"] || "Please wait..."; - var remaining = Browser.mainLoop.remainingBlockers; - var expected = Browser.mainLoop.expectedBlockers; - if (remaining) { - if (remaining < expected) { - Module["setStatus"](`{message} ({expected - remaining}/{expected})`); - } else { - Module["setStatus"](message); - } - } else { - Module["setStatus"](""); - } - } - }, - runIter(func) { - if (ABORT) return; - if (Module["preMainLoop"]) { - var preRet = Module["preMainLoop"](); - if (preRet === false) { - return; - } - } - callUserCallback(func); - Module["postMainLoop"]?.(); - }, - }, - useWebGL: false, - isFullscreen: false, - pointerLock: false, - moduleContextCreatedCallbacks: [], - workers: [], - init() { - if (Browser.initted) return; - Browser.initted = true; - var imagePlugin = {}; - imagePlugin["canHandle"] = function imagePlugin_canHandle(name) { - return !Module["noImageDecoding"] && /\.(jpg|jpeg|png|bmp|webp)$/i.test(name); - }; - imagePlugin["handle"] = function imagePlugin_handle(byteArray, name, onload, onerror) { - var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - if (b.size !== byteArray.length) { - b = new Blob([new Uint8Array(byteArray).buffer], { - type: Browser.getMimetype(name), - }); - } - var url = URL.createObjectURL(b); - var img = new Image(); - img.onload = () => { - var canvas = document.createElement("canvas"); - canvas.width = img.width; - canvas.height = img.height; - var ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - preloadedImages[name] = canvas; - URL.revokeObjectURL(url); - onload?.(byteArray); - }; - img.onerror = (event) => { - err(`Image ${url} could not be decoded`); - onerror?.(); - }; - img.src = url; - }; - preloadPlugins.push(imagePlugin); - var audioPlugin = {}; - audioPlugin["canHandle"] = function audioPlugin_canHandle(name) { - return ( - !Module["noAudioDecoding"] && name.substr(-4) in { ".ogg": 1, ".wav": 1, ".mp3": 1 } - ); - }; - audioPlugin["handle"] = function audioPlugin_handle(byteArray, name, onload, onerror) { - var done = false; - function finish(audio) { - if (done) return; - done = true; - preloadedAudios[name] = audio; - onload?.(byteArray); - } - var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - var url = URL.createObjectURL(b); - var audio = new Audio(); - audio.addEventListener("canplaythrough", () => finish(audio), false); - audio.onerror = function audio_onerror(event) { - if (done) return; - err( - `warning: browser could not fully decode audio ${name}, trying slower base64 approach`, - ); - function encode64(data) { - var BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var PAD = "="; - var ret = ""; - var leftchar = 0; - var leftbits = 0; - for (var i = 0; i < data.length; i++) { - leftchar = (leftchar << 8) | data[i]; - leftbits += 8; - while (leftbits >= 6) { - var curr = (leftchar >> (leftbits - 6)) & 63; - leftbits -= 6; - ret += BASE[curr]; - } - } - if (leftbits == 2) { - ret += BASE[(leftchar & 3) << 4]; - ret += PAD + PAD; - } else if (leftbits == 4) { - ret += BASE[(leftchar & 15) << 2]; - ret += PAD; - } - return ret; - } - audio.src = "data:audio/x-" + name.substr(-3) + ";base64," + encode64(byteArray); - finish(audio); - }; - audio.src = url; - safeSetTimeout(() => { - finish(audio); - }, 1e4); - }; - preloadPlugins.push(audioPlugin); - function pointerLockChange() { - Browser.pointerLock = - document["pointerLockElement"] === Module["canvas"] || - document["mozPointerLockElement"] === Module["canvas"] || - document["webkitPointerLockElement"] === Module["canvas"] || - document["msPointerLockElement"] === Module["canvas"]; - } - var canvas = Module["canvas"]; - if (canvas) { - canvas.requestPointerLock = - canvas["requestPointerLock"] || - canvas["mozRequestPointerLock"] || - canvas["webkitRequestPointerLock"] || - canvas["msRequestPointerLock"] || - (() => {}); - canvas.exitPointerLock = - document["exitPointerLock"] || - document["mozExitPointerLock"] || - document["webkitExitPointerLock"] || - document["msExitPointerLock"] || - (() => {}); - canvas.exitPointerLock = canvas.exitPointerLock.bind(document); - document.addEventListener("pointerlockchange", pointerLockChange, false); - document.addEventListener("mozpointerlockchange", pointerLockChange, false); - document.addEventListener("webkitpointerlockchange", pointerLockChange, false); - document.addEventListener("mspointerlockchange", pointerLockChange, false); - if (Module["elementPointerLock"]) { - canvas.addEventListener( - "click", - (ev) => { - if (!Browser.pointerLock && Module["canvas"].requestPointerLock) { - Module["canvas"].requestPointerLock(); - ev.preventDefault(); - } - }, - false, - ); - } - } - }, - createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { - if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; - var ctx; - var contextHandle; - if (useWebGL) { - var contextAttributes = { antialias: false, alpha: false, majorVersion: 1 }; - if (webGLContextAttributes) { - for (var attribute in webGLContextAttributes) { - contextAttributes[attribute] = webGLContextAttributes[attribute]; - } - } - if (typeof GL != "undefined") { - contextHandle = GL.createContext(canvas, contextAttributes); - if (contextHandle) { - ctx = GL.getContext(contextHandle).GLctx; - } - } - } else { - ctx = canvas.getContext("2d"); - } - if (!ctx) return null; - if (setInModule) { - Module.ctx = ctx; - if (useWebGL) GL.makeContextCurrent(contextHandle); - Browser.useWebGL = useWebGL; - Browser.moduleContextCreatedCallbacks.forEach((callback) => callback()); - Browser.init(); - } - return ctx; - }, - fullscreenHandlersInstalled: false, - lockPointer: undefined, - resizeCanvas: undefined, - requestFullscreen(lockPointer, resizeCanvas) { - Browser.lockPointer = lockPointer; - Browser.resizeCanvas = resizeCanvas; - if (typeof Browser.lockPointer == "undefined") Browser.lockPointer = true; - if (typeof Browser.resizeCanvas == "undefined") Browser.resizeCanvas = false; - var canvas = Module["canvas"]; - function fullscreenChange() { - Browser.isFullscreen = false; - var canvasContainer = canvas.parentNode; - if ( - (document["fullscreenElement"] || - document["mozFullScreenElement"] || - document["msFullscreenElement"] || - document["webkitFullscreenElement"] || - document["webkitCurrentFullScreenElement"]) === canvasContainer - ) { - canvas.exitFullscreen = Browser.exitFullscreen; - if (Browser.lockPointer) canvas.requestPointerLock(); - Browser.isFullscreen = true; - if (Browser.resizeCanvas) { - Browser.setFullscreenCanvasSize(); - } else { - Browser.updateCanvasDimensions(canvas); - } - } else { - canvasContainer.parentNode.insertBefore(canvas, canvasContainer); - canvasContainer.parentNode.removeChild(canvasContainer); - if (Browser.resizeCanvas) { - Browser.setWindowedCanvasSize(); - } else { - Browser.updateCanvasDimensions(canvas); - } - } - Module["onFullScreen"]?.(Browser.isFullscreen); - Module["onFullscreen"]?.(Browser.isFullscreen); - } - if (!Browser.fullscreenHandlersInstalled) { - Browser.fullscreenHandlersInstalled = true; - document.addEventListener("fullscreenchange", fullscreenChange, false); - document.addEventListener("mozfullscreenchange", fullscreenChange, false); - document.addEventListener("webkitfullscreenchange", fullscreenChange, false); - document.addEventListener("MSFullscreenChange", fullscreenChange, false); - } - var canvasContainer = document.createElement("div"); - canvas.parentNode.insertBefore(canvasContainer, canvas); - canvasContainer.appendChild(canvas); - canvasContainer.requestFullscreen = - canvasContainer["requestFullscreen"] || - canvasContainer["mozRequestFullScreen"] || - canvasContainer["msRequestFullscreen"] || - (canvasContainer["webkitRequestFullscreen"] - ? () => canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]) - : null) || - (canvasContainer["webkitRequestFullScreen"] - ? () => canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]) - : null); - canvasContainer.requestFullscreen(); - }, - exitFullscreen() { - if (!Browser.isFullscreen) { - return false; - } - var CFS = - document["exitFullscreen"] || - document["cancelFullScreen"] || - document["mozCancelFullScreen"] || - document["msExitFullscreen"] || - document["webkitCancelFullScreen"] || - (() => {}); - CFS.apply(document, []); - return true; - }, - nextRAF: 0, - fakeRequestAnimationFrame(func) { - var now = Date.now(); - if (Browser.nextRAF === 0) { - Browser.nextRAF = now + 1e3 / 60; - } else { - while (now + 2 >= Browser.nextRAF) { - Browser.nextRAF += 1e3 / 60; - } - } - var delay = Math.max(Browser.nextRAF - now, 0); - setTimeout(func, delay); - }, - requestAnimationFrame(func) { - if (typeof requestAnimationFrame == "function") { - requestAnimationFrame(func); - return; - } - var RAF = Browser.fakeRequestAnimationFrame; - RAF(func); - }, - safeSetTimeout(func, timeout) { - return safeSetTimeout(func, timeout); - }, - safeRequestAnimationFrame(func) { - return Browser.requestAnimationFrame(() => { - callUserCallback(func); - }); - }, - getMimetype(name) { - return { - jpg: "image/jpeg", - jpeg: "image/jpeg", - png: "image/png", - bmp: "image/bmp", - ogg: "audio/ogg", - wav: "audio/wav", - mp3: "audio/mpeg", - }[name.substr(name.lastIndexOf(".") + 1)]; - }, - getUserMedia(func) { - window.getUserMedia ||= navigator["getUserMedia"] || navigator["mozGetUserMedia"]; - window.getUserMedia(func); - }, - getMovementX(event) { - return event["movementX"] || event["mozMovementX"] || event["webkitMovementX"] || 0; - }, - getMovementY(event) { - return event["movementY"] || event["mozMovementY"] || event["webkitMovementY"] || 0; - }, - getMouseWheelDelta(event) { - var delta = 0; - switch (event.type) { - case "DOMMouseScroll": - delta = event.detail / 3; - break; - case "mousewheel": - delta = event.wheelDelta / 120; - break; - case "wheel": - delta = event.deltaY; - switch (event.deltaMode) { - case 0: - delta /= 100; - break; - case 1: - delta /= 3; - break; - case 2: - delta *= 80; - break; - default: - throw "unrecognized mouse wheel delta mode: " + event.deltaMode; - } - break; - default: - throw "unrecognized mouse wheel event: " + event.type; - } - return delta; - }, - mouseX: 0, - mouseY: 0, - mouseMovementX: 0, - mouseMovementY: 0, - touches: {}, - lastTouches: {}, - calculateMouseCoords(pageX, pageY) { - var rect = Module["canvas"].getBoundingClientRect(); - var cw = Module["canvas"].width; - var ch = Module["canvas"].height; - var scrollX = typeof window.scrollX != "undefined" ? window.scrollX : window.pageXOffset; - var scrollY = typeof window.scrollY != "undefined" ? window.scrollY : window.pageYOffset; - var adjustedX = pageX - (scrollX + rect.left); - var adjustedY = pageY - (scrollY + rect.top); - adjustedX = adjustedX * (cw / rect.width); - adjustedY = adjustedY * (ch / rect.height); - return { x: adjustedX, y: adjustedY }; - }, - setMouseCoords(pageX, pageY) { - const { x: x, y: y } = Browser.calculateMouseCoords(pageX, pageY); - Browser.mouseMovementX = x - Browser.mouseX; - Browser.mouseMovementY = y - Browser.mouseY; - Browser.mouseX = x; - Browser.mouseY = y; - }, - calculateMouseEvent(event) { - if (Browser.pointerLock) { - if (event.type != "mousemove" && "mozMovementX" in event) { - Browser.mouseMovementX = Browser.mouseMovementY = 0; - } else { - Browser.mouseMovementX = Browser.getMovementX(event); - Browser.mouseMovementY = Browser.getMovementY(event); - } - Browser.mouseX += Browser.mouseMovementX; - Browser.mouseY += Browser.mouseMovementY; - } else { - if ( - event.type === "touchstart" || - event.type === "touchend" || - event.type === "touchmove" - ) { - var touch = event.touch; - if (touch === undefined) { - return; - } - var coords = Browser.calculateMouseCoords(touch.pageX, touch.pageY); - if (event.type === "touchstart") { - Browser.lastTouches[touch.identifier] = coords; - Browser.touches[touch.identifier] = coords; - } else if (event.type === "touchend" || event.type === "touchmove") { - var last = Browser.touches[touch.identifier]; - last ||= coords; - Browser.lastTouches[touch.identifier] = last; - Browser.touches[touch.identifier] = coords; - } - return; - } - Browser.setMouseCoords(event.pageX, event.pageY); - } - }, - resizeListeners: [], - updateResizeListeners() { - var canvas = Module["canvas"]; - Browser.resizeListeners.forEach((listener) => listener(canvas.width, canvas.height)); - }, - setCanvasSize(width, height, noUpdates) { - var canvas = Module["canvas"]; - Browser.updateCanvasDimensions(canvas, width, height); - if (!noUpdates) Browser.updateResizeListeners(); - }, - windowedWidth: 0, - windowedHeight: 0, - setFullscreenCanvasSize() { - if (typeof SDL != "undefined") { - var flags = HEAPU32[SDL.screen >> 2]; - flags = flags | 8388608; - HEAP32[SDL.screen >> 2] = flags; - } - Browser.updateCanvasDimensions(Module["canvas"]); - Browser.updateResizeListeners(); - }, - setWindowedCanvasSize() { - if (typeof SDL != "undefined") { - var flags = HEAPU32[SDL.screen >> 2]; - flags = flags & ~8388608; - HEAP32[SDL.screen >> 2] = flags; - } - Browser.updateCanvasDimensions(Module["canvas"]); - Browser.updateResizeListeners(); - }, - updateCanvasDimensions(canvas, wNative, hNative) { - if (wNative && hNative) { - canvas.widthNative = wNative; - canvas.heightNative = hNative; - } else { - wNative = canvas.widthNative; - hNative = canvas.heightNative; - } - var w = wNative; - var h = hNative; - if (Module["forcedAspectRatio"] && Module["forcedAspectRatio"] > 0) { - if (w / h < Module["forcedAspectRatio"]) { - w = Math.round(h * Module["forcedAspectRatio"]); - } else { - h = Math.round(w / Module["forcedAspectRatio"]); - } - } - if ( - (document["fullscreenElement"] || - document["mozFullScreenElement"] || - document["msFullscreenElement"] || - document["webkitFullscreenElement"] || - document["webkitCurrentFullScreenElement"]) === canvas.parentNode && - typeof screen != "undefined" - ) { - var factor = Math.min(screen.width / w, screen.height / h); - w = Math.round(w * factor); - h = Math.round(h * factor); - } - if (Browser.resizeCanvas) { - if (canvas.width != w) canvas.width = w; - if (canvas.height != h) canvas.height = h; - if (typeof canvas.style != "undefined") { - canvas.style.removeProperty("width"); - canvas.style.removeProperty("height"); - } - } else { - if (canvas.width != wNative) canvas.width = wNative; - if (canvas.height != hNative) canvas.height = hNative; - if (typeof canvas.style != "undefined") { - if (w != wNative || h != hNative) { - canvas.style.setProperty("width", w + "px", "important"); - canvas.style.setProperty("height", h + "px", "important"); - } else { - canvas.style.removeProperty("width"); - canvas.style.removeProperty("height"); - } - } - } - }, - }; - var getPreloadedImageData = (path, w, h) => { - path = PATH_FS.resolve(path); - var canvas = preloadedImages[path]; - if (!canvas) return 0; - var ctx = canvas.getContext("2d"); - var image = ctx.getImageData(0, 0, canvas.width, canvas.height); - var buf = _malloc(canvas.width * canvas.height * 4); - HEAPU8.set(image.data, buf); - HEAP32[w >> 2] = canvas.width; - HEAP32[h >> 2] = canvas.height; - return buf; - }; - var _emscripten_get_preloaded_image_data = (path, w, h) => - getPreloadedImageData(UTF8ToString(path), w, h); var growMemory = (size) => { var b = wasmMemory.buffer; var pages = (size - b.byteLength + 65535) / 65536; @@ -5768,55 +5093,45 @@ var Module = (() => { init_RegisteredPointer(); UnboundTypeError = Module["UnboundTypeError"] = extendError(Error, "UnboundTypeError"); init_emval(); - Module["requestFullscreen"] = Browser.requestFullscreen; - Module["requestAnimationFrame"] = Browser.requestAnimationFrame; - Module["setCanvasSize"] = Browser.setCanvasSize; - Module["pauseMainLoop"] = Browser.mainLoop.pause; - Module["resumeMainLoop"] = Browser.mainLoop.resume; - Module["getUserMedia"] = Browser.getUserMedia; - Module["createContext"] = Browser.createContext; - var preloadedImages = {}; - var preloadedAudios = {}; var wasmImports = { - fa: OSD_MemInfo_getModuleHeapLength, + ea: OSD_MemInfo_getModuleHeapLength, a: ___cxa_throw, - aa: ___syscall_chmod, - ba: ___syscall_faccessat, + Z: ___syscall_chmod, + _: ___syscall_faccessat, B: ___syscall_fcntl64, - Y: ___syscall_fstat64, - da: ___syscall_ioctl, - W: ___syscall_lstat64, - S: ___syscall_mkdirat, - V: ___syscall_newfstatat, + V: ___syscall_fstat64, + ca: ___syscall_ioctl, + T: ___syscall_lstat64, + S: ___syscall_newfstatat, D: ___syscall_openat, - X: ___syscall_stat64, - R: __abort_js, + U: ___syscall_stat64, + P: __abort_js, p: __embind_finalize_value_object, - K: __embind_register_bigint, - ja: __embind_register_bool, + I: __embind_register_bigint, + ha: __embind_register_bool, c: __embind_register_class, d: __embind_register_class_class_function, j: __embind_register_class_constructor, b: __embind_register_class_function, g: __embind_register_class_property, - ia: __embind_register_emval, + ga: __embind_register_emval, z: __embind_register_enum, h: __embind_register_enum_value, - G: __embind_register_float, - ha: __embind_register_function, + E: __embind_register_float, + fa: __embind_register_function, s: __embind_register_integer, m: __embind_register_memory_view, y: __embind_register_optional, - H: __embind_register_std_string, + F: __embind_register_std_string, C: __embind_register_std_wstring, n: __embind_register_user_type, q: __embind_register_value_object, f: __embind_register_value_object_field, - ka: __embind_register_void, - _: __emscripten_get_now_is_monotonic, - M: __emscripten_lookup_name, - Z: __emscripten_memcpy_js, - Q: __emscripten_runtime_keepalive_clear, + ia: __embind_register_void, + X: __emscripten_get_now_is_monotonic, + K: __emscripten_lookup_name, + W: __emscripten_memcpy_js, + O: __emscripten_runtime_keepalive_clear, o: __emval_as, u: __emval_call_method, e: __emval_decref, @@ -5828,39 +5143,34 @@ var Module = (() => { x: __emval_new_cstring, k: __emval_run_destructors, l: __emval_take_value, - I: __localtime_js, - L: __setitimer_js, - ca: __tzset_js, - $: _emscripten_date_now, - O: _emscripten_get_heap_max, - ga: _emscripten_get_preloaded_image_data, - N: _emscripten_resize_heap, - T: _environ_get, - U: _environ_sizes_get, - ea: _exit, + G: __localtime_js, + J: __setitimer_js, + $: __tzset_js, + Y: _emscripten_date_now, + M: _emscripten_get_heap_max, + L: _emscripten_resize_heap, + Q: _environ_get, + R: _environ_sizes_get, + da: _exit, A: _fd_close, - F: _fd_read, - J: _fd_seek, - E: _fd_write, - P: _proc_exit, + ba: _fd_read, + H: _fd_seek, + aa: _fd_write, + N: _proc_exit, }; var wasmExports = createWasm(); - var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports["ma"])(); - var ___getTypeName = (a0) => (___getTypeName = wasmExports["na"])(a0); - var _malloc = (a0) => (_malloc = wasmExports["oa"])(a0); - var _free = (a0) => (_free = wasmExports["pa"])(a0); - var _htons = (a0) => (_htons = wasmExports["ra"])(a0); - var _emscripten_builtin_memalign = (a0, a1) => - (_emscripten_builtin_memalign = wasmExports["sa"])(a0, a1); - var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["ta"])(a0, a1); + var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports["ka"])(); + var ___getTypeName = (a0) => (___getTypeName = wasmExports["la"])(a0); + var _malloc = (a0) => (_malloc = wasmExports["ma"])(a0); + var _free = (a0) => (_free = wasmExports["na"])(a0); + var _htons = (a0) => (_htons = wasmExports["pa"])(a0); + var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["qa"])(a0, a1); var dynCall_jiji = (Module["dynCall_jiji"] = (a0, a1, a2, a3, a4) => - (dynCall_jiji = Module["dynCall_jiji"] = wasmExports["ua"])(a0, a1, a2, a3, a4)); + (dynCall_jiji = Module["dynCall_jiji"] = wasmExports["ra"])(a0, a1, a2, a3, a4)); var dynCall_viijii = (Module["dynCall_viijii"] = (a0, a1, a2, a3, a4, a5, a6) => - (dynCall_viijii = Module["dynCall_viijii"] = wasmExports["va"])(a0, a1, a2, a3, a4, a5, a6)); - var dynCall_viiijj = (Module["dynCall_viiijj"] = (a0, a1, a2, a3, a4, a5, a6, a7) => - (dynCall_viiijj = Module["dynCall_viiijj"] = wasmExports["wa"])(a0, a1, a2, a3, a4, a5, a6, a7)); + (dynCall_viijii = Module["dynCall_viijii"] = wasmExports["sa"])(a0, a1, a2, a3, a4, a5, a6)); var dynCall_viiiiji = (Module["dynCall_viiiiji"] = (a0, a1, a2, a3, a4, a5, a6, a7) => - (dynCall_viiiiji = Module["dynCall_viiiiji"] = wasmExports["xa"])( + (dynCall_viiiiji = Module["dynCall_viiiiji"] = wasmExports["ta"])( a0, a1, a2, @@ -5871,9 +5181,9 @@ var Module = (() => { a7, )); var dynCall_iiiiij = (Module["dynCall_iiiiij"] = (a0, a1, a2, a3, a4, a5, a6) => - (dynCall_iiiiij = Module["dynCall_iiiiij"] = wasmExports["ya"])(a0, a1, a2, a3, a4, a5, a6)); + (dynCall_iiiiij = Module["dynCall_iiiiij"] = wasmExports["ua"])(a0, a1, a2, a3, a4, a5, a6)); var dynCall_iiiiijj = (Module["dynCall_iiiiijj"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8) => - (dynCall_iiiiijj = Module["dynCall_iiiiijj"] = wasmExports["za"])( + (dynCall_iiiiijj = Module["dynCall_iiiiijj"] = wasmExports["va"])( a0, a1, a2, @@ -5885,7 +5195,7 @@ var Module = (() => { a8, )); var dynCall_iiiiiijj = (Module["dynCall_iiiiiijj"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => - (dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = wasmExports["Aa"])( + (dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = wasmExports["wa"])( a0, a1, a2, diff --git a/packages/chili-wasm/lib/chili-wasm.wasm b/packages/chili-wasm/lib/chili-wasm.wasm index 354763dc..d85f5a98 100644 Binary files a/packages/chili-wasm/lib/chili-wasm.wasm and b/packages/chili-wasm/lib/chili-wasm.wasm differ diff --git a/packages/chili-wasm/package.json b/packages/chili-wasm/package.json index 0b274319..d0676c22 100644 --- a/packages/chili-wasm/package.json +++ b/packages/chili-wasm/package.json @@ -1,6 +1,6 @@ { "name": "chili-wasm", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "type": "module", diff --git a/packages/chili-wasm/src/factory.ts b/packages/chili-wasm/src/factory.ts index 905c4e5c..09897b2e 100644 --- a/packages/chili-wasm/src/factory.ts +++ b/packages/chili-wasm/src/factory.ts @@ -13,12 +13,11 @@ import { Ray, Result, XYZ, - gc, } from "chili-core"; -import { OccShapeConverter } from "./converter"; import { ShapeResult, TopoDS_Shape } from "../lib/chili-wasm"; -import { OccShape } from "./shape"; +import { OccShapeConverter } from "./converter"; import { OcctHelper } from "./helper"; +import { OccShape } from "./shape"; function ensureOccShape(...shapes: IShape[]): TopoDS_Shape[] { return shapes.map((x) => { @@ -30,13 +29,10 @@ function ensureOccShape(...shapes: IShape[]): TopoDS_Shape[] { } function convertShapeResult(result: ShapeResult): Result { - return gc((c) => { - // c(result); - if (!result.isOk) { - return Result.err(String(result.error)); - } - return Result.ok(OcctHelper.wrapShape(result.shape)); - }); + if (!result.isOk) { + return Result.err(String(result.error)); + } + return Result.ok(OcctHelper.wrapShape(result.shape)); } export class ShapeFactory implements IShapeFactory { diff --git a/packages/chili-wasm/src/helper.ts b/packages/chili-wasm/src/helper.ts index d3e90fab..3c72f12f 100644 --- a/packages/chili-wasm/src/helper.ts +++ b/packages/chili-wasm/src/helper.ts @@ -26,7 +26,6 @@ import { Geom_Parabola, Geom_Surface, Geom_TrimmedCurve, - GeomAbs_JoinType, GeomAbs_Shape, gp_Ax2, gp_Ax3, @@ -39,22 +38,10 @@ import { TopoDS_Shape, Vector3, } from "../lib/chili-wasm"; -import { - OccCompound, - OccCompSolid, - OccEdge, - OccFace, - OccShape, - OccShell, - OccSolid, - OccVertex, - OccWire, -} from "./shape"; import { OccBezierCurve, OccBSplineCurve, OccCircle, - OccCurve, OccEllipse, OccHyperbola, OccLine, @@ -62,6 +49,17 @@ import { OccParabola, OccTrimmedCurve, } from "./curve"; +import { + OccCompound, + OccCompSolid, + OccEdge, + OccFace, + OccShape, + OccShell, + OccSolid, + OccVertex, + OccWire, +} from "./shape"; import { OccBezierSurface, OccBSplineSurface, diff --git a/packages/chili-wasm/src/shape.ts b/packages/chili-wasm/src/shape.ts index 34dbf6fd..54eb44de 100644 --- a/packages/chili-wasm/src/shape.ts +++ b/packages/chili-wasm/src/shape.ts @@ -1,55 +1,48 @@ import { + gc, + ICompound, + ICompoundSolid, ICurve, Id, IEdge, + IFace, IShape, IShapeMeshData, + IShell, + ISolid, + ISurface, ITrimmedCurve, + IVertex, IWire, + JoinType, + MathUtils, Matrix4, Orientation, Plane, Ray, Result, - ShapeType, - XYZ, - gc, - IFace, - ISurface, - JoinType, - MathUtils, - IShell, - ISolid, - ICompoundSolid, - ICompound, SerializedProperties, Serializer, - IVertex, + ShapeType, + XYZ, } from "chili-core"; -import { - TopoDS_Edge, - TopoDS_Face, - TopoDS_Shape, - TopoDS_Shell, - TopoDS_Vertex, - TopoDS_Wire, -} from "../lib/chili-wasm"; +import { TopoDS_Edge, TopoDS_Face, TopoDS_Shape, TopoDS_Vertex, TopoDS_Wire } from "../lib/chili-wasm"; +import { OccShapeConverter } from "./converter"; +import { OccCurve, OccTrimmedCurve } from "./curve"; import { OcctHelper } from "./helper"; import { Mesher } from "./mesher"; -import { OccCurve, OccTrimmedCurve } from "./curve"; -import { OccShapeConverter } from "./converter"; @Serializer.register(["shape", "id"], OccShape.deserialize, OccShape.serialize) export class OccShape implements IShape { static serialize(target: OccShape): SerializedProperties { return { - shape: new OccShapeConverter().convertToBrep(target).ok(), + shape: new OccShapeConverter().convertToBrep(target).value, id: target.id, }; } static deserialize(shape: string, id: string) { - let tshape = new OccShapeConverter().convertFromBrep(shape).ok() as OccShape; + let tshape = new OccShapeConverter().convertFromBrep(shape).value as OccShape; tshape._id = id; return tshape; } @@ -147,7 +140,11 @@ export class OccShape implements IShape { return OcctHelper.wrapShape(section); } if (shape instanceof Plane) { - let section = wasm.Shape.sectionSP(this.shape, OcctHelper.toPln(shape)); + let section = wasm.Shape.sectionSP(this.shape, { + location: shape.origin, + direction: shape.normal, + xDirection: shape.xvec, + }); return OcctHelper.wrapShape(section); } @@ -164,6 +161,10 @@ export class OccShape implements IShape { return OcctHelper.wrapShape(wasm.Shape.splitByEdgeOrWires(this.shape, shapes)); } + reserve(): void { + this.shape.reverse(); + } + dispose(): void { this._shape.delete(); this._shape = null as any; diff --git a/packages/chili-web/package.json b/packages/chili-web/package.json index e9fe227e..e2b7797b 100644 --- a/packages/chili-web/package.json +++ b/packages/chili-web/package.json @@ -1,6 +1,6 @@ { "name": "chili-web", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili-web/src/index.ts b/packages/chili-web/src/index.ts index b0ffb76e..427ec046 100644 --- a/packages/chili-web/src/index.ts +++ b/packages/chili-web/src/index.ts @@ -1,8 +1,8 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. +import { AppBuilder } from "chili-builder"; import { Logger } from "chili-core"; import { Loading } from "./loading"; -import { AppBuilder } from "chili-builder"; let loading = new Loading(); document.body.appendChild(loading); @@ -10,8 +10,7 @@ document.body.appendChild(loading); // prettier-ignore new AppBuilder() .useIndexedDB() - // .useOcc() - .useNewOcc() + .useWasmOcc() .useThree() .useUI() .build() diff --git a/packages/chili/package.json b/packages/chili/package.json index da440a6f..3e77b913 100644 --- a/packages/chili/package.json +++ b/packages/chili/package.json @@ -1,6 +1,6 @@ { "name": "chili", - "version": "0.3.0", + "version": "0.4-beta", "description": "", "main": "src/index.ts", "devDependencies": { diff --git a/packages/chili/src/application.ts b/packages/chili/src/application.ts index 4f7b78b3..57a4b59b 100644 --- a/packages/chili/src/application.ts +++ b/packages/chili/src/application.ts @@ -18,31 +18,9 @@ import { } from "chili-core"; import { Document } from "./document"; -export class Application implements IApplication { - private static _instance: Application | undefined; - static get instance() { - if (Application._instance === undefined) { - throw new Error("Application is not build"); - } - return Application._instance; - } - - static build( - visualFactory: IVisualFactory, - shapeFactory: IShapeFactory, - services: IService[], - storage: IStorage, - window?: IWindow, - ): Application { - if (this._instance) { - Logger.warn("Application has been built"); - } else { - this._instance = new Application(visualFactory, shapeFactory, services, storage, window); - window?.init(this._instance); - } - return this._instance; - } +let app: Application | undefined; +export class Application implements IApplication { private _activeView: IView | undefined; get activeView(): IView | undefined { return this._activeView; @@ -58,19 +36,23 @@ export class Application implements IApplication { executingCommand: ICommand | undefined; - private constructor( + constructor( readonly visualFactory: IVisualFactory, readonly shapeFactory: IShapeFactory, readonly services: IService[], readonly storage: IStorage, readonly mainWindow?: IWindow, ) { + if (app !== undefined) { + throw new Error("Only one application can be created"); + } + app = this; services.forEach((x) => x.register(this)); services.forEach((x) => x.start()); window.onbeforeunload = this.handleWindowUnload; } - private handleWindowUnload = (event: BeforeUnloadEvent) => { + private readonly handleWindowUnload = (event: BeforeUnloadEvent) => { if (this.activeView) { // Cancel the event as stated by the standard. event.preventDefault(); @@ -97,7 +79,7 @@ export class Application implements IApplication { return document; } - private async createActiveView(document: IDocument | undefined) { + protected async createActiveView(document: IDocument | undefined) { if (document === undefined) return undefined; let view = document.visual.createView("3d", Plane.XY); this.activeView = view; diff --git a/packages/chili/src/bodys/arc.ts b/packages/chili/src/bodys/arc.ts new file mode 100644 index 00000000..19a052e4 --- /dev/null +++ b/packages/chili/src/bodys/arc.ts @@ -0,0 +1,60 @@ +// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. + +import { + I18nKeys, + IDocument, + IShape, + ParameterShapeNode, + Property, + Result, + Serializer, + XYZ, +} from "chili-core"; + +@Serializer.register(["document", "normal", "center", "start", "angle"]) +export class ArcNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.arc"; + } + + @Serializer.serialze() + @Property.define("circle.center") + get center() { + return this.getPrivateValue("center"); + } + set center(center: XYZ) { + this.setProperty("center", center); + } + + @Serializer.serialze() + @Property.define("arc.start") + get start(): XYZ { + return this.getPrivateValue("start"); + } + + @Serializer.serialze() + get normal(): XYZ { + return this.getPrivateValue("normal"); + } + + @Serializer.serialze() + @Property.define("arc.angle") + get angle() { + return this.getPrivateValue("angle"); + } + set angle(value: number) { + this.setProperty("angle", value); + } + + constructor(document: IDocument, normal: XYZ, center: XYZ, start: XYZ, angle: number) { + super(document); + this.setPrivateValue("normal", normal); + this.setPrivateValue("center", center); + this.setPrivateValue("start", start); + this.setPrivateValue("angle", angle); + } + + generateShape(): Result { + return this.document.application.shapeFactory.arc(this.normal, this.center, this.start, this.angle); + } +} diff --git a/packages/chili/src/bodys/arcBody.ts b/packages/chili/src/bodys/arcBody.ts deleted file mode 100644 index 320de2a0..00000000 --- a/packages/chili/src/bodys/arcBody.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { I18nKeys, IDocument, IShape, ParameterBody, Property, Result, Serializer, XYZ } from "chili-core"; - -@Serializer.register(["document", "normal", "center", "start", "angle"]) -export class ArcBody extends ParameterBody { - readonly display: I18nKeys = "body.arc"; - - private _center: XYZ; - - @Serializer.serialze() - @Property.define("circle.center") - get center() { - return this._center; - } - set center(center: XYZ) { - this.setProperty("center", center); - } - - private _start: XYZ; - @Serializer.serialze() - @Property.define("arc.start") - get start() { - return this._start; - } - - private _normal: XYZ; - - @Serializer.serialze() - get normal() { - return this._normal; - } - - private _angle: number; - @Serializer.serialze() - @Property.define("arc.angle") - get angle() { - return this._angle; - } - set angle(value: number) { - this.setProperty("angle", value); - } - - constructor(document: IDocument, normal: XYZ, center: XYZ, start: XYZ, angle: number) { - super(document); - this._normal = normal; - this._center = center; - this._start = start; - this._angle = angle; - } - - generateShape(): Result { - return this.document.application.shapeFactory.arc( - this.normal, - this._center, - this._start, - this.angle, - ); - } -} diff --git a/packages/chili/src/bodys/boolean.ts b/packages/chili/src/bodys/boolean.ts index 27654679..9273f1d5 100644 --- a/packages/chili/src/bodys/boolean.ts +++ b/packages/chili/src/bodys/boolean.ts @@ -1,23 +1,24 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IShape, ParameterBody, Result, Serializer } from "chili-core"; +import { I18nKeys, IDocument, IShape, ParameterShapeNode, Result, Serializer } from "chili-core"; @Serializer.register(["document", "booleanShape"]) -export class BooleanBody extends ParameterBody { - override display: I18nKeys = "body.bolean"; +export class BooleanNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.bolean"; + } - private _booleanShape: IShape; @Serializer.serialze() - get booleanShape() { - return this._booleanShape; + get booleanShape(): IShape { + return this.getPrivateValue("booleanShape"); } constructor(document: IDocument, shape: IShape) { super(document); - this._booleanShape = shape; + this.setPrivateValue("booleanShape", shape); } override generateShape(): Result { - return Result.ok(this._booleanShape); + return Result.ok(this.booleanShape); } } diff --git a/packages/chili/src/bodys/box.ts b/packages/chili/src/bodys/box.ts index 6184e2f9..34fdf805 100644 --- a/packages/chili/src/bodys/box.ts +++ b/packages/chili/src/bodys/box.ts @@ -1,60 +1,63 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IShape, ParameterBody, Plane, Property, Result, Serializer } from "chili-core"; +import { + I18nKeys, + IDocument, + IShape, + ParameterShapeNode, + Plane, + Property, + Result, + Serializer, +} from "chili-core"; @Serializer.register(["document", "plane", "dx", "dy", "dz"]) -export class BoxBody extends ParameterBody { - readonly display: I18nKeys = "body.box"; - - private _dx: number; +export class BoxNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.box"; + } @Serializer.serialze() @Property.define("box.dx") get dx() { - return this._dx; + return this.getPrivateValue("dx"); } set dx(dx: number) { this.setProperty("dx", dx); } - private _dy: number; - @Serializer.serialze() @Property.define("box.dy") get dy() { - return this._dy; + return this.getPrivateValue("dy"); } set dy(dy: number) { this.setProperty("dy", dy); } - private _dz: number; - @Serializer.serialze() @Property.define("box.dz") get dz() { - return this._dz; + return this.getPrivateValue("dz"); } set dz(dz: number) { this.setProperty("dz", dz); } - private _plane: Plane; - @Serializer.serialze() - get plane() { - return this._plane; + get plane(): Plane { + return this.getPrivateValue("plane"); } constructor(document: IDocument, plane: Plane, dx: number, dy: number, dz: number) { super(document); - this._plane = plane; - this._dx = dx; - this._dy = dy; - this._dz = dz; + this.setPrivateValue("plane", plane); + this.setPrivateValue("dx", dx); + this.setPrivateValue("dy", dy); + this.setPrivateValue("dz", dz); } generateShape(): Result { - return this.document.application.shapeFactory.box(this.plane, this._dx, this._dy, this._dz); + return this.document.application.shapeFactory.box(this.plane, this.dx, this.dy, this.dz); } } diff --git a/packages/chili/src/bodys/circle.ts b/packages/chili/src/bodys/circle.ts index 3643eb64..9586d1da 100644 --- a/packages/chili/src/bodys/circle.ts +++ b/packages/chili/src/bodys/circle.ts @@ -1,60 +1,47 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - FacebaseParameterBody, - I18nKeys, - IDocument, - IShape, - Property, - Result, - Serializer, - XYZ, -} from "chili-core"; +import { FacebaseNode, I18nKeys, IDocument, IShape, Property, Result, Serializer, XYZ } from "chili-core"; @Serializer.register(["document", "normal", "center", "radius"]) -export class CircleBody extends FacebaseParameterBody { - readonly display: I18nKeys = "body.circle"; - - private _center: XYZ; +export class CircleNode extends FacebaseNode { + override display(): I18nKeys { + return "body.circle"; + } @Serializer.serialze() @Property.define("circle.center") get center() { - return this._center; + return this.getPrivateValue("center"); } set center(center: XYZ) { this.setProperty("center", center); } - private _radius: number; - @Serializer.serialze() @Property.define("circle.radius") get radius() { - return this._radius; + return this.getPrivateValue("radius"); } set radius(radius: number) { this.setProperty("radius", radius); } - private _normal: XYZ; - @Serializer.serialze() - get normal() { - return this._normal; + get normal(): XYZ { + return this.getPrivateValue("normal"); } constructor(document: IDocument, normal: XYZ, center: XYZ, radius: number) { super(document); - this._normal = normal; - this._center = center; - this._radius = radius; + this.setPrivateValue("normal", normal); + this.setPrivateValue("center", center); + this.setPrivateValue("radius", radius); } generateShape(): Result { - let circle = this.document.application.shapeFactory.circle(this.normal, this._center, this._radius); + let circle = this.document.application.shapeFactory.circle(this.normal, this.center, this.radius); if (!circle.isOk || !this.isFace) return circle; - let wire = this.document.application.shapeFactory.wire(circle.ok()); - return wire.isOk ? wire.ok().toFace() : circle; + let wire = this.document.application.shapeFactory.wire(circle.value); + return wire.isOk ? wire.value.toFace() : circle; } } diff --git a/packages/chili/src/bodys/face.ts b/packages/chili/src/bodys/face.ts index 4f049fb7..ec3acf9f 100644 --- a/packages/chili/src/bodys/face.ts +++ b/packages/chili/src/bodys/face.ts @@ -1,32 +1,68 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IEdge, IShape, IWire, ParameterBody, Result, Serializer } from "chili-core"; +import { + I18nKeys, + IDocument, + IEdge, + IShape, + IWire, + ParameterShapeNode, + Result, + Serializer, + ShapeType, +} from "chili-core"; @Serializer.register(["document", "shapes"]) -export class FaceBody extends ParameterBody { - override display: I18nKeys = "body.face"; +export class FaceNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.face"; + } - private _shapes: IEdge[] | IWire; @Serializer.serialze() - get shapes(): IEdge[] | IWire { - return this._shapes; + get shapes(): IEdge[] | IWire[] { + return this.getPrivateValue("shapes"); } - set shapes(values: IEdge[] | IWire) { + set shapes(values: IEdge[] | IWire[]) { this.setProperty("shapes", values); } - constructor(document: IDocument, shapes: IEdge[] | IWire) { + constructor(document: IDocument, shapes: IEdge[] | IWire[]) { super(document); - this._shapes = Array.isArray(shapes) ? [...shapes] : shapes; + this.setPrivateValue("shapes", shapes); } - override generateShape(): Result { - if (Array.isArray(this._shapes)) { - let wire = this.document.application.shapeFactory.wire(...this._shapes); - if (!wire.isOk) return wire; - return wire.ok().toFace(); + private isAllClosed(): boolean { + return this.shapes.every((shape) => shape.isClosed() || shape.shapeType === ShapeType.Wire); + } + + private getWires(): IWire[] { + let wires: IWire[] = []; + if (this.isAllClosed()) { + for (const shape of this.shapes) { + if (shape.shapeType === ShapeType.Wire) { + wires.push(shape as IWire); + } else { + let wire = this.document.application.shapeFactory.wire(shape as IEdge); + wires.push(wire.value); + } + } } else { - return this._shapes.toFace(); + let wire = this.document.application.shapeFactory.wire(...(this.shapes as IEdge[])); + if (!wire.isOk) throw new Error("Cannot create wire from open shapes"); + wires.push(wire.value); + } + + for (let i = 1; i < wires.length; i++) { + wires[i].reserve(); } + + return wires; + } + + override generateShape(): Result { + if (this.shapes.length === 0) return Result.err("No shapes to create face"); + + let wires = this.getWires(); + return this.document.application.shapeFactory.face(...wires); } } diff --git a/packages/chili/src/bodys/fuse.ts b/packages/chili/src/bodys/fuse.ts index bc3858df..bbed7b0e 100644 --- a/packages/chili/src/bodys/fuse.ts +++ b/packages/chili/src/bodys/fuse.ts @@ -1,24 +1,24 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IShape, ParameterBody, Result, Serializer } from "chili-core"; +import { I18nKeys, IDocument, IShape, ParameterShapeNode, Result, Serializer } from "chili-core"; @Serializer.register(["document", "bottom", "top"]) -export class FuseBody extends ParameterBody { - override display: I18nKeys = "body.fuse"; +export class FuseNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.fuse"; + } - private _bottom: IShape; @Serializer.serialze() get bottom(): IShape { - return this._bottom; + return this.getPrivateValue("bottom"); } set bottom(value: IShape) { this.setProperty("bottom", value); } - private _top: IShape; @Serializer.serialze() get top(): IShape { - return this._top; + return this.getPrivateValue("top"); } set top(value: IShape) { this.setProperty("top", value); @@ -26,8 +26,8 @@ export class FuseBody extends ParameterBody { constructor(document: IDocument, bottom: IShape, top: IShape) { super(document); - this._bottom = bottom; - this._top = top; + this.setPrivateValue("bottom", bottom); + this.setPrivateValue("top", top); } override generateShape(): Result { diff --git a/packages/chili/src/bodys/importer.ts b/packages/chili/src/bodys/importer.ts deleted file mode 100644 index dc34e590..00000000 --- a/packages/chili/src/bodys/importer.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. - -import { I18nKeys, IDocument, IShape, ParameterBody, Result, Serializer } from "chili-core"; - -@Serializer.register(["document", "importedShape"]) -export class ImportedBody extends ParameterBody { - override display: I18nKeys = "body.imported"; - - private _importedShape: IShape; - @Serializer.serialze() - get importedShape() { - return this._importedShape; - } - - constructor(document: IDocument, shape: IShape) { - super(document); - this._importedShape = shape; - } - - override generateShape(): Result { - return Result.ok(this._importedShape); - } -} diff --git a/packages/chili/src/bodys/line.ts b/packages/chili/src/bodys/line.ts index 67a411c0..ac940185 100644 --- a/packages/chili/src/bodys/line.ts +++ b/packages/chili/src/bodys/line.ts @@ -1,28 +1,35 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IShape, ParameterBody, Property, Result, Serializer, XYZ } from "chili-core"; +import { + I18nKeys, + IDocument, + IShape, + ParameterShapeNode, + Property, + Result, + Serializer, + XYZ, +} from "chili-core"; @Serializer.register(["document", "start", "end"]) -export class LineBody extends ParameterBody { - readonly display: I18nKeys = "body.line"; - - private _start: XYZ; +export class LineNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.line"; + } @Serializer.serialze() @Property.define("line.start") get start() { - return this._start; + return this.getPrivateValue("start"); } set start(pnt: XYZ) { this.setProperty("start", pnt); } - private _end: XYZ; - @Serializer.serialze() @Property.define("line.end") get end() { - return this._end; + return this.getPrivateValue("end"); } set end(pnt: XYZ) { this.setProperty("end", pnt); @@ -30,11 +37,11 @@ export class LineBody extends ParameterBody { constructor(document: IDocument, start: XYZ, end: XYZ) { super(document); - this._start = start; - this._end = end; + this.setPrivateValue("start", start); + this.setPrivateValue("end", end); } generateShape(): Result { - return this.document.application.shapeFactory.line(this._start, this._end); + return this.document.application.shapeFactory.line(this.start, this.end); } } diff --git a/packages/chili/src/bodys/polygon.ts b/packages/chili/src/bodys/polygon.ts index 94dc8e27..02a96fab 100644 --- a/packages/chili/src/bodys/polygon.ts +++ b/packages/chili/src/bodys/polygon.ts @@ -1,25 +1,17 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - FacebaseParameterBody, - I18nKeys, - IDocument, - IShape, - Property, - Result, - Serializer, - XYZ, -} from "chili-core"; +import { FacebaseNode, I18nKeys, IDocument, IShape, Property, Result, Serializer, XYZ } from "chili-core"; @Serializer.register(["document", "points"]) -export class PolygonBody extends FacebaseParameterBody { - readonly display: I18nKeys = "body.polygon"; +export class PolygonNode extends FacebaseNode { + override display(): I18nKeys { + return "body.polygon"; + } - private _points: XYZ[]; @Serializer.serialze() @Property.define("polygon.points") get points() { - return this._points; + return this.getPrivateValue("points"); } set points(value: XYZ[]) { this.setProperty("points", value); @@ -27,12 +19,12 @@ export class PolygonBody extends FacebaseParameterBody { constructor(document: IDocument, points: XYZ[]) { super(document); - this._points = points; + this.setPrivateValue("points", points); } generateShape(): Result { - let wire = this.document.application.shapeFactory.polygon(...this._points); + let wire = this.document.application.shapeFactory.polygon(...this.points); if (!wire.isOk || !this.isFace) return wire; - return wire.ok().toFace(); + return wire.value.toFace(); } } diff --git a/packages/chili/src/bodys/prism.ts b/packages/chili/src/bodys/prism.ts index b629031a..7488354f 100644 --- a/packages/chili/src/bodys/prism.ts +++ b/packages/chili/src/bodys/prism.ts @@ -1,26 +1,35 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IFace, IShape, ParameterBody, Property, Result, Serializer } from "chili-core"; +import { + I18nKeys, + IDocument, + IFace, + IShape, + ParameterShapeNode, + Property, + Result, + Serializer, +} from "chili-core"; import { GeoUtils } from "chili-geo"; @Serializer.register(["document", "section", "length"]) -export class PrismBody extends ParameterBody { - override display: I18nKeys = "body.prism"; +export class PrismNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.prism"; + } - private _section: IShape; @Serializer.serialze() get section(): IShape { - return this._section; + return this.getPrivateValue("section"); } - set section(value: IFace) { + set section(value: IShape) { this.setProperty("section", value); } - private _length: number; @Serializer.serialze() @Property.define("common.length") get length(): number { - return this._length; + return this.getPrivateValue("length"); } set length(value: number) { this.setProperty("length", value); @@ -28,8 +37,8 @@ export class PrismBody extends ParameterBody { constructor(document: IDocument, face: IShape, length: number) { super(document); - this._section = face; - this._length = length; + this.setPrivateValue("section", face); + this.setPrivateValue("length", length); } override generateShape(): Result { diff --git a/packages/chili/src/bodys/rect.ts b/packages/chili/src/bodys/rect.ts index a09ba4d1..36f0365f 100644 --- a/packages/chili/src/bodys/rect.ts +++ b/packages/chili/src/bodys/rect.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { - FacebaseParameterBody, + FacebaseNode, I18nKeys, IDocument, IShape, @@ -13,47 +13,46 @@ import { } from "chili-core"; @Serializer.register(["document", "plane", "dx", "dy"]) -export class RectBody extends FacebaseParameterBody { - readonly display: I18nKeys = "body.rect"; +export class RectNode extends FacebaseNode { + override display(): I18nKeys { + return "body.rect"; + } - private _dx: number; @Serializer.serialze() @Property.define("rect.dx") get dx() { - return this._dx; + return this.getPrivateValue("dx"); } set dx(dx: number) { this.setProperty("dx", dx); } - private _dy: number; @Serializer.serialze() @Property.define("rect.dy") get dy() { - return this._dy; + return this.getPrivateValue("dy"); } set dy(dy: number) { this.setProperty("dy", dy); } - private _plane: Plane; @Serializer.serialze() - get plane() { - return this._plane; + get plane(): Plane { + return this.getPrivateValue("plane"); } constructor(document: IDocument, plane: Plane, dx: number, dy: number) { super(document); - this._plane = plane; - this._dx = dx; - this._dy = dy; + this.setPrivateValue("plane", plane); + this.setPrivateValue("dx", dx); + this.setPrivateValue("dy", dy); } generateShape(): Result { - let points = RectBody.points(this.plane, this._dx, this._dy); + let points = RectNode.points(this.plane, this.dx, this.dy); let wire = this.document.application.shapeFactory.polygon(...points); if (!wire.isOk || !this.isFace) return wire; - return wire.ok().toFace(); + return wire.value.toFace(); } static points(plane: Plane, dx: number, dy: number): XYZ[] { diff --git a/packages/chili/src/bodys/revolve.ts b/packages/chili/src/bodys/revolve.ts index c84fa641..654a1a35 100644 --- a/packages/chili/src/bodys/revolve.ts +++ b/packages/chili/src/bodys/revolve.ts @@ -1,33 +1,32 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IShape, ParameterBody, Ray, Result, Serializer } from "chili-core"; +import { I18nKeys, IDocument, IShape, ParameterShapeNode, Ray, Result, Serializer } from "chili-core"; @Serializer.register(["document", "profile", "axis", "angle"]) -export class RevolveBody extends ParameterBody { - override display: I18nKeys = "body.revol"; +export class RevolvedNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.revol"; + } - private _profile: IShape; @Serializer.serialze() get profile() { - return this._profile; + return this.getPrivateValue("profile"); } set profile(value: IShape) { this.setProperty("profile", value); } - private _axis: Ray; @Serializer.serialze() get axis() { - return this._axis; + return this.getPrivateValue("axis"); } set axis(value: Ray) { this.setProperty("axis", value); } - private _angle: number; @Serializer.serialze() get angle() { - return this._angle; + return this.getPrivateValue("angle"); } set angle(value: number) { this.setProperty("angle", value); @@ -35,9 +34,9 @@ export class RevolveBody extends ParameterBody { constructor(document: IDocument, profile: IShape, axis: Ray, angle: number) { super(document); - this._profile = profile; - this._axis = axis; - this._angle = angle; + this.setPrivateValue("profile", profile); + this.setPrivateValue("axis", axis); + this.setPrivateValue("angle", angle); } override generateShape(): Result { diff --git a/packages/chili/src/bodys/sweep.ts b/packages/chili/src/bodys/sweep.ts index 666f4b67..2ae48e7f 100644 --- a/packages/chili/src/bodys/sweep.ts +++ b/packages/chili/src/bodys/sweep.ts @@ -6,29 +6,29 @@ import { IEdge, IShape, IWire, - ParameterBody, + ParameterShapeNode, Result, Serializer, ShapeType, } from "chili-core"; @Serializer.register(["document", "profile", "path"]) -export class SweepBody extends ParameterBody { - override display: I18nKeys = "body.sweep"; +export class SweepedNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.sweep"; + } - private _profile: IShape; @Serializer.serialze() get profile() { - return this._profile; + return this.getPrivateValue("profile"); } set profile(value: IShape) { this.setProperty("profile", value); } - private _path: IWire; @Serializer.serialze() get path() { - return this._path; + return this.getPrivateValue("path"); } set path(value: IWire) { this.setProperty("path", value); @@ -36,11 +36,13 @@ export class SweepBody extends ParameterBody { constructor(document: IDocument, profile: IShape, path: IWire | IEdge) { super(document); - this._profile = profile; - this._path = - path.shapeType === ShapeType.Wire - ? (path as IWire) - : document.application.shapeFactory.wire(path as unknown as IEdge).ok(); + this.setPrivateValue("profile", profile); + + let wire = path as IWire; + if (path.shapeType !== ShapeType.Wire) { + wire = document.application.shapeFactory.wire(path as unknown as IEdge).value; + } + this.setPrivateValue("path", wire); } override generateShape(): Result { diff --git a/packages/chili/src/bodys/wire.ts b/packages/chili/src/bodys/wire.ts index 4a1bb0f2..713bffe0 100644 --- a/packages/chili/src/bodys/wire.ts +++ b/packages/chili/src/bodys/wire.ts @@ -1,15 +1,16 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { I18nKeys, IDocument, IEdge, IShape, ParameterBody, Result, Serializer } from "chili-core"; +import { I18nKeys, IDocument, IEdge, IShape, ParameterShapeNode, Result, Serializer } from "chili-core"; @Serializer.register(["document", "edges"]) -export class WireBody extends ParameterBody { - override display: I18nKeys = "body.wire"; +export class WireNode extends ParameterShapeNode { + override display(): I18nKeys { + return "body.wire"; + } - private _edges: IEdge[]; @Serializer.serialze() get edges(): IEdge[] { - return this._edges; + return this.getPrivateValue("edges"); } set edges(values: IEdge[]) { this.setProperty("edges", values); @@ -17,7 +18,7 @@ export class WireBody extends ParameterBody { constructor(document: IDocument, edges: IEdge[]) { super(document); - this._edges = [...edges]; + this.setPrivateValue("edges", edges); } override generateShape(): Result { diff --git a/packages/chili/src/commands/application/openDocument.ts b/packages/chili/src/commands/application/openDocument.ts index e071b93c..60c2858b 100644 --- a/packages/chili/src/commands/application/openDocument.ts +++ b/packages/chili/src/commands/application/openDocument.ts @@ -14,7 +14,7 @@ export class OpenDocument implements ICommand { async () => { let files = await readFileAsync(".cd", false); if (files.isOk) { - let json: Serialized = JSON.parse(files.ok()[0].data as string); + let json: Serialized = JSON.parse(files.value[0].data as string); let document = await app.loadDocument(json); document?.application.activeView?.cameraController.fitContent(); } diff --git a/packages/chili/src/commands/application/performanceTest.ts b/packages/chili/src/commands/application/performanceTest.ts index 80a270fa..76639140 100644 --- a/packages/chili/src/commands/application/performanceTest.ts +++ b/packages/chili/src/commands/application/performanceTest.ts @@ -1,12 +1,8 @@ import { - EdgeMeshData, - EditableGeometryEntity, - FaceMeshData, - GeometryModel, + EditableShapeNode, IApplication, ICommand, IDocument, - LineType, Material, Plane, XYZ, @@ -57,11 +53,13 @@ export class OccPerformanceTestCommand extends PerformanceTestCommand { protected override createShape(document: IDocument, material: Material, position: XYZ): void { let plane = Plane.XY.translateTo(position); - let box = document.application.shapeFactory - .box(plane, this.size * Math.random(), this.size * Math.random(), this.size * Math.random()) - .ok(); - let entity = new EditableGeometryEntity(document, box, material.id); - let model = new GeometryModel(document, `box ${this.index++}`, entity); - document.addNode(model); + let box = document.application.shapeFactory.box( + plane, + this.size * Math.random(), + this.size * Math.random(), + this.size * Math.random(), + ).value; + let node = new EditableShapeNode(document, `box ${this.index++}`, box, material.id); + document.addNode(node); } } diff --git a/packages/chili/src/commands/boolean.ts b/packages/chili/src/commands/boolean.ts index 624ea855..db35076a 100644 --- a/packages/chili/src/commands/boolean.ts +++ b/packages/chili/src/commands/boolean.ts @@ -1,14 +1,14 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, GeometryModel, IShape, ParameterGeometryEntity, Result, command } from "chili-core"; -import { BooleanBody } from "../bodys/boolean"; +import { GeometryNode, IShape, Result, ShapeNode, command } from "chili-core"; +import { BooleanNode } from "../bodys/boolean"; import { IStep, SelectModelStep } from "../step"; import { CreateCommand } from "./createCommand"; export abstract class BooleanOperate extends CreateCommand { - protected override geometryEntity(): GeometryEntity { - let shape1 = (this.stepDatas[0].models?.at(0) as GeometryModel)?.geometry.shape.ok(); - let shape2 = (this.stepDatas[1].models?.at(0) as GeometryModel)?.geometry.shape.ok(); + protected override geometryNode(): GeometryNode { + let shape1 = (this.stepDatas[0].models?.at(0) as ShapeNode)?.shape.value; + let shape2 = (this.stepDatas[1].models?.at(0) as ShapeNode)?.shape.value; let booleanType = this.getBooleanOperateType(); let booleanShape: Result; if (booleanType === "common") { @@ -19,11 +19,11 @@ export abstract class BooleanOperate extends CreateCommand { booleanShape = this.application.shapeFactory.booleanFuse(shape1, shape2); } - let body = new BooleanBody(this.document, booleanShape.ok()); + let node = new BooleanNode(this.document, booleanShape.value); this.stepDatas.forEach((x) => { x.models?.at(0)?.parent?.remove(x.models[0]); }); - return new ParameterGeometryEntity(this.document, body); + return node; } protected abstract getBooleanOperateType(): "common" | "cut" | "fuse"; @@ -33,7 +33,9 @@ export abstract class BooleanOperate extends CreateCommand { new SelectModelStep("prompt.select.shape", false), new SelectModelStep("prompt.select.shape", false, { allow: (shape) => { - return !this.stepDatas[0].models?.map((x) => x.geometry.shape.ok()).includes(shape); + return !this.stepDatas[0].models + ?.map((x) => (x as ShapeNode).shape.value) + .includes(shape); }, }), ]; diff --git a/packages/chili/src/commands/create/arc.ts b/packages/chili/src/commands/create/arc.ts index a8b630d3..820df802 100644 --- a/packages/chili/src/commands/create/arc.ts +++ b/packages/chili/src/commands/create/arc.ts @@ -1,16 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - GeometryEntity, - ParameterGeometryEntity, - Plane, - PlaneAngle, - Precision, - ShapeMeshData, - XYZ, - command, -} from "chili-core"; -import { ArcBody } from "../../bodys/arcBody"; +import { GeometryNode, Plane, PlaneAngle, Precision, ShapeMeshData, XYZ, command } from "chili-core"; +import { ArcNode } from "../../bodys/arc"; import { Dimension, SnapLengthAtPlaneData } from "../../snap"; import { AngleStep, IStep, LengthAtPlaneStep, PointStep } from "../../step"; import { CreateCommand } from "../createCommand"; @@ -35,7 +26,7 @@ export class Arc extends CreateCommand { return [centerStep, startStep, angleStep]; } - private getRadiusData = (): SnapLengthAtPlaneData => { + private readonly getRadiusData = (): SnapLengthAtPlaneData => { let point = this.stepDatas[0].point!; return { point: () => point, @@ -50,7 +41,7 @@ export class Arc extends CreateCommand { }; }; - private getAngleData = () => { + private readonly getAngleData = () => { let [center, p1] = [this.stepDatas[0].point!, this.stepDatas[1].point!]; let plane = new Plane(center, this.stepDatas[0].view.workplane.normal, p1.sub(center)); let points: ShapeMeshData[] = [this.previewPoint(center), this.previewPoint(p1)]; @@ -65,9 +56,8 @@ export class Arc extends CreateCommand { let result = [...points]; if (Math.abs(this._planeAngle!.angle) > Precision.Angle) { result.push( - this.application.shapeFactory - .arc(plane.normal, center, p1, this._planeAngle!.angle) - .ok().mesh.edges!, + this.application.shapeFactory.arc(plane.normal, center, p1, this._planeAngle!.angle) + .value.mesh.edges!, ); } return result; @@ -82,15 +72,14 @@ export class Arc extends CreateCommand { }; }; - geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let [p0, p1] = [this.stepDatas[0].point!, this.stepDatas[1].point!]; let plane = this.stepDatas[0].view.workplane; this._planeAngle?.movePoint(this.stepDatas[2].point!); - let body = new ArcBody(this.document, plane.normal, p0, p1, this._planeAngle!.angle); - return new ParameterGeometryEntity(this.document, body); + return new ArcNode(this.document, plane.normal, p0, p1, this._planeAngle!.angle); } - private circlePreview = (point: XYZ | undefined) => { + private readonly circlePreview = (point: XYZ | undefined) => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) { return [p1]; @@ -100,9 +89,11 @@ export class Arc extends CreateCommand { return [ p1, this.previewLine(this.stepDatas[0].point!, point), - this.application.shapeFactory - .circle(plane.normal, start, this.getDistanceAtPlane(plane, start, point)) - .ok().mesh.edges!, + this.application.shapeFactory.circle( + plane.normal, + start, + this.getDistanceAtPlane(plane, start, point), + ).value.mesh.edges!, ]; }; diff --git a/packages/chili/src/commands/create/bezier.ts b/packages/chili/src/commands/create/bezier.ts index dc10a255..a91a2a39 100644 --- a/packages/chili/src/commands/create/bezier.ts +++ b/packages/chili/src/commands/create/bezier.ts @@ -2,8 +2,9 @@ import { AsyncController, - EditableGeometryEntity, - GeometryEntity, + EditableShapeNode, + GeometryNode, + I18n, ShapeMeshData, XYZ, command, @@ -18,9 +19,9 @@ import { CreateCommand } from "../createCommand"; icon: "icon-bezier", }) export class BezierCommand extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let bezier = this.application.shapeFactory.bezier(this.stepDatas.map((x) => x.point!)); - return new EditableGeometryEntity(this.document, bezier.ok()); + return new EditableShapeNode(this.document, I18n.translate("command.bezier"), bezier.value); } protected override async executeSteps(): Promise { @@ -44,7 +45,7 @@ export class BezierCommand extends CreateCommand { return [firstStep, secondStep]; } - private getNextData = (): PointSnapData => { + private readonly getNextData = (): PointSnapData => { return { refPoint: () => this.stepDatas.at(-1)!.point!, dimension: Dimension.D1D2D3, @@ -53,7 +54,7 @@ export class BezierCommand extends CreateCommand { }; }; - private preview = (point: XYZ | undefined): ShapeMeshData[] => { + private readonly preview = (point: XYZ | undefined): ShapeMeshData[] => { let ps: ShapeMeshData[] = this.stepDatas.map((data) => this.previewPoint(data.point!)); let points = this.stepDatas.map((data) => data.point) as XYZ[]; if (point) { @@ -62,13 +63,13 @@ export class BezierCommand extends CreateCommand { if (points.length > 1) { ps.push(...this.previewLines(points)); let bezier = this.application.shapeFactory.bezier(points); - ps.push(bezier.ok().mesh.edges!); + ps.push(bezier.value.mesh.edges!); } return ps; }; - private previewLines = (points: XYZ[]): ShapeMeshData[] => { + private readonly previewLines = (points: XYZ[]): ShapeMeshData[] => { if (points.length < 2) { return []; } @@ -79,7 +80,7 @@ export class BezierCommand extends CreateCommand { return res; }; - private validator = (point: XYZ): boolean => { + private readonly validator = (point: XYZ): boolean => { for (const data of this.stepDatas) { if (point.distanceTo(data.point!) < 0.001) { return false; diff --git a/packages/chili/src/commands/create/box.ts b/packages/chili/src/commands/create/box.ts index 1bbcb80d..e3b11dff 100644 --- a/packages/chili/src/commands/create/box.ts +++ b/packages/chili/src/commands/create/box.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, ParameterGeometryEntity, Plane, XYZ, command } from "chili-core"; -import { BoxBody } from "../../bodys"; +import { GeometryNode, Plane, XYZ, command } from "chili-core"; +import { BoxNode } from "../../bodys"; import { LengthAtAxisSnapData } from "../../snap"; import { IStep, LengthAtAxisStep } from "../../step"; import { RectCommandBase } from "./rect"; @@ -18,7 +18,7 @@ export class Box extends RectCommandBase { return [...steps, third]; } - private getHeightStepData = (): LengthAtAxisSnapData => { + private readonly getHeightStepData = (): LengthAtAxisSnapData => { return { point: this.stepDatas[1].point!, direction: this.stepDatas[0].view.workplane.normal, @@ -26,7 +26,7 @@ export class Box extends RectCommandBase { }; }; - private previewBox = (end: XYZ | undefined) => { + private readonly previewBox = (end: XYZ | undefined) => { if (!end) { return this.previewRect(this.stepDatas[1].point); } @@ -36,17 +36,15 @@ export class Box extends RectCommandBase { return [ p1, p2, - this.application.shapeFactory - .box(data.plane, data.dx, data.dy, this.getHeight(data.plane, end)) - .ok().mesh.edges!, + this.application.shapeFactory.box(data.plane, data.dx, data.dy, this.getHeight(data.plane, end)) + .value.mesh.edges!, ]; }; - protected geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let rect = this.getRectData(this.stepDatas[1].point!); let dz = this.getHeight(rect.plane, this.stepDatas[2].point!); - let body = new BoxBody(this.document, rect.plane, rect.dx, rect.dy, dz); - return new ParameterGeometryEntity(this.document, body); + return new BoxNode(this.document, rect.plane, rect.dx, rect.dy, dz); } private getHeight(plane: Plane, point: XYZ): number { diff --git a/packages/chili/src/commands/create/circle.ts b/packages/chili/src/commands/create/circle.ts index 90e33293..b8fc2805 100644 --- a/packages/chili/src/commands/create/circle.ts +++ b/packages/chili/src/commands/create/circle.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, ParameterGeometryEntity, Plane, Precision, XYZ, command } from "chili-core"; -import { CircleBody } from "../../bodys"; +import { GeometryNode, Plane, Precision, XYZ, command } from "chili-core"; +import { CircleNode } from "../../bodys"; import { SnapLengthAtPlaneData } from "../../snap"; import { IStep, LengthAtPlaneStep, PointStep } from "../../step"; import { CreateFaceableCommand } from "../createCommand"; @@ -33,15 +33,15 @@ export class Circle extends CreateFaceableCommand { }; }; - geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let [p1, p2] = [this.stepDatas[0].point!, this.stepDatas[1].point!]; let plane = this.stepDatas[0].view.workplane; - let body = new CircleBody(this.document, plane.normal, p1, this.getDistanceAtPlane(plane, p1, p2)); + let body = new CircleNode(this.document, plane.normal, p1, this.getDistanceAtPlane(plane, p1, p2)); body.isFace = this.isFace; - return new ParameterGeometryEntity(this.document, body); + return body; } - private circlePreview = (point: XYZ | undefined) => { + private readonly circlePreview = (point: XYZ | undefined) => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) { return [p1]; @@ -51,9 +51,11 @@ export class Circle extends CreateFaceableCommand { return [ p1, this.previewLine(this.stepDatas[0].point!, point), - this.application.shapeFactory - .circle(plane.normal, start, this.getDistanceAtPlane(plane, start, point)) - .ok().mesh.edges!, + this.application.shapeFactory.circle( + plane.normal, + start, + this.getDistanceAtPlane(plane, start, point), + ).value.mesh.edges!, ]; }; diff --git a/packages/chili/src/commands/create/converter.ts b/packages/chili/src/commands/create/converter.ts index 56c008a1..ba829aad 100644 --- a/packages/chili/src/commands/create/converter.ts +++ b/packages/chili/src/commands/create/converter.ts @@ -3,25 +3,22 @@ import { AsyncController, CancelableCommand, - GeometryEntity, - GeometryModel, + GeometryNode, IDocument, IEdge, - IModel, + INode, IShapeFilter, - ParameterGeometryEntity, PubSub, Result, + ShapeNode, ShapeType, Transaction, command, } from "chili-core"; -import { FaceBody } from "../../bodys/face"; -import { WireBody } from "../../bodys/wire"; +import { FaceNode } from "../../bodys/face"; +import { WireNode } from "../../bodys/wire"; import { SelectModelStep } from "../../step"; -let count = 1; - abstract class ConvertCommand extends CancelableCommand { async executeAsync(): Promise { let models = await this.getOrPickModels(this.document); @@ -30,23 +27,18 @@ abstract class ConvertCommand extends CancelableCommand { return; } Transaction.excute(this.document, `excute ${Object.getPrototypeOf(this).data.name}`, () => { - let geometryModel = this.create(this.document, models); - if (!geometryModel.isOk) { + let node = this.create(this.document, models); + if (!node.isOk) { PubSub.default.pub("showToast", "toast.converter.error"); } else { - let model = new GeometryModel( - this.document, - `${geometryModel.ok().display}${count++}`, - geometryModel.ok(), - ); - this.document.addNode(model); + this.document.addNode(node.value); this.document.visual.update(); PubSub.default.pub("showToast", "toast.success"); } }); } - protected abstract create(document: IDocument, models: IModel[]): Result; + protected abstract create(document: IDocument, models: INode[]): Result; async getOrPickModels(document: IDocument) { let filter: IShapeFilter = { @@ -67,10 +59,10 @@ abstract class ConvertCommand extends CancelableCommand { private _getSelectedModels(document: IDocument, filter?: IShapeFilter) { return document.selection .getSelectedNodes() - .map((x) => x as GeometryModel) + .map((x) => x as ShapeNode) .filter((x) => { if (x === undefined) return false; - let shape = x.geometry.shape.ok(); + let shape = x.shape.value; if (shape === undefined) return false; if (filter !== undefined && !filter.allow(shape)) return false; return true; @@ -84,15 +76,15 @@ abstract class ConvertCommand extends CancelableCommand { icon: "icon-toPoly", }) export class ConvertToWire extends ConvertCommand { - protected override create(document: IDocument, models: IModel[]): Result { - let edges = models.map((x) => x.geometry.shape.ok()) as IEdge[]; - let wireBody = new WireBody(document, edges); + protected override create(document: IDocument, models: ShapeNode[]): Result { + let edges = models.map((x) => x.shape.value) as IEdge[]; + let wireBody = new WireNode(document, edges); let shape = wireBody.generateShape(); if (!shape.isOk) { - return Result.err(shape.error()); + return Result.err(shape.error); } models.forEach((x) => x.parent?.remove(x)); - return Result.ok(new ParameterGeometryEntity(document, wireBody)); + return Result.ok(wireBody); } } @@ -102,15 +94,15 @@ export class ConvertToWire extends ConvertCommand { icon: "icon-toFace", }) export class ConvertToFace extends ConvertCommand { - protected override create(document: IDocument, models: IModel[]): Result { - let edges = models.map((x) => x.geometry.shape.ok()) as IEdge[]; - let wireBody = new FaceBody(document, edges); + protected override create(document: IDocument, models: ShapeNode[]): Result { + let edges = models.map((x) => x.shape.value) as IEdge[]; + let wireBody = new FaceNode(document, edges); let shape = wireBody.generateShape(); if (!shape.isOk) { - return Result.err(shape.error()); + return Result.err(shape.error); } models.forEach((x) => x.parent?.remove(x)); - return Result.ok(new ParameterGeometryEntity(document, wireBody)); + return Result.ok(wireBody); } } diff --git a/packages/chili/src/commands/create/fuse.ts b/packages/chili/src/commands/create/fuse.ts index cbce606b..04b5286b 100644 --- a/packages/chili/src/commands/create/fuse.ts +++ b/packages/chili/src/commands/create/fuse.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, IFace, ParameterGeometryEntity, Precision, ShapeType, command } from "chili-core"; -import { PrismBody } from "../../bodys"; +import { GeometryNode, IFace, Precision, ShapeType, command } from "chili-core"; +import { PrismNode } from "../../bodys"; import { LengthAtAxisSnapData } from "../../snap"; import { IStep, LengthAtAxisStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; @@ -13,12 +13,11 @@ import { CreateCommand } from "../createCommand"; icon: "icon-circle", }) export class Fuse extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let shape = this.stepDatas[0].shapes[0].shape as IFace; // todo assert let [point, normal] = shape.normal(0, 0); let dist = this.stepDatas[1].point!.sub(point).dot(normal); - let body = new PrismBody(this.document, shape, dist); - return new ParameterGeometryEntity(this.document, body); + return new PrismNode(this.document, shape, dist); } protected override getSteps(): IStep[] { @@ -39,7 +38,7 @@ export class Fuse extends CreateCommand { let dist = p.sub(point).dot(normal); if (Math.abs(dist) < Precision.Float) return []; let vec = normal.multiply(dist); - return [this.application.shapeFactory.prism(shape, vec).ok().mesh.edges!]; + return [this.application.shapeFactory.prism(shape, vec).value.mesh.edges!]; }, }; }; diff --git a/packages/chili/src/commands/create/line.ts b/packages/chili/src/commands/create/line.ts index f9c90a4a..ca6fbea2 100644 --- a/packages/chili/src/commands/create/line.ts +++ b/packages/chili/src/commands/create/line.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, ParameterGeometryEntity, Precision, Property, XYZ, command } from "chili-core"; -import { LineBody } from "../../bodys"; +import { GeometryNode, Precision, Property, XYZ, command } from "chili-core"; +import { LineNode } from "../../bodys"; import { Dimension, PointSnapData } from "../../snap"; import { IStep, PointStep } from "../../step"; import { CreateCommand } from "../createCommand"; @@ -12,20 +12,18 @@ import { CreateCommand } from "../createCommand"; icon: "icon-line", }) export class Line extends CreateCommand { - private _isContinue: boolean = false; @Property.define("command.line.isConnected", { dependencies: [{ property: "repeatOperation", value: true }], }) get isContinue() { - return this._isContinue; + return this.getPrivateValue("isContinue", false); } set isContinue(value: boolean) { this.setProperty("isContinue", value); } - geometryEntity(): GeometryEntity { - let body = new LineBody(this.document, this.stepDatas[0].point!, this.stepDatas[1].point!); - return new ParameterGeometryEntity(this.document, body); + protected override geometryNode(): GeometryNode { + return new LineNode(this.document, this.stepDatas[0].point!, this.stepDatas[1].point!); } getSteps(): IStep[] { @@ -35,7 +33,7 @@ export class Line extends CreateCommand { } protected override resetSteps() { - if (this._isContinue) { + if (this.isContinue) { this.stepDatas[0] = this.stepDatas[1]; this.stepDatas.length = 1; } else { @@ -43,7 +41,7 @@ export class Line extends CreateCommand { } } - private getSecondPointData = (): PointSnapData => { + private readonly getSecondPointData = (): PointSnapData => { return { refPoint: () => this.stepDatas[0].point!, dimension: Dimension.D1D2D3, @@ -56,11 +54,11 @@ export class Line extends CreateCommand { }; }; - private linePreview = (point: XYZ | undefined) => { + private readonly linePreview = (point: XYZ | undefined) => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) { return [p1]; } - return [p1, this.application.shapeFactory.line(this.stepDatas[0].point!, point).ok().mesh.edges!]; + return [p1, this.application.shapeFactory.line(this.stepDatas[0].point!, point).value.mesh.edges!]; }; } diff --git a/packages/chili/src/commands/create/offset.ts b/packages/chili/src/commands/create/offset.ts index dd9228db..59212532 100644 --- a/packages/chili/src/commands/create/offset.ts +++ b/packages/chili/src/commands/create/offset.ts @@ -1,6 +1,7 @@ import { - EditableGeometryEntity, - GeometryEntity, + EditableShapeNode, + GeometryNode, + I18n, IEdge, IFace, IShape, @@ -21,10 +22,10 @@ import { CreateCommand } from "../createCommand"; icon: "icon-offset", }) export class OffsetCommand extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let normal = this.getAxis().normal; let shape = this.createOffsetShape(normal, this.stepDatas[1].distance!); - return new EditableGeometryEntity(this.document, shape.ok()); + return new EditableShapeNode(this.document, I18n.translate("command.offset"), shape.value); } protected override getSteps(): IStep[] { @@ -47,7 +48,7 @@ export class OffsetCommand extends CreateCommand { let distance = point.sub(ax.point).dot(ax.direction); let shape = this.createOffsetShape(ax.normal, distance); if (shape.isOk) { - res.push(shape.ok().mesh.edges!); + res.push(shape.value.mesh.edges!); } return res; }, @@ -69,7 +70,7 @@ export class OffsetCommand extends CreateCommand { private getFaceOrWireAxis(shape: IShape, start: XYZ) { let face = shape as IFace; if (shape.shapeType === ShapeType.Wire) { - face = (shape as IWire).toFace().ok(); + face = (shape as IWire).toFace().value; } let normal = face.normal(0, 0)[1]; let { nearest, direction } = this.getNearstPointAndDirection(shape, start, normal); @@ -97,7 +98,7 @@ export class OffsetCommand extends CreateCommand { wire = (shape as IFace).outerWire(); } let nearest = GeoUtils.nearestPoint(wire, start); - let nextEdge = GeoUtils.findNextEdge(wire, nearest.edge).ok(); + let nextEdge = GeoUtils.findNextEdge(wire, nearest.edge).value; let direction = nearest.edge.curve().dn(0, 1); let scale = nearest.edge.orientation() === nextEdge.orientation() ? 1 : -1; let nextDirection = nextEdge.curve().dn(0, 1).multiply(scale); diff --git a/packages/chili/src/commands/create/polygon.ts b/packages/chili/src/commands/create/polygon.ts index 638ad7c1..74411766 100644 --- a/packages/chili/src/commands/create/polygon.ts +++ b/packages/chili/src/commands/create/polygon.ts @@ -3,15 +3,14 @@ import { AsyncController, EdgeMeshDataBuilder, - GeometryEntity, + GeometryNode, I18n, - ParameterGeometryEntity, Precision, ShapeMeshData, XYZ, command, } from "chili-core"; -import { PolygonBody } from "../../bodys"; +import { PolygonNode } from "../../bodys"; import { Dimension, PointSnapData, SnapedData } from "../../snap"; import { IStep, PointStep } from "../../step"; import { CreateFaceableCommand } from "../createCommand"; @@ -22,13 +21,13 @@ import { CreateFaceableCommand } from "../createCommand"; icon: "icon-polygon", }) export class Polygon extends CreateFaceableCommand { - protected override geometryEntity(): GeometryEntity { - let body = new PolygonBody( + protected override geometryNode(): GeometryNode { + let node = new PolygonNode( this.document, this.stepDatas.map((step) => step.point!), ); - body.isFace = this.isFace; - return new ParameterGeometryEntity(this.document, body); + node.isFace = this.isFace; + return node; } protected override async executeSteps(): Promise { @@ -62,7 +61,7 @@ export class Polygon extends CreateFaceableCommand { return [firstStep, secondStep]; } - private getNextData = (): PointSnapData => { + private readonly getNextData = (): PointSnapData => { return { refPoint: () => this.stepDatas.at(-1)!.point!, dimension: Dimension.D1D2D3, @@ -88,7 +87,7 @@ export class Polygon extends CreateFaceableCommand { return [...ps, edges.build()]; }; - private validator = (point: XYZ): boolean => { + private readonly validator = (point: XYZ): boolean => { for (const data of this.stepDatas) { if (point.distanceTo(data.point!) < 0.001) { return false; diff --git a/packages/chili/src/commands/create/prism.ts b/packages/chili/src/commands/create/prism.ts index fd47488e..5593e432 100644 --- a/packages/chili/src/commands/create/prism.ts +++ b/packages/chili/src/commands/create/prism.ts @@ -1,8 +1,8 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, ParameterGeometryEntity, Precision, ShapeType, command } from "chili-core"; +import { GeometryNode, Precision, ShapeType, command } from "chili-core"; import { GeoUtils } from "chili-geo"; -import { PrismBody } from "../../bodys"; +import { PrismNode } from "../../bodys"; import { LengthAtAxisSnapData } from "../../snap"; import { IStep, LengthAtAxisStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; @@ -14,12 +14,11 @@ import { CreateCommand } from "../createCommand"; icon: "icon-prism", }) export class Prism extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let shape = this.stepDatas[0].shapes[0].shape; const { point, normal } = this.getAxis(); let dist = this.stepDatas[1].point!.sub(point).dot(normal); - let body = new PrismBody(this.document, shape, dist); - return new ParameterGeometryEntity(this.document, body); + return new PrismNode(this.document, shape, dist); } protected override getSteps(): IStep[] { @@ -33,7 +32,7 @@ export class Prism extends CreateCommand { ]; } - private getLengthStepData = (): LengthAtAxisSnapData => { + private readonly getLengthStepData = (): LengthAtAxisSnapData => { const { point, normal } = this.getAxis(); return { point, @@ -44,7 +43,7 @@ export class Prism extends CreateCommand { if (Math.abs(dist) < Precision.Float) return []; let vec = normal.multiply(dist); let shape = this.stepDatas[0].shapes[0].shape; - return [this.application.shapeFactory.prism(shape, vec).ok().mesh.edges!]; + return [this.application.shapeFactory.prism(shape, vec).value.mesh.edges!]; }, }; }; diff --git a/packages/chili/src/commands/create/rect.ts b/packages/chili/src/commands/create/rect.ts index ff5b92e1..33b680d0 100644 --- a/packages/chili/src/commands/create/rect.ts +++ b/packages/chili/src/commands/create/rect.ts @@ -1,15 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - GeometryEntity, - MathUtils, - ParameterGeometryEntity, - Plane, - Property, - XYZ, - command, -} from "chili-core"; -import { RectBody } from "../../bodys"; +import { GeometryNode, MathUtils, Plane, Property, XYZ, command } from "chili-core"; +import { RectNode } from "../../bodys"; import { SnapLengthAtPlaneData, SnapedData } from "../../snap"; import { IStep, LengthAtPlaneStep, PointStep } from "../../step"; import { CreateCommand } from "../createCommand"; @@ -39,7 +31,7 @@ export abstract class RectCommandBase extends CreateCommand { return [first, second]; } - private nextSnapData = (): SnapLengthAtPlaneData => { + private readonly nextSnapData = (): SnapLengthAtPlaneData => { return { point: () => this.stepDatas[0].point!, preview: this.previewRect, @@ -52,7 +44,7 @@ export abstract class RectCommandBase extends CreateCommand { }; }; - private handleValid = (end: XYZ) => { + private readonly handleValid = (end: XYZ) => { let data = this.getRectData(end); if (data === undefined) return false; return !MathUtils.anyEqualZero(data.dx, data.dy); @@ -65,7 +57,7 @@ export abstract class RectCommandBase extends CreateCommand { } let data = this.getRectData(end); let p2 = this.previewPoint(end); - return [p1, p2, this.application.shapeFactory.rect(data.plane, data.dx, data.dy).ok().mesh.edges!]; + return [p1, p2, this.application.shapeFactory.rect(data.plane, data.dx, data.dy).value.mesh.edges!]; }; protected getRectData(point: XYZ): RectData { @@ -80,19 +72,18 @@ export abstract class RectCommandBase extends CreateCommand { icon: "icon-rect", }) export class Rect extends RectCommandBase { - protected _isFace: boolean = false; @Property.define("command.faceable.isFace") public get isFace() { - return this._isFace; + return this.getPrivateValue("isFace", false); } public set isFace(value: boolean) { this.setProperty("isFace", value); } - protected geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let rect = this.getRectData(this.stepDatas[1].point!); - let body = new RectBody(this.document, rect.plane, rect.dx, rect.dy); - body.isFace = this._isFace; - return new ParameterGeometryEntity(this.document, body); + let node = new RectNode(this.document, rect.plane, rect.dx, rect.dy); + node.isFace = this.isFace; + return node; } } diff --git a/packages/chili/src/commands/create/revolve.ts b/packages/chili/src/commands/create/revolve.ts index d0179bd2..1b64f6e9 100644 --- a/packages/chili/src/commands/create/revolve.ts +++ b/packages/chili/src/commands/create/revolve.ts @@ -1,19 +1,18 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { - GeometryEntity, + GeometryNode, ICurve, IEdge, ILine, IShape, IShapeFilter, - ParameterGeometryEntity, Property, Ray, ShapeType, command, } from "chili-core"; -import { RevolveBody } from "../../bodys"; +import { RevolvedNode } from "../../bodys"; import { IStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; import { CreateCommand } from "../createCommand"; @@ -24,21 +23,19 @@ import { CreateCommand } from "../createCommand"; icon: "icon-revolve", }) export class Revolve extends CreateCommand { - private _angle: number = 360; @Property.define("common.angle") public get angle() { - return this._angle; + return this.getPrivateValue("angle", 360); } public set angle(value: number) { this.setProperty("angle", value); } - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let shape = this.stepDatas[0].shapes[0].shape; // todo assert let edge = (this.stepDatas[1].shapes[0].shape as IEdge).curve().basisCurve() as ILine; let axis = new Ray(edge.value(0), edge.direction); - let body = new RevolveBody(this.document, shape, axis, this._angle); - return new ParameterGeometryEntity(this.document, body); + return new RevolvedNode(this.document, shape, axis, this.angle); } protected override getSteps(): IStep[] { diff --git a/packages/chili/src/commands/create/section.ts b/packages/chili/src/commands/create/section.ts index 617126c5..509e0975 100644 --- a/packages/chili/src/commands/create/section.ts +++ b/packages/chili/src/commands/create/section.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { EditableGeometryEntity, GeometryEntity, ShapeType, command } from "chili-core"; +import { EditableShapeNode, GeometryNode, I18n, ShapeType, command } from "chili-core"; import { IStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; import { CreateCommand } from "../createCommand"; @@ -11,11 +11,11 @@ import { CreateCommand } from "../createCommand"; icon: "icon-section", }) export class Section extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let shape = this.stepDatas[0].shapes[0].shape; let path = this.stepDatas[1].shapes[0].shape; let section = shape.section(path); - return new EditableGeometryEntity(this.document, section); + return new EditableShapeNode(this.document, I18n.translate("command.section"), section); } protected override getSteps(): IStep[] { diff --git a/packages/chili/src/commands/create/sweep.ts b/packages/chili/src/commands/create/sweep.ts index 10a3dc83..018110a2 100644 --- a/packages/chili/src/commands/create/sweep.ts +++ b/packages/chili/src/commands/create/sweep.ts @@ -1,7 +1,7 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { GeometryEntity, IWire, ParameterGeometryEntity, ShapeType, command } from "chili-core"; -import { SweepBody } from "../../bodys"; +import { GeometryNode, IWire, ShapeType, command } from "chili-core"; +import { SweepedNode } from "../../bodys"; import { IStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; import { CreateCommand } from "../createCommand"; @@ -12,11 +12,10 @@ import { CreateCommand } from "../createCommand"; icon: "icon-sweep", }) export class Sweep extends CreateCommand { - protected override geometryEntity(): GeometryEntity { + protected override geometryNode(): GeometryNode { let shape = this.stepDatas[0].shapes[0].shape; let path = this.stepDatas[1].shapes[0].shape; - let body = new SweepBody(this.document, shape, path as IWire); - return new ParameterGeometryEntity(this.document, body); + return new SweepedNode(this.document, shape, path as IWire); } protected override getSteps(): IStep[] { diff --git a/packages/chili/src/commands/create/thickSolid.ts b/packages/chili/src/commands/create/thickSolid.ts index 54e0cea8..bd360c41 100644 --- a/packages/chili/src/commands/create/thickSolid.ts +++ b/packages/chili/src/commands/create/thickSolid.ts @@ -1,6 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { EditableGeometryEntity, GeometryEntity, Property, ShapeType, command } from "chili-core"; +import { EditableShapeNode, I18n, Property, ShapeType, command } from "chili-core"; import { IStep, SelectShapeStep } from "../../step"; import { CreateCommand } from "../createCommand"; @@ -10,19 +10,18 @@ import { CreateCommand } from "../createCommand"; icon: "icon-thickSolid", }) export class ThickSolidCommand extends CreateCommand { - private _thickness: number = 50; @Property.define("command.thickSolid") get thickness() { - return this._thickness; + return this.getPrivateValue("thickness", 10); } set thickness(value: number) { this.setProperty("thickness", value); } - protected override geometryEntity(): GeometryEntity { + protected override geometryNode() { let shape = this.stepDatas[0].shapes[0].shape; let thickSolid = this.application.shapeFactory.makeThickSolidBySimple(shape, this.thickness); - return new EditableGeometryEntity(this.document, thickSolid.ok()); + return new EditableShapeNode(this.document, I18n.translate("command.thickSolid"), thickSolid.value); } protected override getSteps(): IStep[] { diff --git a/packages/chili/src/commands/createCommand.ts b/packages/chili/src/commands/createCommand.ts index 842a1053..96d63124 100644 --- a/packages/chili/src/commands/createCommand.ts +++ b/packages/chili/src/commands/createCommand.ts @@ -1,15 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - EditableGeometryEntity, - GeometryEntity, - GeometryModel, - I18n, - ParameterGeometryEntity, - Property, - ShapeType, - Transaction, -} from "chili-core"; +import { GeometryNode, Property, Transaction } from "chili-core"; import { MultistepCommand } from "./multistepCommand"; let count = 1; @@ -17,24 +8,24 @@ let count = 1; export abstract class CreateCommand extends MultistepCommand { protected override executeMainTask() { Transaction.excute(this.document, `excute ${Object.getPrototypeOf(this).data.name}`, () => { - let geometry = this.geometryEntity(); - let name = this.getModelName(geometry) + count++; - let model = new GeometryModel(this.document, name, geometry); - this.document.addNode(model); + let node = this.geometryNode(); + this.document.addNode(node); this.document.visual.update(); }); } - private getModelName(geometry: GeometryEntity): string { - if (geometry instanceof EditableGeometryEntity) { - return ShapeType[geometry.shape.ok().shapeType]; - } else if (geometry instanceof ParameterGeometryEntity) { - return I18n.translate(geometry.body.display); - } - return "model"; + protected abstract geometryNode(): GeometryNode; +} + +export abstract class CreateNodeCommand extends MultistepCommand { + protected override executeMainTask() { + Transaction.excute(this.document, `excute ${Object.getPrototypeOf(this).data.name}`, () => { + this.document.addNode(this.getNode()); + this.document.visual.update(); + }); } - protected abstract geometryEntity(): GeometryEntity; + protected abstract getNode(): GeometryNode; } export abstract class CreateFaceableCommand extends CreateCommand { diff --git a/packages/chili/src/commands/importExport.ts b/packages/chili/src/commands/importExport.ts index 6ab9bf3e..b6b32084 100644 --- a/packages/chili/src/commands/importExport.ts +++ b/packages/chili/src/commands/importExport.ts @@ -2,24 +2,22 @@ import { AsyncController, - GeometryModel, + EditableShapeNode, + GeometryNode, I18n, IApplication, ICommand, IDocument, - IModel, - INode, IShape, NodeLinkedList, - ParameterGeometryEntity, PubSub, Result, + ShapeNode, Transaction, command, download, readFilesAsync, } from "chili-core"; -import { ImportedBody } from "../bodys/importer"; import { SelectModelStep } from "../step"; let count = 1; @@ -54,10 +52,8 @@ export class Import implements ICommand { PubSub.default.pub("showToast", "toast.read.error"); return; } - let shapes = shape[1].ok().map((x) => { - let body = new ImportedBody(document, x); - let geometry = new ParameterGeometryEntity(document, body); - return new GeometryModel(document, `Imported ${count++}`, geometry); + let shapes = shape[1].value.map((x) => { + return new EditableShapeNode(document, `Imported ${count++}`, x); }); let nodeList = new NodeLinkedList(document, shape[0]!); document.addNode(nodeList); @@ -67,13 +63,13 @@ export class Import implements ICommand { private async readShape(application: IApplication): Promise<[string | undefined, Result]> { let data = await readFilesAsync(".iges, .igs, .step, .stp", false); - if (!data.isOk || data.ok().length === 0) { + if (!data.isOk || data.value.length === 0) { return [undefined, data.parse()]; } let shape: Result; - let name = data.ok()[0].name.toLowerCase(); - let content = new Uint8Array(await data.ok()[0].arrayBuffer()); + let name = data.value[0].name.toLowerCase(); + let content = new Uint8Array(await data.value[0].arrayBuffer()); if (name.endsWith(".igs") || name.endsWith(".iges")) { shape = application.shapeFactory.converter.convertFromIGES(content); @@ -99,14 +95,14 @@ abstract class Export implements ICommand { PubSub.default.pub( "showPermanent", async () => { - let shapes = models.map((x) => x.geometry.shape.ok()); + let shapes = models.map((x) => (x as ShapeNode).shape.value); let shapeString = await this.convertAsync(application, type, ...shapes); if (!shapeString.isOk) { PubSub.default.pub("showToast", "toast.converter.error"); return; } PubSub.default.pub("showToast", "toast.downloading"); - download([shapeString.ok()], `${models[0].name}.${type}`); + download([shapeString.value], `${models[0].name}.${type}`); }, "toast.excuting{0}", "", @@ -131,7 +127,7 @@ abstract class Export implements ICommand { private async selectModelsAsync(application: IApplication) { let models = application.activeView?.document.selection .getSelectedNodes() - .filter((x) => INode.isModelNode(x)) as IModel[]; + .filter((x) => x instanceof GeometryNode); if (models?.length === 0) { let controller = new AsyncController(); let step = new SelectModelStep("prompt.select.models", true); diff --git a/packages/chili/src/commands/modify/array.ts b/packages/chili/src/commands/modify/array.ts index 8aad9864..8c929d95 100644 --- a/packages/chili/src/commands/modify/array.ts +++ b/packages/chili/src/commands/modify/array.ts @@ -2,8 +2,7 @@ import { AsyncController, - IModel, - INode, + GeometryNode, LineType, Matrix4, Transaction, @@ -21,7 +20,7 @@ import { MultistepCommand } from "../multistepCommand"; icon: "icon-array", }) export class Array extends MultistepCommand { - private models?: IModel[]; + private models?: GeometryNode[]; private positions?: number[]; getSteps(): IStep[] { @@ -30,7 +29,7 @@ export class Array extends MultistepCommand { return [firstStep, secondStep]; } - private getSecondPointData = (): PointSnapData => { + private readonly getSecondPointData = (): PointSnapData => { return { refPoint: () => this.stepDatas[0].point!, dimension: Dimension.D1D2D3, @@ -38,7 +37,7 @@ export class Array extends MultistepCommand { }; }; - private movePreview = (point: XYZ | undefined) => { + private readonly movePreview = (point: XYZ | undefined) => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) return [p1]; let start = this.stepDatas[0].point!; @@ -61,9 +60,7 @@ export class Array extends MultistepCommand { }; protected override async beforeExecute(): Promise { - this.models = this.document.selection - .getSelectedNodes() - .filter((x) => INode.isModelNode(x)) as IModel[]; + this.models = this.document.selection.getSelectedNodes().filter((x) => x instanceof GeometryNode); if (this.models.length === 0) { this.controller = new AsyncController(); this.models = await this.document.selection.pickModel("axis.x", this.controller, true); @@ -71,8 +68,8 @@ export class Array extends MultistepCommand { } this.positions = []; this.models?.forEach((model) => { - let ps = model.geometry.shape.unchecked()?.mesh.edges?.positions; - if (ps) this.positions = this.positions!.concat(model.geometry.matrix.ofPoints(ps)); + let ps = model.mesh.edges?.positions; + if (ps) this.positions = this.positions!.concat(model.matrix.ofPoints(ps)); }); return true; } @@ -82,7 +79,7 @@ export class Array extends MultistepCommand { let vec = this.stepDatas[1].point!.sub(this.stepDatas[0].point!); let transform = Matrix4.createTranslation(vec.x, vec.y, vec.z); this.models?.forEach((x) => { - x.geometry.matrix = x.geometry.matrix.multiply(transform); + x.matrix = x.matrix.multiply(transform); }); this.document.visual.update(); }); diff --git a/packages/chili/src/commands/modify/break.ts b/packages/chili/src/commands/modify/break.ts index 12453e7b..e724f1f8 100644 --- a/packages/chili/src/commands/modify/break.ts +++ b/packages/chili/src/commands/modify/break.ts @@ -1,15 +1,6 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { - EditableGeometryEntity, - GeometryModel, - IEdge, - IVisualGeometry, - ShapeType, - Transaction, - XYZ, - command, -} from "chili-core"; +import { EditableShapeNode, IEdge, ShapeType, Transaction, XYZ, command } from "chili-core"; import { Dimension } from "../../snap"; import { IStep, PointOnCurveStep } from "../../step"; import { SelectShapeStep } from "../../step/selectStep"; @@ -34,11 +25,14 @@ export class Break extends MultistepCommand { let model = this.document.visual.context.getModel(this.stepDatas[0].shapes[0].owner)!; model.parent?.remove(model); (this.stepDatas[0].shapes[0].shape as IEdge).update(curve); - let model1 = new EditableGeometryEntity(this.document, this.stepDatas[0].shapes[0].shape); - let model2 = new EditableGeometryEntity(this.document, curve2.makeEdge()); - this.document.addNode(new GeometryModel(this.document, `${model.name}_1`, model1)); - this.document.addNode(new GeometryModel(this.document, `${model.name}_2`, model2)); + let model1 = new EditableShapeNode( + this.document, + `${model.name}_1`, + this.stepDatas[0].shapes[0].shape, + ); + let model2 = new EditableShapeNode(this.document, `${model.name}_2`, curve2.makeEdge()); + this.document.addNode(model1, model2); this.document.visual.update(); }); diff --git a/packages/chili/src/commands/modify/mirror.ts b/packages/chili/src/commands/modify/mirror.ts index 8ddc7fb0..33799cdd 100644 --- a/packages/chili/src/commands/modify/mirror.ts +++ b/packages/chili/src/commands/modify/mirror.ts @@ -26,7 +26,7 @@ export class Mirror extends TransformedCommand { return [firstStep, secondStep]; } - private getSecondPointData = (): PointSnapData => { + private readonly getSecondPointData = (): PointSnapData => { return { refPoint: () => this.stepDatas[0].point!, dimension: Dimension.D1D2, @@ -40,7 +40,7 @@ export class Mirror extends TransformedCommand { }; }; - private mirrorPreview = (point: XYZ | undefined): ShapeMeshData[] => { + private readonly mirrorPreview = (point: XYZ | undefined): ShapeMeshData[] => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) return [p1]; let shape = this.transformPreview(point); diff --git a/packages/chili/src/commands/modify/rotate.ts b/packages/chili/src/commands/modify/rotate.ts index d8080988..e8e87cf6 100644 --- a/packages/chili/src/commands/modify/rotate.ts +++ b/packages/chili/src/commands/modify/rotate.ts @@ -33,7 +33,7 @@ export class Rotate extends TransformedCommand { return [firstStep, secondStep, thirdStep]; } - private getSecondPointData = (): PointSnapData => { + private readonly getSecondPointData = (): PointSnapData => { return { refPoint: () => this.stepDatas[0].point!, dimension: Dimension.D1D2D3, @@ -43,7 +43,7 @@ export class Rotate extends TransformedCommand { }; }; - private getThirdPointData = (): PointSnapData => { + private readonly getThirdPointData = (): PointSnapData => { return { dimension: Dimension.D1D2, preview: this.rotatePreview, @@ -59,7 +59,7 @@ export class Rotate extends TransformedCommand { }; }; - private rotatePreview = (point: XYZ | undefined): ShapeMeshData[] => { + private readonly rotatePreview = (point: XYZ | undefined): ShapeMeshData[] => { let p1 = this.previewPoint(this.stepDatas[0].point!); let l1 = this.getRayData(this.stepDatas[1].point!); let result = [p1, l1, this.previewPoint(this.stepDatas[1].point!)]; @@ -77,7 +77,7 @@ export class Rotate extends TransformedCommand { return this.getTempLineData(start, e); } - private linePreview = (point: XYZ | undefined): ShapeMeshData[] => { + private readonly linePreview = (point: XYZ | undefined): ShapeMeshData[] => { let p1 = this.previewPoint(this.stepDatas[0].point!); if (!point) { return [p1]; diff --git a/packages/chili/src/commands/modify/split.ts b/packages/chili/src/commands/modify/split.ts index 8b96ed83..73211c3f 100644 --- a/packages/chili/src/commands/modify/split.ts +++ b/packages/chili/src/commands/modify/split.ts @@ -1,10 +1,11 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. import { - EditableGeometryEntity, - GeometryModel, + EditableShapeNode, + GeometryNode, IEdge, IVisualGeometry, + Result, ShapeType, Transaction, command, @@ -19,22 +20,21 @@ import { MultistepCommand } from "../multistepCommand"; icon: "icon-split", }) export class Split extends MultistepCommand { - private geometryEntity(): EditableGeometryEntity { + private splitedShape() { let shape1 = this.stepDatas[0].shapes[0].shape; let edges = this.stepDatas[1].shapes.map((x) => x.shape) as IEdge[]; - let shapes = shape1.split(edges); - return new EditableGeometryEntity(this.document, shapes); + return shape1.split(edges); } protected override executeMainTask() { Transaction.excute(this.document, `excute ${Object.getPrototypeOf(this).data.name}`, () => { - let geometry = this.geometryEntity(); let old = this.document.visual.context.getModel(this.stepDatas[0].shapes[0].owner)!; - if (old instanceof EditableGeometryEntity) { - old.replaceShape(geometry.shape.ok()); - } else { - let model = new GeometryModel(this.document, old.name, geometry); - model.geometry.matrix = old.geometry.matrix; + let shape = this.splitedShape(); + if (old instanceof EditableShapeNode) { + old.shape = Result.ok(shape); + } else if (old instanceof GeometryNode) { + let model = new EditableShapeNode(this.document, old.name, shape); + model.matrix = old.matrix; this.removeModels( this.stepDatas[0].shapes[0].owner, ...this.stepDatas[1].shapes.map((x) => x.owner), diff --git a/packages/chili/src/commands/modify/transformedCommand.ts b/packages/chili/src/commands/modify/transformedCommand.ts index f907f4f0..a2b90b47 100644 --- a/packages/chili/src/commands/modify/transformedCommand.ts +++ b/packages/chili/src/commands/modify/transformedCommand.ts @@ -3,8 +3,7 @@ import { AsyncController, EdgeMeshData, - IModel, - INode, + GeometryNode, LineType, Matrix4, Property, @@ -16,15 +15,13 @@ import { import { MultistepCommand } from "../multistepCommand"; export abstract class TransformedCommand extends MultistepCommand { - protected models?: IModel[]; + protected models?: GeometryNode[]; protected positions?: number[]; - private _isClone: boolean = false; @Property.define("common.clone") get isClone() { - return this._isClone; + return this.getPrivateValue("isClone", false); } - set isClone(value: boolean) { this.setProperty("isClone", value); } @@ -43,9 +40,7 @@ export abstract class TransformedCommand extends MultistepCommand { }; private async ensureSelectedModels() { - this.models = this.document.selection - .getSelectedNodes() - .filter((x) => INode.isModelNode(x)) as IModel[]; + this.models = this.document.selection.getSelectedNodes().filter((x) => x instanceof GeometryNode); if (this.models.length > 0) return true; this.controller = new AsyncController(); this.models = await this.document.selection.pickModel("prompt.select.models", this.controller, true); @@ -61,8 +56,8 @@ export abstract class TransformedCommand extends MultistepCommand { this.positions = []; this.models!.forEach((model) => { - let ps = model.geometry.shape.unchecked()?.mesh.edges?.positions; - if (ps) this.positions = this.positions!.concat(model.geometry.matrix.ofPoints(ps)); + let ps = model.mesh.edges?.positions; + if (ps) this.positions = this.positions!.concat(model.matrix.ofPoints(ps)); }); return true; } @@ -79,7 +74,7 @@ export abstract class TransformedCommand extends MultistepCommand { } let transform = this.transfrom(this.stepDatas.at(-1)!.point!); models?.forEach((x) => { - x.geometry.matrix = x.geometry.matrix.multiply(transform); + x.matrix = x.matrix.multiply(transform); }); this.document.visual.update(); }); diff --git a/packages/chili/src/commands/modify/trim.ts b/packages/chili/src/commands/modify/trim.ts index 7bf2e314..116128f1 100644 --- a/packages/chili/src/commands/modify/trim.ts +++ b/packages/chili/src/commands/modify/trim.ts @@ -3,8 +3,8 @@ import { AsyncController, CancelableCommand, - EditableGeometryEntity, - GeometryModel, + EditableShapeNode, + GeometryNode, I18n, ICurve, IDocument, @@ -13,6 +13,7 @@ import { IShapeFilter, ITrimmedCurve, IView, + ShapeNode, ShapeType, Transaction, VisualConfig, @@ -66,10 +67,10 @@ export class Trim extends CancelableCommand { private trimEdge(selected: TrimEdge) { let model = this.document.visual.context.getModel(selected.edge.owner); + let materialId = (model as GeometryNode)?.materialId; selected.segments.retainSegments.forEach((segment) => { let newEdge = selected.curve.trim(segment.start, segment.end).makeEdge(); - let newEntity = new EditableGeometryEntity(this.document, newEdge); - model?.parent?.add(new GeometryModel(this.document, model.name, newEntity)); + model?.parent?.add(new EditableShapeNode(this.document, model.name, newEdge, materialId)); }); model?.parent?.remove(model); @@ -149,8 +150,12 @@ function findEdges(detecteds: VisualShapeData[], view: IView) { let boundingBox = detecteds[0].owner.boundingBox(); let otherEdges = view.document.visual.context .boundingBoxIntersectFilter(boundingBox, new EdgeFilter()) - .filter((d) => d.geometryEngity.shape.ok().id !== detecteds[0].shape.id) - .map((x) => x.geometryEngity.shape.ok() as IEdge); + .filter( + (d) => + d.geometryNode instanceof ShapeNode && + d.geometryNode.shape.value.id !== detecteds[0].shape.id, + ) + .map((x) => (x.geometryNode as ShapeNode).shape.value as IEdge); return otherEdges; } diff --git a/packages/chili/src/commands/workingPlane.ts b/packages/chili/src/commands/workingPlane.ts index 1cd5afd8..94555f7a 100644 --- a/packages/chili/src/commands/workingPlane.ts +++ b/packages/chili/src/commands/workingPlane.ts @@ -34,7 +34,7 @@ export class SetWorkplane implements ICommand { let vm = new WorkingPlaneViewModel(); PubSub.default.pub("showDialog", "workingPlane.set", vm, () => { let planes = [Plane.XY, Plane.YZ, Plane.ZX]; - view!.workplane = planes[vm.planes.selectedIndexes[0]]; + view.workplane = planes[vm.planes.selectedIndexes[0]]; }); } } diff --git a/packages/chili/src/document.ts b/packages/chili/src/document.ts index bb84698b..f99f6e78 100644 --- a/packages/chili/src/document.ts +++ b/packages/chili/src/document.ts @@ -28,7 +28,7 @@ import { } from "chili-core"; import { Selection } from "./selection"; -const FILE_VERSIOM = "0.3.1"; +const FILE_VERSIOM = "0.4.0"; export class Document extends Observable implements IDocument { readonly visual: IVisual; @@ -36,11 +36,10 @@ export class Document extends Observable implements IDocument { readonly selection: ISelection; readonly materials: ObservableCollection = new ObservableCollection(); - private _nodeChangedObservers = new Set(); + private readonly _nodeChangedObservers = new Set(); - private _name: string; get name(): string { - return this._name; + return this.getPrivateValue("name"); } set name(name: string) { if (this.name === name) return; @@ -52,15 +51,18 @@ export class Document extends Observable implements IDocument { @Serializer.serialze() get rootNode(): INodeLinkedList { if (this._rootNode === undefined) { - this.setRootNode(new NodeLinkedList(this, this._name)); + this.setRootNode(this.initRootNode()); } return this._rootNode!; } + set rootNode(value: INodeLinkedList) { + this.setRootNode(value); + } private setRootNode(value?: INodeLinkedList) { if (this._rootNode === value) return; this._rootNode?.removePropertyChanged(this.handleRootNodeNameChanged); - this._rootNode = value ?? new NodeLinkedList(this, this._name); + this._rootNode = value ?? new NodeLinkedList(this, this.name); this._rootNode.onPropertyChanged(this.handleRootNodeNameChanged); } @@ -78,7 +80,7 @@ export class Document extends Observable implements IDocument { readonly id: string = Id.generate(), ) { super(); - this._name = name; + this.setPrivateValue("name", name); this.history = new History(); this.visual = application.visualFactory.create(this); this.selection = new Selection(this); @@ -88,12 +90,16 @@ export class Document extends Observable implements IDocument { Logger.info(`new document: ${name}`); } - private handleRootNodeNameChanged = (prop: string) => { + private readonly handleRootNodeNameChanged = (prop: string) => { if (prop === "name") { this.name = this.rootNode.name; } }; + initRootNode() { + return new NodeLinkedList(this, this.name); + } + serialize(): Serialized { let serialized = { classKey: "Document", @@ -144,7 +150,7 @@ export class Document extends Observable implements IDocument { this.application.activeView = this.application.views.at(0); this.application.documents.delete(this); this.materials.removeCollectionChanged(this.handleMaterialChanged); - Logger.info(`document: ${this._name} closed`); + Logger.info(`document: ${this.name} closed`); this.dispose(); } @@ -184,7 +190,7 @@ export class Document extends Observable implements IDocument { return document; } - private handleMaterialChanged = (args: CollectionChangedArgs) => { + private readonly handleMaterialChanged = (args: CollectionChangedArgs) => { if (args.action === CollectionAction.add) { Transaction.add(this, this.history, { name: "MaterialChanged", diff --git a/packages/chili/src/selection.ts b/packages/chili/src/selection.ts index bb2a9f08..314c52ac 100644 --- a/packages/chili/src/selection.ts +++ b/packages/chili/src/selection.ts @@ -3,6 +3,7 @@ import { AsyncController, CursorType, + GeometryNode, I18nKeys, IDisposable, IDocument, @@ -12,6 +13,7 @@ import { IShapeFilter, Logger, PubSub, + ShapeNode, ShapeType, VisualState, } from "chili-core"; @@ -96,12 +98,13 @@ export class Selection implements ISelection, IDisposable { return this._selectedNodes.length; } - private nodeFilter = (x: INode) => { - if (INode.isModelNode(x)) { - let shape = x.geometry.shape.ok(); + private readonly nodeFilter = (x: INode) => { + if (x instanceof ShapeNode) { + let shape = x.shape.value; if (!shape || !this.filter) return true; return this.filter.allow(shape); } + return false; }; @@ -127,7 +130,7 @@ export class Selection implements ISelection, IDisposable { private addSelectPublish(nodes: INode[], publish: boolean) { nodes.forEach((m) => { - if (INode.isModelNode(m)) { + if (m instanceof GeometryNode) { let visual = this.document.visual.context.getShape(m); if (visual) this.document.visual.highlighter.addState(visual, VisualState.selected, ShapeType.Shape); @@ -139,7 +142,7 @@ export class Selection implements ISelection, IDisposable { private removeSelectedPublish(nodes: INode[], publish: boolean) { for (const node of nodes) { - if (INode.isModelNode(node)) { + if (node instanceof GeometryNode) { let visual = this.document.visual.context.getShape(node); if (visual) this.document.visual.highlighter.removeState( diff --git a/packages/chili/src/services/commandService.ts b/packages/chili/src/services/commandService.ts index d1821a3b..daedf8c0 100644 --- a/packages/chili/src/services/commandService.ts +++ b/packages/chili/src/services/commandService.ts @@ -33,12 +33,12 @@ export class CommandService implements IService { Logger.info(`${CommandService.name} registed`); } - private onActiveViewChanged = async (view: IView | undefined) => { + private readonly onActiveViewChanged = async (view: IView | undefined) => { if (this.app.executingCommand && ICommand.isCanclableCommand(this.app.executingCommand)) await this.app.executingCommand.cancel(); }; - private executeCommand = async (commandName: CommandKeys) => { + private readonly executeCommand = async (commandName: CommandKeys) => { let command = commandName === "special.last" ? this._lastCommand : commandName; if (command === undefined) return; if (!(await this.canExecute(command))) return; diff --git a/packages/chili/src/services/editorService.ts b/packages/chili/src/services/editorService.ts index c70a5ac0..ba5f7444 100644 --- a/packages/chili/src/services/editorService.ts +++ b/packages/chili/src/services/editorService.ts @@ -21,7 +21,7 @@ export class EditorService implements IService { Logger.info(`${EditorService.name} stoped`); } - private handleSelectionChanged = (document: IDocument, selected: INode[]) => { + private readonly handleSelectionChanged = (document: IDocument, selected: INode[]) => { if (this.editHandler !== undefined) { this.editHandler.dispose(); this.editHandler = undefined; diff --git a/packages/chili/src/services/hotkeyService.ts b/packages/chili/src/services/hotkeyService.ts index 2048675a..1bffafa9 100644 --- a/packages/chili/src/services/hotkeyService.ts +++ b/packages/chili/src/services/hotkeyService.ts @@ -47,7 +47,7 @@ export class HotkeyService implements IService { Logger.info(`${HotkeyService.name} stoped`); } - private eventHandlerKeyDown = (e: KeyboardEvent) => { + private readonly eventHandlerKeyDown = (e: KeyboardEvent) => { e.preventDefault(); let visual = this.app?.activeView?.document?.visual; let view = this.app?.activeView; @@ -58,7 +58,7 @@ export class HotkeyService implements IService { } }; - private commandKeyDown = (e: KeyboardEvent) => { + private readonly commandKeyDown = (e: KeyboardEvent) => { e.preventDefault(); let command = this.getCommand(e); if (command !== undefined) { diff --git a/packages/chili/src/snap/snap.ts b/packages/chili/src/snap/snap.ts index 3c240503..56eef881 100644 --- a/packages/chili/src/snap/snap.ts +++ b/packages/chili/src/snap/snap.ts @@ -1,6 +1,14 @@ // Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license. -import { IDocument, IModel, IShapeFilter, IView, ShapeMeshData, VisualShapeData, XYZ } from "chili-core"; +import { + GeometryNode, + IDocument, + IShapeFilter, + IView, + ShapeMeshData, + VisualShapeData, + XYZ, +} from "chili-core"; export type SnapValidator = (point: XYZ) => boolean; export type SnapPreviewer = (point: XYZ | undefined) => ShapeMeshData[]; @@ -24,7 +32,7 @@ export interface SnapedData { distance?: number; refPoint?: XYZ; shapes: VisualShapeData[]; - models?: IModel[]; + models?: GeometryNode[]; } export interface MouseAndDetected { diff --git a/packages/chili/src/snap/snapEventHandler/angleSnapEventHandler.ts b/packages/chili/src/snap/snapEventHandler/angleSnapEventHandler.ts index f877ae0f..72207310 100644 --- a/packages/chili/src/snap/snapEventHandler/angleSnapEventHandler.ts +++ b/packages/chili/src/snap/snapEventHandler/angleSnapEventHandler.ts @@ -30,7 +30,7 @@ export class AngleSnapEventHandler extends SnapEventHandler { if (snapPointData.prompt === undefined) snapPointData.prompt = this.snapedInfo; } - private snapedInfo = (snaped?: SnapedData) => { + private readonly snapedInfo = (snaped?: SnapedData) => { this.planeAngle.movePoint(snaped?.point!); return `${this.planeAngle.angle.toFixed(2)} °`; }; diff --git a/packages/chili/src/snap/snapEventHandler/snapEventHandler.ts b/packages/chili/src/snap/snapEventHandler/snapEventHandler.ts index 178d2eb8..f6d8e989 100644 --- a/packages/chili/src/snap/snapEventHandler/snapEventHandler.ts +++ b/packages/chili/src/snap/snapEventHandler/snapEventHandler.ts @@ -21,7 +21,7 @@ export abstract class SnapEventHandler implements private _tempPoint?: number; private _tempShapes?: number[]; protected _snaped?: SnapedData; - private validators: SnapValidator[] = []; + private readonly validators: SnapValidator[] = []; constructor( readonly document: IDocument, @@ -228,7 +228,7 @@ export abstract class SnapEventHandler implements } } - private handleText = (view: IView, text: string) => { + private readonly handleText = (view: IView, text: string) => { this._snaped = this.getPointFromInput(view, text); this.finish(); }; diff --git a/packages/chili/src/snap/snaps/objectSnap.ts b/packages/chili/src/snap/snaps/objectSnap.ts index b876dcc4..1e188a9f 100644 --- a/packages/chili/src/snap/snaps/objectSnap.ts +++ b/packages/chili/src/snap/snaps/objectSnap.ts @@ -27,10 +27,10 @@ interface InvisibleSnapInfo { } export class ObjectSnap implements ISnap { - private _featureInfos: Map; - private _intersectionInfos: Map; - private _invisibleInfos: Map; - private _hilightedShapes: VisualShapeData[] = []; + private readonly _featureInfos: Map; + private readonly _intersectionInfos: Map; + private readonly _invisibleInfos: Map; + private readonly _hilightedShapes: VisualShapeData[] = []; private _lastDetected?: [IView, SnapedData]; private _hintVertex?: [IVisualContext, number]; @@ -183,7 +183,7 @@ export class ObjectSnap implements ISnap { private hilighted(view: IView, shapes: VisualShapeData[]) { shapes.forEach((x) => { - let highlighter = x.owner.geometryEngity.document.visual.highlighter; + let highlighter = x.owner.geometryNode.document.visual.highlighter; highlighter.addState(x.owner, VisualState.highlighter, x.shape.shapeType, ...x.indexes); }); this._hilightedShapes.push(...shapes); @@ -191,7 +191,7 @@ export class ObjectSnap implements ISnap { private unHilighted() { this._hilightedShapes.forEach((x) => { - let highlighter = x.owner.geometryEngity.document.visual.highlighter; + let highlighter = x.owner.geometryNode.document.visual.highlighter; highlighter.removeState(x.owner, VisualState.highlighter, x.shape.shapeType, ...x.indexes); }); this._hilightedShapes.length = 0; diff --git a/packages/chili/src/snap/tracking/axisTracking.ts b/packages/chili/src/snap/tracking/axisTracking.ts index c394437f..9bceecaa 100644 --- a/packages/chili/src/snap/tracking/axisTracking.ts +++ b/packages/chili/src/snap/tracking/axisTracking.ts @@ -5,7 +5,7 @@ import { I18n, IView, Plane, XYZ } from "chili-core"; import { Axis } from "./axis"; export class AxisTracking { - private axies: Map = new Map(); + private readonly axies: Map = new Map(); constructor(readonly trackingZ: boolean) {} diff --git a/packages/chili/src/step/angleStep.ts b/packages/chili/src/step/angleStep.ts index ac99478b..296637e7 100644 --- a/packages/chili/src/step/angleStep.ts +++ b/packages/chili/src/step/angleStep.ts @@ -14,8 +14,8 @@ function defaultSnapedData(): PointSnapData { export class AngleStep extends Step { constructor( tip: I18nKeys, - private handleCenter: () => XYZ, - private handleP1: () => XYZ, + private readonly handleCenter: () => XYZ, + private readonly handleP1: () => XYZ, handleP2Data: () => PointSnapData = defaultSnapedData, ) { super(tip, handleP2Data);