Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/geode/geometry/information.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,8 @@ namespace geode
{
[[nodiscard]] local_index_t opengeode_geometry_api position_to_index(
POSITION position );

[[nodiscard]] std::string opengeode_geometry_api position_to_string(
POSITION position );
} // namespace detail
} // namespace geode
1 change: 0 additions & 1 deletion include/geode/geometry/internal/predicates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ namespace GEO

enum SIGN
{

negative = -1,

zero = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@ namespace geode
BRepBuilder& new_brep_builder,
const ModelGenericMapping& component_mapping );

void opengeode_model_api transfer_brep_collections(
const BRep& old_brep,
const BRep& new_brep,
BRepBuilder& new_brep_builder,
const ModelUnchangedComponentMapping& unchanged_components );

void opengeode_model_api transfer_section_collections(
const Section& old_section,
const Section& new_section,
SectionBuilder& new_brep_builder,
const ModelGenericMapping& component_mapping );

void opengeode_model_api transfer_section_collections(
const Section& old_section,
const Section& new_section,
SectionBuilder& new_brep_builder,
const ModelUnchangedComponentMapping& unchanged_components );
} // namespace detail
} // namespace geode
29 changes: 29 additions & 0 deletions src/geode/geometry/information.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,34 @@ namespace geode
}
return index_it->second;
}

std::string position_to_string( POSITION position )
{
static const absl::flat_hash_map< POSITION, std::string > map = {
{ POSITION::vertex0, "vertex0" },
{ POSITION::vertex1, "vertex1" },
{ POSITION::vertex2, "vertex2" },
{ POSITION::vertex3, "vertex3" },
{ POSITION::edge0, "edge0" },
{ POSITION::edge1, "edge1" },
{ POSITION::edge2, "edge2" },
{ POSITION::facet0, "facet0" },
{ POSITION::facet1, "facet1" },
{ POSITION::facet2, "facet2" },
{ POSITION::facet3, "facet3" },
{ POSITION::edge01, "edge01" },
{ POSITION::edge02, "edge02" },
{ POSITION::edge03, "edge03" },
{ POSITION::edge12, "edge12" },
{ POSITION::edge13, "edge13" },
{ POSITION::edge23, "edge23" },
};
const auto index_it = map.find( position );
if( index_it == map.end() )
{
return "NO_LID";
}
return index_it->second;
}
} // namespace detail
} // namespace geode
Loading