Skip to content

Commit

Permalink
feat: add the MultiSolid class to the C API
Browse files Browse the repository at this point in the history
  • Loading branch information
delhomer authored and lbartoletti committed Oct 10, 2024
1 parent 5cefd25 commit 73489cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/capi/sfcgal_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "SFCGAL/MultiLineString.h"
#include "SFCGAL/MultiPoint.h"
#include "SFCGAL/MultiPolygon.h"
#include "SFCGAL/MultiSolid.h"
#include "SFCGAL/Point.h"
#include "SFCGAL/Polygon.h"
#include "SFCGAL/PolyhedralSurface.h"
Expand Down Expand Up @@ -621,6 +622,13 @@ sfcgal_multi_polygon_create() -> sfcgal_geometry_t *
return static_cast<SFCGAL::Geometry *>(new SFCGAL::MultiPolygon());)
}

extern "C" auto
sfcgal_multi_solid_create() -> sfcgal_geometry_t *
{
SFCGAL_GEOMETRY_CONVERT_CATCH_TO_ERROR(
return static_cast<SFCGAL::Geometry *>(new SFCGAL::MultiSolid());)
}

/**
* Polyhedral surface
*/
Expand Down
7 changes: 7 additions & 0 deletions src/capi/sfcgal_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ sfcgal_multi_linestring_create();
SFCGAL_API sfcgal_geometry_t *
sfcgal_multi_polygon_create();

/**
* Creates an empty MultiSolid
* @ingroup capi
*/
SFCGAL_API sfcgal_geometry_t *
sfcgal_multi_solid_create();

/**
* Creates an empty PolyhedralSurface
* @ingroup capi
Expand Down

0 comments on commit 73489cc

Please sign in to comment.