Commit 192832e0 authored by Bob Obara's avatar Bob Obara

ENH: Changing Mesh Collection to Mesh Resource

parent 0ebc73f7
......@@ -39,7 +39,7 @@ to be `priority:low`.
`component:...`
---------------
SMTK is composed of several different components. These labels are associated with Issues to identify the SMTK component associated with the issue. For example `component:attribute_collection refers to SMTK's attribute collection while component:gui would refers to SMTK's Qt GUI extensions.
SMTK is composed of several different components. These labels are associated with Issues to identify the SMTK component associated with the issue. For example `component:attribute_resource refers to SMTK's attribute resource while component:gui would refers to SMTK's Qt GUI extensions.
`triage:...`
--------------
......
......@@ -76,7 +76,7 @@ In more detail:
+ Improve operator availability logic.
+ Refactor qtUIManager and pqSMTKOperationPanel.
Now a qtUIManager may be constructed with an Operation instance
whose attribute collection will be rendered as its view.
whose attribute resource will be rendered as its view.
Furthermore, applications can ask the qtUIManager to find/create a
default view of its operation.
This greatly simplifies the operation panel's job.
......
......@@ -3,7 +3,7 @@
+ smtk::mesh::Maanger is now removed from SMTK.
+ mesh Collections are now optionally managed by a resource manager
This is a significant change.
Previously, mesh collections were held by a mesh manager owned by a
model resource. Now, mesh collections are freestanding and can be
Previously, mesh resources were held by a mesh manager owned by a
model resource. Now, mesh resources are freestanding and can be
classified onto a model resource. The classification mechanism is
handled internally using resource links.
......@@ -22,7 +22,7 @@ There are two ways to go about storing and maintaining this
bidirectional map between modeling kernel entities and SMTK
UUIDs:
1. If the modeling kernel provides an attribute collection,
1. If the modeling kernel provides an attribute resource,
then the UUIDs can be stored as attributes on entities.
Note that it is important to verify that attributes
can be stored on all the entities you wish SMTK to be
......@@ -52,7 +52,7 @@ on each :cxx:`vtkDataObject`'s information object using the :cxx:`SMTK_UUID_KEY`
:end-before: // -- 1 --
The advantage to the first approach is that modeling
kernels with attribute collections generally provide a way
kernels with attribute resources generally provide a way
to preserve attributes across modeling operations.
When using the latter method, there is no robust way to
track entities across modeling operations that change
......@@ -93,7 +93,7 @@ Adding UUIDs as attributes
Although we do not provide example code in this tutorial,
it should be straightforward to add UUIDs to a modeling kernel's
attribute collection either as a 16-byte binary blob or an ASCII string
attribute resource either as a 16-byte binary blob or an ASCII string
per entity.
For example, if we wished to make VTK points and cells available
......@@ -105,7 +105,7 @@ instances (one for points, one for cells).
VTK provides the concept of pedigree IDs for mapping points and cells
from inputs to corresponding outputs, so (for filters that support
pedigree IDs) VTK behaves much like an attribute collection in a geometric
pedigree IDs) VTK behaves much like an attribute resource in a geometric
modeling kernel.
If we ever expose individual points and cells in the SMTK Exodus session,
......
......@@ -60,7 +60,7 @@ two inherited virtual methods
+ :smtk:`ableToOperate <Operator::ableToOperate>` which is an opportunity for an
operator to perform checks on the validity of input parameters
that cannot be easily encoded using the attribute collection; and
that cannot be easily encoded using the attribute resource; and
+ :smtk:`operateInternal <Operator::operateInternal>` which implements the actual
behavior of the operator.
......@@ -74,7 +74,7 @@ in the class header file. We only declare :smtk:`Operator::operateInternal`:
:linenos:
By calling :smtk:`Operator::ensureSpecification` in :smtk:`Operator::ableToOperate`,
we force the attribute collection to build an attribute instance which
we force the attribute resource to build an attribute instance which
holds specifications for each parameter of this instance of the
Operator.
Then in :smtk:`Operator::operateInternal` we can refer to the specification
......
......@@ -146,7 +146,7 @@ two files are normally written:
the first, specified by the :arg:`-rwfile` argument is the
actual Remus worker file and is formatted as a JSON object.
The second has the same filename with a :file:`.requirements`
suffix appended and is formatted as an XML attribute collection
suffix appended and is formatted as an XML attribute resource
describing the modeling operations available.
You should generate a separate Remus worker file for each combination
......
......@@ -147,7 +147,7 @@ Attributes that can be included in <Categories> Element.
Analysis Section
---------------------------
This is an optional section that define analyses. An analysis is
defined as a collection of categories. For example, using the
defined as a resource of categories. For example, using the
categories defined in the`Category Section`_, the following XML would
define two analyses (Ground Water Flow, and Ground Water with Heat
Transfer).
......
......@@ -17,7 +17,7 @@ This process can involve any or all of the following:
- assigning initial conditions to portions of the simulation domain or its boundary; and
- assigning global simulation properties such as convergence criteria.
SMTK provides an attribute collection that can represent
SMTK provides an attribute resource that can represent
arbitrarily structured data and a template system that
can be tailored to describe almost any simulation's
expected inputs without allowing spurious or invalid
......
......@@ -41,7 +41,7 @@ the most aggregate, are as follows:
association with a model entity, material, boundary condition, or
initial condition. As a set, each :smtk:`PointSet` supports set-theoretic
actions (intersect, difference and union). Each `PointSet`
instance holds a reference to its parent collection (described below)
instance holds a reference to its parent resource (described below)
and provides methods for setting attributes, computing subsets, and accessing
individual points.
......@@ -51,7 +51,7 @@ the most aggregate, are as follows:
association with a model entity, material, boundary condition, or
initial condition. As a set, each :smtk:`CellSet` supports set-theoretic
actions (intersect, difference and union). Each `CellSet`
instance holds a reference to its parent collection (described below)
instance holds a reference to its parent resource (described below)
and provides methods for setting attributes, computing subsets, and accessing
individual cells.
......@@ -61,7 +61,7 @@ the most aggregate, are as follows:
association with a model entity, material, boundary condition, or
initial condition. As a set, each :smtk:`MeshSet` supports set-theoretic
actions (intersect, difference and union). Each `MeshSet` instance
holds a reference to a parent collection (described below) and
holds a reference to a parent resource (described below) and
provides methods for setting attributes, computing subsets, and
accessing individual meshes. A `MeshSet` also has access to its
underlying `CellSet` and `PointSet`.
......@@ -79,7 +79,7 @@ the most aggregate, are as follows:
Problem domains are often the union of several instances of
`MeshSet` in a `Collection`. Often, the problem domain may be
decomposed in several ways, so that all of the `MeshSet`s in a
collection may cover the problem domain several
resource may cover the problem domain several
times over.
For example, a `Collection` may have one `MeshSet` for each geometric model
cell as well as a `MeshSet` for each material.
......
Key Concepts
============
Like the attribute collection, the model system is composed of C++ classes,
Like the attribute resource, the model system is composed of C++ classes,
also accessible in Python, whose instances perform the following functions:
:smtk:`Resource <smtk::model::Resource>`
......@@ -10,7 +10,7 @@ also accessible in Python, whose instances perform the following functions:
assigned a UUID by SMTK.
You can think of the resource as a key-value store from UUID values to
model entities, their properties, their arrangement with other entities,
their ties to the attribute collection, and their tessellations.
their ties to the attribute resource, and their tessellations.
:smtk:`Session <smtk::model::Session>`
instances relate entries in a model Resource to a solid modeling kernel.
......@@ -26,7 +26,7 @@ also accessible in Python, whose instances perform the following functions:
Operators usually require the entries in the model Resource to be
updated after they are executed (in the solid modeling kernel).
Each operator implements a method to invoke its operation in the modeling kernel
and owns an attribute collection Attribute instance (its *specification*) to store
and owns an attribute resource Attribute instance (its *specification*) to store
the parameters required by the operation.
SMTK expects the primary operand of an operator (e.g., a set of edge entities
in the model resource to be swept into a face) to be model entities
......
......@@ -11,7 +11,7 @@ Sessions (1) transcribe modeling-kernel entities into SMTK’s storage and
(2) keep a list of :smtk:`Operators <Operator>` that can be used to modify the model.
As part of the transcription process, sessions track which entities have been incompletely transcribed,
allowing partial, on-demand transcription.
SMTK’s cgm and discrete session types use their respective attribute collection's
SMTK’s cgm and discrete session types use their respective attribute resource's
modeler to hold SMTK-generated universal, unique IDs (UUIDs) for each model entity;
modeling-kernel sessions may also provide a list of UUIDs in an unambiguous traversal order.
This is useful if UUIDs cannot be stored in a model file but also in the event where
......
......@@ -10,14 +10,14 @@ These subsystems are:
* The **resource** system holds a set of base classes used by the systems below to provide
basic provenance information about versions of data on disk.
Each file is a *resource*, which may hold a collection of *resource components*;
Each file is a *resource*, which may hold a resource of *resource components*;
the *resource manager* assembles resources together for processing into a simulation input.
* The **attribute** system, which provides a way to specify how information should be
organized for scientific and engineering workflows, accept that information from users,
and ensure that it is consistent with the specification.
* The **model** system, which provides geometric modeling and allows you to tie
information from the attribute collection to geometric entities (e.g., assign boundary conditions
in the attribute collection to particular boundaries on a CAD model).
information from the attribute resource to geometric entities (e.g., assign boundary conditions
in the attribute resource to particular boundaries on a CAD model).
* The **mesh** system, which can manipulate meshes of geometric models; it provides a way
to propagate simulation attribute information from model entities onto meshes.
It also provides a way to run external mesh creation tools on the model.
......@@ -25,7 +25,7 @@ These subsystems are:
constructing and executing *operators*, which create, modify and delete
resources.
* The **simulation** (also known as the **export**) system, which is a set of utilities
that lets you convert resources (e.g., attribute, model, and mesh collections) into
that lets you convert resources (e.g., attribute, model, and mesh resources) into
an input deck for a simulation using Python scripts (or C++ if you wish).
* The **view** system provides user interface functionality that is independent of any
particular operating system or platform. It serves as a layer between the resource
......
......@@ -6,12 +6,12 @@ There are two base classes holding provenance metadata:
:smtk:`Resource <smtk::resource::Resource>`
instances correspond to files and thus have a URL.
Each resource also has a UUID and a type.
Resources may also provide access to a collection of components (see below)
Resources may also provide access to a resource of components (see below)
present in the file, indexed by UUID.
:smtk:`Component <smtk::resource::Component>`
instances are meaningful subsets of data present in a resource.
An attribute collection presents its attributes as resource components.
An attribute resource presents its attributes as resource components.
Similarly, geometric model entities (vertices, edges, faces, etc.) are
components in the model subsystem.
Each component has a UUID and holds a weak reference to the resource
......@@ -20,7 +20,7 @@ There are two base classes holding provenance metadata:
In addition to these useful base classes,
:smtk:`Manager <smtk::resource::Manager>`
instances hold a collection of resources.
instances hold a resource of resources.
How the resources are related to each other is determined by your application,
but a common use is holding all of the resources related to a simulation.
......
......@@ -4,7 +4,7 @@ SMTK's Simulation System
Once you have
a model or mesh and
an attribute collection describing a simulation,
an attribute resource describing a simulation,
you are ready to create an input deck for the simulation.
One option is to have your simulation link directly to SMTK,
......@@ -22,8 +22,8 @@ text file.
The :smtk:`smtk::simulation::ExportSpec` class aggregates
all of the information you should need to write the input deck:
* an attribute collection holding simulation parameters
* an attribute collection holding locations of files involved in the export
* an attribute resource holding simulation parameters
* an attribute resource holding locations of files involved in the export
* an object that provides methods for querying the analysis grid (be it a model or mesh).
Your python export script is expected to take a single argument (an
......
......@@ -99,7 +99,7 @@ typedef smtk::shared_ptr<smtk::extension::qtSelectionManager> qtSelectionManager
namespace mesh
{
class Collection;
class Resource;
class Component;
class Interface;
class Allocator;
......@@ -278,8 +278,8 @@ typedef smtk::weak_ptr<smtk::operation::Manager> WeakManagerPtr;
namespace mesh
{
typedef smtk::shared_ptr<smtk::mesh::Collection> CollectionPtr;
typedef smtk::shared_ptr<const smtk::mesh::Collection> ConstCollectionPtr;
typedef smtk::shared_ptr<smtk::mesh::Resource> ResourcePtr;
typedef smtk::shared_ptr<const smtk::mesh::Resource> ConstResourcePtr;
typedef smtk::shared_ptr<smtk::mesh::Component> ComponentPtr;
typedef smtk::shared_ptr<smtk::mesh::Interface> InterfacePtr;
typedef smtk::shared_ptr<smtk::mesh::Allocator> AllocatorPtr;
......
......@@ -33,10 +33,10 @@ class ComponentItemDefinition;
*
* While the actual value stored is a ComponentPtr, only the UUID of the
* component and its owning resource are saved when the attribute is serialized.
* Then, when deserialized, the attribute collection's resourceManager()
* Then, when deserialized, the attribute resource's resourceManager()
* is used to recreate the pointer.
* (Thus the UUIDs are assumed to be present in the resource manager referenced
* by this item's attribute collection.)
* by this item's attribute resource.)
* If the entity is not present, the returned ComponentPtr will be null and
* no type checking of attribute values can be performed.
*/
......
......@@ -46,11 +46,11 @@ public:
// Temp structure used for copying definitions
struct CopyInfo
{
// Reference to collection that is getting modified ("to")
// Reference to resource that is getting modified ("to")
const smtk::attribute::Resource& ToResource;
// List of ValueItemDefinitions that reference expressions not currently in this collection
// List of ValueItemDefinitions that reference expressions not currently in this resource
std::queue<std::pair<std::string, smtk::attribute::ItemDefinitionPtr> > UnresolvedExpItems;
// List of RefItemDefinitions that reference types not currently in this collection
// List of RefItemDefinitions that reference types not currently in this resource
std::queue<std::pair<std::string, smtk::attribute::ItemDefinitionPtr> > UnresolvedRefItems;
CopyInfo(const smtk::attribute::ResourcePtr resource)
: ToResource(*resource)
......
......@@ -14,7 +14,7 @@
#include "smtk/model/Resource.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/Resource.h"
#include <algorithm> // for std::find and std::copy
#include <iostream>
......
......@@ -40,7 +40,7 @@ public:
std::size_t numberOfRequiredValues() const;
bool isExtensible() const;
/// associated item with collection's meshes given \a collectionid and its \a meshset
/// associated item with resource's meshes given \a resourceid and its \a meshset
bool appendValue(const smtk::mesh::MeshSet&);
bool appendValues(const smtk::mesh::MeshList&);
bool appendValues(const smtk::mesh::MeshSets&);
......
......@@ -28,8 +28,8 @@ class ResourceItemDefinition;
/**\brief Hold resources as an attribute value.
*
* An attribute whose value is a resource (such as a mesh collection,
* model manager, or even an attribute collection).
* An attribute whose value is a resource (such as a mesh resource,
* model manager, or even an attribute resource).
*/
class SMTKCORE_EXPORT ResourceItem : public ReferenceItem
{
......
......@@ -15,7 +15,7 @@
#include "smtk/attribute/Resource.h"
#include "smtk/attribute/json/jsonItem.h"
#include "smtk/common/UUID.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/Resource.h"
#include "smtk/mesh/json/jsonHandleRange.h"
......@@ -50,7 +50,7 @@ SMTKCORE_EXPORT void to_json(json& j, const smtk::attribute::MeshItemPtr& itemPt
if (itemPtr->isSet(i))
{
json value;
value["Resourceid"] = it->collection()->entity().toString();
value["Resourceid"] = it->resource()->entity().toString();
value["Val"] = it->range();
values.push_back(value);
}
......@@ -121,10 +121,10 @@ SMTKCORE_EXPORT void from_json(const json& /*j*/, smtk::attribute::MeshItemPtr&
// cid = smtk::common::UUID(resourceId);
// //convert back to a handle
// smtk::mesh::HandleRange hrange = value.at("Val");
// smtk::mesh::CollectionPtr c = modelmgr->meshes()->collection(cid);
// smtk::mesh::ResourcePtr c = modelmgr->meshes()->resource(cid);
// if (!c)
// {
// std::cerr << "Expecting a valid collection for mesh item: " << itemPtr->name() << std::endl;
// std::cerr << "Expecting a valid resource for mesh item: " << itemPtr->name() << std::endl;
// continue;
// }
// smtk::mesh::InterfacePtr interface = c->interface();
......
......@@ -81,7 +81,7 @@ SMTKCORE_EXPORT void to_json(json& j, const smtk::attribute::ResourcePtr& res)
// Process views
// First write toplevel views and then write out the non-toplevel - note that the
// attribute or view collection do care about this - the assumption
// attribute resource or views do not care about this - the assumption
// is that the designer would probably like all the toplevel views clustered together
json viewsObj = json::array();
bool isTop;
......
......@@ -12,8 +12,8 @@
#include "smtk/extension/delaunay/io/ExportDelaunayMesh.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/MeshSet.h"
#include "smtk/mesh/core/Resource.h"
#include "smtk/mesh/utility/ExtractTessellation.h"
......@@ -84,7 +84,7 @@ std::vector<Delaunay::Shape::Point> ExportDelaunayMesh::operator()(
}
std::vector<Delaunay::Shape::Point> ExportDelaunayMesh::operator()(
const smtk::model::Loop& loop, smtk::mesh::CollectionPtr& collection) const
const smtk::model::Loop& loop, smtk::mesh::ResourcePtr& resource) const
{
std::int64_t connectivityLength = -1;
std::int64_t numberOfCells = -1;
......@@ -92,7 +92,7 @@ std::vector<Delaunay::Shape::Point> ExportDelaunayMesh::operator()(
//query for all cells
smtk::mesh::utility::PreAllocatedTessellation::determineAllocationLengths(
loop, collection, connectivityLength, numberOfCells, numberOfPoints);
loop, resource, connectivityLength, numberOfCells, numberOfPoints);
std::vector<std::int64_t> conn(connectivityLength);
std::vector<float> fpoints(numberOfPoints * 3);
......@@ -102,7 +102,7 @@ std::vector<Delaunay::Shape::Point> ExportDelaunayMesh::operator()(
ftess.disableVTKStyleConnectivity(true);
ftess.disableVTKCellTypes(true);
smtk::mesh::utility::extractOrderedTessellation(loop, collection, ftess);
smtk::mesh::utility::extractOrderedTessellation(loop, resource, ftess);
std::vector<Delaunay::Shape::Point> points;
......
......@@ -13,7 +13,7 @@
#define __smtk_extension_delaunay_io_ExportDelaunayMesh_h
#include "smtk/extension/delaunay/Exports.h"
//forward declarers for Manager and Collection
//forward declarers for Manager and Resource
#include "smtk/PublicPointerDefs.h"
namespace Delaunay
......@@ -55,9 +55,9 @@ public:
std::vector<Delaunay::Shape::Point> operator()(const smtk::model::Loop&) const;
//Export a model loop with a mesh representation stored in the given
// collection into a vector of Delaunay points.
// resource into a vector of Delaunay points.
std::vector<Delaunay::Shape::Point> operator()(
const smtk::model::Loop&, smtk::mesh::CollectionPtr&) const;
const smtk::model::Loop&, smtk::mesh::ResourcePtr&) const;
};
}
}
......
......@@ -12,8 +12,8 @@
#include "smtk/extension/delaunay/io/ImportDelaunayMesh.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/MeshSet.h"
#include "smtk/mesh/core/Resource.h"
#include "Mesh/Mesh.hh"
#include "Shape/Point.hh"
......@@ -40,16 +40,16 @@ std::size_t IndexOf(Point& point, const PointContainer& points)
}
smtk::mesh::MeshSet ImportDelaunayMesh::operator()(
const Delaunay::Mesh::Mesh& mesh, smtk::mesh::CollectionPtr collection) const
const Delaunay::Mesh::Mesh& mesh, smtk::mesh::ResourcePtr meshresource) const
{
smtk::mesh::InterfacePtr iface = collection->interface();
smtk::mesh::InterfacePtr iface = meshresource->interface();
smtk::mesh::AllocatorPtr alloc = iface->allocator();
smtk::mesh::Handle firstVertex = 0;
std::vector<double*> coordinateMemory;
if (!alloc->allocatePoints(mesh.GetVertices().size(), firstVertex, coordinateMemory))
{
return collection->createMesh(smtk::mesh::CellSet(collection, smtk::mesh::HandleRange()));
return meshresource->createMesh(smtk::mesh::CellSet(meshresource, smtk::mesh::HandleRange()));
}
std::size_t idx = 0;
......@@ -67,7 +67,7 @@ smtk::mesh::MeshSet ImportDelaunayMesh::operator()(
if (!alloc->allocateCells(smtk::mesh::Triangle, mesh.GetTriangles().size(),
smtk::mesh::verticesPerCell(smtk::mesh::Triangle), createdCellIds, connectivity))
{
return collection->createMesh(smtk::mesh::CellSet(collection, smtk::mesh::HandleRange()));
return meshresource->createMesh(smtk::mesh::CellSet(meshresource, smtk::mesh::HandleRange()));
}
idx = 0;
......@@ -81,7 +81,7 @@ smtk::mesh::MeshSet ImportDelaunayMesh::operator()(
alloc->connectivityModified(
createdCellIds, smtk::mesh::verticesPerCell(smtk::mesh::Triangle), connectivity);
return collection->createMesh(smtk::mesh::CellSet(collection, createdCellIds));
return meshresource->createMesh(smtk::mesh::CellSet(meshresource, createdCellIds));
}
bool ImportDelaunayMesh::operator()(
......
......@@ -13,7 +13,7 @@
#define __smtk_extension_delaunay_io_ImportDelaunayMesh_h
#include "smtk/extension/delaunay/Exports.h"
//forward declarers for Manager and Collection
//forward declarers for Manager and Meshresource
#include "smtk/PublicPointerDefs.h"
namespace Delaunay
......@@ -61,8 +61,8 @@ public:
ImportDelaunayMesh(const ImportDelaunayMesh&) = delete;
ImportDelaunayMesh& operator=(const ImportDelaunayMesh&) = delete;
//Import a Delaunay mesh into an existing collection.
smtk::mesh::MeshSet operator()(const Delaunay::Mesh::Mesh&, smtk::mesh::CollectionPtr) const;
//Import a Delaunay mesh into an existing meshresource.
smtk::mesh::MeshSet operator()(const Delaunay::Mesh::Mesh&, smtk::mesh::ResourcePtr) const;
//Import a Delaunay mesh as a tessellation for an entity.
bool operator()(const Delaunay::Mesh::Mesh&, smtk::model::EntityRef&) const;
......
......@@ -18,7 +18,7 @@
#include "smtk/extension/delaunay/io/ExportDelaunayMesh.h"
#include "smtk/extension/delaunay/io/ImportDelaunayMesh.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/Resource.h"
#include "smtk/model/Face.h"
#include "smtk/model/FaceUse.h"
......
......@@ -19,7 +19,7 @@
#include "smtk/extension/delaunay/io/ExportDelaunayMesh.h"
#include "smtk/extension/delaunay/io/ImportDelaunayMesh.h"
#include "smtk/mesh/core/Collection.h"
#include "smtk/mesh/core/Resource.h"
#include "smtk/model/Face.h"
#include "smtk/model/FaceUse.h"
......@@ -76,12 +76,12 @@ TriangulateFaces::Result TriangulateFaces::operateInternal()
bool validatePolygons = this->parameters()->findVoid("validate polygons")->isEnabled();
// construct a collection and associate it with the face's model
// construct a meshresource and associate it with the face's model
smtk::model::Resource::Ptr resource =
std::dynamic_pointer_cast<smtk::model::Resource>(faces[0].component()->resource());
smtk::mesh::CollectionPtr collection = smtk::mesh::Collection::create();
collection->setModelResource(faces[0].resource());
collection->associateToModel(faces[0].model().entity());
smtk::mesh::ResourcePtr meshresource = smtk::mesh::Resource::create();
meshresource->setModelResource(faces[0].resource());
meshresource->associateToModel(faces[0].model().entity());
Result result = this->createResult(smtk::operation::Operation::Outcome::SUCCEEDED);
......@@ -150,20 +150,20 @@ TriangulateFaces::Result TriangulateFaces::operateInternal()
excise(p_sub, mesh);
}
// populate the collection
// populate the meshresource
smtk::extension::delaunay::io::ImportDelaunayMesh importFromDelaunayMesh;
smtk::mesh::MeshSet meshSet = importFromDelaunayMesh(mesh, collection);
smtk::mesh::MeshSet meshSet = importFromDelaunayMesh(mesh, meshresource);
if (!meshSet.is_empty())
{
collection->setAssociation(face, meshSet);
meshresource->setAssociation(face, meshSet);
}
meshSet.mergeCoincidentContactPoints();
smtk::attribute::ResourceItem::Ptr collectionItem = result->findResource("collection");
collectionItem->setValue(std::static_pointer_cast<smtk::resource::Resource>(collection));
smtk::attribute::ResourceItem::Ptr meshresourceItem = result->findResource("meshresource");
meshresourceItem->setValue(std::static_pointer_cast<smtk::resource::Resource>(meshresource));
// we flag the model that owns this face as modified so that a mesh
// collection for the entire model is placed in ModelBuilder's model
// meshresource for the entire model is placed in ModelBuilder's model
// tree. In the future, ModelBuilder should be able to handle meshes
// on model entities (rather than entire models).
smtk::attribute::ComponentItem::Ptr modified = result->findComponent("modified");
......
......@@ -26,8 +26,8 @@ class Session;
*
* This operation creates smtk::mesh::MeshSets associated with
* smtk::mesh::Faces using Delaunay. The MeshSets reside in the
* smtk::mesh::Collection with the same UUID as the Faces' model. If this
* collection does not yet exist during the construction of the meshes, it is
* smtk::mesh::Resource with the same UUID as the Faces' model. If this
* resource does not yet exist during the construction of the meshes, it is
* created and populated with the MeshSets.
*/
class SMTKDELAUNAYEXT_EXPORT TriangulateFaces : public smtk::operation::XMLOperation
......
......@@ -11,7 +11,7 @@
This operation creates smtk::mesh::MeshSets associated with
smtk::mesh::Faces using Delaunay. The MeshSets reside in a new
smtk::mesh::Collection associated with the faces' model. The
smtk::mesh::Resource associated with the faces' model. The
resulting triangulation is composed only of the boundary points.
</DetailedDescription>
<AssociationsDef Name="faces" NumberOfRequiredValues="1" Extensible="true">
......@@ -30,8 +30,8 @@
<include href="smtk/operation/Result.xml"/>
<AttDef Type="result(triangulate faces)" BaseType="result">
<ItemDefinitions>
<Resource Name="collection" NumberOfRequiredValues="1">
<Accepts><Resource Name="smtk::mesh::Collection"/></Accepts>
<Resource Name="meshresource" NumberOfRequiredValues="1">
<Accepts><Resource Name="smtk::mesh::Resource"/></Accepts>
</Resource>
<Component Name="mesh_created" NumberOfRequiredValues="1" Extensible="true">
<Accepts><Resource Name="smtk::model::Resource" Filter=""/></Accepts>
......