Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
aeva
graph
Commits
a1b3e753
Commit
a1b3e753
authored
Mar 17, 2022
by
David Thompson
Browse files
WIP: Broken arc implementation.
parent
ddcc8344
Changes
4
Hide whitespace changes
Inline
Side-by-side
smtk/markup/CMakeLists.txt
View file @
a1b3e753
set
(
sources
)
set
(
headers
arcs/Labels.h
queries/SelectionFootprint.h
)
set
(
operations
...
...
smtk/markup/Traits.h
View file @
a1b3e753
...
...
@@ -47,6 +47,7 @@
#include
"smtk/markup/Subset.h"
#include
"smtk/markup/SurfaceGrid.h"
#include
"smtk/markup/VolumeGrid.h"
#include
"smtk/markup/arcs/Labels.h"
#include
"smtk/markup/detail/NodeContainer.h"
#include
<tuple>
...
...
@@ -98,6 +99,8 @@ struct SMTKMARKUP_EXPORT Traits
VolumeGrid
>
;
using
ArcTypes
=
std
::
tuple
<
Labels
,
LabelSubject
>
;
/*
typedef std::tuple<ChildrenAs<CompSolid>, ChildrenAs<Solid>, ChildrenAs<Shell>, ChildrenAs<Face>,
...
...
smtk/markup/arcs/Labels.h
0 → 100644
View file @
a1b3e753
// Copyright © Kitware Inc under the [BSD-3-clause license](https://opensource.org/licenses/BSD-3-Clause).
#ifndef smtk_markup_arcs_Labels_h
#define smtk_markup_arcs_Labels_h
#include
"smtk/markup/Exports.h"
#include
"smtk/graph/arcs/Arc.h"
#include
"smtk/graph/arcs/Arcs.h"
namespace
smtk
{
namespace
markup
{
// Node types
class
Component
;
class
Label
;
// Forward declare arc types
class
Labels
;
class
LabelSubject
;
class
SMTKMARKUP_EXPORT
Labels
:
public
smtk
::
graph
::
Arcs
<
Component
,
Label
,
Labels
>
{
public:
using
InverseArcType
=
LabelSubject
;
using
smtk
::
graph
::
Arcs
<
Component
,
Label
,
Labels
>::
Arcs
;
};
class
SMTKMARKUP_EXPORT
LabelSubject
:
public
smtk
::
graph
::
Arc
<
Label
,
Component
,
LabelSubject
>
{
public:
using
InverseArcType
=
Labels
;
using
smtk
::
graph
::
Arc
<
Label
,
Component
,
LabelSubject
>::
Arc
;
};
}
// namespace markup
}
// namespace smtk
#endif // smtk_markup_arcs_Labels_h
smtk/markup/testing/cxx/TestResource.cxx
View file @
a1b3e753
...
...
@@ -38,6 +38,9 @@ int TestResource(int argc, char** argv)
nn
=
components
.
size
();
std
::
cout
<<
"Found "
<<
nn
<<
" labels
\n
"
;
// resource->connect<LabelSubject>(*label, *group);
label
->
get
<
LabelSubject
>
().
insert
(
*
group
);
auto
write
=
smtk
::
markup
::
Write
::
create
();
write
->
parameters
()
->
associations
()
->
appendValue
(
resource
);
write
->
operate
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment