Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tools
frackit
Commits
bc324910
Commit
bc324910
authored
Dec 10, 2020
by
Dennis Gläser
Browse files
[python][io] register brep writer
parent
36152af3
Changes
3
Hide whitespace changes
Inline
Side-by-side
frackit/python/io/CMakeLists.txt
View file @
bc324910
install
(
FILES
brepwriter.hh
gmshwriter.hh
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/frackit/python/io
)
frackit/python/io/brepwriter.hh
0 → 100644
View file @
bc324910
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#ifndef FRACKIT_PYTHON_IO_BREP_WRITER_HH
#define FRACKIT_PYTHON_IO_BREP_WRITER_HH
#include
<pybind11/pybind11.h>
#include
<frackit/io/brepwriter.hh>
#include
<frackit/entitynetwork/entitynetwork.hh>
#include
<frackit/python/entitynetwork/traits.hh>
namespace
Frackit
::
Python
{
namespace
py
=
pybind11
;
void
registerBRepWriter
(
py
::
module
&
module
)
{
using
EntityNetwork
=
Frackit
::
EntityNetwork
<
PythonEntityNetworkTraits
>
;
py
::
class_
<
BRepWriter
>
cls
(
module
,
"BRepWriter"
);
cls
.
def
(
py
::
init
<
const
EntityNetwork
&>
());
cls
.
def
(
"write"
,
&
BRepWriter
::
write
,
"write the entity network to a .brep file"
);
}
}
// end namespace Frackit::Python
#endif
python/frackit/io/_io.cc
View file @
bc324910
...
...
@@ -17,9 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#include
<pybind11/pybind11.h>
#include
<frackit/python/io/brepwriter.hh>
#include
<frackit/python/io/gmshwriter.hh>
PYBIND11_MODULE
(
_io
,
module
)
{
Frackit
::
Python
::
registerBRepWriter
(
module
);
Frackit
::
Python
::
registerGmshWriter
<
double
>
(
module
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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