iMSTK issueshttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues2022-06-30T09:06:09-04:00https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/444Epsilon in PointwiseMapper2022-06-30T09:06:09-04:00Andrew WilsonEpsilon in PointwiseMapperOn numerous occasions now we have run into the issue of importing a double TetrahedralMesh and float SurfaceMesh. Usually the original data was in double, the .msh file format supports double. .vtk supports double. But SurfaceMesh's ofte...On numerous occasions now we have run into the issue of importing a double TetrahedralMesh and float SurfaceMesh. Usually the original data was in double, the .msh file format supports double. .vtk supports double. But SurfaceMesh's often seem to be read in as 32 bit floats.
Then the PointwiseMap is used resulting in a static/unmapped SurfaceMesh. None of the points were found to be on the TetrahedralMesh because of its epsilon.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/443Pbd LineMeshToMeshCCD Handling Cancels Movement2022-09-28T15:52:25-04:00Andrew WilsonPbd LineMeshToMeshCCD Handling Cancels MovementI'm not sure if it's numerically correct or a bug but the current solution in pbdSelfSutureCCD appears to cancel out a lot of side to side movement as if the two lines in contact are frozen in place unaffected by outside things. Could th...I'm not sure if it's numerically correct or a bug but the current solution in pbdSelfSutureCCD appears to cancel out a lot of side to side movement as if the two lines in contact are frozen in place unaffected by outside things. Could this also be an effect more accentuated in PBD than a second order model?
This can be tested by unfixing the right end of the thread in the pbdSelfSutureCCD example and pulling the thread to the left or right.
Luckily for many use cases this is not important.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/442Screen Text Instructions on Examples2022-07-26T08:42:50-04:00Andrew WilsonScreen Text Instructions on ExamplesI've had at least 2 people now ask me if the program they just started was frozen when in reality the program just started paused and they need to press space to start (often nice for haptics). It could be useful and easy to add some tex...I've had at least 2 people now ask me if the program they just started was frozen when in reality the program just started paused and they need to press space to start (often nice for haptics). It could be useful and easy to add some textual info on screen for some examples to avoid this.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/441Change PointSet::getCellIndices() function to return share_ptr in place of ra...2022-07-20T17:43:58-04:00Shreeraj JadhavChange PointSet::getCellIndices() function to return share_ptr in place of raw pointerUpdate `PointSet::getCellIndices()` function and in `PointSet` and derived classes to return a shared pointer in place of a raw pointer.
Related to https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824.
See discussion: https://git...Update `PointSet::getCellIndices()` function and in `PointSet` and derived classes to return a shared pointer in place of a raw pointer.
Related to https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824.
See discussion: https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824#note_1203524Shreeraj JadhavShreeraj Jadhavhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/440Debug Vertex Labels2022-06-28T17:35:58-04:00Andrew WilsonDebug Vertex LabelsA VisualModel that you could add that would display the numbering of the vertices would be very useful for debug. ie: VertexLabelVisualModelA VisualModel that you could add that would display the numbering of the vertices would be very useful for debug. ie: VertexLabelVisualModelhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/439Pbd Collision Benchmark2022-08-09T11:23:22-04:00Andrew WilsonPbd Collision BenchmarkA pbd collision benchmark could be really useful. I have, at many points, wanted to know if changes to code effected performance. But not all of our examples are representation of full usage as they don't produce many contacts.A pbd collision benchmark could be really useful. I have, at many points, wanted to know if changes to code effected performance. But not all of our examples are representation of full usage as they don't produce many contacts.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/435Update logic inside `EdgeEdgeCCDState` with function call to `edgeToEdgeClose...2022-08-17T10:27:26-04:00Shreeraj JadhavUpdate logic inside `EdgeEdgeCCDState` with function call to `edgeToEdgeClosestPoints`Remove duplicate implementation and simplify `CollisionDetection/EdgeEdgeCCDState` by calling `CollisionUtils::edgeToEdgeClosestPoints` inside `EdgeEdgeCCDState`.
See: https://gitlab.kitware.com/iMSTK/iMSTK/-/blob/36664de0e276828c6b61e4...Remove duplicate implementation and simplify `CollisionDetection/EdgeEdgeCCDState` by calling `CollisionUtils::edgeToEdgeClosestPoints` inside `EdgeEdgeCCDState`.
See: https://gitlab.kitware.com/iMSTK/iMSTK/-/blob/36664de0e276828c6b61e4436e7899c9f6294119/Source/CollisionDetection/imstkCollisionUtils.h#L1038Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/434Fixed Iteration For Visual Tests2022-08-06T03:52:01-04:00Andrew WilsonFixed Iteration For Visual TestsThey should not use the SimulationManager, be replaced with something more simple:
```
while (sceneTime < maxTime)
{
sceneManager->setDt(fixedDt);
sceneManager->update();
viewer->update(); // The rate you do this may need som...They should not use the SimulationManager, be replaced with something more simple:
```
while (sceneTime < maxTime)
{
sceneManager->setDt(fixedDt);
sceneManager->update();
viewer->update(); // The rate you do this may need some more thought
}
```
There's a couple other bits that make this a tad trickier to do.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/433Pbd Boundary Condition Collisions2022-08-01T17:09:12-04:00Jacob MoorePbd Boundary Condition CollisionsThe PBD solver occasionally "explodes" when a rigid body contacts a boundary point of a PBD object. This can come from some possible issues.
1. There is some point in the PBD collision solve where the inverse mass of zero is causing poi...The PBD solver occasionally "explodes" when a rigid body contacts a boundary point of a PBD object. This can come from some possible issues.
1. There is some point in the PBD collision solve where the inverse mass of zero is causing points adjacent to it to fly off into oblivion.
2. There is an issue with the order of operations in which the constraints are solved.
3. ???Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/429Pbd Constraint Feature List2022-06-02T01:22:44-04:00Andrew WilsonPbd Constraint Feature ListThis is a list of constraints that could be useful to imstk:
- [ ] Shape Matching and moreso Local Shape Matching (see [A Survey on Position Based Dynamics, 2017](http://mmacklin.com/2017-EG-CourseNotes.pdf))
- [ ] Plasticity with Shap...This is a list of constraints that could be useful to imstk:
- [ ] Shape Matching and moreso Local Shape Matching (see [A Survey on Position Based Dynamics, 2017](http://mmacklin.com/2017-EG-CourseNotes.pdf))
- [ ] Plasticity with Shape Matching
- [ ] Our Pbd Fluids still uses PBD, not XPBD.
- [ ] Inverted Green Strain for FEM Tet constraint using SVD as described [Position-Based Simulation of Continuous Materials](https://animation.rwth-aachen.de/media/papers/2014-CAG-PBER.pdf)https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/427DataArray and VecDataArray Compile Time Access to # of Component and Scalar Type2022-06-20T04:22:01-04:00Andrew WilsonDataArray and VecDataArray Compile Time Access to # of Component and Scalar TypeMany template classes provide using statements for types that are template arguments such that they can be used at compile time (forwarded into another template function, static assertion, constexpr if statement, other compile time uses)...Many template classes provide using statements for types that are template arguments such that they can be used at compile time (forwarded into another template function, static assertion, constexpr if statement, other compile time uses). Atm there is no way to do this with VecDataArray # of components and scalar type. Which ARE known at compile time, but cannot be used.
Example of such a function:
```
template<int N>
static void whatWhatWhatttt()
{
for (int i = 0; i < N; i++)
{
printf("woof\n");
}
}
template<typename T>
static void fill(T& myDataArray,
typename T::ValueType initValue)
{
myDataArray.fill(initValue);
if constexpr(T::NumComponents == 5)
{
printf("blah\n");
}
whatWhatWhatttt<T::NumComponents>();
}
```Andrew WilsonAndrew Wilsonhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/426Cmake Settings for Imstk-Unity2022-06-24T08:19:57-04:00Harald ScheirichCmake Settings for Imstk-UnityWhen building for imstk Unity VTK and maybe some other dependencies should be turned offWhen building for imstk Unity VTK and maybe some other dependencies should be turned offHarald ScheirichHarald Scheirichhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/421SurfaceMeshToCapsuleCD Uncovered Cases2022-07-26T20:03:04-04:00Andrew WilsonSurfaceMeshToCapsuleCD Uncovered CasesTwo cases I know of aren't covered with triangle to capsule. Documenting that issue here.
1. When the capsule is completely inside the triangle. It does *sometimes* generate data, but it's not the correct/expected manifold that would gi...Two cases I know of aren't covered with triangle to capsule. Documenting that issue here.
1. When the capsule is completely inside the triangle. It does *sometimes* generate data, but it's not the correct/expected manifold that would give good behavior.
2. When the triangles edge is in contact along the lengthwise portion of a capsule, a point contact is produced instead of an edge. This one isn't as critical as a point contact here gives ok behaviour.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/420SurfaceMesh deepCopy parameter2022-08-30T13:25:25-04:00Connor BowleySurfaceMesh deepCopy parameterNot necessarily a big deal, but it was unexpected to me that I can only deep copy SurfaceMesh's if the one I want to copy is stored in a `shared_ptr`. I would expect the signature to instead be `void deepCopy(const SurfaceMesh& srcMesh)`...Not necessarily a big deal, but it was unexpected to me that I can only deep copy SurfaceMesh's if the one I want to copy is stored in a `shared_ptr`. I would expect the signature to instead be `void deepCopy(const SurfaceMesh& srcMesh)`, as there is no true requirement that one can only copy 1) surface meshes that are specifically stored in shared pointer, and 2) non-const surface meshes (as the current parameter is `shared_ptr<SurfaceMesh>` and not `shared_ptr<const SurfaceMesh>`.
As an aside regarding a comment in the code for deepCopy, `\todo: generalize base classes and implement for every geometry`, please consider using a clone approach rather than a deep copy approach so it will work nicely with class hierarchies. You wouldn't really be able to implement `void PointSet::deepCopy(const PointSet& src)` because I could do something like `surfaceMesh.deepCopy(lineMesh)` and that can't happen (yes, you could detect this at runtime and throw and exception (or do the VTK method and silently ignore it), but ensuring the type safe clone can always happen is better). However, doing `surfaceMesh.clone()` or even `pointSetThatCouldBeASurfaceMesh.clone()` is always well defined.
Also, should you go the clone route, I found this a neat way to fake covariant return types with smart pointers.
https://www.fluentcpp.com/2017/09/12/how-to-return-a-smart-pointer-and-use-covariance/
For reference:
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c130-for-making-deep-copies-of-polymorphic-classes-prefer-a-virtual-clone-function-instead-of-public-copy-constructionassignmenthttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/419Real Time timestep/dt is not passed into PbdSolver continuously2022-07-06T13:51:30-04:00Andrew WilsonReal Time timestep/dt is not passed into PbdSolver continuouslyIt is only passed in on initialization, if the timestep is changed, PbdSolver never see's this change.
Given a fixed timestep this is a non issue, (ours is "semi fixed" as its called so it could cause a slight drift in time).
The PbdSo...It is only passed in on initialization, if the timestep is changed, PbdSolver never see's this change.
Given a fixed timestep this is a non issue, (ours is "semi fixed" as its called so it could cause a slight drift in time).
The PbdSolver only uses timestep in the case of XPBD.Andrew WilsonAndrew Wilsonhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/418Barycentric calculation for Line is flipped2022-06-16T23:34:24-04:00Andrew WilsonBarycentric calculation for Line is flippedBasically u is v and v is u. They still sum to 1.
This function is not internally used anywhere.
If a user had flipped their usage of them as well then they would have gotten correct results.Basically u is v and v is u. They still sum to 1.
This function is not internally used anywhere.
If a user had flipped their usage of them as well then they would have gotten correct results.Andrew WilsonAndrew Wilsonhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/417imstk::DataArray const begin/end methods2022-05-16T08:43:14-04:00Connor Bowleyimstk::DataArray const begin/end methodsIt would be useful to have const versions of `imstk::DataArray::begin` and `imstk::DataArray::end`. Yes, the existence of `cbegin` and `cend` are helpful, but I believe const `begin` and `end` would allow use of a `const DataArray` in a ...It would be useful to have const versions of `imstk::DataArray::begin` and `imstk::DataArray::end`. Yes, the existence of `cbegin` and `cend` are helpful, but I believe const `begin` and `end` would allow use of a `const DataArray` in a range based for loop.
Similarly it would be useful to have these for `imstk::VecDataArray`.
For reference `std::vector` has both const `begin`, non-const `begin`, and const `cbegin`
https://en.cppreference.com/w/cpp/container/vector/begin
https://en.cppreference.com/w/cpp/language/range-for#:~:text=If%20range%2Dexpression%20is%20an%20expression%20of%20a,%3BHarald ScheirichHarald Scheirichhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/415Visual Tests break under Linux2022-04-24T01:02:26-04:00Harald ScheirichVisual Tests break under LinuxWhen running the visual tests as a suit there is a spurious failure on test shutdown that implies that we are accessing the window after it has been closedWhen running the visual tests as a suit there is a spurious failure on test shutdown that implies that we are accessing the window after it has been closedhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/414Can't build TBB 2019 with gcc112022-06-29T09:38:53-04:00Harald ScheirichCan't build TBB 2019 with gcc11The TBB version that iMSKT currently uses `2019` can't be built with gcc 11 due to https://github.com/oneapi-src/oneTBB/issues/370
- we could try and apply the fix to our local version
- we could try and update TBBThe TBB version that iMSKT currently uses `2019` can't be built with gcc 11 due to https://github.com/oneapi-src/oneTBB/issues/370
- we could try and apply the fix to our local version
- we could try and update TBBhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/413FetchContent_Populate failed to get HEAD2022-04-21T19:51:33-04:00Andrew WilsonFetchContent_Populate failed to get HEADFetchContent_Populate only pulls from HEAD & won't update when the head moves.
```
Performing update step for 'imstkexternalprojecttemplate-populate'
1> CMake Error at C:/Repos/iMSTK/buildMsvc17/Innerbuild/Testing/imstkexternalprojectt...FetchContent_Populate only pulls from HEAD & won't update when the head moves.
```
Performing update step for 'imstkexternalprojecttemplate-populate'
1> CMake Error at C:/Repos/iMSTK/buildMsvc17/Innerbuild/Testing/imstkexternalprojecttemplate-subbuild/imstkexternalprojecttemplate-populate-prefix/tmp/imstkexternalprojecttemplate-populate-gitupdate.cmake:25 (message):
1> Failed to get the hash for HEAD:
1>
1> fatal: unsafe repository
1> ('C:/Repos/iMSTK/buildMsvc17/Innerbuild/Testing/iMSTKExternalProjectTemplate'
1> is owned by someone else)
1>
1> To add an exception for this directory, call:
1>
1>
1>
1> git config --global --add safe.directory
1> C:/Repos/iMSTK/buildMsvc17/Innerbuild/Testing/iMSTKExternalProjectTemplate
```
Nothing in the repository changed but iMSTKExternalProjectTemplate was updated.