Skip to content
Draft

V18 #1314

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
39756d1
wip
BenPinet Jun 8, 2026
1b18385
wip
BenPinet Jun 9, 2026
df8dc99
wip
BenPinet Jun 12, 2026
cc237e7
wip
BenPinet Jun 12, 2026
c7ecbe2
wip
BenPinet Jun 16, 2026
20de5b0
Merge branch 'next' into feat/add_uuid_to_attribute
BenPinet Jun 16, 2026
6882d5b
wip
BenPinet Jun 16, 2026
6ec0e96
wip
BenPinet Jun 17, 2026
be288e0
wip
BenPinet Jun 19, 2026
88722b2
Merge branch 'next' into feat/add_uuid_to_attribute
BenPinet Jun 19, 2026
19297f1
wip
BenPinet Jun 19, 2026
3f59771
clean
BenPinet Jun 19, 2026
f549b73
fix python
BenPinet Jun 19, 2026
a9482f0
fix tests
BenPinet Jun 19, 2026
23cfdf1
feat(Attributes): add uuid to identify attributes and remove find or …
BenPinet Jun 22, 2026
3194d1b
feat(Attribute): attribute are now identified with uuid.
BenPinet Jun 22, 2026
4a07b92
fixes for geosciences
BenPinet Jun 23, 2026
d174e81
python fixes
BenPinet Jun 23, 2026
740b3e5
fix copy
BenPinet Jun 24, 2026
fe21d43
fix vertices identifier
BenPinet Jun 25, 2026
c794ab8
fix load vertex identifier
BenPinet Jun 26, 2026
bb19da1
opengeode fixes for background
BenPinet Jun 29, 2026
8999c5e
Merge branch 'next' into feat/add_uuid_to_attribute
BenPinet Jun 30, 2026
759e9e0
Merge branch 'next' into feat/add_uuid_to_attribute
BenPinet Jul 8, 2026
d17100b
add id to scalar function
BenPinet Jul 16, 2026
a0660c1
fix compilation
BenPinet Jul 16, 2026
ca65cfd
remove uuid
BenPinet Jul 16, 2026
f33bbb3
Merge branch 'next' into feat/add_uuid_to_attribute
BenPinet Jul 16, 2026
01b9bd7
add python function
BenPinet Jul 16, 2026
d34cbee
fixes
BenPinet Jul 22, 2026
177ca3e
Merge pull request #1290 from Geode-solutions/feat/add_uuid_to_attribute
BotellaA Jul 23, 2026
aaca805
feat(Attributes): add no-value property support
BenPinet Jul 29, 2026
76633bc
add ways to save vtk files with no data value
BenPinet Jul 30, 2026
93cc080
Merge branch 'next' into v18
BenPinet Jul 31, 2026
473c5d7
Merge branch 'v18' into feat/add_no_value_property_to_attribute
BenPinet Jul 31, 2026
2852353
Merge pull request #1310 from Geode-solutions/feat/add_no_value_prope…
BotellaA Jul 31, 2026
f2ae8f8
fix(Logger): replace warn with warning
BenPinet Aug 3, 2026
e2a5918
fix(SIGN): rename signe struct
BenPinet Aug 3, 2026
e2fd4c6
Merge pull request #1312 from Geode-solutions/feat/replace_replace_wa…
BotellaA Aug 3, 2026
d869749
feat(Passkey): add explicit to passkey constructor
BenPinet Aug 4, 2026
3156d65
Merge pull request #1313 from Geode-solutions/feat/put_sign_struct_in…
BotellaA Aug 4, 2026
7ea4265
Merge branch 'v18' into feat/add_explicit_to_passkey_constructor
BenPinet Aug 5, 2026
0947b1a
Merge pull request #1315 from Geode-solutions/feat/add_explicit_to_pa…
BotellaA Aug 5, 2026
413bd88
fix(MakeTuple): remove std::make_tuple and std::make_pair
BenPinet Aug 6, 2026
9f951bd
fix compilation
BenPinet Aug 6, 2026
8a62372
fix compilation
BenPinet Aug 6, 2026
ef80955
Merge pull request #1316 from Geode-solutions/fix/remove_make_pair_an…
BotellaA Aug 11, 2026
50f874a
feat(ModelBuilders): change parameters in model builder functions
BenPinet Aug 12, 2026
5e89a6c
pierre's comments
BenPinet Aug 12, 2026
f34b8bb
Merge pull request #1317 from Geode-solutions/feat/change_input_param…
BotellaA Aug 12, 2026
a0cb368
Merge branch 'next' into v18
BenPinet Aug 13, 2026
ae8cb4e
fix(GeometricalOperationsOnMesh): update template parameter for geome…
BenPinet Aug 13, 2026
8fc2f16
Merge pull request #1319 from Geode-solutions/fix/geometrical_operati…
BotellaA Aug 13, 2026
ce495de
fix(ComponentID): change componentid class to struct
BenPinet Aug 13, 2026
ac3545f
fix python
BenPinet Aug 13, 2026
658660b
fix python
BenPinet Aug 14, 2026
31466dc
fix python
BenPinet Aug 14, 2026
b4c4a54
fix python
BenPinet Aug 14, 2026
76c6a37
fix(Segment): make segment.direction() return normalized direction
BenPinet Aug 14, 2026
938786b
pierre's comment
BenPinet Aug 14, 2026
0ee21db
fix compilation
BenPinet Aug 14, 2026
dd9f120
fix compilation
BenPinet Aug 14, 2026
64d3a19
fix test
BenPinet Aug 14, 2026
c343bf5
Merge pull request #1321 from Geode-solutions/fix/remove_segment_norm…
BotellaA Aug 14, 2026
3e012b2
Merge branch 'v18' into fix/change_ComponentID_to_struct
BenPinet Aug 14, 2026
cece204
Merge pull request #1320 from Geode-solutions/fix/change_ComponentID_…
BotellaA Aug 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 28 additions & 4 deletions bindings/python/src/basic/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,47 @@ namespace geode
std::shared_ptr< VariableAttribute< type > > >(
module, variable_name.c_str() )
.def( "set_value", &VariableAttribute< type >::set_value )
.def( "default_value", &VariableAttribute< type >::default_value );
.def(
"default_values", &VariableAttribute< type >::default_values );
const auto sparse_name = absl::StrCat( "SparseAttribute", typestr );
pybind11::class_< SparseAttribute< type >, ReadOnlyAttribute< type >,
std::shared_ptr< SparseAttribute< type > > >(
module, sparse_name.c_str() )
.def( "set_value", &SparseAttribute< type >::set_value )
.def( "default_value", &SparseAttribute< type >::default_value );
.def( "default_values", &SparseAttribute< type >::default_values );
}

