Skip to content

Commit 24afc8d

Browse files
committed
Merge branch 'master' into feat/database
2 parents fe349c6 + e358c69 commit 24afc8d

File tree

257 files changed

+6240
-2248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+6240
-2248
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ jobs:
3333
build-windows:
3434
needs: format
3535
uses: Geode-solutions/actions/.github/workflows/ci-windows.yml@master
36+
with:
37+
directory: opengeode
38+
secrets: inherit
39+
40+
build-windows-python:
41+
needs: format
42+
uses: Geode-solutions/actions/.github/workflows/ci-windows-python.yml@master
3643
with:
3744
name: OPENGEODE
3845
directory: opengeode
3946
secrets: inherit
4047

4148
semantic-release:
42-
needs: [build-linux, build-linux-python, build-windows]
49+
needs: [build-linux, build-linux-python, build-windows, build-windows-python]
4350
uses: Geode-solutions/actions/.github/workflows/release.yml@master
4451
secrets: inherit
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Manual release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
uses: Geode-solutions/actions/.github/workflows/trigger-release.yml@master
9+
secrets: inherit

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.14)
21+
cmake_minimum_required(VERSION 3.15)
22+
23+
cmake_policy(SET CMP0091 NEW)
24+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
2225

2326
#-------------------------------------------------------------------------------
2427
# Project options
@@ -29,6 +32,7 @@ option(OPENGEODE_WITH_PYTHON "Compile Python bindings" OFF)
2932
if(OPENGEODE_WITH_PYTHON)
3033
set(PYTHON_VERSION "" CACHE STRING "Python version to use for compiling modules")
3134
endif()
35+
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
3236

3337
# Internal options
3438
option(USE_SUPERBUILD "Whether or not a superbuild should be invoked" ON)

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ OpenGeode is an open source framework for representing and manipulating geometri
3535

3636
## Ecosystem
3737

38-
| Project | Version | Description |
39-
|---------|---------|-------------|
40-
| [OpenGeode-IO] | ![OpenGeode-IO-version] | Implementation of input and output formats |
41-
| [OpenGeode-Geosciences] | ![OpenGeode-Geosciences-version] | Custom objects and algorithms tailored for Geosciences |
42-
| [OpenGeode-GeosciencesIO] | ![OpenGeode-GeosciencesIO-version] | Implementation of input and output formats for Geosciences |
43-
| [OpenGeode-ModuleTemplate] | ![OpenGeode-ModuleTemplate-version] | Template for creating your own OpenGeode modules |
44-
| [Geode] | ![Geode-version] | Open-source software for visualization, modeling and much more |
38+
| Project | Version | Description |
39+
|-----------------------------|---------------------------------------|-----------------------------------------------------------------|
40+
| [OpenGeode-IO] | ![OpenGeode-IO-version] | Implementation of input and output formats |
41+
| [OpenGeode-Geosciences] | ![OpenGeode-Geosciences-version] | Custom objects and algorithms tailored for Geosciences |
42+
| [OpenGeode-GeosciencesIO] | ![OpenGeode-GeosciencesIO-version] | Implementation of input and output formats for Geosciences |
43+
| [OpenGeode-ModuleTemplate] | ![OpenGeode-ModuleTemplate-version] | Template for creating your own OpenGeode modules |
44+
| [Geode] | ![Geode-version] | Open-source software for visualization, modeling and much more |
4545

4646
[OpenGeode-IO]: https://github.com/Geode-solutions/OpenGeode-IO
4747
[OpenGeode-IO-version]: https://img.shields.io/github/release/Geode-solutions/OpenGeode-IO.svg

bindings/python/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
from .opengeode_py_basic import *
2222
from .opengeode_py_geometry import *
2323
from .opengeode_py_mesh import *
24-
from .opengeode_py_model import *
24+
from .opengeode_py_model import *
25+
26+
OpenGeodeModel.initialize()

bindings/python/src/basic/basic.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@
2525
#include <pybind11/pybind11.h>
2626
#include <pybind11/stl.h>
2727

