You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extend plotSolution to visualize arbitrary geometries #41
1D line plots for scalar solutions (see e.g the tutorial)
2D contour plots for structured rectangular grids (reshaping node coordinates into grids) (see e.g the tutorial)
2D contour plots for unstructured meshes using node-based interpolation (via Plotly's contour type with xyz arrays) (see e.g the tutorial)
However, it does not handle true element-based visualization for arbitrary polygonal topologies.
Tasks:
Introduce a new plotType option, e.g., "polygon"
Use Plotly's scatter with fill: 'toself' or mesh3d to draw individual polygonal elements based on element connectivity (e.g., from nop arrays in meshGenerationScript.js)
For each element, extract node coordinates and solution values to create filled polygons with color mapping
Example API usage: plotSolution(solutionVector, nodesCoordinates, solverConfig, "2D", "polygon", plotDivId);
Hi @Pawankalyan2023! Thanks for your interest in contributing to the FEAScript project. Visualizing arbitrary geometries is a core capability that will help drive the project’s future expansion. Feel free to reach out if you need any details or support. Please also consider ⭐️ the project!
Hi @agrim317! Thanks for your interest in contributing to the project. Please also consider ⭐️ the project! @Pawankalyan2023, just checking — are you still working on this issue? If not, we can reassign it to @agrim317 to keep progress moving.
Hey @agrim317. Just a reminder that Hacktoberfest is wrapping up soon (October 31st). You can always contribute after Hacktoberfest, but you might miss out on their rewards. All the best
@agrim317 I’m currently working on it, as I believe it will be one of the foundation stones for version 0.0.2. We’re adjusting the strategy because I don't think mesh3d is suitable for 2D cases (at least I wasn't satisfied with it). Below is the updated roadmap for this issue:
Preprocess the finite element mesh. If the element is a quadrilateral, split it into two triangles.
Build a spatial index over the triangles. This allows fast queries for triangles near point (x,y).
Create a dense visualization grid. Initialize each grid value to null.
For each visualization point (x, y), perform a point-in-triangle test and extract the parent element.
Interpolate the FE solution value using the local coordinates.
Instead of using a spatial index, I have implemented an adjacency-based search to find which element contains a given point. The plotSolution function (as well as the new plotInterpolatedSolution) will be now called as plotSolution(model, result, plotType, plotDivId) in the HTML examples (see the new example with a rhomboidal geometry here https://feascript.com/tutorials/heat-conduction-2d-rhom-fin-gmsh.html). The new capability is included in the 0.2.0 (first release candidate) version.
Activity
Pawankalyan2023 commentedon Sep 23, 2025
Hi @nikoscham , I would like to take this issue can you assign this to me for hacktoberfest
nikoscham commentedon Sep 24, 2025
Hi @Pawankalyan2023! Thanks for your interest in contributing to the FEAScript project. Visualizing arbitrary geometries is a core capability that will help drive the project’s future expansion. Feel free to reach out if you need any details or support. Please also consider ⭐️ the project!
Nikos
agrim317 commentedon Oct 19, 2025
Hi @nikoscham ,
I’m interested in working on this issue. If it’s still open and not currently being worked on, could you please assign it to me?
nikoscham commentedon Oct 19, 2025
Hi @agrim317! Thanks for your interest in contributing to the project. Please also consider ⭐️ the project!
@Pawankalyan2023, just checking — are you still working on this issue? If not, we can reassign it to @agrim317 to keep progress moving.
Pawankalyan2023 commentedon Oct 19, 2025
Hi @nikoscham , you can assign to @agrim317
nikoscham commentedon Oct 19, 2025
@agrim317 you can start working on this issue. Let me know if you need any clarifications!
nikoscham commentedon Oct 30, 2025
Hey @agrim317. Just a reminder that Hacktoberfest is wrapping up soon (October 31st). You can always contribute after Hacktoberfest, but you might miss out on their rewards. All the best
nikoscham commentedon Nov 25, 2025
@agrim317 I’m currently working on it, as I believe it will be one of the foundation stones for version 0.0.2. We’re adjusting the strategy because I don't think
mesh3dis suitable for 2D cases (at least I wasn't satisfied with it). Below is the updated roadmap for this issue:Build a spatial index over the triangles. This allows fast queries for triangles near point(x,y).null.(x, y),perform a point-in-triangle test and extract the parent element.nikoscham commentedon Dec 17, 2025
Instead of using a spatial index, I have implemented an adjacency-based search to find which element contains a given point. The
plotSolutionfunction (as well as the newplotInterpolatedSolution) will be now called asplotSolution(model, result, plotType, plotDivId)in the HTML examples (see the new example with a rhomboidal geometry here https://feascript.com/tutorials/heat-conduction-2d-rhom-fin-gmsh.html). The new capability is included in the 0.2.0 (first release candidate) version.Feature/arbitrary geometries2 (#59)