template < typename type >
void python_attribute_values_class(
pybind11::module& module, const std::string& typestr )
{
const auto values_name = absl::StrCat( "AttributeValues", typestr );
pybind11::class_< AttributeValues< type > >(
module, values_name.c_str() )
.def( pybind11::init<>() )
.def_readwrite(
"default_value", &AttributeValues< type >::default_value )
.def_readwrite( "no_value", &AttributeValues< type >::no_value );
}

void define_attributes( pybind11::module& module )
{
pybind11::class_< AttributeProperties >( module, "AttributeProperties" )
.def( pybind11::init<>() )
.def( pybind11::init< bool, bool >() )
.def_readwrite( "assignable", &AttributeProperties::assignable )
.def_readwrite( "interpolable", &AttributeProperties::interpolable )
.def_readwrite(
"interpolable", &AttributeProperties::interpolable );
"transferable", &AttributeProperties::transferable );

python_attribute_values_class< bool >( module, "Bool" );
python_attribute_values_class< int >( module, "Int" );
python_attribute_values_class< unsigned int >( module, "UInt" );
python_attribute_values_class< float >( module, "Float" );
python_attribute_values_class< double >( module, "Double" );
python_attribute_values_class< std::array< double, 2 > >(
module, "ArrayDouble2" );
python_attribute_values_class< std::array< double, 3 > >(
module, "ArrayDouble3" );

