Added Cell and Marker Functionality - #4
Merged
Conversation
afshawnlotfi
commented
Nov 17, 2025
Member
- Added support for cell markers
- Added support for multiple cell types outside triangles
- Cleaned up a little
- Updated `Mesh` interface to include `cellTypes` for VTK compatibility. - Implemented `inferCellTypes` and `getCellTypes` methods in `MeshUtils` for automatic cell type inference. - Added triangulation support for mixed polygons in `MeshUtils`, ensuring compatibility with THREE.js. - Enhanced tests for cell types and triangulation, covering various polygon configurations. - Updated TypeScript documentation to reflect new features and usage examples.
- Introduced marker support in the Mesh class to define boundary conditions, material regions, and geometric features. - Added methods for automatic conversion between list-of-lists and flattened marker storage. - Implemented marker reconstruction from flattened structures. - Enhanced marker type detection based on element sizes. - Added serialization support for markers during mesh encoding/decoding. - Updated README.md to include examples and documentation for marker usage. - Created new example notebook for working with mesh markers. - Added unit tests for marker functionality, including creation, reconstruction, and serialization. - Updated TypeScript interfaces and utility functions to support marker handling.
… improved element size handling
…ulations - Updated `TestDictArrays` to include new array fields: `index_sizes` and `cell_types`. - Modified `TestIndexSizes` to validate polygon count and inferred sizes for triangles. - Enhanced `TestPydanticMesh` to support polygon structures and validate mesh properties. - Added tests for custom mesh handling, ensuring proper serialization and optimization. - Implemented automatic calculation of `markerSizes` and `markerOffsets` in `MeshUtils`. - Introduced utility functions `inferSizesFromCellTypes` and `sizesToOffsets` for VTK cell type handling. - Updated TypeScript README and tests to reflect new marker auto-calculation features.
afshawnlotfi
added a commit
that referenced
this pull request
Nov 17, 2025
* feat: Enhance mesh functionality with polygon support and cell types - Updated `Mesh` interface to include `cellTypes` for VTK compatibility. - Implemented `inferCellTypes` and `getCellTypes` methods in `MeshUtils` for automatic cell type inference. - Added triangulation support for mixed polygons in `MeshUtils`, ensuring compatibility with THREE.js. - Enhanced tests for cell types and triangulation, covering various polygon configurations. - Updated TypeScript documentation to reflect new features and usage examples. * feat: Add support for mesh markers and boundary conditions - Introduced marker support in the Mesh class to define boundary conditions, material regions, and geometric features. - Added methods for automatic conversion between list-of-lists and flattened marker storage. - Implemented marker reconstruction from flattened structures. - Enhanced marker type detection based on element sizes. - Added serialization support for markers during mesh encoding/decoding. - Updated README.md to include examples and documentation for marker usage. - Created new example notebook for working with mesh markers. - Added unit tests for marker functionality, including creation, reconstruction, and serialization. - Updated TypeScript interfaces and utility functions to support marker handling. * feat: Introduce cell type utilities and integrate with Mesh class for improved element size handling * Enhance mesh functionality with automatic marker size and offset calculations - Updated `TestDictArrays` to include new array fields: `index_sizes` and `cell_types`. - Modified `TestIndexSizes` to validate polygon count and inferred sizes for triangles. - Enhanced `TestPydanticMesh` to support polygon structures and validate mesh properties. - Added tests for custom mesh handling, ensuring proper serialization and optimization. - Implemented automatic calculation of `markerSizes` and `markerOffsets` in `MeshUtils`. - Introduced utility functions `inferSizesFromCellTypes` and `sizesToOffsets` for VTK cell type handling. - Updated TypeScript README and tests to reflect new marker auto-calculation features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.