28+
#include <geode/basic/library.h>
29+
2830
#include "attribute.h"
2931
#include "attribute_manager.h"
32+
#include "greyscale_color.h"
3033
#include "identifier.h"
3134
#include "identifier_builder.h"
3235
#include "mapping.h"
36+
#include "rgb_color.h"
3337
#include "uuid.h"
3438

3539
namespace pybind11
@@ -57,10 +61,14 @@ PYBIND11_MODULE( opengeode_py_basic, module )
5761
module.attr( "NO_ID" ) = geode::NO_ID;
5862
module.attr( "NO_LID" ) = geode::NO_LID;
5963
module.attr( "global_epsilon" ) = geode::global_epsilon;
64+
pybind11::class_< geode::OpenGeodeBasic >( module, "OpenGeodeBasic" )
65+
.def( "initialize", &geode::OpenGeodeBasic::initialize );
6066
geode::define_uuid( module );
6167
geode::define_attributes( module );
6268
geode::define_attribute_manager( module );
6369
geode::define_mapping( module );
6470
geode::define_identifier( module );
6571
geode::define_identifier_builder( module );
72+
geode::define_rgb_color( module );
73+
geode::define_greyscale_color( module );
6674
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2019 - 2022 Geode-solutions
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*
22+
*/
23+
24+
#include <pybind11/operators.h>
25+
26+
#include <geode/basic/greyscale_color.h>
27+
28+
namespace geode
29+
{
30+
void define_greyscale_color( pybind11::module& module )
31+
{
32+
pybind11::class_< GreyscaleColor >( module, "GreyscaleColor" )
33+
.def( pybind11::init<>() )
34+
.def( pybind11::init< local_index_t >() )
35+
.def( "value", &GreyscaleColor::value )
36+
.def( "set_value", &GreyscaleColor::set_value )
37+
.def( "string", &GreyscaleColor::string )
38+
.def( pybind11::self == pybind11::self )
39+
.def( pybind11::self != pybind11::self )
40+
.def( pybind11::self + pybind11::self )
41+
.def( pybind11::self += pybind11::self );
42+
}
43+
} // namespace geode
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2019 - 2022 Geode-solutions
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*
22+
*/
23+
24+
#include <pybind11/operators.h>
25+
26+
#include <geode/basic/rgb_color.h>
27+
28+
namespace geode
29+
{
30+
void define_rgb_color( pybind11::module& module )
31+
{
32+
pybind11::class_< RGBColor >( module, "RGBColor" )
33+
.def( pybind11::init<>() )
34+
.def( pybind11::init< local_index_t, local_index_t,
35+
local_index_t >() )
36+
.def( "red", &RGBColor::red )
37+
.def( "green", &RGBColor::green )
38+
.def( "blue", &RGBColor::blue )
39+
.def( "set_red", &RGBColor::set_red )
40+
.def( "set_green", &RGBColor::set_green )
41+
.def( "set_blue", &RGBColor::set_blue )
42+
.def( "string", &RGBColor::string )
43+
.def( pybind11::self == pybind11::self )
44+
.def( pybind11::self != pybind11::self )
45+
.def( pybind11::self + pybind11::self )
46+
.def( pybind11::self += pybind11::self );
47+
}
48+
} // namespace geode

bindings/python/src/basic/uuid.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace geode
3131
{
3232
pybind11::class_< uuid >( module, "uuid" )
3333
.def( pybind11::init<>() )
34+
.def( pybind11::init< absl::string_view >() )
3435
.def( "string", &uuid::string );
3536
}
3637
} // namespace geode

bindings/python/src/geometry/bounding_box.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
const Ray< dimension >& ) const ) \
4040
& BoundingBox##dimension##D::intersects ) \
4141
.def( "min", &BoundingBox##dimension##D::min ) \
42-
.def( "max", &BoundingBox##dimension##D::max )
42+
.def( "max", &BoundingBox##dimension##D::max ) \
43+
.def( "center", &BoundingBox##dimension##D::center ) \
44+
.def( "diagonal", &BoundingBox##dimension##D::diagonal )
4345

4446
namespace geode
4547
{

0 commit comments

Comments
 (0)