Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Ben Boeckel
SMTK
Commits
68b85ef5
Commit
68b85ef5
authored
Jul 26, 2020
by
Aron Helser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for compiling opencascade on msvc2019
parent
aa9e6b4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
16 deletions
+22
-16
smtk/session/opencascade/Operation.cxx
smtk/session/opencascade/Operation.cxx
+9
-9
smtk/session/opencascade/Resource.h
smtk/session/opencascade/Resource.h
+10
-4
smtk/session/opencascade/operators/Cut.cxx
smtk/session/opencascade/operators/Cut.cxx
+2
-2
smtk/session/opencascade/queries/SelectionFootprint.h
smtk/session/opencascade/queries/SelectionFootprint.h
+1
-1
No files found.
smtk/session/opencascade/Operation.cxx
View file @
68b85ef5
...
...
@@ -101,37 +101,37 @@ Shape* Operation::createNode(
switch
(
shapeType
)
{
case
TopAbs_COMPOUND
:
node
=
resource
->
create
<
Compound
>
();
node
=
resource
->
create
Shape
<
Compound
>
();
break
;
case
TopAbs_COMPSOLID
:
mark
=
false
;
node
=
resource
->
create
<
CompSolid
>
();
node
=
resource
->
create
Shape
<
CompSolid
>
();
break
;
case
TopAbs_SOLID
:
mark
=
false
;
node
=
resource
->
create
<
Solid
>
();
node
=
resource
->
create
Shape
<
Solid
>
();
break
;
case
TopAbs_SHELL
:
mark
=
false
;
node
=
resource
->
create
<
Shell
>
();
node
=
resource
->
create
Shape
<
Shell
>
();
break
;
case
TopAbs_FACE
:
node
=
resource
->
create
<
Face
>
();
node
=
resource
->
create
Shape
<
Face
>
();
break
;
case
TopAbs_WIRE
:
mark
=
false
;
node
=
resource
->
create
<
Wire
>
();
node
=
resource
->
create
Shape
<
Wire
>
();
break
;
case
TopAbs_EDGE
:
node
=
resource
->
create
<
Edge
>
();
node
=
resource
->
create
Shape
<
Edge
>
();
break
;
case
TopAbs_VERTEX
:
node
=
resource
->
create
<
Vertex
>
();
node
=
resource
->
create
Shape
<
Vertex
>
();
break
;
case
TopAbs_SHAPE
:
// fall through
default:
mark
=
false
;
node
=
resource
->
create
<
Shape
>
();
node
=
resource
->
create
Shape
<
Shape
>
();
break
;
}
std
::
string
nname
;
...
...
smtk/session/opencascade/Resource.h
View file @
68b85ef5
...
...
@@ -10,7 +10,6 @@
#ifndef smtk_session_opencascade_Resource_h
#define smtk_session_opencascade_Resource_h
/*!\file */
#include "smtk/graph/Resource.h"
#include "smtk/resource/DerivedFrom.h"
...
...
@@ -26,6 +25,7 @@ namespace smtk
{
namespace
session
{
/// OpenCASCADE session
namespace
opencascade
{
...
...
@@ -41,15 +41,16 @@ class Shape;
struct
CellBoundary
;
struct
FreeCell
;
using
GraphResource
=
smtk
::
graph
::
Resource
<
Traits
>
;
/**\brief A resource for boundary representations via OpenCASCADE.
*
*/
class
SMTKOPENCASCADESESSION_EXPORT
Resource
:
public
smtk
::
resource
::
DerivedFrom
<
Resource
,
smtk
::
g
raph
::
Resource
<
Traits
>
>
:
public
smtk
::
resource
::
DerivedFrom
<
smtk
::
session
::
opencascade
::
Resource
,
G
raphResource
>
{
public:
smtkTypeMacro
(
smtk
::
session
::
opencascade
::
Resource
);
smtkSuperclassMacro
(
smtk
::
resource
::
DerivedFrom
<
Resource
,
smtk
::
g
raph
::
Resource
<
Traits
>
>
);
smtkSuperclassMacro
(
smtk
::
resource
::
DerivedFrom
<
Resource
,
G
raphResource
>
);
smtkSharedPtrCreateMacro
(
smtk
::
resource
::
PersistentObject
);
virtual
~
Resource
()
=
default
;
...
...
@@ -62,7 +63,12 @@ public:
const
TopoDS_Compound
&
compound
()
const
{
return
m_compound
;
}
void
setCompound
(
const
TopoDS_Compound
&
compound
)
{
m_compound
=
compound
;
}
using
Superclass
::
create
;
// wrap to avoid name conflict in msvc
template
<
typename
componentT
>
smtk
::
shared_ptr
<
componentT
>
createShape
()
{
return
GraphResource
::
create
<
componentT
>
();
}
protected:
Resource
(
const
smtk
::
common
::
UUID
&
,
smtk
::
resource
::
Manager
::
Ptr
manager
=
nullptr
);
...
...
smtk/session/opencascade/operators/Cut.cxx
View file @
68b85ef5
...
...
@@ -117,7 +117,7 @@ Cut::Result Cut::operateInternal()
else
{
std
::
cerr
<<
"Grrk! unknown shape marked modified.
\n
"
;
auto
topNode
=
resource
->
create
<
Shape
>
();
auto
topNode
=
resource
->
create
Shape
<
Shape
>
();
session
->
addShape
(
topNode
->
id
(),
*
shapeIn
);
created
->
appendValue
(
topNode
);
geom
.
markModified
(
topNode
);
...
...
@@ -133,7 +133,7 @@ Cut::Result Cut::operateInternal()
std
::
size_t
ii
=
0
;
for
(
auto
&
shape
:
newShapes
)
{
auto
topNode
=
resource
->
create
<
Shape
>
();
auto
topNode
=
resource
->
create
Shape
<
Shape
>
();
session
->
addShape
(
topNode
->
id
(),
shape
);
created
->
appendValue
(
topNode
);
geom
.
markModified
(
topNode
);
...
...
smtk/session/opencascade/queries/SelectionFootprint.h
View file @
68b85ef5
...
...
@@ -29,7 +29,7 @@ namespace opencascade
/**\brief Identify b-rep components highlighted to display a selection.
*
*/
struct
SMTK
CORE
_EXPORT
SelectionFootprint
struct
SMTK
OPENCASCADESESSION
_EXPORT
SelectionFootprint
:
public
smtk
::
resource
::
query
::
DerivedFrom
<
SelectionFootprint
,
smtk
::
geometry
::
SelectionFootprint
>
{
...
...
Write
Preview
Markdown
is supported
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