build-dxf 0.1.138 → 0.1.139

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.
Files changed (183) hide show
  1. package/package.json +1 -1
  2. package/src/2025/build-dxf/src/api/getSocket.d.ts +1 -0
  3. package/src/2025/build-dxf/src/demo.d.ts +1 -0
  4. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/AlignToParallelSegments.d.ts +1 -0
  5. package/src/2025/build-dxf/src/utils/algorithms/ConstraintSystem.d.ts +17 -0
  6. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegmentSpatialHash.d.ts +4 -0
  7. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/OBB.d.ts +4 -4
  8. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PointSpatialHash.d.ts +15 -3
  9. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PointUtils.d.ts +11 -0
  10. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Polygon.d.ts +4 -4
  11. package/src/2025/build-dxf/src/utils/algorithms/PolygonUtils.d.ts +9 -0
  12. package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Rectangle.d.ts +9 -1
  13. package/src/2025/build-dxf/src/utils/geometry-manager/GeometryManager.d.ts +2 -0
  14. package/src/build.js +202 -386
  15. package/src/index.css +4 -0
  16. package/src/index3.js +359 -8
  17. package/src/static_assets/libs/LLM.d.ts +43 -0
  18. /package/src/{App.vue.d.ts → 2025/build-dxf/src/App.vue.d.ts} +0 -0
  19. /package/src/{api → 2025/build-dxf/src/api}/index.d.ts +0 -0
  20. /package/src/{api → 2025/build-dxf/src/api}/type.d.ts +0 -0
  21. /package/src/{components → 2025/build-dxf/src/components}/DragContainer.vue.d.ts +0 -0
  22. /package/src/{components → 2025/build-dxf/src/components}/NumberEditor.vue.d.ts +0 -0
  23. /package/src/{constants.d.ts → 2025/build-dxf/src/constants.d.ts} +0 -0
  24. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/DxfSystem.d.ts +0 -0
  25. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/build.d.ts +0 -0
  26. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/CorrectionDxf.d.ts +0 -0
  27. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/Dxf.d.ts +0 -0
  28. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/ThreeVJia.d.ts +0 -0
  29. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/Variable.d.ts +0 -0
  30. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/index.d.ts +0 -0
  31. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ClippingLine.d.ts +0 -0
  32. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/Command.d.ts +0 -0
  33. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DefaultCommand.d.ts +0 -0
  34. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DeleteSelectLine.d.ts +0 -0
  35. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawDoorLine.d.ts +0 -0
  36. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawHole.d.ts +0 -0
  37. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawLine.d.ts +0 -0
  38. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawWindow.d.ts +0 -0
  39. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ManualDistance.d.ts +0 -0
  40. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/MergeLine.d.ts +0 -0
  41. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/index.d.ts +0 -0
  42. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyDoor.d.ts +0 -0
  43. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyLine.d.ts +0 -0
  44. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyWindow.d.ts +0 -0
  45. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PropertiesPanel.d.ts +0 -0
  46. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/RayDistance.d.ts +0 -0
  47. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/SelectAll.d.ts +0 -0
  48. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/TwoLineConnectionLine.d.ts +0 -0
  49. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/TwoPointConnection.d.ts +0 -0
  50. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/VerticalCorr.d.ts +0 -0
  51. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/VerticalCorrContinue.d.ts +0 -0
  52. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ViewAngle.d.ts +0 -0
  53. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Editor.d.ts +0 -0
  54. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/RenderManager.d.ts +0 -0
  55. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/index.d.ts +0 -0
  56. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/EditorTool/EditorTool.vue.d.ts +0 -0
  57. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/EditorTool/EditorToolContent.vue.d.ts +0 -0
  58. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/PropertiesPanel.vue.d.ts +0 -0
  59. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/Button.vue.d.ts +0 -0
  60. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/Input.vue.d.ts +0 -0
  61. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/ToolToggle.vue.d.ts +0 -0
  62. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/type.d.ts +0 -0
  63. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/DragControlPoint.d.ts +0 -0
  64. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/LineSelector.d.ts +0 -0
  65. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/PointerFollowMove.d.ts +0 -0
  66. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/SnapController.d.ts +0 -0
  67. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/utils/Wall2D.d.ts +0 -0
  68. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/DxfLineModel.d.ts +0 -0
  69. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/WhiteModel.d.ts +0 -0
  70. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/index.d.ts +0 -0
  71. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/index.d.ts +0 -0
  72. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/DomContainer.d.ts +0 -0
  73. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/DomEventRegister.d.ts +0 -0
  74. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/EventInput.d.ts +0 -0
  75. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/ModelDataRender.d.ts +0 -0
  76. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/Renderer.d.ts +0 -0
  77. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/index.d.ts +0 -0
  78. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/index.d.ts +0 -0
  79. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/type.d.ts +0 -0
  80. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/BayWindowHelper.d.ts +0 -0
  81. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/BoundExt.d.ts +0 -0
  82. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/DoorFind.d.ts +0 -0
  83. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/DoubleWallFinder.d.ts +0 -0
  84. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/HeightQuery.d.ts +0 -0
  85. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/LineGroupType.d.ts +0 -0
  86. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/LoadModel.d.ts +0 -0
  87. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/SceneAutoGenerat.d.ts +0 -0
  88. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/ThreeVJiaPipeline.d.ts +0 -0
  89. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallGroupManager.d.ts +0 -0
  90. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallHole.d.ts +0 -0
  91. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallHoleDrawData.d.ts +0 -0
  92. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/ZHouseMockData.d.ts +0 -0
  93. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/DxfDataPlugin.d.ts +0 -0
  94. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/DxfDrawPlugin.d.ts +0 -0
  95. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-data.d.ts +0 -0
  96. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-dxf-image.d.ts +0 -0
  97. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-dxf-string.d.ts +0 -0
  98. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/index.d.ts +0 -0
  99. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/clipping-double-wall.d.ts +0 -0
  100. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/draw-helper.d.ts +0 -0
  101. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/find-discrete.d.ts +0 -0
  102. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/find-rooms.d.ts +0 -0
  103. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/get-win-draw-data.d.ts +0 -0
  104. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/index.d.ts +0 -0
  105. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/axis-align-corr.d.ts +0 -0
  106. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/bound-ext.d.ts +0 -0
  107. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/bay-window.d.ts +0 -0
  108. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/double-wall.d.ts +0 -0
  109. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/index.d.ts +0 -0
  110. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/door-space-handle.d.ts +0 -0
  111. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/door-to-hole.d.ts +0 -0
  112. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/double-wall-alignment.d.ts +0 -0
  113. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/index.d.ts +0 -0
  114. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/init.d.ts +0 -0
  115. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/remove-short-double-wall.d.ts +0 -0
  116. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/wall-height-handle.d.ts +0 -0
  117. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/index.d.ts +0 -0
  118. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/remove-dangline.d.ts +0 -0
  119. /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/tools.d.ts +0 -0
  120. /package/src/{main.d.ts → 2025/build-dxf/src/main.d.ts} +0 -0
  121. /package/src/{pages → 2025/build-dxf/src/pages}/DxfPreview.vue.d.ts +0 -0
  122. /package/src/{pages → 2025/build-dxf/src/pages}/Editor.vue.d.ts +0 -0
  123. /package/src/{pages → 2025/build-dxf/src/pages}/ExportGLB.vue.d.ts +0 -0
  124. /package/src/{pages → 2025/build-dxf/src/pages}/ImagePreview.vue.d.ts +0 -0
  125. /package/src/{pages → 2025/build-dxf/src/pages}/ModelView.vue.d.ts +0 -0
  126. /package/src/{pages → 2025/build-dxf/src/pages}/Setting.vue.d.ts +0 -0
  127. /package/src/{pages → 2025/build-dxf/src/pages}/SplitWindow.vue.d.ts +0 -0
  128. /package/src/{pages → 2025/build-dxf/src/pages}/Todo.vue.d.ts +0 -0
  129. /package/src/{pages → 2025/build-dxf/src/pages}/WallView.vue.d.ts +0 -0
  130. /package/src/{pages → 2025/build-dxf/src/pages}/buildJson.vue.d.ts +0 -0
  131. /package/src/{pages → 2025/build-dxf/src/pages}/modelCarrier/index.vue.d.ts +0 -0
  132. /package/src/{router → 2025/build-dxf/src/router}/index.d.ts +0 -0
  133. /package/src/{utils → 2025/build-dxf/src/utils}/EventDispatcher.d.ts +0 -0
  134. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/AxisAlignCorr.d.ts +0 -0
  135. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Box2.d.ts +0 -0
  136. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/ConvexHullGraham.d.ts +0 -0
  137. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Debouncing.d.ts +0 -0
  138. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineIndexGenerator.d.ts +0 -0
  139. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineQueryer.d.ts +0 -0
  140. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegment.d.ts +0 -0
  141. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegmentUtils.d.ts +0 -0
  142. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Map.d.ts +0 -0
  143. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/MaxiCircles.d.ts +0 -0
  144. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/MiniCircles.d.ts +0 -0
  145. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PCSparseOctree.d.ts +0 -0
  146. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Pipeline.d.ts +0 -0
  147. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Point.d.ts +0 -0
  148. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Quadtree.d.ts +0 -0
  149. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/UndirectedGraph.d.ts +0 -0
  150. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/UnionFindSet.d.ts +0 -0
  151. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/ccw.d.ts +0 -0
  152. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/lazy.d.ts +0 -0
  153. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/precision.d.ts +0 -0
  154. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/stepElimination.d.ts +0 -0
  155. /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/uuid.d.ts +0 -0
  156. /package/src/{utils → 2025/build-dxf/src/utils}/command/CommandFlow.d.ts +0 -0
  157. /package/src/{utils → 2025/build-dxf/src/utils}/command/CommandSystem.d.ts +0 -0
  158. /package/src/{utils → 2025/build-dxf/src/utils}/command/index.d.ts +0 -0
  159. /package/src/{utils → 2025/build-dxf/src/utils}/decorators/measure-time.d.ts +0 -0
  160. /package/src/{utils → 2025/build-dxf/src/utils}/ecs/Component.d.ts +0 -0
  161. /package/src/{utils → 2025/build-dxf/src/utils}/ecs/Container.d.ts +0 -0
  162. /package/src/{utils → 2025/build-dxf/src/utils}/ecs/index.d.ts +0 -0
  163. /package/src/{utils → 2025/build-dxf/src/utils}/index.d.ts +0 -0
  164. /package/src/{utils → 2025/build-dxf/src/utils}/modelScenario/bayWindow.d.ts +0 -0
  165. /package/src/{utils → 2025/build-dxf/src/utils}/modelScenario/scenario.d.ts +0 -0
  166. /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/ExtrudeMesh.d.ts +0 -0
  167. /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/LineAlignmentGuide.d.ts +0 -0
  168. /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Lines.d.ts +0 -0
  169. /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Lines2.d.ts +0 -0
  170. /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Shape2D.d.ts +0 -0
  171. /package/src/{utils → 2025/build-dxf/src/utils}/tools/GCHandle.d.ts +0 -0
  172. /package/src/{utils → 2025/build-dxf/src/utils}/tools/Gltf.d.ts +0 -0
  173. /package/src/{utils → 2025/build-dxf/src/utils}/tools/StorageHelper.d.ts +0 -0
  174. /package/src/{utils → 2025/build-dxf/src/utils}/tools/clone-user-data.d.ts +0 -0
  175. /package/src/{utils → 2025/build-dxf/src/utils}/tools/create-html.d.ts +0 -0
  176. /package/src/{utils → 2025/build-dxf/src/utils}/tools/create-promise.d.ts +0 -0
  177. /package/src/{utils → 2025/build-dxf/src/utils}/tools/createVueApp.d.ts +0 -0
  178. /package/src/{utils → 2025/build-dxf/src/utils}/tools/download.d.ts +0 -0
  179. /package/src/{utils → 2025/build-dxf/src/utils}/tools/get-json.d.ts +0 -0
  180. /package/src/{utils → 2025/build-dxf/src/utils}/tools/include.d.ts +0 -0
  181. /package/src/{utils → 2025/build-dxf/src/utils}/tools/is-mobile.d.ts +0 -0
  182. /package/src/{utils → 2025/build-dxf/src/utils}/tools/repetitive-task.d.ts +0 -0
  183. /package/src/{utils → 2025/build-dxf/src/utils}/tools/selectLocal-file.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.1.138",
