import { ThreeEvent, ReactThreeFiber } from '@react-three/fiber'; import { ScgObject, ObjectID } from '@buerli.io/core'; import { InfinityPlane } from '../../components/graphics/InfinityPlane'; import { Geometry } from 'three-stdlib'; export declare type HighlightedConstraintsT = Array<{ constraintId: ObjectID; geometryId: ObjectID; }>; export declare type SketchPState = { alwaysShowConstr: boolean; showCoincidence: boolean; showRigidSets: boolean; activeHandler: HandlersList | undefined; handlers: { [key: string]: Handler; }; tmpObjects: { [key: string]: TmpObject; }; highlighted: ObjectID[]; interaction: { cycle: number; objects: ObjectID[]; lastHoveredPos: { [key: ObjectID]: THREE.Vector3; }; constraintsToGeometry: { [key: ObjectID]: ObjectID; }; }; overdefined: { [key: ObjectID]: ObjectID[]; }; isDragged: boolean; scale: number; step: number; mousePos: THREE.Vector3 | undefined; cursor: null | string; needsUpdate: number; }; export declare type TmpObjectID = string; export declare enum HandlersList { CREATEANGLE = "createAngle", DRAG = "drag", DRAWPOINT = "drawPoint", DRAWLINE = "drawLine", DRAWRECT2POINTS = "drawRect2Points", DRAWRECTCENTER = "drawRectCenter", DRAWARCTANGENT = "drawArcTangent", DRAWARCCENTER = "drawArcCenter", DRAWARCMIDDLE = "drawArcMidlde", DRAWCIRCLE = "drawCircle", FILLET = "fillet", HOVER = "hover", TRIM = "trim", SPLIT = "split", USEGEOM = "useGeometry", USEREF = "useReference", SSELECT = "sSelect" } export declare type PointerEventsT = { target: any; pointerId: any; }; export declare type Handler = { name: HandlersList; filter: (object: ScgObject) => boolean; onActivate?: () => void; onDeactivate?: (() => void) | (() => Promise); pointerHandlers: Record & PointerEventsT) => void>; keyHandlers?: Record boolean | void>; }; export declare enum TmpObjClasses { Line = "Line", Point = "Point", Circle = "Cirlce", Arc = "Arc", AngularDimension = "AngularDimension", Rectangle = "Rectangle" } declare type TmpObjectCommon = { class: TmpObjClasses; id: string; color?: THREE.ColorRepresentation; }; export declare type TmpLineT = TmpObjectCommon & { startPId: TmpObjectID; endPId: TmpObjectID; }; export declare type TmpRectT = TmpObjectCommon & { start: THREE.Vector3; end: THREE.Vector3; isSquare: boolean; isCentered: boolean; }; export declare type TmpPointT = TmpObjectCommon & { position: THREE.Vector3; size?: number; }; export declare type TmpArcT = TmpObjectCommon & { startPId: TmpObjectID; endPId: TmpObjectID; centerPId: TmpObjectID; clockwise: boolean; drawAsLine?: boolean; }; export declare type TmpCircleT = TmpObjectCommon & { centerPId: TmpObjectID; radius: number; }; export declare type TmpAngularDimensionT = TmpObjectCommon & { dir0: THREE.Vector3; dir1: THREE.Vector3; center: THREE.Vector3; dimPos: THREE.Vector3; reflex: number; }; export declare type TmpObject = TmpLineT | TmpPointT | TmpArcT | TmpCircleT | TmpAngularDimensionT | TmpRectT; export declare type TmpObjects = { [key: string]: TmpObject; }; export declare type ConstraintType = 'COINCIDENT' | 'COLINEAR' | 'CONCENTRIC' | 'EQUAL_LENGTH' | 'EQUAL_RADIUS' | 'FIXATION' | 'HORIZONTAL' | 'MIDPOINT' | 'PARALLEL' | 'PERPENDICULAR' | 'SPLINE_FIT_POINT' | 'SYMMETRY' | 'TANGENT' | 'VERTICAL'; export declare type DimensionType = 'RADIUS' | 'DIAMETER' | 'OFFSET' | 'HORIZONTAL_DISTANCE' | 'VERTICAL_DISTANCE' | 'ANGLE' | 'ANGLEOX'; declare global { type InfinityPlaneT = ReactThreeFiber.Object3DNode; namespace JSX { interface IntrinsicElements { infinityPlane: InfinityPlaneT; geometry: ReactThreeFiber.Node; } } } export {};