pybind11::class_< AttributeBase, std::shared_ptr< AttributeBase > >(
module, "AttributeBase" )
Expand Down
80 changes: 59 additions & 21 deletions bindings/python/src/basic/attribute_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,66 @@ namespace geode
void python_attribute_class( pybind11::class_< AttributeManager >& manager,
const std::string& suffix )
{
const auto read_suffix = absl::StrCat( "find_attribute_", suffix );
manager.def(
read_suffix.c_str(), &AttributeManager::find_attribute< type > );
const auto constant_suffix =
absl::StrCat( "find_or_create_attribute_constant_", suffix );
manager.def( constant_suffix.c_str(),
const auto read_suffix =
absl::StrCat( "find_read_only_attribute_", suffix );
manager.def( read_suffix.c_str(),
&AttributeManager::find_read_only_attribute< type > );
const auto create_constant_suffix =
absl::StrCat( "create_attribute_constant_", suffix );
manager.def( create_constant_suffix.c_str(),
static_cast< geode::uuid ( AttributeManager::* )( std::string_view,
AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< ConstantAttribute,
type > ) );
manager.def( create_constant_suffix.c_str(),
static_cast< void ( AttributeManager::* )( std::string_view,
const uuid&, AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< ConstantAttribute,
type > ) );
const auto find_constant_suffix =
absl::StrCat( "find_attribute_constant_", suffix );
manager.def( find_constant_suffix.c_str(),
static_cast< std::shared_ptr< ConstantAttribute< type > > (
AttributeManager::* )( std::string_view, type ) >(
&AttributeManager::find_or_create_attribute< ConstantAttribute,
AttributeManager::* )( const geode::uuid& ) >(
&AttributeManager::find_attribute< ConstantAttribute,
type > ) );
const auto create_variable_suffix =
absl::StrCat( "create_attribute_variable_", suffix );
manager.def( create_variable_suffix.c_str(),
static_cast< geode::uuid ( AttributeManager::* )( std::string_view,
AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< VariableAttribute,
type > ) );
manager.def( create_variable_suffix.c_str(),
static_cast< void ( AttributeManager::* )( std::string_view,
const uuid&, AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< VariableAttribute,
type > ) );
const auto variable_suffix =
absl::StrCat( "find_or_create_attribute_variable_", suffix );
manager.def( variable_suffix.c_str(),
const auto find_variable_suffix =
absl::StrCat( "find_attribute_variable_", suffix );
manager.def( find_variable_suffix.c_str(),
static_cast< std::shared_ptr< VariableAttribute< type > > (
AttributeManager::* )( std::string_view, type ) >(
&AttributeManager::find_or_create_attribute< VariableAttribute,
AttributeManager::* )( const geode::uuid& ) >(
&AttributeManager::find_attribute< VariableAttribute,
type > ) );
const auto sparse_suffix =
absl::StrCat( "find_or_create_attribute_sparse_", suffix );
manager.def( sparse_suffix.c_str(),
static_cast< std::shared_ptr< SparseAttribute< type > > (
AttributeManager::* )( std::string_view, type ) >(
&AttributeManager::find_or_create_attribute< SparseAttribute,
const auto create_sparse_suffix =
absl::StrCat( "create_attribute_sparse_", suffix );
manager.def( create_sparse_suffix.c_str(),
static_cast< geode::uuid ( AttributeManager::* )( std::string_view,
AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< SparseAttribute,
type > ) );
manager.def( create_sparse_suffix.c_str(),
static_cast< void ( AttributeManager::* )( std::string_view,
const uuid&, AttributeValues< type >, AttributeProperties ) >(
&AttributeManager::create_attribute< SparseAttribute,
type > ) );
const auto find_sparse_suffix =
absl::StrCat( "find_attribute_sparse_", suffix );
manager.def( find_sparse_suffix.c_str(),
static_cast< std::shared_ptr< SparseAttribute< type > > (
AttributeManager::* )( const geode::uuid& ) >(
&AttributeManager::find_attribute< SparseAttribute, type > ) );
}

void define_attribute_manager( pybind11::module& module )
Expand All @@ -69,7 +105,7 @@ namespace geode
manager.def( pybind11::init<>() )
.def( "find_generic_attribute",
&AttributeManager::find_generic_attribute )
.def( "attribute_names", &AttributeManager::attribute_names )
.def( "attribute_ids", &AttributeManager::attribute_ids )
.def( "attribute_type", &AttributeManager::attribute_type )
.def( "attribute_exists", &AttributeManager::attribute_exists )
.def( "nb_elements", &AttributeManager::nb_elements )
Expand All @@ -80,7 +116,9 @@ namespace geode
.def( "delete_attribute", &AttributeManager::delete_attribute )
.def( "set_attribute_properties",
&AttributeManager::set_attribute_properties )
.def( "delete_elements", &AttributeManager::delete_elements );
.def( "delete_elements", &AttributeManager::delete_elements )
.def( "attribute_ids_matching_name",
&AttributeManager::attribute_ids_matching_name );
python_attribute_class< bool >( manager, "bool" );
python_attribute_class< int >( manager, "int" );
python_attribute_class< unsigned int >( manager, "uint" );
Expand Down
2 changes: 0 additions & 2 deletions bindings/python/src/geometry/basic_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
.def( pybind11::init< const Point< dimension >&, \
const Point< dimension >& >() ) \
.def( "direction", &Segment##dimension##D::direction ) \
.def( "normalized_direction", \
&Segment##dimension##D::normalized_direction ) \
.def( "barycenter", &Segment##dimension##D::barycenter ) \
.def( "length", &Segment##dimension##D::length ) \
.def( "vertices", &Segment##dimension##D::vertices ) \
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/src/geometry/sign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ namespace geode
{
module.def( "tetrahedron_volume_sign", &tetrahedron_volume_sign );
module.def( "triangle_area_sign2D",
static_cast< Sign ( * )( const Triangle2D& ) >(
static_cast< SIGN ( * )( const Triangle2D& ) >(
&triangle_area_sign ) );
module.def( "triangle_area_sign3D",
static_cast< Sign ( * )( const Triangle3D&, local_index_t ) >(
static_cast< SIGN ( * )( const Triangle3D&, local_index_t ) >(
&triangle_area_sign ) );
}
} // namespace geode
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
const auto translate_name##mesh##dimension = absl::StrCat( \
"translate_", mesh_name, std::to_string( dimension ), "D" ); \
module.def( translate_name##mesh##dimension.c_str(), \
&translate_mesh< mesh, mesh##Builder, dimension > )
&translate_mesh< mesh##dimension##D > )

#define PYTHON_RESCALE( mesh, mesh_name, dimension ) \
const auto rescale_name##mesh##dimension = absl::StrCat( \
"rescale_", mesh_name, std::to_string( dimension ), "D" ); \
module.def( rescale_name##mesh##dimension.c_str(), \
&rescale_mesh< mesh, mesh##Builder, dimension > )
&rescale_mesh< mesh##dimension##D > )

namespace geode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <geode/basic/uuid.hpp>

#include <geode/model/mixin/builder/block_collections_builder.hpp>
#include <geode/model/mixin/core/block_collection.hpp>

#define PYTHON_BLOCK_COLLECTIONS_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <geode/basic/uuid.hpp>

#include <geode/model/mixin/builder/corner_collections_builder.hpp>
#include <geode/model/mixin/core/corner_collection.hpp>

#define PYTHON_CORNER_COLLECTIONS_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <geode/mesh/builder/point_set_builder.hpp>

#include <geode/model/mixin/builder/corners_builder.hpp>
#include <geode/model/mixin/core/corner.hpp>

#define PYTHON_CORNERS_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <geode/basic/uuid.hpp>

#include <geode/model/mixin/builder/line_collections_builder.hpp>
#include <geode/model/mixin/core/line_collection.hpp>

#define PYTHON_LINE_COLLECTIONS_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
1 change: 1 addition & 0 deletions bindings/python/src/model/mixin/builder/lines_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <geode/mesh/builder/edged_curve_builder.hpp>

#include <geode/model/mixin/builder/lines_builder.hpp>
#include <geode/model/mixin/core/line.hpp>

#define PYTHON_LINES_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <geode/basic/uuid.hpp>

#include <geode/model/mixin/builder/model_boundaries_builder.hpp>
#include <geode/model/mixin/core/model_boundary.hpp>

#define PYTHON_MODEL_BOUNDARIES_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <geode/basic/uuid.hpp>

#include <geode/model/mixin/builder/surface_collections_builder.hpp>
#include <geode/model/mixin/core/surface_collection.hpp>

#define PYTHON_SURFACE_COLLECTIONS_BUILDER( dimension ) \
const auto name##dimension = \
Expand Down
7 changes: 2 additions & 5 deletions bindings/python/src/model/mixin/core/component_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ namespace geode
pybind11::class_< ComponentID >( module, "ComponentID" )
.def( pybind11::init<>() )
.def( pybind11::init< ComponentType, uuid >() )
.def( "id", static_cast< const uuid& (ComponentID::*) () const& >(
&ComponentID::id ) )
.def( "type",
static_cast< const ComponentType& (ComponentID::*) () const& >(
&ComponentID::type ) )
.def( "string", &ComponentID::string )
.def_readwrite( "type", &ComponentID::type )
.def_readwrite( "id", &ComponentID::id )
.def( pybind11::self == pybind11::self )
.def( pybind11::self != pybind11::self );
}
Expand Down
Loading
Loading