3
+ "version": "0.1.139",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -0,0 +1 @@
1
+ export declare const getPjPointAndPathSocketApi: (idRegion: any, resourceType: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export {};
@@ -5,6 +5,7 @@ export interface AlignDescriptor {
5
5
  gap?: number;
6
6
  onMergeLine?: (target: LineSegment, source: LineSegment) => void;
7
7
  onGroup?: OnGroupFun;
8
+ onSegmentClippedAway?: (target: LineSegment, clipLines: LineSegment[]) => void;
8
9
  }
9
10
  /** 通过平行轴和垂直轴分组对齐线段,搭配垂直纠正使用
10
11
  */
@@ -0,0 +1,17 @@
1
+ export declare class Variable {
2
+ value: number;
3
+ fixed: boolean;
4
+ constructor(value: number, fixed?: boolean);
5
+ }
6
+ export interface Constraint {
7
+ evaluate(): number[];
8
+ }
9
+ export declare class ConstraintSystem {
10
+ constraints: Constraint[];
11
+ variables: Variable[];
12
+ addConstraint(c: Constraint): void;
13
+ addVariable(v: Variable): void;
14
+ residuals(): number[];
15
+ jacobian(eps?: number): number[][];
16
+ solve(iterations?: number): void;
17
+ }
@@ -1,6 +1,7 @@
1
1
  import { Box2 } from './Box2';
2
2
  import { LineSegment } from './LineSegment';
3
3
  import { Point } from './Point';
4
+ import { Rectangle } from './Rectangle';
4
5
  export interface RaycastHit {
5
6
  line: LineSegment;
6
7
  point: Point;
@@ -60,6 +61,9 @@ export declare class LineSegmentSpatialHash {
60
61
  * 查询相交线段
61
62
  */
62
63
  queryLine(line: LineSegment, out?: LineSegment[]): LineSegment<Record<string, any>>[];
64
+ private rectangleBounds;
65
+ /** 通过矩形查询 */
66
+ queryRectangle(rectangle: Rectangle, out?: LineSegment[]): LineSegment<Record<string, any>>[];
63
67
  private rayIntersectSegment;
64
68
  /**
65
69
  * 射线检测
@@ -12,19 +12,19 @@ export declare class OBB extends OBB_ {
12
12
  * @param box
13
13
  * @param position
14
14
  * @param rotation
15
- * @param obb
15
+ * @param out
16
16
  * @returns
17
17
  */
18
- static from(box: THREE.Vector3, position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion, obb?: OBB): OBB;
18
+ static from(box: THREE.Vector3, position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion, out?: OBB): OBB;
19
19
  /** 通过2d路径创建
20
20
  * @param path
21
21
  * @param origin
22
22
  * @param height
23
- * @param obb_
23
+ * @param out
24
24
  * @returns
25
25
  */
26
26
  static fromByPath2D(path: {
27
27
  x: number;
28
28
  y: number;
29
- }[], origin: THREE.Vector3, height: number, obb_?: OBB): OBB;
29
+ }[], origin: THREE.Vector3, height: number, out?: OBB): OBB;
30
30
  }
