SMTK issueshttps://gitlab.kitware.com/cmb/smtk/-/issues2018-11-19T14:33:26-05:00https://gitlab.kitware.com/cmb/smtk/-/issues/208Mesh Representation2018-11-19T14:33:26-05:00T.J. CoronaMesh RepresentationThe current implementation for representing Meshes as multiblocks is serviceable, but it does support selection or visualization queues. It needs to be updated and possibly merged with `vtkModelMultiBlockSource`.The current implementation for representing Meshes as multiblocks is serviceable, but it does support selection or visualization queues. It needs to be updated and possibly merged with `vtkModelMultiBlockSource`.https://gitlab.kitware.com/cmb/smtk/-/issues/188Examine tessellation performance2018-11-01T18:40:08-04:00David ThompsonExamine tessellation performanceBased on feedback about load times for large geometries in the VTK session, it might be necessary to change `smtk::model::Tessellation`.
For the VTK session, there are 2 copies:
+ From the `vtkDataObject` instances internal to the sessi...Based on feedback about load times for large geometries in the VTK session, it might be necessary to change `smtk::model::Tessellation`.
For the VTK session, there are 2 copies:
+ From the `vtkDataObject` instances internal to the session to `smtk::model::Tessellation`
+ From `smtk::model::Tessellation` to `vtkDataObject` instances in the multiblock source used for rendering.
Even for other sessions, there is still an issue even though the original tessellation may not be in VTK format. One approach would be to store a functor rather than actual points/triangles. The functor may hold on to point/triangle arrays internally in whatever format is required. Then, SMTK's multiblock source can either zero-copy the result into a VTK dataset or deep-copy it depending on what the functor provides. This also delays tessellation from the time at which the model is read to the time at which the tessellation is needed.
We had thought to eliminate `smtk::model::Tessellation` and replace it with `smtk::mesh`, but given the performance of MOAB for this kind of thing perhaps that is a longer term goal than SMTK 3.
@tjcorona @bob.obaraSMTK 3.0https://gitlab.kitware.com/cmb/smtk/-/issues/148Add ability to write a mesh set2018-08-09T14:31:25-04:00T.J. CoronaAdd ability to write a mesh setCurrently, mesh I/O is performed at the collection level. From `smtk/mesh/moab/Writers.cxx:63-103`, we should be able to support exporting a particular mesh set to a file. We would have to make sure that the point space doesn't get borke...Currently, mesh I/O is performed at the collection level. From `smtk/mesh/moab/Writers.cxx:63-103`, we should be able to support exporting a particular mesh set to a file. We would have to make sure that the point space doesn't get borked when writing out mesh sets and reading them back.https://gitlab.kitware.com/cmb/smtk/-/issues/140Populate info panel with mesh statistics2017-05-01T14:39:57-04:00T.J. CoronaPopulate info panel with mesh statisticsIt would be nice to have verdict-like information about meshes that are loaded into ModelBuilder.It would be nice to have verdict-like information about meshes that are loaded into ModelBuilder.T.J. CoronaT.J. Coronahttps://gitlab.kitware.com/cmb/smtk/-/issues/91Remove boost :: int64_t from smtk/mesh/ExtractTessellation.h/cxx2019-04-29T15:17:45-04:00T.J. CoronaRemove boost :: int64_t from smtk/mesh/ExtractTessellation.h/cxxusing boost::int64_t causes problems on systems where VTK doesn't set vtkIdType to the same value. This likely needs to use the same logic as the vtkIdType selection logic to ensure compatibility to VTK.
One sloppy workaround for this...using boost::int64_t causes problems on systems where VTK doesn't set vtkIdType to the same value. This likely needs to use the same logic as the vtkIdType selection logic to ensure compatibility to VTK.
One sloppy workaround for this issue is in ExportVTKData.cxx:167:
```
namespace
{
template<class T, class U>
struct swapDataTypesIfNecessary
{
void operator()(T*& in, U*& out, boost::int64_t len)
{
out = new U[len];
for (boost::int64_t i=0;i<len;i++)
{
out[i] = in[i];
}
delete [] in;
}
};
template<class T>
struct swapDataTypesIfNecessary<T,T>
{
void operator()(T*& in, T*& out, boost::int64_t)
{
out = in;
}
};
}
//----------------------------------------------------------------------------
void ExportVTKData::operator()(const smtk::mesh::MeshSet& meshset,
vtkUnstructuredGrid* ug) const
{
boost::int64_t connectivityLength= -1;
boost::int64_t numberOfCells = -1;
boost::int64_t numberOfPoints = -1;
//determine the allocation lengths
smtk::mesh::PreAllocatedTessellation::determineAllocationLengths(
meshset, connectivityLength, numberOfCells, numberOfPoints);
// add the number of cells to the connectivity length to get the length of
// VTK-style connectivity
connectivityLength += numberOfCells;
//create raw data buffers to hold our data
double* pointsData = new double[3*numberOfPoints];
unsigned char* cellTypesData = new unsigned char[numberOfCells];
boost::int64_t* cellLocationsData_ = new boost::int64_t[numberOfCells];
boost::int64_t* connectivityData_ = new boost::int64_t[connectivityLength];
//extract tessellation information
smtk::mesh::PreAllocatedTessellation tess(connectivityData_,
cellLocationsData_,
cellTypesData, pointsData);
smtk::mesh::extractTessellation(meshset, tess);
swapDataTypesIfNecessary<boost::int64_t, vtkIdType> swap;
vtkIdType* cellLocationsData;
swap(cellLocationsData_, cellLocationsData, numberOfCells);
vtkIdType* connectivityData;
swap(connectivityData_, connectivityData, connectivityLength);
// create vtk data arrays to hold our data
vtkNew<vtkDoubleArray> pointsArray;
vtkNew<vtkUnsignedCharArray> cellTypes;
vtkNew<vtkIdTypeArray> cellLocations;
vtkNew<vtkIdTypeArray> connectivity;
// transfer ownership of our raw data arrays to the vtk data arrays
pointsArray->SetNumberOfComponents(3);
pointsArray->SetArray(pointsData, 3*numberOfPoints, false,
vtkDoubleArray::VTK_DATA_ARRAY_DELETE);
cellTypes->SetArray(cellTypesData, numberOfCells, false,
vtkUnsignedCharArray::VTK_DATA_ARRAY_DELETE);
cellLocations->SetArray(cellLocationsData, numberOfCells, false,
vtkIdTypeArray::VTK_DATA_ARRAY_DELETE);
connectivity->SetArray(connectivityData, connectivityLength, false,
vtkIdTypeArray::VTK_DATA_ARRAY_DELETE);
vtkNew<vtkPoints> points;
points->SetData(pointsArray.GetPointer());
vtkNew<vtkCellArray> cells;
cells->SetCells(numberOfCells, connectivity.GetPointer());
ug->SetPoints(points.GetPointer());
ug->SetCells(cellTypes.GetPointer(), cellLocations.GetPointer(),
cells.GetPointer());
}
```https://gitlab.kitware.com/cmb/smtk/-/issues/46Create a validation routine that orients and orders an SMTK mesh.2019-04-29T15:18:47-04:00T.J. CoronaCreate a validation routine that orients and orders an SMTK mesh.T.J. CoronaT.J. Coronahttps://gitlab.kitware.com/cmb/smtk/-/issues/45Mesh operators need to mark whether or not they modify If a mesh is oriented ...2019-04-29T15:18:47-04:00T.J. CoronaMesh operators need to mark whether or not they modify If a mesh is oriented and orderedThis Issue follows Issue #44.This Issue follows Issue #44.T.J. CoronaT.J. Coronahttps://gitlab.kitware.com/cmb/smtk/-/issues/44Add the ability to mark up a mesh as being oriented and ordered2019-04-29T15:18:47-04:00T.J. CoronaAdd the ability to mark up a mesh as being oriented and orderedWith the ability to determine that a model is already ordered and oriented, SMTK mesh can extract tessellations efficiently without first having to sort the output.With the ability to determine that a model is already ordered and oriented, SMTK mesh can extract tessellations efficiently without first having to sort the output.T.J. CoronaT.J. Corona