@classcad/react-cad 0.0.0-stage → 3.0.0-beta.20261119100608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +98 -2
- package/build/components/UI/CAD/Constraints.d.ts +30 -0
- package/build/components/UI/CAD/Drawing.d.ts +83 -0
- package/build/components/UI/CAD/ListPlaceholder.d.ts +3 -0
- package/build/components/UI/CAD/Messages/Message.d.ts +8 -0
- package/build/components/UI/CAD/Messages/Messages.d.ts +43 -0
- package/build/components/UI/CAD/Messages/index.d.ts +1 -0
- package/build/components/UI/CAD/Messages/msgStore.d.ts +18 -0
- package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +5 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/Feature.d.ts +8 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/FeatureList.d.ts +6 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/index.d.ts +1 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/utils.d.ts +26 -0
- package/build/components/UI/CAD/ModelTree/ModelTree.d.ts +56 -0
- package/build/components/UI/CAD/ModelTree/ModelTreeHeader.d.ts +15 -0
- package/build/components/UI/CAD/ModelTree/index.d.ts +1 -0
- package/build/components/UI/CAD/ModelTree/primitives.d.ts +6 -0
- package/build/components/UI/CAD/ModelTree/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/PluginBounds.d.ts +8 -0
- package/build/components/UI/CAD/PluginTooltip.d.ts +5 -0
- package/build/components/UI/CAD/PluginsWindows.d.ts +99 -0
- package/build/components/UI/CAD/ReadOnlyContext.d.ts +10 -0
- package/build/components/UI/CAD/SideBar.d.ts +40 -0
- package/build/components/UI/CAD/Solids/Solids.d.ts +23 -0
- package/build/components/UI/CAD/Solids/index.d.ts +1 -0
- package/build/components/UI/CAD/Solids/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/Solids/useVisibleSolids.d.ts +30 -0
- package/build/components/UI/CAD/StageHud.d.ts +9 -0
- package/build/components/UI/CAD/StatusBar.d.ts +11 -0
- package/build/components/UI/CAD/ThemeToggle.d.ts +25 -0
- package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +3 -0
- package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +3 -0
- package/build/components/UI/CAD/ToolBar/ToolBar.d.ts +24 -0
- package/build/components/UI/CAD/ToolBar/index.d.ts +1 -0
- package/build/components/UI/CAD/ToolBar/useCommands.d.ts +12 -0
- package/build/components/UI/CAD/ViewOptionsBar/ViewOptionButtons.d.ts +30 -0
- package/build/components/UI/CAD/ViewOptionsBar/useOptionCommands.d.ts +65 -0
- package/build/components/UI/CAD/ViewPlugButtons.d.ts +43 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModal.d.ts +18 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalContext.d.ts +9 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalInner.d.ts +27 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalProvider.d.ts +4 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/OverlayScrollbar.d.ts +6 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/ResizeHandle.d.ts +2 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/clamp.d.ts +1 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/draggableModalReducer.d.ts +123 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/getWindowSize.d.ts +4 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/index.d.ts +3 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/useDrag.d.ts +5 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/usePrevious.d.ts +1 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/useResize.d.ts +7 -0
- package/build/components/UI/CAD/common/BlankDiv.d.ts +3 -0
- package/build/components/UI/CAD/common/Collapse.d.ts +13 -0
- package/build/components/UI/CAD/common/ContextMenu.d.ts +115 -0
- package/build/components/UI/CAD/common/Divider.d.ts +4 -0
- package/build/components/UI/CAD/common/EntityName.d.ts +14 -0
- package/build/components/UI/CAD/common/Img.d.ts +6 -0
- package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +8 -0
- package/build/components/UI/CAD/common/LoadingScreen/Spinner.d.ts +3 -0
- package/build/components/UI/CAD/common/LoadingScreen/index.d.ts +1 -0
- package/build/components/UI/CAD/common/Menu.d.ts +81 -0
- package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
- package/build/components/UI/CAD/common/NameEdit.d.ts +7 -0
- package/build/components/UI/CAD/common/SectionHeader.d.ts +9 -0
- package/build/components/UI/CAD/common/primitives.d.ts +36 -0
- package/build/components/UI/CAD/common/reveal.d.ts +12 -0
- package/build/components/UI/CAD/hooks/index.d.ts +13 -0
- package/build/components/UI/CAD/hooks/useContextMenuInteraction.d.ts +7 -0
- package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/hooks/useCurrentInstance.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useCurrentProduct.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useEditMode.d.ts +40 -0
- package/build/components/UI/CAD/hooks/useFeatureCount.d.ts +6 -0
- package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
- package/build/components/UI/CAD/hooks/useHasPending.d.ts +27 -0
- package/build/components/UI/CAD/hooks/useIsDisabled.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useIsLoading.d.ts +25 -0
- package/build/components/UI/CAD/hooks/useIsSketchActive.d.ts +26 -0
- package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +12 -0
- package/build/components/UI/CAD/hooks/useOperationSequence.d.ts +29 -0
- package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +8 -0
- package/build/components/UI/CAD/hooks/useRoot.d.ts +2 -0
- package/build/components/UI/CAD/index.d.ts +27 -0
- package/build/components/UI/CAD/plugins/ProductManagement/ProdTable.d.ts +10 -0
- package/build/components/UI/CAD/plugins/ProductManagement/Root.d.ts +11 -0
- package/build/components/UI/CAD/plugins/ProductManagement/View.d.ts +11 -0
- package/build/components/UI/CAD/plugins/ProductManagement/index.d.ts +34 -0
- package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +4 -0
- package/build/components/UI/CAD/plugins/ProductManagement/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/plugins/SessionManagement/Root.d.ts +11 -0
- package/build/components/UI/CAD/plugins/SessionManagement/index.d.ts +36 -0
- package/build/components/UI/CAD/plugins/SessionManagement/types.d.ts +3 -0
- package/build/components/UI/CAD/store/CADActions.d.ts +29 -0
- package/build/components/UI/CAD/store/CADStore.d.ts +68 -0
- package/build/components/UI/CAD/store/instances.d.ts +7 -0
- package/build/components/UI/Readfile.d.ts +39 -0
- package/build/components/UI/ThemeVars.d.ts +6 -0
- package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +8 -0
- package/build/components/UI/editors/BooleanEditor/index.d.ts +2 -0
- package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +3 -0
- package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +11 -0
- package/build/components/UI/editors/CSysEditor/index.d.ts +2 -0
- package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +9 -0
- package/build/components/UI/editors/ColorEditor/ColorEditor.d.ts +12 -0
- package/build/components/UI/editors/ColorEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ColorEditor/useColorParam.d.ts +9 -0
- package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +20 -0
- package/build/components/UI/editors/ExpressionEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +5 -0
- package/build/components/UI/editors/NumberEditor/Inputs.d.ts +18 -0
- package/build/components/UI/editors/NumberEditor/Mentions.d.ts +10 -0
- package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +12 -0
- package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +12 -0
- package/build/components/UI/editors/NumberEditor/index.d.ts +2 -0
- package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +5 -0
- package/build/components/UI/editors/PointEditor/PointEditor.d.ts +10 -0
- package/build/components/UI/editors/PointEditor/index.d.ts +2 -0
- package/build/components/UI/editors/PointEditor/usePointParam.d.ts +5 -0
- package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +12 -0
- package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +13 -0
- package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
- package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +24 -0
- package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +16 -0
- package/build/components/UI/editors/RefsEditors/index.d.ts +8 -0
- package/build/components/UI/editors/RefsEditors/pickers.d.ts +4 -0
- package/build/components/UI/editors/RefsEditors/useIdParam.d.ts +3 -0
- package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +19 -0
- package/build/components/UI/editors/RefsEditors/useModes.d.ts +11 -0
- package/build/components/UI/editors/RefsEditors/useRefsParam.d.ts +3 -0
- package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +18 -0
- package/build/components/UI/editors/ToleranceEditor/ToleranceEditor.d.ts +7 -0
- package/build/components/UI/editors/ToleranceEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ToleranceEditor/useToleranceParam.d.ts +3 -0
- package/build/components/UI/editors/TypeEditor/TypeEditor.d.ts +10 -0
- package/build/components/UI/editors/TypeEditor/index.d.ts +2 -0
- package/build/components/UI/editors/TypeEditor/useTypeParam.d.ts +3 -0
- package/build/components/UI/editors/TypeWrapper.d.ts +6 -0
- package/build/components/UI/editors/Wrapper.d.ts +16 -0
- package/build/components/UI/editors/useParam.d.ts +20 -0
- package/build/components/UI/editors/useValidation.d.ts +4 -0
- package/build/components/graphics/Badge.d.ts +70 -0
- package/build/components/graphics/CSysDisplay.d.ts +108 -0
- package/build/components/graphics/CompositeCurveObj.d.ts +33 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesManager.d.ts +41 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesStore.d.ts +28 -0
- package/build/components/graphics/GeometryOverrides/index.d.ts +2 -0
- package/build/components/graphics/GeometryOverrides/useOverrideGeometryColor.d.ts +36 -0
- package/build/components/graphics/HUD.d.ts +44 -0
- package/build/components/graphics/HoveredConstraintDisplay.d.ts +24 -0
- package/build/components/graphics/InfinityPlane.d.ts +4 -0
- package/build/components/graphics/Outlines/AAPass.d.ts +8 -0
- package/build/components/graphics/Outlines/IDPass.d.ts +12 -0
- package/build/components/graphics/Outlines/Outline.d.ts +62 -0
- package/build/components/graphics/Outlines/OutlineEffect.d.ts +48 -0
- package/build/components/graphics/Outlines/OutlineMaterial.d.ts +9 -0
- package/build/components/graphics/Outlines/WidenPass.d.ts +17 -0
- package/build/components/graphics/PluginGeometryBounds.d.ts +40 -0
- package/build/components/graphics/SelectableMate.d.ts +3 -0
- package/build/components/graphics/SelectedMateObj.d.ts +54 -0
- package/build/components/graphics/StageLook.d.ts +51 -0
- package/build/components/graphics/WorkAxisObj.d.ts +33 -0
- package/build/components/graphics/WorkCSysObj.d.ts +33 -0
- package/build/components/graphics/WorkCoordSystemObj.d.ts +32 -0
- package/build/components/graphics/WorkPlaneObj.d.ts +33 -0
- package/build/components/graphics/WorkPointObj.d.ts +57 -0
- package/build/components/graphics/graphics.d.ts +61 -0
- package/build/components/graphics/utils/MatePathTransform.d.ts +10 -0
- package/build/components/graphics/utils/useCsysMatrix.d.ts +4 -0
- package/build/components/utils/CompValidation/ErrorBoundary.d.ts +28 -0
- package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +16 -0
- package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +14 -0
- package/build/components/utils/CompValidation/verifiers.d.ts +32 -0
- package/build/components/utils/FtVisibilityController.d.ts +26 -0
- package/build/elements/index.d.ts +162 -0
- package/build/icons/axes.d.ts +73 -0
- package/build/icons/draw.d.ts +75 -0
- package/build/icons/features.d.ts +71 -0
- package/build/icons/glyphs.d.ts +10 -0
- package/build/icons/index.d.ts +152 -0
- package/build/icons/legacy.d.ts +159 -0
- package/build/icons/mates.d.ts +26 -0
- package/build/icons/params.d.ts +77 -0
- package/build/icons/refs.d.ts +61 -0
- package/build/icons/sheets.d.ts +302 -0
- package/build/icons/sketch.d.ts +102 -0
- package/build/icons/types.d.ts +74 -0
- package/build/icons/ui.d.ts +114 -0
- package/build/icons.cjs.js +1751 -0
- package/build/icons.js +1742 -0
- package/build/index.cjs.js +44948 -0
- package/build/index.d.ts +115 -0
- package/build/index.js +44800 -0
- package/build/plugins/AppearanceEditor/Root.d.ts +12 -0
- package/build/plugins/AppearanceEditor/index.d.ts +42 -0
- package/build/plugins/Boolean/Root.d.ts +11 -0
- package/build/plugins/Boolean/index.d.ts +39 -0
- package/build/plugins/BoundingBoxInfo/Root.d.ts +12 -0
- package/build/plugins/BoundingBoxInfo/View.d.ts +11 -0
- package/build/plugins/BoundingBoxInfo/index.d.ts +35 -0
- package/build/plugins/Box/Root.d.ts +11 -0
- package/build/plugins/Box/index.d.ts +34 -0
- package/build/plugins/Chamfer/Root.d.ts +11 -0
- package/build/plugins/Chamfer/index.d.ts +35 -0
- package/build/plugins/CircularPattern/Root.d.ts +11 -0
- package/build/plugins/CircularPattern/index.d.ts +35 -0
- package/build/plugins/CompositeCurve/Root.d.ts +11 -0
- package/build/plugins/CompositeCurve/View.d.ts +11 -0
- package/build/plugins/CompositeCurve/index.d.ts +36 -0
- package/build/plugins/Cone/Root.d.ts +11 -0
- package/build/plugins/Cone/index.d.ts +36 -0
- package/build/plugins/Cylinder/Root.d.ts +11 -0
- package/build/plugins/Cylinder/index.d.ts +35 -0
- package/build/plugins/Dimensions/DimContext.d.ts +10 -0
- package/build/plugins/Dimensions/Root.d.ts +11 -0
- package/build/plugins/Dimensions/View.d.ts +11 -0
- package/build/plugins/Dimensions/graphics/DimGraphics.d.ts +7 -0
- package/build/plugins/Dimensions/graphics/DimensionSet.d.ts +8 -0
- package/build/plugins/Dimensions/graphics/primitives.d.ts +34 -0
- package/build/plugins/Dimensions/index.d.ts +34 -0
- package/build/plugins/Dimensions/utils.d.ts +5 -0
- package/build/plugins/EntityDeletion/Root.d.ts +11 -0
- package/build/plugins/EntityDeletion/index.d.ts +34 -0
- package/build/plugins/Expressions/Root.d.ts +11 -0
- package/build/plugins/Expressions/index.d.ts +34 -0
- package/build/plugins/Expressions/useContextMenuItems.d.ts +4 -0
- package/build/plugins/Extrusion/Root.d.ts +11 -0
- package/build/plugins/Extrusion/View.d.ts +11 -0
- package/build/plugins/Extrusion/index.d.ts +50 -0
- package/build/plugins/Fillet/Root.d.ts +11 -0
- package/build/plugins/Fillet/index.d.ts +35 -0
- package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/CircularPattern/View.d.ts +11 -0
- package/build/plugins/HLConstraints/CircularPattern/index.d.ts +38 -0
- package/build/plugins/HLConstraints/Cylindrical/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Cylindrical/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Cylindrical/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Fastened/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Fastened/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Fastened/index.d.ts +37 -0
- package/build/plugins/HLConstraints/FastenedOrigin/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/FastenedOrigin/View.d.ts +11 -0
- package/build/plugins/HLConstraints/FastenedOrigin/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Gear/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Gear/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Gear/index.d.ts +36 -0
- package/build/plugins/HLConstraints/Group/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Group/index.d.ts +34 -0
- package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/LinearPattern/View.d.ts +11 -0
- package/build/plugins/HLConstraints/LinearPattern/index.d.ts +38 -0
- package/build/plugins/HLConstraints/Parallel/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Parallel/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Parallel/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Planar/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Planar/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Planar/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Revolute/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Revolute/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Revolute/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Slider/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Slider/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Slider/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Spherical/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Spherical/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Spherical/index.d.ts +36 -0
- package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
- package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
- package/build/plugins/HLConstraints/components/LimitedValue.d.ts +12 -0
- package/build/plugins/HLConstraints/components/Limits.d.ts +25 -0
- package/build/plugins/HLConstraints/components/LimitsCollapse.d.ts +12 -0
- package/build/plugins/HLConstraints/validators.d.ts +2 -0
- package/build/plugins/Import/Root.d.ts +11 -0
- package/build/plugins/Import/index.d.ts +35 -0
- package/build/plugins/LinearPattern/Root.d.ts +11 -0
- package/build/plugins/LinearPattern/index.d.ts +36 -0
- package/build/plugins/Measure/Digits.d.ts +7 -0
- package/build/plugins/Measure/Root.d.ts +11 -0
- package/build/plugins/Measure/View.d.ts +15 -0
- package/build/plugins/Measure/config.d.ts +1 -0
- package/build/plugins/Measure/graphics/MeasureGraphics.d.ts +24 -0
- package/build/plugins/Measure/index.d.ts +39 -0
- package/build/plugins/Measure/utils.d.ts +2 -0
- package/build/plugins/Mirror/Root.d.ts +11 -0
- package/build/plugins/Mirror/index.d.ts +34 -0
- package/build/plugins/Revolve/Root.d.ts +11 -0
- package/build/plugins/Revolve/index.d.ts +37 -0
- package/build/plugins/Rotate/Root.d.ts +11 -0
- package/build/plugins/Rotate/index.d.ts +35 -0
- package/build/plugins/Sketch/Root/Constraints/Constraints.d.ts +2 -0
- package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +22 -0
- package/build/plugins/Sketch/Root/Constraints/index.d.ts +2 -0
- package/build/plugins/Sketch/Root/Constraints/utils.d.ts +6 -0
- package/build/plugins/Sketch/Root/CopyPatterns.d.ts +2 -0
- package/build/plugins/Sketch/Root/Details.d.ts +2 -0
- package/build/plugins/Sketch/Root/Handlers.d.ts +2 -0
- package/build/plugins/Sketch/Root/PlaneSelection.d.ts +7 -0
- package/build/plugins/Sketch/Root/Position.d.ts +2 -0
- package/build/plugins/Sketch/Root/Regions.d.ts +2 -0
- package/build/plugins/Sketch/Root/Root.d.ts +11 -0
- package/build/plugins/Sketch/Root/RootContext.d.ts +7 -0
- package/build/plugins/Sketch/Root/SketchGroup.d.ts +15 -0
- package/build/plugins/Sketch/Root/index.d.ts +1 -0
- package/build/plugins/Sketch/Root/useContextMenuItems.d.ts +4 -0
- package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
- package/build/plugins/Sketch/View/View.d.ts +11 -0
- package/build/plugins/Sketch/View/ViewContext.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/Constraints.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
- package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +20 -0
- package/build/plugins/Sketch/View/graphics/Merged/ArcGeometry.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/ArcMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/Bezier.d.ts +19 -0
- package/build/plugins/Sketch/View/graphics/Merged/BezierGeometry.d.ts +12 -0
- package/build/plugins/Sketch/View/graphics/Merged/BezierMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/Circle.d.ts +9 -0
- package/build/plugins/Sketch/View/graphics/Merged/Line.d.ts +15 -0
- package/build/plugins/Sketch/View/graphics/Merged/LineGeometry.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/LineMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +16 -0
- package/build/plugins/Sketch/View/graphics/Merged/Point.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/Merged/Spline.d.ts +17 -0
- package/build/plugins/Sketch/View/graphics/Merged/SplineGeometry.d.ts +11 -0
- package/build/plugins/Sketch/View/graphics/Merged/SplineMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/TmpAngularDimension.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/graphics.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +49 -0
- package/build/plugins/Sketch/View/graphics/primitives.d.ts +34 -0
- package/build/plugins/Sketch/View/graphics/scale.d.ts +6 -0
- package/build/plugins/Sketch/View/graphics/tmpGraphics.d.ts +3 -0
- package/build/plugins/Sketch/View/graphics/transform.d.ts +4 -0
- package/build/plugins/Sketch/View/handlers/CreateAngle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/CreateConstraint.d.ts +10 -0
- package/build/plugins/Sketch/View/handlers/Drag.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawArc.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawCircle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawLine.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawNurbs.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawPoint.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawRectangle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Fillet.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +33 -0
- package/build/plugins/Sketch/View/handlers/Hover.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Split.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Trim.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Use.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/constraintCreation.d.ts +10 -0
- package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +24 -0
- package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/snapper.d.ts +11 -0
- package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +20 -0
- package/build/plugins/Sketch/View/index.d.ts +1 -0
- package/build/plugins/Sketch/constants.d.ts +5 -0
- package/build/plugins/Sketch/description.d.ts +7 -0
- package/build/plugins/Sketch/index.d.ts +35 -0
- package/build/plugins/Sketch/resources.d.ts +5 -0
- package/build/plugins/Sketch/types.d.ts +148 -0
- package/build/plugins/Sketch/utils/Interaction.d.ts +7 -0
- package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
- package/build/plugins/Sketch/utils/getSketchState.d.ts +3 -0
- package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
- package/build/plugins/Sketch/utils/useSketchState.d.ts +3 -0
- package/build/plugins/Slice/Root.d.ts +11 -0
- package/build/plugins/Slice/index.d.ts +34 -0
- package/build/plugins/SliceBySheet/Root.d.ts +11 -0
- package/build/plugins/SliceBySheet/index.d.ts +35 -0
- package/build/plugins/Sphere/Root.d.ts +11 -0
- package/build/plugins/Sphere/index.d.ts +35 -0
- package/build/plugins/TransformByCsys/Root.d.ts +11 -0
- package/build/plugins/TransformByCsys/index.d.ts +35 -0
- package/build/plugins/Translate/Root.d.ts +11 -0
- package/build/plugins/Translate/index.d.ts +35 -0
- package/build/plugins/Twist/Root.d.ts +11 -0
- package/build/plugins/Twist/View.d.ts +11 -0
- package/build/plugins/Twist/index.d.ts +48 -0
- package/build/plugins/WorkAxis/Root.d.ts +11 -0
- package/build/plugins/WorkAxis/View.d.ts +11 -0
- package/build/plugins/WorkAxis/index.d.ts +37 -0
- package/build/plugins/WorkCSys/Root.d.ts +11 -0
- package/build/plugins/WorkCSys/View.d.ts +11 -0
- package/build/plugins/WorkCSys/index.d.ts +53 -0
- package/build/plugins/WorkCoordSystem/Root.d.ts +11 -0
- package/build/plugins/WorkCoordSystem/View.d.ts +11 -0
- package/build/plugins/WorkCoordSystem/index.d.ts +55 -0
- package/build/plugins/WorkPlane/Root.d.ts +11 -0
- package/build/plugins/WorkPlane/View.d.ts +11 -0
- package/build/plugins/WorkPlane/index.d.ts +38 -0
- package/build/plugins/WorkPlane/validators.d.ts +1 -0
- package/build/plugins/WorkPoint/Root.d.ts +11 -0
- package/build/plugins/WorkPoint/View.d.ts +11 -0
- package/build/plugins/WorkPoint/index.d.ts +38 -0
- package/build/plugins/components/PluginForm.d.ts +24 -0
- package/build/plugins/utils/useRefsReset.d.ts +2 -0
- package/build/session/identity.d.ts +46 -0
- package/build/session/sessionClient.d.ts +140 -0
- package/build/session/types.d.ts +52 -0
- package/build/session/viewpoints.d.ts +90 -0
- package/build/theme/AppStyle.d.ts +33 -0
- package/build/theme/fonts/mono.d.ts +29 -0
- package/build/theme/stage.d.ts +148 -0
- package/build/theme/styles/antdChoices.d.ts +1 -0
- package/build/theme/styles/antdControls.d.ts +1 -0
- package/build/theme/styles/antdSurfaces.d.ts +1 -0
- package/build/theme/styles/editors.d.ts +1 -0
- package/build/theme/styles/fields.d.ts +1 -0
- package/build/theme/styles/frame.d.ts +1 -0
- package/build/theme/styles/panes.d.ts +1 -0
- package/build/theme/styles/parts.d.ts +2 -0
- package/build/theme/styles/rest.d.ts +1 -0
- package/build/theme/styles/sketch.d.ts +1 -0
- package/build/theme/styles/toolbar.d.ts +1 -0
- package/build/theme/styles/tools.d.ts +1 -0
- package/build/theme/styles/windows.d.ts +1 -0
- package/build/theme/themeStore.d.ts +305 -0
- package/build/types/jsx-compat.d.ts +8 -0
- package/build/types.d.ts +16 -0
- package/build/utils/FileUtils.d.ts +20 -0
- package/build/utils/bezierMatrices.d.ts +3 -0
- package/build/utils/conversionUtils.d.ts +78 -0
- package/build/utils/cubicSplineInterpolation.d.ts +5 -0
- package/build/utils/defaultValues.d.ts +3 -0
- package/build/utils/drawing/index.d.ts +3 -0
- package/build/utils/drawing/useDrawingArr.d.ts +10 -0
- package/build/utils/drawing/useDrawingCCId.d.ts +10 -0
- package/build/utils/drawing/useDrawingStr.d.ts +10 -0
- package/build/utils/getHighlightedColor.d.ts +6 -0
- package/build/utils/getMatePath.d.ts +2 -0
- package/build/utils/getMateRefIds.d.ts +30 -0
- package/build/utils/helpers.d.ts +19 -0
- package/build/utils/mateUtils.d.ts +35 -0
- package/build/utils/nurbsUtils.d.ts +35 -0
- package/build/utils/selection/filters.d.ts +12 -0
- package/build/utils/selection/scopes/mateSelection.d.ts +49 -0
- package/build/utils/selection/scopes/treeObjInteraction.d.ts +74 -0
- package/build/utils/selection/useSelectorsOrder.d.ts +12 -0
- package/build/utils/sketchIntersectionUtils.d.ts +139 -0
- package/build/utils/sketchUtils.d.ts +235 -0
- package/build/utils/useAllObjects.d.ts +31 -0
- package/build/utils/useIsUncommited.d.ts +2 -0
- package/build/utils/useRetainVisibility.d.ts +2 -0
- package/build/utils/useScale.d.ts +5 -0
- package/build/utils/validation.d.ts +11 -0
- package/doc/api/advanced/session.md +646 -0
- package/doc/api/advanced/utilities.md +1306 -0
- package/doc/api/assembly-constraints.md +340 -0
- package/doc/api/feature-plugins.md +613 -0
- package/doc/api/graphics.md +848 -0
- package/doc/api/hooks.md +300 -0
- package/doc/api/icons.md +812 -0
- package/doc/api/index.md +87 -0
- package/doc/api/other.md +369 -0
- package/doc/api/panels.md +754 -0
- package/doc/api/theme.md +551 -0
- package/doc/api/tool-plugins.md +191 -0
- package/doc/api/ui-elements.md +310 -0
- package/doc/api/work-geometry.md +154 -0
- package/icons/package.json +8 -0
- package/package.json +109 -4
- package/tools/fonts/brotli.py +29 -0
- package/tools/fonts/build.py +76 -0
- package/tools/icons/preview.mjs +74 -0
- package/tsconfig.build.json +16 -0
- package/typedoc.json +18 -0
- package/vitest.config.mts +25 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link PluginGeometryBounds}.
|
|
5
|
+
*
|
|
6
|
+
* @advanced
|
|
7
|
+
* @category Graphics
|
|
8
|
+
*/
|
|
9
|
+
export type PluginGeometryBoundsProps = {
|
|
10
|
+
/** The drawing whose current part's features are measured. */
|
|
11
|
+
drawingId: DrawingID;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* An unseen box around what the plugins of the current part show: its visible work geometry and sketches.
|
|
15
|
+
*
|
|
16
|
+
* It is a mesh that is not drawn, with the box as its geometry's bounds, so that what fits the view to the scene
|
|
17
|
+
* (drei's `<Bounds>`) takes the work points, axes, planes, coordinate systems and sketches in, which are not part of
|
|
18
|
+
* the model's geometry. It follows them as they change. It goes inside the canvas, next to the geometry that is
|
|
19
|
+
* fitted. Its props: {@link PluginGeometryBoundsProps}.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { Bounds } from '@react-three/drei'
|
|
24
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
25
|
+
* import { BuerliGeometry } from '@classcad/react'
|
|
26
|
+
* import { PluginGeometryBounds } from '@classcad/react-cad'
|
|
27
|
+
*
|
|
28
|
+
* // zoom to fit takes the work planes and sketches in, not only the bodies
|
|
29
|
+
* const Fitted = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
30
|
+
* <Bounds fit observe margin={1.2}>
|
|
31
|
+
* <BuerliGeometry drawingId={drawingId} />
|
|
32
|
+
* <PluginGeometryBounds drawingId={drawingId} />
|
|
33
|
+
* </Bounds>
|
|
34
|
+
* )
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @advanced
|
|
38
|
+
* @category Graphics
|
|
39
|
+
*/
|
|
40
|
+
export declare const PluginGeometryBounds: React.FC<PluginGeometryBoundsProps>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type * as THREE from 'three';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
import { FlipType, ReorientedType } from '@classcad/client';
|
|
5
|
+
/**
|
|
6
|
+
* Props of {@link SelectedMateObj}.
|
|
7
|
+
*
|
|
8
|
+
* @advanced
|
|
9
|
+
* @category Graphics
|
|
10
|
+
*/
|
|
11
|
+
export type SelectedMateObjProps = {
|
|
12
|
+
/** The drawing the mate is in. */
|
|
13
|
+
drawingId: DrawingID;
|
|
14
|
+
/** The work coordinate system the mate is on. */
|
|
15
|
+
csysId: ObjectID;
|
|
16
|
+
/** The mate's path: the instances that lead to the coordinate system, as an assembly constraint's mate gives it. */
|
|
17
|
+
path: ObjectID[];
|
|
18
|
+
/** Which of the coordinate system's axes is the mate's main one, and which way. */
|
|
19
|
+
flip: FlipType;
|
|
20
|
+
/** How far the mate is turned about its main axis. */
|
|
21
|
+
reorient: ReorientedType;
|
|
22
|
+
/** Its colour. */
|
|
23
|
+
color?: THREE.ColorRepresentation;
|
|
24
|
+
/** Its opacity, from 0 to 1. */
|
|
25
|
+
opacity?: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Draws a mate of an assembly as it is selected: the coordinate system it is on, flipped and turned as the mate
|
|
29
|
+
* says, where its path places it in the current instance.
|
|
30
|
+
*
|
|
31
|
+
* Its props: {@link SelectedMateObjProps}. {@link CSysDisplay} draws all the mates of an assembly.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import { FlipType, ReorientedType } from '@classcad/client'
|
|
36
|
+
* import type { DrawingID, ObjectID } from '@classcad/sdkjs'
|
|
37
|
+
* import { HUD, SelectedMateObj, useStage } from '@classcad/react-cad'
|
|
38
|
+
*
|
|
39
|
+
* // in the canvas: a mate the app has in hand, lying along -Z of its coordinate system, over the model
|
|
40
|
+
* function MateInHand({ drawingId, csysId, path }: { drawingId: DrawingID; csysId: ObjectID; path: ObjectID[] }) {
|
|
41
|
+
* const stage = useStage()
|
|
42
|
+
* return (
|
|
43
|
+
* <HUD>
|
|
44
|
+
* <SelectedMateObj drawingId={drawingId} csysId={csysId} path={path} flip={FlipType.FLIP_Z_INV}
|
|
45
|
+
* reorient={ReorientedType.REORIENTED_0} color={stage.pick} />
|
|
46
|
+
* </HUD>
|
|
47
|
+
* )
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @advanced
|
|
52
|
+
* @category Graphics
|
|
53
|
+
*/
|
|
54
|
+
export declare const SelectedMateObj: React.FC<SelectedMateObjProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props of {@link StageLook}.
|
|
4
|
+
*
|
|
5
|
+
* @category Graphics
|
|
6
|
+
*/
|
|
7
|
+
export type StageLookProps = {
|
|
8
|
+
/** How wide a line is inked, in px. Default `1.4`. */
|
|
9
|
+
weight?: number;
|
|
10
|
+
/** false leaves curved faces without their silhouettes. Default `true`. */
|
|
11
|
+
silhouettes?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The model on the stage: a solid body, drawn by its lines as a drawing shows it (BRANDING.md,
|
|
15
|
+
* "The stage").
|
|
16
|
+
* - **Body.** A body the model gives a colour of its own keeps it; the engine's stock grey takes
|
|
17
|
+
* the theme's body tone: a neutral grey that stands clearly off the ground, in either theme.
|
|
18
|
+
* - **Edges.** The engine's edges are hairlines (a GL line is one device pixel wide, half a pixel
|
|
19
|
+
* on a dense screen). Each is drawn instead as a line of real width, which takes its colour and
|
|
20
|
+
* its opacity from the hairline, so whatever recolours or fades the model's edges still does.
|
|
21
|
+
* The hairline stays where it is, unseen, as what is pointed at and picked. Seams, where a
|
|
22
|
+
* curved face meets itself, are drawn like every other edge: what can be picked is seen.
|
|
23
|
+
* - **Silhouettes.** Where a curved face turns away from the eye there is no edge, and a drawing
|
|
24
|
+
* has a line. It is found for the view as it stands, and found again when the view turns.
|
|
25
|
+
* - **Thin bodies.** A body only a few lines thick on screen (a rod, a wire, a sheet from far off)
|
|
26
|
+
* is drawn by its faces: it has no silhouette, and the edges of a body that narrow, or edges that
|
|
27
|
+
* lie that close together, take on its colour. A dense model reads as its parts, not as ink.
|
|
28
|
+
*
|
|
29
|
+
* Mount it inside the canvas, beside the geometry. (That the edges are ink is the theme's doing:
|
|
30
|
+
* {@link Drawing} tells the engine's geometry so.) Without it the model is the engine's own grey with hairline edges.
|
|
31
|
+
* Its props: {@link StageLookProps}.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import { Canvas } from '@react-three/fiber'
|
|
36
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
37
|
+
* import { BuerliGeometry } from '@classcad/react'
|
|
38
|
+
* import { StageLook } from '@classcad/react-cad'
|
|
39
|
+
*
|
|
40
|
+
* // the model drawn as a drawing: heavier lines, and no silhouettes on its curved faces
|
|
41
|
+
* const Stage = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
42
|
+
* <Canvas orthographic>
|
|
43
|
+
* <StageLook weight={1.8} silhouettes={false} />
|
|
44
|
+
* <BuerliGeometry drawingId={drawingId} />
|
|
45
|
+
* </Canvas>
|
|
46
|
+
* )
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @category Graphics
|
|
50
|
+
*/
|
|
51
|
+
export declare const StageLook: React.FC<StageLookProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type * as THREE from 'three';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
/**
|
|
5
|
+
* Props of {@link WorkAxisObj}.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Graphics
|
|
9
|
+
*/
|
|
10
|
+
export type WorkAxisObjProps = {
|
|
11
|
+
/** The drawing the object is in. */
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
/** The work axis (`CC_WorkAxis`) in the drawing's structure tree. */
|
|
14
|
+
objectId: ObjectID;
|
|
15
|
+
/** Its colour. Default: the stage's datum colour ({@link StageColors}.datum). */
|
|
16
|
+
color?: THREE.ColorRepresentation;
|
|
17
|
+
/** Its opacity, from 0 to 1. Default `1`. */
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Given to its meshes' `userData`, for whoever picks it from the scene. */
|
|
20
|
+
userData?: any;
|
|
21
|
+
/** Pointer handlers for its meshes (react-three-fiber's `onClick`, `onPointerOver`, …). */
|
|
22
|
+
handlers?: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Draws a work axis of the drawing's structure on the stage: an arrow from its position along its direction, the
|
|
26
|
+
* same size on the screen at any zoom.
|
|
27
|
+
*
|
|
28
|
+
* Its props: {@link WorkAxisObjProps}. See {@link WorkPointObj}.
|
|
29
|
+
*
|
|
30
|
+
* @advanced
|
|
31
|
+
* @category Graphics
|
|
32
|
+
*/
|
|
33
|
+
export declare const WorkAxisObj: React.FC<WorkAxisObjProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
/**
|
|
5
|
+
* Props of {@link WorkCSysObj}.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Graphics
|
|
9
|
+
*/
|
|
10
|
+
export type WorkCSysObjProps = {
|
|
11
|
+
/** The drawing the object is in. */
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
/** The work coordinate system (`CC_WorkCSys`) in the drawing's structure tree. */
|
|
14
|
+
objectId: ObjectID;
|
|
15
|
+
/** Its colour. Default: its axes' own colours. */
|
|
16
|
+
color?: THREE.ColorRepresentation;
|
|
17
|
+
/** Its opacity, from 0 to 1. Default `1`. */
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Given to its meshes' `userData`, for whoever picks it from the scene. */
|
|
20
|
+
userData?: any;
|
|
21
|
+
/** Pointer handlers for its meshes (react-three-fiber's `onClick`, `onPointerOver`, …). */
|
|
22
|
+
handlers?: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Draws a work coordinate system (`CC_WorkCSys`) of the drawing's structure on the stage: its three axes, where its
|
|
26
|
+
* coordinate system puts them.
|
|
27
|
+
*
|
|
28
|
+
* Its props: {@link WorkCSysObjProps}. See {@link WorkPointObj}.
|
|
29
|
+
*
|
|
30
|
+
* @advanced
|
|
31
|
+
* @category Graphics
|
|
32
|
+
*/
|
|
33
|
+
export declare const WorkCSysObj: React.FC<WorkCSysObjProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
/**
|
|
5
|
+
* Props of {@link WorkCoordSystemObj}.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Graphics
|
|
9
|
+
*/
|
|
10
|
+
export type WorkCoordSystemObjProps = {
|
|
11
|
+
/** The drawing the object is in. */
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
/** The work coordinate system (`CC_WorkCoordSystem`) in the drawing's structure tree. */
|
|
14
|
+
objectId: ObjectID;
|
|
15
|
+
/** Its colour. Default: its axes' own colours. */
|
|
16
|
+
color?: THREE.ColorRepresentation;
|
|
17
|
+
/** Its opacity, from 0 to 1. Default `1`. */
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Given to its meshes' `userData`, for whoever picks it from the scene. */
|
|
20
|
+
userData?: any;
|
|
21
|
+
/** Pointer handlers for its meshes (react-three-fiber's `onClick`, `onPointerOver`, …). */
|
|
22
|
+
handlers?: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Draws a work coordinate system (`CC_WorkCoordSystem`) of the drawing's structure on the stage: its three axes.
|
|
26
|
+
*
|
|
27
|
+
* Its props: {@link WorkCoordSystemObjProps}. See {@link WorkPointObj}.
|
|
28
|
+
*
|
|
29
|
+
* @advanced
|
|
30
|
+
* @category Graphics
|
|
31
|
+
*/
|
|
32
|
+
export declare const WorkCoordSystemObj: React.FC<WorkCoordSystemObjProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
/**
|
|
5
|
+
* Props of {@link WorkPlaneObj}.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Graphics
|
|
9
|
+
*/
|
|
10
|
+
export type WorkPlaneObjProps = {
|
|
11
|
+
/** The drawing the object is in. */
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
/** The work plane (`CC_WorkPlane`) in the drawing's structure tree. */
|
|
14
|
+
objectId: ObjectID;
|
|
15
|
+
/** Its colour. Default: the stage's plane colour ({@link StageColors}.plane). */
|
|
16
|
+
color?: THREE.ColorRepresentation;
|
|
17
|
+
/** Its opacity, from 0 to 1. Default `1`. */
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Given to its meshes' `userData`, for whoever picks it from the scene. */
|
|
20
|
+
userData?: any;
|
|
21
|
+
/** Pointer handlers for its meshes (react-three-fiber's `onClick`, `onPointerOver`, …). */
|
|
22
|
+
handlers?: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Draws a work plane of the drawing's structure on the stage: a square of its size at its position, its outline over
|
|
26
|
+
* a thin fill, seen from either side.
|
|
27
|
+
*
|
|
28
|
+
* Its props: {@link WorkPlaneObjProps}. See {@link WorkPointObj}.
|
|
29
|
+
*
|
|
30
|
+
* @advanced
|
|
31
|
+
* @category Graphics
|
|
32
|
+
*/
|
|
33
|
+
export declare const WorkPlaneObj: React.FC<WorkPlaneObjProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type * as THREE from 'three';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
/**
|
|
5
|
+
* Props of {@link WorkPointObj}.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Graphics
|
|
9
|
+
*/
|
|
10
|
+
export type WorkPointObjProps = {
|
|
11
|
+
/** The drawing the object is in. */
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
/** The work point (`CC_WorkPoint`) in the drawing's structure tree. */
|
|
14
|
+
objectId: ObjectID;
|
|
15
|
+
/** Its colour. Default: the stage's datum colour ({@link StageColors}.datum). */
|
|
16
|
+
color?: THREE.ColorRepresentation;
|
|
17
|
+
/** Its opacity, from 0 to 1. Default `1`. */
|
|
18
|
+
opacity?: number;
|
|
19
|
+
/** Given to its meshes' `userData`, for whoever picks it from the scene. */
|
|
20
|
+
userData?: any;
|
|
21
|
+
/** Pointer handlers for its meshes (react-three-fiber's `onClick`, `onPointerOver`, …). */
|
|
22
|
+
handlers?: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Draws a work point of the drawing's structure on the stage: a dot at its position, the same size on the screen at
|
|
26
|
+
* any zoom.
|
|
27
|
+
*
|
|
28
|
+
* Buerligons draws one over the model where the pointer is on a work point, or where one is selected, in a
|
|
29
|
+
* {@link HUD}. Its props: {@link WorkPointObjProps}.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { ScgClassType } from '@classcad/client'
|
|
34
|
+
* import { useDrawing } from '@classcad/react'
|
|
35
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
36
|
+
* import { HUD, useStage, WorkAxisObj, WorkPlaneObj, WorkPointObj } from '@classcad/react-cad'
|
|
37
|
+
*
|
|
38
|
+
* // in the canvas: the work geometry under the pointer, drawn over the model in the highlight
|
|
39
|
+
* function HoveredWorkGeometry({ drawingId }: { drawingId: DrawingID }) {
|
|
40
|
+
* const stage = useStage()
|
|
41
|
+
* const id = useDrawing(drawingId, (d) => d.interaction.hovered?.objectId)
|
|
42
|
+
* const clazz = useDrawing(drawingId, (d) => (id ? d.structure.tree[id]?.class : undefined))
|
|
43
|
+
* if (!id) return null
|
|
44
|
+
* return (
|
|
45
|
+
* <HUD>
|
|
46
|
+
* {clazz === ScgClassType.CCWorkPoint && <WorkPointObj drawingId={drawingId} objectId={id} color={stage.hover} />}
|
|
47
|
+
* {clazz === ScgClassType.CCWorkAxis && <WorkAxisObj drawingId={drawingId} objectId={id} color={stage.hover} />}
|
|
48
|
+
* {clazz === ScgClassType.CCWorkPlane && <WorkPlaneObj drawingId={drawingId} objectId={id} color={stage.hover} opacity={0.22} />}
|
|
49
|
+
* </HUD>
|
|
50
|
+
* )
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @advanced
|
|
55
|
+
* @category Graphics
|
|
56
|
+
*/
|
|
57
|
+
export declare const WorkPointObj: React.FC<WorkPointObjProps>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
export declare const Point: React.FC<{
|
|
4
|
+
position: THREE.Vector3;
|
|
5
|
+
radius: number;
|
|
6
|
+
color: THREE.ColorRepresentation;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
handlers?: any;
|
|
9
|
+
userData?: any;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Arrow: React.FC<{
|
|
12
|
+
position: THREE.Vector3;
|
|
13
|
+
direction: THREE.Vector3;
|
|
14
|
+
length: number;
|
|
15
|
+
width: number;
|
|
16
|
+
color: THREE.ColorRepresentation;
|
|
17
|
+
opacity?: number;
|
|
18
|
+
handlers?: any;
|
|
19
|
+
userData?: any;
|
|
20
|
+
withCone?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const OriginPoint: React.FC<{
|
|
23
|
+
position?: THREE.Vector3;
|
|
24
|
+
color: THREE.ColorRepresentation;
|
|
25
|
+
opacity?: number;
|
|
26
|
+
handlers?: any;
|
|
27
|
+
userData?: any;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const AxisArrow: React.FC<{
|
|
30
|
+
position?: THREE.Vector3;
|
|
31
|
+
direction: THREE.Vector3;
|
|
32
|
+
length?: number;
|
|
33
|
+
width?: number;
|
|
34
|
+
color: THREE.ColorRepresentation;
|
|
35
|
+
opacity?: number;
|
|
36
|
+
handlers?: any;
|
|
37
|
+
userData?: any;
|
|
38
|
+
withCone?: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const Csys: React.FC<{
|
|
41
|
+
matrix: THREE.Matrix4;
|
|
42
|
+
opacity: number;
|
|
43
|
+
handlers?: any;
|
|
44
|
+
color?: THREE.ColorRepresentation;
|
|
45
|
+
userData?: any;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const SelectedCsys: React.FC<{
|
|
48
|
+
matrix: THREE.Matrix4;
|
|
49
|
+
opacity?: number;
|
|
50
|
+
handlers?: any;
|
|
51
|
+
color?: THREE.ColorRepresentation;
|
|
52
|
+
userData?: any;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const Caption: React.FC<{
|
|
55
|
+
text: string;
|
|
56
|
+
position: THREE.Vector3;
|
|
57
|
+
color?: number;
|
|
58
|
+
scale?: number;
|
|
59
|
+
font?: string;
|
|
60
|
+
fontSize?: number;
|
|
61
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
4
|
+
export declare const MatePathTransform: React.FC<{
|
|
5
|
+
drawingId: DrawingID;
|
|
6
|
+
path: ObjectID[];
|
|
7
|
+
currentDepth?: number;
|
|
8
|
+
matrix?: THREE.Matrix4;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { DrawingID, ObjectID } from '@classcad/sdkjs';
|
|
3
|
+
import { FlipType, ReorientedType } from '@classcad/client';
|
|
4
|
+
export declare const useCsysMatrix: (drawingId: DrawingID, csysId: ObjectID, flip: FlipType | undefined, reorient: ReorientedType | undefined) => THREE.Matrix4;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://reactjs.org/docs/error-boundaries.html
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Warnings } from './verifiers';
|
|
6
|
+
type State = {
|
|
7
|
+
hasError?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type Props = {
|
|
10
|
+
showHtml?: boolean;
|
|
11
|
+
warnings?: Warnings;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Wrapper for components which are exported from package.
|
|
16
|
+
* It's intended to catch all errors and show friendly fallback to the user instead of error log.
|
|
17
|
+
* By default it returns null in error case. You have to pass showHtml prop to show message to the user.
|
|
18
|
+
* TODO: implement message showing.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ErrorBoundary extends React.Component<Props, State> {
|
|
21
|
+
constructor(props: Props);
|
|
22
|
+
static getDerivedStateFromError(error: any): {
|
|
23
|
+
hasError: boolean;
|
|
24
|
+
};
|
|
25
|
+
componentDidCatch(error: any, errorInfo: any): void;
|
|
26
|
+
render(): React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for CSysDisplay component. Checks drawing and currentInstance existance.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const CSysDisplayValidator: React.FC<{
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for Drawing component. Checks drawing existence.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const DrawingValidator: React.FC<{
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for Expressions plugin. Checks drawing and currentProduct existance.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExpressionsValidator: React.FC<{
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for feature plugins. Checks drawing, currentProduct and corresponding feature existance.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @param pluginId
|
|
8
|
+
* @param isCanvas used for showing different output for DOM component and for threeJS component.
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const FtPluginValidator: React.FC<{
|
|
12
|
+
drawingId: DrawingID;
|
|
13
|
+
pluginId: PluginID;
|
|
14
|
+
inCanvas?: boolean;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for FeatureList component. Checks drawing and currentProduct existance.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const FeatureListValidator: React.FC<{
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Validator for ProductManagement plugin. Checks drawing, root, partContainer and AssemblyContainer existance.
|
|
5
|
+
*
|
|
6
|
+
* @param drawingId
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const ProductManagementValidator: React.FC<{
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
pluginId: PluginID;
|
|
12
|
+
inCanvas?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
2
|
+
/**
|
|
3
|
+
* !!! Important !!!
|
|
4
|
+
*
|
|
5
|
+
* Functions in this file are called outside of ErrorBoundary,
|
|
6
|
+
* so an error appearing in such function will break whole application.
|
|
7
|
+
*
|
|
8
|
+
* This is why all point operators should be guarded by question mark.
|
|
9
|
+
* And this is the reasone why we should not use any "regular" hooks, or just functions
|
|
10
|
+
* which are already used in components exported from @classcad/react-cad.
|
|
11
|
+
*
|
|
12
|
+
* There should not be any hard logic, verifiers are just checking if tree contains particular data
|
|
13
|
+
* (e.g. useCurProductVerifier checks if currentProduct exists in drawing.structure, and corresponding
|
|
14
|
+
* object exists in drawing.structure.tree, otherwise it adds warning).
|
|
15
|
+
*
|
|
16
|
+
* If you need to reuse non trivial existing function, it's better to copypaste code of the function
|
|
17
|
+
* and guard all access operator by question marks like it's already done in usePartAndAssemblyContVerifier
|
|
18
|
+
* for useAllObjects.
|
|
19
|
+
*/
|
|
20
|
+
type Warning = {
|
|
21
|
+
caption: string;
|
|
22
|
+
};
|
|
23
|
+
export type Warnings = Record<string, Warning | null>;
|
|
24
|
+
export declare function useDrawingVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
25
|
+
export declare function useCurProductVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
26
|
+
export declare function useCurInstanceVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
27
|
+
export declare function useRootVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
28
|
+
export declare function useRootOrProdVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
29
|
+
export declare function usePluginObjVerifier(drawingId: DrawingID, pluginId: PluginID, warnings: Warnings): void;
|
|
30
|
+
export declare function usePartAndAssemblyContVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
31
|
+
export declare function useExprSetVerifier(drawingId: DrawingID, warnings: Warnings): void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link FtVisibilityController}.
|
|
5
|
+
*
|
|
6
|
+
* @advanced
|
|
7
|
+
* @category Panels
|
|
8
|
+
*/
|
|
9
|
+
export type FtVisibilityControllerProps = {
|
|
10
|
+
/** The drawing whose features' views it shows and hides. */
|
|
11
|
+
drawingId: DrawingID;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Shows and hides the views of the current part's features as the rollback bar and the fields ask.
|
|
15
|
+
*
|
|
16
|
+
* A feature below the rollback bar is not in force: its view (a work plane, a sketch) is hidden while it is there,
|
|
17
|
+
* and shown again when the bar moves past it. While a field picks, the features picked into it by their tree object
|
|
18
|
+
* (a sketch, a work plane) are shown, and hidden again afterwards if they were hidden before. It renders nothing.
|
|
19
|
+
* {@link Drawing} renders it; an app that composes the pieces itself renders it once beside its {@link ModelTree}, as
|
|
20
|
+
* the example there does. Its props: {@link FtVisibilityControllerProps}.
|
|
21
|
+
*
|
|
22
|
+
* @advanced
|
|
23
|
+
* @category Panels
|
|
24
|
+
*/
|
|
25
|
+
declare const FtVisibilityController: React.FC<FtVisibilityControllerProps>;
|
|
26
|
+
export default FtVisibilityController;
|