@@ -10,6 +10,11 @@ type Target<T> = {
10
10
  type NodeSet<T> = Set<Target<T>>;
11
11
  export type PvgTarget<T> = Target<T>;
12
12
  export type ResultList<T = any> = Array<Target<T>>;
13
+ export type CircleResult<T = any> = {
14
+ point: Point;
15
+ distanceSq: number;
16
+ userData?: T;
17
+ };
13
18
  export declare class PointSpatialHash<T = Record<string, any>> {
14
19
  map: Map<string, NodeSet<T>>;
15
20
  gridSize: number;
@@ -109,10 +114,17 @@ export declare class PointSpatialHash<T = Record<string, any>> {
109
114
  point: Point;
110
115
  userData: T;
111
116
  } | null;
112
- /** 通过点,从近到远辐射查找,同一格子,不保证远近
113
- * 返回第一个满足条件的目标
117
+ /** 通过点,从近到远按圈层搜索
118
+ * 同一圈内不保证距离顺序
119
+ * 返回第一个满足条件的圈层
120
+ */
121
+ searchByRing(point: Point, fn: (circle: CircleResult<T>[], circleNum: number) => boolean, maxRing?: number): CircleResult<T>[] | null;
122
+ /**
123
+ * @param point
124
+ * @param excludeSelf
125
+ * @returns
114
126
  */
115
- nearestSearch(point: Point, fn: (target: Target<T>) => boolean, maxRing?: number): Target<T> | null;
127
+ findNearest(point: Point, excludeSelf?: boolean): CircleResult<T> | null;
116
128
  /**
117
129
  * @param point
118
130
  */
@@ -3,6 +3,7 @@ import { Point } from './Point';
3
3
  export declare class PointUtils {
4
4
  private static _globalPoint;
5
5
  static get globalPoint(): Point<Record<string, any>>;
6
+ static getCenter(points: Point[]): Point<Record<string, any>>;
6
7
  /** 值网格化
7
8
  * @param points
8
9
  * @param tolerance
@@ -33,4 +34,14 @@ export declare class PointUtils {
33
34
  * @returns
34
35
  */
35
36
  static constrainPointToAxis(point: Point, baseLine: LineSegment, normalStartPoint?: Point | null, baseNormalLine?: LineSegment): Point<Record<string, any>>;
37
+ /** 导出为数组
38
+ * @param points
39
+ * @returns
40
+ */
41
+ static toArray(points: Point[]): Float32Array<ArrayBuffer>;
42
+ /** 导出为数组
43
+ * @param points
44
+ * @returns
45
+ */
46
+ static fromArray(array: Array<number> | Float32Array): Point<Record<string, any>>[];
36
47
  }
@@ -45,6 +45,10 @@ export declare class Polygon<T = any> extends Array<Point<T>> {
45
45
  * @param width
46
46
  */
47
47
  closedExpansion(width: number, scale?: number): this | null;
48
+ /** 通过线段分割
49
+ * @param line
50
+ * @returns
51
+ */
48
52
  clipByLine(line: LineSegment): Polygon<Record<string, any>>[];
49
53
  /**
50
54
  * 获取点相对于多边形的位置
@@ -91,10 +95,6 @@ export declare class Polygon<T = any> extends Array<Point<T>> {
91
95
  * @param polygon
92
96
  */
93
97
  difference(polygons: Polygon | Polygon[], scale?: number): boolean;
94
- /** 拆分为凸包
95
- * @returns
96
- */
97
- splitConvexHull(): Polygon<Record<string, any>>[] | null;
98
98
  /** 包围盒检测
99
99
  * @param box
100
100
  * @returns
@@ -0,0 +1,9 @@
1
+ import { LineSegment } from './LineSegment';
2
+ import { Polygon } from './Polygon';
3
+ export declare class PolygonUtils {
4
+ /** 拆分为凸包
5
+ * @returns
6
+ */
7
+ static splitConvexHull(ploy: Polygon): Polygon<Record<string, any>>[] | null;
8
+ static splitByLine(lines: LineSegment[], clipLine: LineSegment): LineSegment[][];
9
+ }
@@ -27,6 +27,14 @@ export declare class Rectangle {
27
27
  * @returns 是否完全在矩形内部
28
28
  */
29
29
  containsLineSegment(line: LineSegment): boolean;
30
+ /**
31
+ * 获取所有点在轴上的投影,并且返回区间
32
+ * @param rect
33
+ * @param axis
34
+ * @returns
35
+ */
36
+ private projectRectangle;
37
+ private isProjectionOverlap;
30
38
  /**
31
39
  * 判断矩形是否与矩形相交
32
40
  * @description 使用分离轴定理
@@ -43,7 +51,7 @@ export declare class Rectangle {
43
51
  *
44
52
  * @returns
45
53
  */
46
- toBox(): Box2;
54
+ toBox(out?: Box2): Box2;
47
55
  /**
48
56
  *
49
57
  * @param line
@@ -0,0 +1,2 @@
1
+ export declare class GeometryManager {
2
+ }