UNPKG

@bitbybit-dev/occt

Version:

Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.

41 lines (40 loc) 2.19 kB
import { TopoDS_Compound } from "../../../bitbybit-dev-occt/bitbybit-dev-occt"; import * as Inputs from "../../api/inputs/inputs"; import { TransformsService } from "./transforms.service"; import { ConverterService } from "./converter.service"; import { WiresService } from "./wires.service"; import { BaseBitByBit } from "../../base"; import { EdgesService } from "./edges.service"; import { EntitiesService } from "./entities.service"; export declare class DimensionsService { private readonly base; private readonly transformsService; private readonly converterService; private readonly entitiesService; private readonly edgesService; private readonly wiresService; constructor(base: BaseBitByBit, transformsService: TransformsService, converterService: ConverterService, entitiesService: EntitiesService, edgesService: EdgesService, wiresService: WiresService); /** * Evaluates a mathematical expression or template string with a given value * @param expression The expression to evaluate (can contain 'val' placeholder) * @param value The numeric value to substitute for 'val' * @param decimalPlaces Number of decimal places to format the result * @param removeTrailingZeros Whether to remove trailing zeros from the result * @returns The evaluated expression as a formatted string */ private evaluateExpression; /** * Formats dimension label text with optional expression evaluation * @param value The numeric value to display * @param labelOverwrite Optional expression to evaluate instead of raw value * @param decimalPlaces Number of decimal places for formatting * @param labelSuffix Suffix to append to the text * @param removeTrailingZeros Whether to remove trailing zeros from the result * @returns Formatted dimension label text */ private formatDimensionLabel; private createArrow; simpleLinearLengthDimension(inputs: Inputs.OCCT.SimpleLinearLengthDimensionDto): TopoDS_Compound; simpleAngularDimension(inputs: Inputs.OCCT.SimpleAngularDimensionDto): TopoDS_Compound; pinWithLabel(inputs: Inputs.OCCT.PinWithLabelDto): TopoDS_Compound; }