chili3d 0.6.1 → 0.6.3
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/README.md +14 -175
- package/{packages/chili → chili}/package.json +6 -1
- package/{packages/chili-builder → chili-builder}/package.json +6 -1
- package/{packages/chili-controls → chili-controls}/package.json +6 -1
- package/{packages/chili-core → chili-core}/package.json +6 -1
- package/{packages/chili-geo → chili-geo}/package.json +6 -1
- package/{packages/chili-i18n → chili-i18n}/package.json +6 -1
- package/{packages/chili-storage → chili-storage}/package.json +6 -1
- package/{packages/chili-three → chili-three}/package.json +6 -1
- package/{packages/chili-ui → chili-ui}/package.json +6 -1
- package/{packages/chili-vis → chili-vis}/package.json +6 -1
- package/{packages/chili-wasm → chili-wasm}/package.json +6 -1
- package/{packages/chili-web → chili-web}/package.json +6 -1
- package/package.json +18 -48
- package/.github/workflows/main.yml +0 -26
- package/.vscode/c_cpp_properties.json +0 -30
- package/.vscode/launch.json +0 -21
- package/.vscode/settings.json +0 -8
- package/Dockerfile +0 -7
- package/LICENSE +0 -661
- package/biome.json +0 -67
- package/compose.yml +0 -7
- package/cpp/CMakeLists.txt +0 -96
- package/cpp/CMakePresets.json +0 -43
- package/cpp/README.md +0 -21
- package/cpp/src/converter.cpp +0 -413
- package/cpp/src/factory.cpp +0 -612
- package/cpp/src/geometry.cpp +0 -204
- package/cpp/src/mesher.cpp +0 -330
- package/cpp/src/opencascade.cpp +0 -414
- package/cpp/src/shape.cpp +0 -447
- package/cpp/src/shared.cpp +0 -83
- package/cpp/src/shared.hpp +0 -211
- package/cpp/src/transient.cpp +0 -29
- package/cpp/src/utils.cpp +0 -114
- package/cpp/src/utils.hpp +0 -25
- package/cpp/test/index.html +0 -146
- package/packages/chili/test/command.test.ts +0 -4
- package/packages/chili-controls/test/converter.test.ts +0 -70
- package/packages/chili-controls/test/styleMock.js +0 -4
- package/packages/chili-core/test/binding.test.ts +0 -95
- package/packages/chili-core/test/boundingBox.test.ts +0 -60
- package/packages/chili-core/test/collection.test.ts +0 -53
- package/packages/chili-core/test/history.test.ts +0 -42
- package/packages/chili-core/test/line.test.ts +0 -75
- package/packages/chili-core/test/linesegment.test.ts +0 -98
- package/packages/chili-core/test/linkedList.test.ts +0 -82
- package/packages/chili-core/test/math.test.ts +0 -34
- package/packages/chili-core/test/matrix.test.ts +0 -129
- package/packages/chili-core/test/node.test.ts +0 -122
- package/packages/chili-core/test/nodeList.test.ts +0 -247
- package/packages/chili-core/test/observer.test.ts +0 -91
- package/packages/chili-core/test/plane.test.ts +0 -31
- package/packages/chili-core/test/quaternion.test.ts +0 -14
- package/packages/chili-core/test/result.test.ts +0 -24
- package/packages/chili-core/test/serializer.test.ts +0 -58
- package/packages/chili-core/test/snapType.test.ts +0 -10
- package/packages/chili-core/test/task.test.ts +0 -41
- package/packages/chili-core/test/testDocument.ts +0 -70
- package/packages/chili-core/test/transaction.test.ts +0 -42
- package/packages/chili-core/test/visual.test.ts +0 -42
- package/packages/chili-core/test/xyz.test.ts +0 -260
- package/packages/chili-three/test/cameraControls.ts +0 -10
- package/packages/chili-three/test/testDocument.ts +0 -68
- package/packages/chili-three/test/testEdge.ts +0 -171
- package/packages/chili-three/test/testView.ts +0 -78
- package/packages/chili-three/test/three.test.ts +0 -44
- package/packages/chili-three/test/viewGizmo.ts +0 -12
- package/packages/global.d.ts +0 -31
- package/public/favicon.svg +0 -10
- package/public/fonts/fzhei.json +0 -46120
- package/public/iconfont.js +0 -1
- package/public/images/wechat.jpg +0 -0
- package/public/index.css +0 -13
- package/public/index.html +0 -24
- package/rspack.config.ts +0 -93
- package/rstest.config.ts +0 -27
- package/screenshots/screenshot.png +0 -0
- package/scripts/add_copyright.mjs +0 -59
- package/scripts/build-npm.mjs +0 -105
- package/scripts/common.mjs +0 -24
- package/scripts/release.mjs +0 -92
- package/scripts/restore-package-json.mjs +0 -27
- package/scripts/setup_wasm_deps.mjs +0 -97
- package/scripts/update-package-json.mjs +0 -27
- package/tsconfig.build.json +0 -14
- package/tsconfig.build.tsbuildinfo +0 -1
- package/tsconfig.json +0 -19
- /package/{packages/chili → chili}/src/application.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/arc.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/boolean.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/box.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/circle.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/cone.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/cylinder.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/ellipse.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/face.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/fuse.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/index.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/line.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/polygon.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/prism.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/pyramid.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/rect.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/revolve.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/sphere.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/sweep.ts +0 -0
- /package/{packages/chili → chili}/src/bodys/wire.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/index.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/newDocument.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/openDocument.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/performanceTest.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/saveDocument.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/toFile.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/toggleDynamicWorkplane.ts +0 -0
- /package/{packages/chili → chili}/src/commands/application/wechatGroup.ts +0 -0
- /package/{packages/chili → chili}/src/commands/boolean.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/arc.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/bezier.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/box.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/circle.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/cone.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/converter.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/copySubShape.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/curveProjection.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/cylinder.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/ellipse.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/group.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/index.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/line.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/loft.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/offset.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/polygon.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/prism.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/pyramid.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/rect.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/revolve.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/section.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/sphere.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/sweep.ts +0 -0
- /package/{packages/chili → chili}/src/commands/create/thickSolid.ts +0 -0
- /package/{packages/chili → chili}/src/commands/createActCommand.ts +0 -0
- /package/{packages/chili → chili}/src/commands/createCommand.ts +0 -0
- /package/{packages/chili → chili}/src/commands/delete.ts +0 -0
- /package/{packages/chili → chili}/src/commands/folder.ts +0 -0
- /package/{packages/chili → chili}/src/commands/importExport.ts +0 -0
- /package/{packages/chili → chili}/src/commands/index.ts +0 -0
- /package/{packages/chili → chili}/src/commands/measure/angle.ts +0 -0
- /package/{packages/chili → chili}/src/commands/measure/index.ts +0 -0
- /package/{packages/chili → chili}/src/commands/measure/length.ts +0 -0
- /package/{packages/chili → chili}/src/commands/measure/select.module.css +0 -0
- /package/{packages/chili → chili}/src/commands/measure/select.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/array.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/break.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/brush.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/chamfer.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/explode.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/fillet.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/index.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/mirror.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/move.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/removeFeature.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/removeSubShapes.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/rotate.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/split.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/transformedCommand.ts +0 -0
- /package/{packages/chili → chili}/src/commands/modify/trim.ts +0 -0
- /package/{packages/chili → chili}/src/commands/multistepCommand.ts +0 -0
- /package/{packages/chili → chili}/src/commands/redo.ts +0 -0
- /package/{packages/chili → chili}/src/commands/undo.ts +0 -0
- /package/{packages/chili → chili}/src/commands/workingPlane.ts +0 -0
- /package/{packages/chili → chili}/src/comparers/NumberEqualityComparer.ts +0 -0
- /package/{packages/chili → chili}/src/comparers/XYZEqualityComparer.ts +0 -0
- /package/{packages/chili → chili}/src/comparers/index.ts +0 -0
- /package/{packages/chili → chili}/src/document.ts +0 -0
- /package/{packages/chili → chili}/src/editEventHandler.ts +0 -0
- /package/{packages/chili → chili}/src/index.ts +0 -0
- /package/{packages/chili → chili}/src/selection.ts +0 -0
- /package/{packages/chili → chili}/src/services/commandService.ts +0 -0
- /package/{packages/chili → chili}/src/services/editorService.ts +0 -0
- /package/{packages/chili → chili}/src/services/hotkeyService.ts +0 -0
- /package/{packages/chili → chili}/src/services/index.ts +0 -0
- /package/{packages/chili → chili}/src/snap/dimension.ts +0 -0
- /package/{packages/chili → chili}/src/snap/handlers/angleSnapEventHandler.ts +0 -0
- /package/{packages/chili → chili}/src/snap/handlers/index.ts +0 -0
- /package/{packages/chili → chili}/src/snap/handlers/lengthSnapEventHandler.ts +0 -0
- /package/{packages/chili → chili}/src/snap/handlers/pointSnapEventHandler.ts +0 -0
- /package/{packages/chili → chili}/src/snap/handlers/snapEventHandler.ts +0 -0
- /package/{packages/chili → chili}/src/snap/index.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/axisSnap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/baseSnap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/featurePointStrategy.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/index.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/objectSnap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/planeSnap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/snaps/pointOnCurveSnap.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/axis.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/axisTracking.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/index.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/objectTracking.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/trackingBase.ts +0 -0
- /package/{packages/chili → chili}/src/snap/tracking/trackingSnap.ts +0 -0
- /package/{packages/chili → chili}/src/step/angleStep.ts +0 -0
- /package/{packages/chili → chili}/src/step/index.ts +0 -0
- /package/{packages/chili → chili}/src/step/lengthStep.ts +0 -0
- /package/{packages/chili → chili}/src/step/pointStep.ts +0 -0
- /package/{packages/chili → chili}/src/step/selectStep.ts +0 -0
- /package/{packages/chili → chili}/src/step/step.ts +0 -0
- /package/{packages/chili → chili}/src/utils.ts +0 -0
- /package/{packages/chili-builder → chili-builder}/src/additionalModule.ts +0 -0
- /package/{packages/chili-builder → chili-builder}/src/appBuilder.ts +0 -0
- /package/{packages/chili-builder → chili-builder}/src/defaultDataExchange.ts +0 -0
- /package/{packages/chili-builder → chili-builder}/src/index.ts +0 -0
- /package/{packages/chili-builder → chili-builder}/src/ribbon.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/collection.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/controls.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/colorConverter.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/index.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/numberConverter.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/stringConverter.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/urlConverter.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/converters/xyzConverter.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/expander/expander.module.css +0 -0
- /package/{packages/chili-controls → chili-controls}/src/expander/expander.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/expander/index.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/htmlProps.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/index.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/radioGroup.module.css +0 -0
- /package/{packages/chili-controls → chili-controls}/src/radioGroup.ts +0 -0
- /package/{packages/chili-controls → chili-controls}/src/utils.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/application.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/command/command.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/command/commandKeys.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/command/decarator.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/command/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/config.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/constants.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/dataExchange.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/document.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/editor.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/asyncController.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/binding.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/collection.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/converter.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/deepObserver.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/disposable.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/dto/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/equalityComparer.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/gc.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/history.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/id.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/lazy.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/linkedList.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/logger.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/messageType.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/objectStorage.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/observer.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/precision.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/pubsub.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/result.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/storage.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/transaction.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/utils/debounce.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/utils/download.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/utils/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/foundation/utils/readFileAsync.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/i18n/i18n.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/i18n/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/i18n/keys.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/material.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/boundingBox.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/line.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/lineSegment.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/mathUtils.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/matrix4.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/plane.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/planeAngle.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/quaternion.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/ray.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/xy.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/math/xyz.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/component.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/facebaseNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/folderNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/geometryNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/groupNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/meshNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/node.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/shapeNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/model/visualNode.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/modelManager.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/navigation.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/property.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/selection.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/selectionFilter.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/serialize/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/serialize/serializer.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/service.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/curve.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/geometry.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/lineType.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/meshData.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/shape.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/shapeConverter.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/shapeFactory.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/shapeType.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/shape/surface.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/snapType.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/button.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/combobox.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/dialog.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/ribbon.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/ui/window.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/act.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/cameraController.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/cursorType.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/detectedData.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/eventHandler.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/highlighter.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/index.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/meshExporter.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/meshUtils.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/textGenerator.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/view.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/viewGizmo.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/viewport.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/visual.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/visualContext.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/visualFactory.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/visualObject.ts +0 -0
- /package/{packages/chili-core → chili-core}/src/visual/visualShape.ts +0 -0
- /package/{packages/chili-geo → chili-geo}/src/index.ts +0 -0
- /package/{packages/chili-geo → chili-geo}/src/utils.ts +0 -0
- /package/{packages/chili-i18n → chili-i18n}/src/en.ts +0 -0
- /package/{packages/chili-i18n → chili-i18n}/src/index.ts +0 -0
- /package/{packages/chili-i18n → chili-i18n}/src/pt-br.ts +0 -0
- /package/{packages/chili-i18n → chili-i18n}/src/zh-cn.ts +0 -0
- /package/{packages/chili-storage → chili-storage}/src/index.ts +0 -0
- /package/{packages/chili-storage → chili-storage}/src/indexedDBStorage.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/cameraController.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/common.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/constants.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/highlightable.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/index.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/meshExporter.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/outlinePass.js +0 -0
- /package/{packages/chili-three → chili-three}/src/texture_points.jpg +0 -0
- /package/{packages/chili-three → chili-three}/src/threeGeometry.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeGeometryFactory.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeHelper.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeHighlighter.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeView.module.css +0 -0
- /package/{packages/chili-three → chili-three}/src/threeView.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeViewEventHandler.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeVisual.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeVisualContext.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeVisualFactory.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/threeVisualObject.ts +0 -0
- /package/{packages/chili-three → chili-three}/src/viewGizmo.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/cursor/draw.cur +0 -0
- /package/{packages/chili-ui → chili-ui}/src/cursor/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/dialog.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/dialog.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/editor.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/editor.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/home.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/home.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/languageSelector.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/navigation3DSelector.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/home/themeSelector.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/mainWindow.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/mainWindow.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/okCancel.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/okCancel.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/permanent.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/permanent.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/projectView.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/projectView.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/toolBar.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/toolBar.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/tree.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/tree.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeItem.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeItem.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeItemGroup.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeItemGroup.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeModel.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/project/tree/treeModel.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/check.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/colorPorperty.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/colorProperty.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/common.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/input.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/input.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/materialDataContent.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/materialEditor.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/materialEditor.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/textureEditor.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/material/textureEditor.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/materialProperty.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/materialProperty.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/matrixProperty.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/propertyBase.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/propertyBase.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/propertyView.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/propertyView.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/property/utils.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/commandContext.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/commandContext.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbon.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbon.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonButton.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonButton.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonData.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonStack.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonStack.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonToggleButton.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/ribbon/ribbonToggleButton.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/statusbar/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/statusbar/snapConfig.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/statusbar/snapConfig.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/statusbar/statusbar.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/statusbar/statusbar.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/toast/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/toast/toast.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/toast/toast.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/flyout.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/flyout.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/input.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/input.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/tip.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/flyout/tip.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/index.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/layoutViewport.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/layoutViewport.ts +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/viewport.module.css +0 -0
- /package/{packages/chili-ui → chili-ui}/src/viewport/viewport.ts +0 -0
- /package/{packages/chili-vis → chili-vis}/src/index.ts +0 -0
- /package/{packages/chili-vis → chili-vis}/src/nodeSelectionEventHandler.ts +0 -0
- /package/{packages/chili-vis → chili-vis}/src/selectionEventHandler.ts +0 -0
- /package/{packages/chili-vis → chili-vis}/src/shapeSelectionEventHandler.ts +0 -0
- /package/{packages/chili-vis → chili-vis}/src/viewUtils.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/lib/chili-wasm.d.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/lib/chili-wasm.js +0 -0
- /package/{packages/chili-wasm → chili-wasm}/lib/chili-wasm.wasm +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/converter.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/curve.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/factory.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/geometry.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/helper.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/index.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/mesher.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/shape.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/surface.ts +0 -0
- /package/{packages/chili-wasm → chili-wasm}/src/wasm.ts +0 -0
- /package/{packages/chili-web → chili-web}/src/index.ts +0 -0
- /package/{packages/chili-web → chili-web}/src/loading.ts +0 -0
package/biome.json
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
3
|
-
"vcs": {
|
|
4
|
-
"enabled": true,
|
|
5
|
-
"clientKind": "git",
|
|
6
|
-
"useIgnoreFile": true
|
|
7
|
-
},
|
|
8
|
-
"files": {
|
|
9
|
-
"includes": [
|
|
10
|
-
"**",
|
|
11
|
-
"!!**/dist",
|
|
12
|
-
"!!**/occ-wasm",
|
|
13
|
-
"!!**/public",
|
|
14
|
-
"!!**/build",
|
|
15
|
-
"!!**/coverage",
|
|
16
|
-
"!!**/lib"
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"css": {
|
|
20
|
-
"parser": {
|
|
21
|
-
"cssModules": true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"formatter": {
|
|
25
|
-
"enabled": true,
|
|
26
|
-
"indentStyle": "space",
|
|
27
|
-
"lineWidth": 110,
|
|
28
|
-
"indentWidth": 4
|
|
29
|
-
},
|
|
30
|
-
"linter": {
|
|
31
|
-
"enabled": true,
|
|
32
|
-
"rules": {
|
|
33
|
-
"recommended": true,
|
|
34
|
-
"style": {
|
|
35
|
-
"noNonNullAssertion": "warn",
|
|
36
|
-
"useTemplate": "warn"
|
|
37
|
-
},
|
|
38
|
-
"suspicious": {
|
|
39
|
-
"noExplicitAny": "warn",
|
|
40
|
-
"noImplicitAnyLet": "warn",
|
|
41
|
-
"useIterableCallbackReturn": "warn",
|
|
42
|
-
"noNonNullAssertedOptionalChain": "warn"
|
|
43
|
-
},
|
|
44
|
-
"correctness": {
|
|
45
|
-
"noUnusedFunctionParameters": "warn",
|
|
46
|
-
"noUnusedPrivateClassMembers": "warn",
|
|
47
|
-
"noUnusedVariables": "warn"
|
|
48
|
-
},
|
|
49
|
-
"complexity": {
|
|
50
|
-
"noStaticOnlyClass": "off"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"javascript": {
|
|
55
|
-
"formatter": {
|
|
56
|
-
"quoteStyle": "double"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"assist": {
|
|
60
|
-
"enabled": true,
|
|
61
|
-
"actions": {
|
|
62
|
-
"source": {
|
|
63
|
-
"organizeImports": "on"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
package/compose.yml
DELETED
package/cpp/CMakeLists.txt
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required (VERSION 3.30)
|
|
2
|
-
|
|
3
|
-
project (chili-wasm)
|
|
4
|
-
set (CMAKE_CXX_STANDARD 17)
|
|
5
|
-
set (TARGET chili-wasm)
|
|
6
|
-
set (CMAKE_CONFIGURATION_TYPES Debug;Release)
|
|
7
|
-
set (CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
|
|
8
|
-
|
|
9
|
-
get_filename_component(SOURCE_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
|
|
10
|
-
set(CMAKE_INSTALL_PREFIX "${SOURCE_ROOT_DIR}/packages/chili-wasm/lib")
|
|
11
|
-
|
|
12
|
-
set (OcctToolkits
|
|
13
|
-
# FoundationClasses
|
|
14
|
-
TKernel TKMath
|
|
15
|
-
# ModelingData
|
|
16
|
-
TKG2d TKG3d TKGeomBase TKBRep
|
|
17
|
-
# ModelingAlgorithms
|
|
18
|
-
TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKShHealing
|
|
19
|
-
# Visualization
|
|
20
|
-
TKService TKV3d
|
|
21
|
-
# ApplicationFramework
|
|
22
|
-
TKCDF TKLCAF TKCAF TKStdL TKStd TKVCAF TKBin TKBinL TKBinXCAF
|
|
23
|
-
# DataExchange
|
|
24
|
-
TKDE TKXSBase TKXCAF TKDESTEP TKDEIGES TKDESTL
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
set (OcctUsedPackages)
|
|
28
|
-
foreach(toolkit ${OcctToolkits})
|
|
29
|
-
file (STRINGS build/occt/src/${toolkit}/PACKAGES OcctPackages)
|
|
30
|
-
list (APPEND OcctUsedPackages ${OcctPackages})
|
|
31
|
-
endforeach()
|
|
32
|
-
list (REMOVE_DUPLICATES OcctUsedPackages)
|
|
33
|
-
|
|
34
|
-
set (OcctSourceFolders)
|
|
35
|
-
set (OcctIncludeDirs)
|
|
36
|
-
foreach(package ${OcctUsedPackages})
|
|
37
|
-
if (NOT package STREQUAL "")
|
|
38
|
-
list (APPEND OcctSourceFolders build/occt/src/${package}/*.c*)
|
|
39
|
-
list (APPEND OcctIncludeDirs build/occt/src/${package})
|
|
40
|
-
endif()
|
|
41
|
-
endforeach()
|
|
42
|
-
|
|
43
|
-
include(build/occt/adm/cmake/version.cmake)
|
|
44
|
-
configure_file("build/occt/adm/templates/Standard_Version.hxx.in" "include/Standard_Version.hxx" @ONLY)
|
|
45
|
-
list (APPEND OcctIncludeDirs ${CMAKE_CURRENT_BINARY_DIR}/include)
|
|
46
|
-
|
|
47
|
-
file (GLOB OcctSourceFiles ${OcctSourceFolders})
|
|
48
|
-
|
|
49
|
-
set (ChiliWasmSourcesFolder src)
|
|
50
|
-
file (GLOB
|
|
51
|
-
ChiliWasmSourceFiles CONFIGURE_DEPENDS
|
|
52
|
-
${ChiliWasmSourcesFolder}/*.hpp
|
|
53
|
-
${ChiliWasmSourcesFolder}/*.cpp
|
|
54
|
-
)
|
|
55
|
-
source_group ("Sources" FILES ${ChiliWasmSourceFiles})
|
|
56
|
-
source_group ("OCCT" FILES ${OcctSourceFiles})
|
|
57
|
-
|
|
58
|
-
if (${EMSCRIPTEN})
|
|
59
|
-
|
|
60
|
-
add_library(occt STATIC ${OcctSourceFiles})
|
|
61
|
-
target_include_directories (occt PUBLIC ${OcctIncludeDirs})
|
|
62
|
-
target_compile_options (occt PUBLIC
|
|
63
|
-
$<$<CONFIG:Release>:-Os>
|
|
64
|
-
$<$<CONFIG:Release>:-flto>
|
|
65
|
-
$<IF:$<CONFIG:Release>,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0>
|
|
66
|
-
-DOCCT_NO_PLUGINS
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
add_executable (${TARGET} ${ChiliWasmSourceFiles})
|
|
70
|
-
target_include_directories (${TARGET} PUBLIC ${OcctIncludeDirs})
|
|
71
|
-
target_compile_options (${TARGET} PUBLIC
|
|
72
|
-
$<$<CONFIG:Release>:-Os>
|
|
73
|
-
$<$<CONFIG:Release>:-flto>
|
|
74
|
-
$<IF:$<CONFIG:Release>,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0>
|
|
75
|
-
)
|
|
76
|
-
target_link_libraries(${TARGET} PUBLIC occt)
|
|
77
|
-
target_link_options (${TARGET} PUBLIC
|
|
78
|
-
$<IF:$<CONFIG:Release>,-Os,-O0>
|
|
79
|
-
$<IF:$<CONFIG:Release>,-flto,-fno-lto>
|
|
80
|
-
$<IF:$<CONFIG:Release>,-sDISABLE_EXCEPTION_CATCHING=1,-sDISABLE_EXCEPTION_CATCHING=0>
|
|
81
|
-
-sMODULARIZE=1
|
|
82
|
-
-sEXPORT_ES6=1
|
|
83
|
-
-sSTACK_SIZE=8MB
|
|
84
|
-
-sINITIAL_HEAP=64MB
|
|
85
|
-
-sALLOW_MEMORY_GROWTH=1
|
|
86
|
-
-sMAXIMUM_MEMORY=4GB
|
|
87
|
-
-sENVIRONMENT="web"
|
|
88
|
-
--bind
|
|
89
|
-
--emit-tsd "${TARGET}.d.ts"
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX})
|
|
93
|
-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.wasm DESTINATION ${CMAKE_INSTALL_PREFIX})
|
|
94
|
-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.d.ts DESTINATION ${CMAKE_INSTALL_PREFIX})
|
|
95
|
-
|
|
96
|
-
endif ()
|
package/cpp/CMakePresets.json
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"configurePresets": [
|
|
4
|
-
{
|
|
5
|
-
"name": "default",
|
|
6
|
-
"generator": "Ninja",
|
|
7
|
-
"hidden": true,
|
|
8
|
-
"toolchainFile": "build/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "debug",
|
|
12
|
-
"inherits": "default",
|
|
13
|
-
"displayName": "Emscripten Debug",
|
|
14
|
-
"binaryDir": "build/target/debug",
|
|
15
|
-
"cacheVariables": {
|
|
16
|
-
"CMAKE_BUILD_TYPE": "Debug"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "release",
|
|
21
|
-
"inherits": "default",
|
|
22
|
-
"displayName": "Emscripten Release",
|
|
23
|
-
"binaryDir": "build/target/release",
|
|
24
|
-
"cacheVariables": {
|
|
25
|
-
"CMAKE_BUILD_TYPE": "Release"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"buildPresets": [
|
|
30
|
-
{
|
|
31
|
-
"name": "debug",
|
|
32
|
-
"configurePreset": "debug",
|
|
33
|
-
"configuration": "Debug",
|
|
34
|
-
"targets": ["install"]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "release",
|
|
38
|
-
"configurePreset": "release",
|
|
39
|
-
"configuration": "Release",
|
|
40
|
-
"targets": ["install"]
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
package/cpp/README.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# chili3d's WebAssembly Module
|
|
2
|
-
|
|
3
|
-
## Clone and install all dependencies
|
|
4
|
-
|
|
5
|
-
When compiling for the first time, or if the build directory has been deleted or dependencies have been updated, please execute this command
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm run setup:wasm
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
If you see **Setup complete**, it means it was successful. Otherwise, please check the logs and try again.
|
|
12
|
-
|
|
13
|
-
## Compile
|
|
14
|
-
|
|
15
|
-
To build the current project, please execute
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm run build:wasm
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After the compilation is completed, the target will be copied to the **packages/chili-wasm/lib** directory.
|
package/cpp/src/converter.cpp
DELETED
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
// Part of the Chili3d Project, under the AGPL-3.0 License.
|
|
2
|
-
// See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
#include <emscripten/bind.h>
|
|
5
|
-
#include <emscripten/val.h>
|
|
6
|
-
|
|
7
|
-
#include <BRepBuilderAPI_MakeSolid.hxx>
|
|
8
|
-
#include <BRepBuilderAPI_Sewing.hxx>
|
|
9
|
-
#include <BRepMesh_IncrementalMesh.hxx>
|
|
10
|
-
#include <BRepTools.hxx>
|
|
11
|
-
#include <BRep_Builder.hxx>
|
|
12
|
-
#include <IGESCAFControl_Reader.hxx>
|
|
13
|
-
#include <IGESControl_Writer.hxx>
|
|
14
|
-
#include <Quantity_Color.hxx>
|
|
15
|
-
#include <STEPCAFControl_Reader.hxx>
|
|
16
|
-
#include <STEPControl_Writer.hxx>
|
|
17
|
-
#include <StlAPI_Reader.hxx>
|
|
18
|
-
#include <StlAPI_Writer.hxx>
|
|
19
|
-
#include <TDF_ChildIterator.hxx>
|
|
20
|
-
#include <TDF_Label.hxx>
|
|
21
|
-
#include <TDataStd_Name.hxx>
|
|
22
|
-
#include <TDocStd_Document.hxx>
|
|
23
|
-
#include <TopoDS_Iterator.hxx>
|
|
24
|
-
#include <TopoDS_Shape.hxx>
|
|
25
|
-
#include <XCAFDoc_ColorTool.hxx>
|
|
26
|
-
#include <XCAFDoc_DocumentTool.hxx>
|
|
27
|
-
#include <XCAFDoc_ShapeTool.hxx>
|
|
28
|
-
|
|
29
|
-
#include "shared.hpp"
|
|
30
|
-
#include "utils.hpp"
|
|
31
|
-
|
|
32
|
-
using namespace emscripten;
|
|
33
|
-
|
|
34
|
-
class VectorBuffer : public std::streambuf {
|
|
35
|
-
public:
|
|
36
|
-
VectorBuffer(const std::vector<uint8_t>& v)
|
|
37
|
-
{
|
|
38
|
-
setg((char*)v.data(), (char*)v.data(), (char*)(v.data() + v.size()));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
EMSCRIPTEN_DECLARE_VAL_TYPE(ShapeNodeArray)
|
|
43
|
-
|
|
44
|
-
struct ShapeNode {
|
|
45
|
-
std::optional<TopoDS_Shape> shape;
|
|
46
|
-
std::optional<std::string> color;
|
|
47
|
-
std::vector<ShapeNode> children;
|
|
48
|
-
std::string name;
|
|
49
|
-
|
|
50
|
-
ShapeNodeArray getChildren() const
|
|
51
|
-
{
|
|
52
|
-
return ShapeNodeArray(val::array(children));
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// copy from https://github.com/kovacsv/occt-import-js/blob/main/occt-import-js/src/importer-xcaf.cpp
|
|
57
|
-
std::string getLabelNameNoRef(const TDF_Label& label)
|
|
58
|
-
{
|
|
59
|
-
Handle(TDataStd_Name) nameAttribute = new TDataStd_Name();
|
|
60
|
-
if (!label.FindAttribute(nameAttribute->GetID(), nameAttribute)) {
|
|
61
|
-
return std::string();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
Standard_Integer utf8NameLength = nameAttribute->Get().LengthOfCString();
|
|
65
|
-
char* nameBuf = new char[utf8NameLength + 1];
|
|
66
|
-
nameAttribute->Get().ToUTF8CString(nameBuf);
|
|
67
|
-
std::string name(nameBuf, utf8NameLength);
|
|
68
|
-
delete[] nameBuf;
|
|
69
|
-
return name;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
std::string getLabelName(const TDF_Label& label, const Handle(XCAFDoc_ShapeTool) & shapeTool)
|
|
73
|
-
{
|
|
74
|
-
if (XCAFDoc_ShapeTool::IsReference(label)) {
|
|
75
|
-
TDF_Label referredShapeLabel;
|
|
76
|
-
shapeTool->GetReferredShape(label, referredShapeLabel);
|
|
77
|
-
return getLabelName(referredShapeLabel, shapeTool);
|
|
78
|
-
}
|
|
79
|
-
return getLabelNameNoRef(label);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
std::string getShapeName(const TopoDS_Shape& shape, const Handle(XCAFDoc_ShapeTool) & shapeTool)
|
|
83
|
-
{
|
|
84
|
-
TDF_Label shapeLabel;
|
|
85
|
-
if (!shapeTool->Search(shape, shapeLabel)) {
|
|
86
|
-
return std::string();
|
|
87
|
-
}
|
|
88
|
-
return getLabelName(shapeLabel, shapeTool);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
bool getLabelColorNoRef(const TDF_Label& label, const Handle(XCAFDoc_ColorTool) & colorTool, std::string& color)
|
|
92
|
-
{
|
|
93
|
-
static const std::vector<XCAFDoc_ColorType> colorTypes = { XCAFDoc_ColorSurf, XCAFDoc_ColorCurv, XCAFDoc_ColorGen };
|
|
94
|
-
|
|
95
|
-
Quantity_Color qColor;
|
|
96
|
-
for (XCAFDoc_ColorType colorType : colorTypes) {
|
|
97
|
-
if (colorTool->GetColor(label, colorType, qColor)) {
|
|
98
|
-
color = std::string(Quantity_Color::ColorToHex(qColor).ToCString());
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
bool getLabelColor(const TDF_Label& label, const Handle(XCAFDoc_ShapeTool) & shapeTool,
|
|
107
|
-
const Handle(XCAFDoc_ColorTool) & colorTool, std::string& color)
|
|
108
|
-
{
|
|
109
|
-
if (getLabelColorNoRef(label, colorTool, color)) {
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (XCAFDoc_ShapeTool::IsReference(label)) {
|
|
114
|
-
TDF_Label referredShape;
|
|
115
|
-
shapeTool->GetReferredShape(label, referredShape);
|
|
116
|
-
return getLabelColor(referredShape, shapeTool, colorTool, color);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
bool getShapeColor(const TopoDS_Shape& shape, const Handle(XCAFDoc_ShapeTool) & shapeTool,
|
|
123
|
-
const Handle(XCAFDoc_ColorTool) & colorTool, std::string& color)
|
|
124
|
-
{
|
|
125
|
-
TDF_Label shapeLabel;
|
|
126
|
-
if (!shapeTool->Search(shape, shapeLabel)) {
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
return getLabelColor(shapeLabel, shapeTool, colorTool, color);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
bool isFreeShape(const TDF_Label& label, const Handle(XCAFDoc_ShapeTool) & shapeTool)
|
|
133
|
-
{
|
|
134
|
-
TopoDS_Shape tmpShape;
|
|
135
|
-
return shapeTool->GetShape(label, tmpShape) && shapeTool->IsFree(label);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
bool isMeshNode(const TDF_Label& label, const Handle(XCAFDoc_ShapeTool) & shapeTool)
|
|
139
|
-
{
|
|
140
|
-
// if there are no children, it is a mesh node
|
|
141
|
-
if (!label.HasChild()) {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// if it has a subshape child, treat it as mesh node
|
|
146
|
-
bool hasSubShapeChild = false;
|
|
147
|
-
for (TDF_ChildIterator it(label); it.More(); it.Next()) {
|
|
148
|
-
TDF_Label childLabel = it.Value();
|
|
149
|
-
if (shapeTool->IsSubShape(childLabel)) {
|
|
150
|
-
hasSubShapeChild = true;
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (hasSubShapeChild) {
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// if it doesn't have a freeshape child, treat it as a mesh node
|
|
159
|
-
bool hasFreeShapeChild = false;
|
|
160
|
-
for (TDF_ChildIterator it(label); it.More(); it.Next()) {
|
|
161
|
-
TDF_Label childLabel = it.Value();
|
|
162
|
-
if (isFreeShape(childLabel, shapeTool)) {
|
|
163
|
-
hasFreeShapeChild = true;
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (!hasFreeShapeChild) {
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return false;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
ShapeNode initLabelNode(const TDF_Label label, const Handle(XCAFDoc_ShapeTool) shapeTool,
|
|
175
|
-
const Handle(XCAFDoc_ColorTool) colorTool)
|
|
176
|
-
{
|
|
177
|
-
std::string color;
|
|
178
|
-
getLabelColor(label, shapeTool, colorTool, color);
|
|
179
|
-
|
|
180
|
-
ShapeNode node = {
|
|
181
|
-
.shape = std::nullopt,
|
|
182
|
-
.color = color,
|
|
183
|
-
.children = {},
|
|
184
|
-
.name = getLabelName(label, shapeTool),
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
return node;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
ShapeNode initShapeNode(const TopoDS_Shape& shape, const Handle(XCAFDoc_ShapeTool) & shapeTool,
|
|
191
|
-
const Handle(XCAFDoc_ColorTool) & colorTool)
|
|
192
|
-
{
|
|
193
|
-
std::string color;
|
|
194
|
-
getShapeColor(shape, shapeTool, colorTool, color);
|
|
195
|
-
ShapeNode childShapeNode = { .shape = shape, .color = color, .children = {}, .name = getShapeName(shape, shapeTool) };
|
|
196
|
-
return childShapeNode;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
ShapeNode initGroupNode(const TopoDS_Shape& shape, const Handle_XCAFDoc_ShapeTool& shapeTool)
|
|
200
|
-
{
|
|
201
|
-
ShapeNode groupNode = {
|
|
202
|
-
.shape = std::nullopt, .color = std::nullopt, .children = {}, .name = getShapeName(shape, shapeTool)
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
return groupNode;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
ShapeNode parseShape(TopoDS_Shape& shape, const Handle_XCAFDoc_ShapeTool& shapeTool,
|
|
209
|
-
const Handle_XCAFDoc_ColorTool& colorTool)
|
|
210
|
-
{
|
|
211
|
-
if (shape.ShapeType() == TopAbs_COMPOUND || shape.ShapeType() == TopAbs_COMPSOLID) {
|
|
212
|
-
auto node = initGroupNode(shape, shapeTool);
|
|
213
|
-
TopoDS_Iterator iterator(shape);
|
|
214
|
-
while (iterator.More()) {
|
|
215
|
-
auto subShape = iterator.Value();
|
|
216
|
-
node.children.push_back(parseShape(subShape, shapeTool, colorTool));
|
|
217
|
-
iterator.Next();
|
|
218
|
-
}
|
|
219
|
-
return node;
|
|
220
|
-
}
|
|
221
|
-
return initShapeNode(shape, shapeTool, colorTool);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
ShapeNode parseLabelToNode(const TDF_Label& label, const Handle(XCAFDoc_ShapeTool) & shapeTool,
|
|
225
|
-
const Handle(XCAFDoc_ColorTool) & colorTool)
|
|
226
|
-
{
|
|
227
|
-
if (isMeshNode(label, shapeTool)) {
|
|
228
|
-
auto shape = shapeTool->GetShape(label);
|
|
229
|
-
return parseShape(shape, shapeTool, colorTool);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
auto node = initLabelNode(label, shapeTool, colorTool);
|
|
233
|
-
for (TDF_ChildIterator it(label); it.More(); it.Next()) {
|
|
234
|
-
auto childLabel = it.Value();
|
|
235
|
-
if (isFreeShape(childLabel, shapeTool)) {
|
|
236
|
-
auto childNode = parseLabelToNode(childLabel, shapeTool, colorTool);
|
|
237
|
-
node.children.push_back(childNode);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return node;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
ShapeNode parseRootLabelToNode(const Handle(XCAFDoc_ShapeTool) & shapeTool, const Handle(XCAFDoc_ColorTool) & colorTool)
|
|
244
|
-
{
|
|
245
|
-
auto label = shapeTool->Label();
|
|
246
|
-
|
|
247
|
-
ShapeNode node = initLabelNode(label, shapeTool, colorTool);
|
|
248
|
-
for (TDF_ChildIterator it(label); it.More(); it.Next()) {
|
|
249
|
-
auto childLabel = it.Value();
|
|
250
|
-
if (isFreeShape(childLabel, shapeTool)) {
|
|
251
|
-
auto childNode = parseLabelToNode(childLabel, shapeTool, colorTool);
|
|
252
|
-
node.children.push_back(childNode);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return node;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
static ShapeNode parseNodeFromDocument(Handle(TDocStd_Document) document)
|
|
260
|
-
{
|
|
261
|
-
TDF_Label mainLabel = document->Main();
|
|
262
|
-
Handle(XCAFDoc_ShapeTool) shapeTool = XCAFDoc_DocumentTool::ShapeTool(mainLabel);
|
|
263
|
-
Handle(XCAFDoc_ColorTool) colorTool = XCAFDoc_DocumentTool::ColorTool(mainLabel);
|
|
264
|
-
|
|
265
|
-
return parseRootLabelToNode(shapeTool, colorTool);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
class Converter {
|
|
269
|
-
private:
|
|
270
|
-
static TopoDS_Shape sewShapes(const std::vector<TopoDS_Shape>& shapes)
|
|
271
|
-
{
|
|
272
|
-
BRepBuilderAPI_Sewing sewing;
|
|
273
|
-
for (const auto& shape : shapes) {
|
|
274
|
-
sewing.Add(shape);
|
|
275
|
-
}
|
|
276
|
-
sewing.Perform();
|
|
277
|
-
return sewing.SewedShape();
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
static void writeBufferToFile(const std::string& fileName, const Uint8Array& buffer)
|
|
281
|
-
{
|
|
282
|
-
std::vector<uint8_t> input = convertJSArrayToNumberVector<uint8_t>(buffer);
|
|
283
|
-
std::ofstream dummyFile;
|
|
284
|
-
dummyFile.open(fileName, std::ios::binary);
|
|
285
|
-
dummyFile.write((char*)input.data(), input.size());
|
|
286
|
-
dummyFile.close();
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
public:
|
|
290
|
-
static std::string convertToBrep(const TopoDS_Shape& input)
|
|
291
|
-
{
|
|
292
|
-
std::ostringstream oss;
|
|
293
|
-
BRepTools::Write(input, oss);
|
|
294
|
-
return oss.str();
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
static TopoDS_Shape convertFromBrep(const std::string& input)
|
|
298
|
-
{
|
|
299
|
-
std::istringstream iss(input);
|
|
300
|
-
TopoDS_Shape output;
|
|
301
|
-
BRep_Builder builder;
|
|
302
|
-
BRepTools::Read(output, iss, builder);
|
|
303
|
-
return output;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
static std::optional<ShapeNode> convertFromStep(const Uint8Array& buffer)
|
|
307
|
-
{
|
|
308
|
-
std::vector<uint8_t> input = convertJSArrayToNumberVector<uint8_t>(buffer);
|
|
309
|
-
VectorBuffer vectorBuffer(input);
|
|
310
|
-
std::istream iss(&vectorBuffer);
|
|
311
|
-
|
|
312
|
-
STEPCAFControl_Reader cafReader;
|
|
313
|
-
cafReader.SetColorMode(true);
|
|
314
|
-
cafReader.SetNameMode(true);
|
|
315
|
-
IFSelect_ReturnStatus readStatus = cafReader.ReadStream("stp", iss);
|
|
316
|
-
|
|
317
|
-
if (readStatus != IFSelect_RetDone) {
|
|
318
|
-
return std::nullopt;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
Handle(TDocStd_Document) document = new TDocStd_Document("bincaf");
|
|
322
|
-
if (!cafReader.Transfer(document)) {
|
|
323
|
-
return std::nullopt;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
return parseNodeFromDocument(document);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
static std::optional<ShapeNode> convertFromIges(const Uint8Array& buffer)
|
|
330
|
-
{
|
|
331
|
-
std::string dummyFileName = "temp.igs";
|
|
332
|
-
writeBufferToFile(dummyFileName, buffer);
|
|
333
|
-
|
|
334
|
-
IGESCAFControl_Reader igesCafReader;
|
|
335
|
-
igesCafReader.SetColorMode(true);
|
|
336
|
-
igesCafReader.SetNameMode(true);
|
|
337
|
-
if (igesCafReader.ReadFile(dummyFileName.c_str()) != IFSelect_RetDone) {
|
|
338
|
-
std::remove(dummyFileName.c_str());
|
|
339
|
-
return std::nullopt;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
Handle(TDocStd_Document) document = new TDocStd_Document("bincaf");
|
|
343
|
-
if (!igesCafReader.Transfer(document)) {
|
|
344
|
-
std::remove(dummyFileName.c_str());
|
|
345
|
-
return std::nullopt;
|
|
346
|
-
}
|
|
347
|
-
std::remove(dummyFileName.c_str());
|
|
348
|
-
return parseNodeFromDocument(document);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
static std::string convertToStep(const ShapeArray& input)
|
|
352
|
-
{
|
|
353
|
-
auto shapes = vecFromJSArray<TopoDS_Shape>(input);
|
|
354
|
-
std::ostringstream oss;
|
|
355
|
-
STEPControl_Writer stepWriter;
|
|
356
|
-
for (const auto& shape : shapes) {
|
|
357
|
-
stepWriter.Transfer(shape, STEPControl_AsIs);
|
|
358
|
-
}
|
|
359
|
-
stepWriter.WriteStream(oss);
|
|
360
|
-
return oss.str();
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
static std::string convertToIges(const ShapeArray& input)
|
|
364
|
-
{
|
|
365
|
-
auto shapes = vecFromJSArray<TopoDS_Shape>(input);
|
|
366
|
-
std::ostringstream oss;
|
|
367
|
-
IGESControl_Writer igesWriter;
|
|
368
|
-
for (const auto& shape : shapes) {
|
|
369
|
-
igesWriter.AddShape(shape);
|
|
370
|
-
}
|
|
371
|
-
igesWriter.ComputeModel();
|
|
372
|
-
igesWriter.Write(oss);
|
|
373
|
-
return oss.str();
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
static std::optional<ShapeNode> convertFromStl(const Uint8Array& buffer)
|
|
377
|
-
{
|
|
378
|
-
std::string dummyFileName = "temp.stl";
|
|
379
|
-
writeBufferToFile(dummyFileName, buffer);
|
|
380
|
-
|
|
381
|
-
StlAPI_Reader stlReader;
|
|
382
|
-
TopoDS_Shape shape;
|
|
383
|
-
if (!stlReader.Read(shape, dummyFileName.c_str())) {
|
|
384
|
-
return std::nullopt;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
ShapeNode node = { .shape = shape, .color = std::nullopt, .children = {}, .name = "STL Shape" };
|
|
388
|
-
|
|
389
|
-
return node;
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
EMSCRIPTEN_BINDINGS(Converter)
|
|
394
|
-
{
|
|
395
|
-
register_optional<ShapeNode>();
|
|
396
|
-
|
|
397
|
-
register_type<ShapeNodeArray>("Array<ShapeNode>");
|
|
398
|
-
|
|
399
|
-
class_<ShapeNode>("ShapeNode")
|
|
400
|
-
.property("shape", &ShapeNode::shape, return_value_policy::reference())
|
|
401
|
-
.property("color", &ShapeNode::color)
|
|
402
|
-
.property("name", &ShapeNode::name)
|
|
403
|
-
.function("getChildren", &ShapeNode::getChildren);
|
|
404
|
-
|
|
405
|
-
class_<Converter>("Converter")
|
|
406
|
-
.class_function("convertToBrep", &Converter::convertToBrep)
|
|
407
|
-
.class_function("convertFromBrep", &Converter::convertFromBrep)
|
|
408
|
-
.class_function("convertFromStep", &Converter::convertFromStep)
|
|
409
|
-
.class_function("convertFromIges", &Converter::convertFromIges)
|
|
410
|
-
.class_function("convertToStep", &Converter::convertToStep)
|
|
411
|
-
.class_function("convertToIges", &Converter::convertToIges)
|
|
412
|
-
.class_function("convertFromStl", &Converter::convertFromStl);
|
|
413
|
-
}
|