SFCGAL
Classes | Functions
Implementation details

Classes

class  SFCGAL::algorithm::BoundaryVisitor
 Compute the boundary for a Geometry. More...
 
class  SFCGAL::algorithm::SurfaceGraph
 Represents a polyhedral surface as a graph where faces are nodes and egde are graph edges. More...
 
class  SFCGAL::algorithm::ConsistentOrientationBuilder
 Make orientation consistent in a triangle set. More...
 

Functions

auto SFCGAL::algorithm::area (const Geometry &g, NoValidityCheck)
 Compute the 2D area for a Geometry. More...
 
auto SFCGAL::algorithm::signedArea (const Triangle &g)
 Compute the 2D signed area for a Triangle. More...
 
auto SFCGAL::algorithm::signedArea (const LineString &g)
 Compute the 2D signed area for a closed LineString. More...
 
auto SFCGAL::algorithm::area (const Triangle &g)
 Returns Compute the 2D area for a Triangle. More...
 
auto SFCGAL::algorithm::area (const Polygon &g)
 Returns Compute the 2D area for a Polygon. More...
 
auto SFCGAL::algorithm::area (const GeometryCollection &g)
 Returns the 2D area for a GeometryCollection. More...
 
auto SFCGAL::algorithm::area (const TriangulatedSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
auto SFCGAL::algorithm::area (const PolyhedralSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
auto SFCGAL::algorithm::area3D (const Geometry &g, NoValidityCheck)
 Returns 3D area for a Geometry. More...
 
auto SFCGAL::algorithm::area3D (const Polygon &g)
 Returns 3D area for a Polygon. More...
 
auto SFCGAL::algorithm::area3D (const GeometryCollection &g)
 Returns the 3D area for a MultiPolygon. More...
 
auto SFCGAL::algorithm::area3D (const PolyhedralSurface &g)
 Returns the 3D area for a PolyhedralSurface. More...
 
auto SFCGAL::algorithm::area3D (const Triangle &g)
 Returns the 3D area for a Triangle. More...
 
auto SFCGAL::algorithm::area3D (const TriangulatedSurface &g)
 Returns the 3D area for a TriangulatedSurface. More...
 
auto SFCGAL::algorithm::collect (const Geometry &ga, const Geometry &gb)
 Returns an aggregate of ga and gb. More...
 
template<typename GeometryIterator >
std::unique_ptr< GeometrySFCGAL::algorithm::collect (GeometryIterator begin, GeometryIterator end)
 Returns an aggregate of a list of geometries. More...
 
auto SFCGAL::algorithm::collectionHomogenize (std::unique_ptr< Geometry > coll)
 Given a geometry collection, returns the "simplest" representation of the contents. More...
 
auto SFCGAL::algorithm::isConnected (const SurfaceGraph &graph)
 test if a surface is connected, the graph should be build beforehand More...
 
auto SFCGAL::algorithm::isClosed (const SurfaceGraph &graph)
 test if a surface is closed, the graph should be build beforehand More...
 
auto SFCGAL::algorithm::covers (const Geometry &ga, const Geometry &gb)
 Cover test on 2D geometries. More...
 
template<int Dim>
bool SFCGAL::algorithm::covers (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b)
 @ More...
 
template<int Dim>
bool SFCGAL::algorithm::covers (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b)
 @ More...
 
auto SFCGAL::algorithm::difference (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Diffrence on 2D geometries. More...
 
auto SFCGAL::algorithm::difference3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Difference on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::difference (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
auto SFCGAL::algorithm::distance (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute the distance between two Geometries. More...
 
auto SFCGAL::algorithm::distancePointGeometry (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
auto SFCGAL::algorithm::distancePointPoint (const Point &gA, const Point &gB)
 distance between two Points More...
 
auto SFCGAL::algorithm::distancePointLineString (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
auto SFCGAL::algorithm::distancePointPolygon (const Point &gA, const Polygon &gB)
 distance between a Point and a Polygon More...
 
auto SFCGAL::algorithm::distancePointTriangle (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
auto SFCGAL::algorithm::distanceLineStringGeometry (const LineString &gA, const Geometry &gB)
 dispatch distance from LineString to Geometry More...
 
auto SFCGAL::algorithm::distanceLineStringLineString (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
auto SFCGAL::algorithm::distanceLineStringPolygon (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
auto SFCGAL::algorithm::distanceLineStringTriangle (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
auto SFCGAL::algorithm::distancePolygonGeometry (const Polygon &gA, const Geometry &gB)
 dispatch distance from Polygon to Geometry More...
 
auto SFCGAL::algorithm::distancePolygonPolygon (const Polygon &gA, const Polygon &gB)
 distance between two Polygons More...
 
auto SFCGAL::algorithm::distancePolygonTriangle (const Polygon &gA, const Triangle &gB)
 distance between a Polygon and a Triangle More...
 
auto SFCGAL::algorithm::distanceTriangleGeometry (const Triangle &gA, const Geometry &gB)
 dispatch distance from a Triangle to a Geometry More...
 
auto SFCGAL::algorithm::distanceGeometryCollectionToGeometry (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
auto SFCGAL::algorithm::distancePointSegment (const Point &p, const Point &a, const Point &b)
 
auto SFCGAL::algorithm::distanceSegmentSegment (const Point &a, const Point &b, const Point &c, const Point &d)
 
auto SFCGAL::algorithm::distance3D (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute distance between two 3D Geometries. More...
 
auto SFCGAL::algorithm::distancePointGeometry3D (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
auto SFCGAL::algorithm::distancePointPoint3D (const Point &gA, const Point &gB)
 distance between two Points More...
 
auto SFCGAL::algorithm::distancePointLineString3D (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
auto SFCGAL::algorithm::distancePointTriangle3D (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
auto SFCGAL::algorithm::distancePointPolygon3D (const Point &gA, const Polygon &gB)
 distance between a Point and a Triangle More...
 
auto SFCGAL::algorithm::distancePointSolid3D (const Point &gA, const Solid &gB)
 distance between a Point and a Solid More...
 
auto SFCGAL::algorithm::distanceLineStringGeometry3D (const LineString &gA, const Geometry &gB)
 dispatch distance between a LineString and a Geometry More...
 
auto SFCGAL::algorithm::distanceLineStringLineString3D (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
auto SFCGAL::algorithm::distanceLineStringTriangle3D (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
auto SFCGAL::algorithm::distanceLineStringPolygon3D (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
auto SFCGAL::algorithm::distanceLineStringSolid3D (const LineString &gA, const Solid &gB)
 distance between a LineString and a Solid More...
 
auto SFCGAL::algorithm::distanceTriangleGeometry3D (const Triangle &gA, const Geometry &gB)
 dispatch distance between a Triangle and a Geometry More...
 
auto SFCGAL::algorithm::distanceTriangleSolid3D (const Triangle &gA, const Solid &gB)
 distance between a Triangle and a Solid More...
 
auto SFCGAL::algorithm::distancePolygonGeometry3D (const Polygon &gA, const Geometry &gB)
 dispatch distance between a Polygon and a Geometry More...
 
auto SFCGAL::algorithm::distanceSolidGeometry3D (const Solid &gA, const Geometry &gB)
 dispatch distance between a Solid and a Geometry More...
 
auto SFCGAL::algorithm::distanceSolidSolid3D (const Solid &gA, const Solid &gB)
 distance between two Solids More...
 
auto SFCGAL::algorithm::distanceGeometryCollectionToGeometry3D (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
auto SFCGAL::algorithm::distancePointSegment3D (const Point &p, const Point &a, const Point &b)
 
auto SFCGAL::algorithm::distancePointTriangle3D (const Point &p, const Point &a, const Point &b, const Point &c)
 
auto SFCGAL::algorithm::distanceSegmentSegment3D (const Point &a, const Point &b, const Point &c, const Point &d)
 
auto SFCGAL::algorithm::distanceSegmentTriangle3D (const Point &sA, const Point &sB, const Point &tA, const Point &tB, const Point &tC)
 
auto SFCGAL::algorithm::distanceTriangleTriangle3D (const Triangle &gA, const Triangle &gB)
 distance between two Triangles More...
 
SFCGAL_API std::unique_ptr< GeometrySFCGAL::algorithm::extrude (const Geometry &g, Kernel::FT &dx, Kernel::FT &dy, Kernel::FT &dz, NoValidityCheck &nvc)
 Returns a Geometry equal to the specified Geometry, extruded by the specified displacement. More...
 
SFCGAL_API auto SFCGAL::algorithm::extrude (const Geometry &g, const double &dx, const double &dy, const double &dz)
 Returns a Geometry equal to the specified Geometry, extruded by the specified displacement. More...
 
auto SFCGAL::algorithm::extrude (const Geometry &g, const Kernel::Vector_3 &v)
 Returns a Geometry equal to the specified Geometry, extruded by the specified displacement vector. More...
 
auto SFCGAL::algorithm::intersection (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 2D geometries. More...
 
auto SFCGAL::algorithm::intersection3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::intersection (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
template<int Dim>
void SFCGAL::algorithm::intersection (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b, detail::GeometrySet< Dim > &)
 
auto SFCGAL::algorithm::intersects (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection test on 2D geometries. More...
 
auto SFCGAL::algorithm::intersects3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection test on 3D geometries. More...
 
template<int Dim>
bool SFCGAL::algorithm::intersects (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b)
 Intersection test on GeometrySet. More...
 
template<int Dim>
bool SFCGAL::algorithm::intersects (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b)
 Intersection test on a PrimitiveHandle. More...
 
auto SFCGAL::algorithm::selfIntersects (const LineString &l)
 Self intersection test for 2D LineString (false if only endpoint touch) More...
 
auto SFCGAL::algorithm::selfIntersects3D (const LineString &l)
 Self intersection test for 3D LineString (false if only endpoints touch) More...
 
auto SFCGAL::algorithm::selfIntersects (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D PolyhedralSurface (false if only point touch) More...
 
auto SFCGAL::algorithm::selfIntersects3D (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D PolyhedralSurface (false if only point touch) More...
 
auto SFCGAL::algorithm::selfIntersects (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D TriangulatedSurface (false if only point touch) More...
 
auto SFCGAL::algorithm::selfIntersects3D (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D TriangulatedSurface (false if only point touch) More...
 
auto SFCGAL::algorithm::minkowskiSum (const Geometry &gA, const Polygon &gB, NoValidityCheck)
 2D minkowski sum (p+q) More...
 
auto SFCGAL::algorithm::offset (const Geometry &g, const double &r, NoValidityCheck)
 [experimental]compute polygon offset More...
 
template<typename Kernel >
bool SFCGAL::algorithm::isPlane3D (const Geometry &geom, const double &toleranceAbs)
 Test if all points of a geometry lie in the same plane. More...
 
auto SFCGAL::algorithm::straightSkeleton (const Polygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false, const double &toleranceAbs=1e-8)
 build a 2D straight skeleton for a Polygon More...
 
auto SFCGAL::algorithm::straightSkeleton (const MultiPolygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false, const double &toleranceAbs=1e-8)
 build a 2D straight skeleton for a Polygon More...
 
auto SFCGAL::algorithm::tesselate (const Geometry &, NoValidityCheck)
 Tesselate a geometry: this will triangulate surfaces (including polyhedral and solid's surfaces) and keep untouched points, lines, etc. More...
 
auto SFCGAL::algorithm::union_ (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Union on 2D geometries. More...
 
auto SFCGAL::algorithm::union3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Union on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::union_ (const detail::GeometrySet< Dim > &a, const detail::GeometrySet< Dim > &b, detail::GeometrySet< Dim > &)
 
template<int Dim>
void SFCGAL::algorithm::union_ (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b, detail::GeometrySet< Dim > &)
 
auto SFCGAL::algorithm::volume (const Solid &g, NoValidityCheck)
 Computes the volume of a Solid. More...
 
SFCGAL_API sfcgal_geometry_tsfcgal_geometry_make_solid (const sfcgal_geometry_t *geom)
 Convert a PolyhedralSurface to a Solid. More...
 
auto SFCGAL::detail::algorithm::coversPoints (const Geometry &ga, const Geometry &gb)
 Pseudo cover test on 2D geometries. More...
 
auto SFCGAL::detail::algorithm::coversPoints3D (const Geometry &ga, const Geometry &gb)
 Pseudo cover test on 3D geometries. More...
 
virtual void SFCGAL::Geometry::accept (GeometryVisitor &visitor)=0
 [visitor]dispatch visitor More...
 
virtual void SFCGAL::Geometry::accept (ConstGeometryVisitor &visitor) const =0
 [visitor]dispatch visitor More...
 
template<class Archive >
void SFCGAL::Geometry::serialize (Archive &, const unsigned int)
 Serializer. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Geometry &g, TriangulatedSurface &triangulatedSurface)
 Triangulate 3D polygons in a Geometry. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Polygon &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D Polygon. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Triangle &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D Triangle (copy triangle) More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const TriangulatedSurface &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D TriangulatedSurface (copy triangles) More...
 
SFCGAL_API void SFCGAL::triangulate::opentriangulatePolygon3D (const GeometryCollection &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a 3D MultiPolygon. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const PolyhedralSurface &polyhedralSurface, TriangulatedSurface &triangulatedSurface)
 Triangulate 3D polygons in a PolyhedralSurface. More...
 
void SFCGAL::triangulate::triangulatePolygon3D (const Solid &g, TriangulatedSurface &triangulatedSurface)
 Triangulate a Solid. More...
 

Detailed Description

Function Documentation

◆ accept() [1/2]

virtual void SFCGAL::Geometry::accept ( ConstGeometryVisitor visitor) const
pure virtual

◆ accept() [2/2]

virtual void SFCGAL::Geometry::accept ( GeometryVisitor visitor)
pure virtual

◆ area() [1/6]

SFCGAL_API double SFCGAL::algorithm::area ( const Geometry g,
NoValidityCheck   
)

Compute the 2D area for a Geometry.

Warning
Z component is ignored, there is no 2D projection for 3D geometries
Precondition
g is a valid geometry
Warning
No actual validity check is done

◆ area() [2/6]

SFCGAL_API double SFCGAL::algorithm::area ( const GeometryCollection g) -> double

Returns the 2D area for a GeometryCollection.

◆ area() [3/6]

SFCGAL_API double SFCGAL::algorithm::area ( const Polygon g) -> double

Returns Compute the 2D area for a Polygon.

◆ area() [4/6]

SFCGAL_API double SFCGAL::algorithm::area ( const PolyhedralSurface g) -> double

Returns the 2D area for a TriangulatedSurface.

◆ area() [5/6]

SFCGAL_API double SFCGAL::algorithm::area ( const Triangle g) -> double

Returns Compute the 2D area for a Triangle.

◆ area() [6/6]

SFCGAL_API double SFCGAL::algorithm::area ( const TriangulatedSurface g) -> double

Returns the 2D area for a TriangulatedSurface.

◆ area3D() [1/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const Geometry g,
NoValidityCheck   
) -> double

Returns 3D area for a Geometry.


– area3D

Warning
Solid area is set to 0 (might be defined as the area of the surface)
Precondition
g is a valid geometry
Warning
No actual validity check is done

◆ area3D() [2/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const GeometryCollection g) -> double

Returns the 3D area for a MultiPolygon.

◆ area3D() [3/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const Polygon g) -> double

Returns 3D area for a Polygon.

◆ area3D() [4/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const PolyhedralSurface g) -> double

Returns the 3D area for a PolyhedralSurface.

◆ area3D() [5/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const Triangle g) -> double

Returns the 3D area for a Triangle.

◆ area3D() [6/6]

SFCGAL_API double SFCGAL::algorithm::area3D ( const TriangulatedSurface g) -> double

Returns the 3D area for a TriangulatedSurface.

◆ collect() [1/2]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::collect ( const Geometry ga,
const Geometry gb 
) -> std::unique_ptr< Geometry >

Returns an aggregate of ga and gb.

◆ collect() [2/2]

template<typename GeometryIterator >
std::unique_ptr< Geometry > SFCGAL::algorithm::collect ( GeometryIterator  begin,
GeometryIterator  end 
)

Returns an aggregate of a list of geometries.

◆ collectionHomogenize()

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::collectionHomogenize ( std::unique_ptr< Geometry coll)

Given a geometry collection, returns the "simplest" representation of the contents.

Singletons will be returned as singletons. Collections that are homogeneous will be returned as the appropriate multi-type.

Warning
Ownership is taken from the parameter

◆ covers() [1/3]

template<int Dim>
bool SFCGAL::algorithm::covers ( const detail::GeometrySet< Dim > &  a,
const detail::GeometrySet< Dim > &  b 
)

@

◆ covers() [2/3]

template<int Dim>
bool SFCGAL::algorithm::covers ( const detail::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b 
)

@

◆ covers() [3/3]

SFCGAL_API bool SFCGAL::algorithm::covers ( const Geometry ga,
const Geometry gb 
)

Cover test on 2D geometries.

Checks if gA covers gB. Force projection to z=0 if needed @

◆ coversPoints()

SFCGAL_API bool SFCGAL::detail::algorithm::coversPoints ( const Geometry ga,
const Geometry gb 
)

Pseudo cover test on 2D geometries.

Collect points of gb and tests if no points of gb is outside ga @

◆ coversPoints3D()

SFCGAL_API bool SFCGAL::detail::algorithm::coversPoints3D ( const Geometry ga,
const Geometry gb 
)

Pseudo cover test on 3D geometries.

Collect points of gb and tests if no points of gb is outside ga @

◆ difference() [1/2]

template<int Dim>
void SFCGAL::algorithm::difference ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b,
GeometrySet< Dim > &  output 
)

◆ difference() [2/2]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::difference ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Diffrence on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.

◆ difference3D()

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::difference3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Difference on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done

◆ distance()

SFCGAL_API double SFCGAL::algorithm::distance ( const Geometry gA,
const Geometry gB,
NoValidityCheck   
)

Compute the distance between two Geometries.

Precondition
gA is a valid geometry
gB is a valid geometry
Warning
No actual validity check is done

◆ distance3D()

SFCGAL_API double SFCGAL::algorithm::distance3D ( const Geometry gA,
const Geometry gB,
NoValidityCheck   
)

Compute distance between two 3D Geometries.

Precondition
gA is a valid geometry
gB is a valid geometry
Warning
No actual validity check is done

◆ distanceGeometryCollectionToGeometry()

SFCGAL_API double SFCGAL::algorithm::distanceGeometryCollectionToGeometry ( const Geometry gA,
const Geometry gB 
) -> double

dispatch distance from a collection of geometry (gA) to a Geometry (gB)

◆ distanceGeometryCollectionToGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distanceGeometryCollectionToGeometry3D ( const Geometry gA,
const Geometry gB 
) -> double

dispatch distance from a collection of geometry (gA) to a Geometry (gB)

◆ distanceLineStringGeometry()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringGeometry ( const LineString gA,
const Geometry gB 
) -> double

dispatch distance from LineString to Geometry

◆ distanceLineStringGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringGeometry3D ( const LineString gA,
const Geometry gB 
) -> double

dispatch distance between a LineString and a Geometry

◆ distanceLineStringLineString()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringLineString ( const LineString gA,
const LineString gB 
) -> double

distance between two LineStrings

◆ distanceLineStringLineString3D()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringLineString3D ( const LineString gA,
const LineString gB 
) -> double

distance between two LineStrings

◆ distanceLineStringPolygon()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringPolygon ( const LineString gA,
const Polygon gB 
) -> double

distance between a LineString and a Polygon

◆ distanceLineStringPolygon3D()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringPolygon3D ( const LineString gA,
const Polygon gB 
)

distance between a LineString and a Polygon

Todo:
same method than distancePointPolygon3D (unify if triangulate is available)

◆ distanceLineStringSolid3D()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringSolid3D ( const LineString gA,
const Solid gB 
) -> double

distance between a LineString and a Solid

◆ distanceLineStringTriangle()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringTriangle ( const LineString gA,
const Triangle gB 
) -> double

distance between a LineString and a Triangle

◆ distanceLineStringTriangle3D()

SFCGAL_API double SFCGAL::algorithm::distanceLineStringTriangle3D ( const LineString gA,
const Triangle gB 
) -> double

distance between a LineString and a Triangle

◆ distancePointGeometry()

SFCGAL_API double SFCGAL::algorithm::distancePointGeometry ( const Point gA,
const Geometry gB 
) -> double

dispatch distance from Point to Geometry

◆ distancePointGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distancePointGeometry3D ( const Point gA,
const Geometry gB 
) -> double

dispatch distance from Point to Geometry

◆ distancePointLineString()

SFCGAL_API double SFCGAL::algorithm::distancePointLineString ( const Point gA,
const LineString gB 
) -> double

distance between a Point and a LineString

◆ distancePointLineString3D()

SFCGAL_API double SFCGAL::algorithm::distancePointLineString3D ( const Point gA,
const LineString gB 
) -> double

distance between a Point and a LineString

◆ distancePointPoint()

SFCGAL_API double SFCGAL::algorithm::distancePointPoint ( const Point gA,
const Point gB 
) -> double

distance between two Points

◆ distancePointPoint3D()

SFCGAL_API double SFCGAL::algorithm::distancePointPoint3D ( const Point gA,
const Point gB 
) -> double

distance between two Points

◆ distancePointPolygon()

SFCGAL_API double SFCGAL::algorithm::distancePointPolygon ( const Point gA,
const Polygon gB 
) -> double

distance between a Point and a Polygon

◆ distancePointPolygon3D()

SFCGAL_API double SFCGAL::algorithm::distancePointPolygon3D ( const Point gA,
const Polygon gB 
) -> double

distance between a Point and a Triangle

◆ distancePointSegment()

SFCGAL_API double SFCGAL::algorithm::distancePointSegment ( const Point p,
const Point a,
const Point b 
) -> double

◆ distancePointSegment3D()

SFCGAL_API double SFCGAL::algorithm::distancePointSegment3D ( const Point p,
const Point a,
const Point b 
) -> double

◆ distancePointSolid3D()

SFCGAL_API double SFCGAL::algorithm::distancePointSolid3D ( const Point gA,
const Solid gB 
) -> double

distance between a Point and a Solid

◆ distancePointTriangle()

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle ( const Point gA,
const Triangle gB 
) -> double

distance between a Point and a Triangle

◆ distancePointTriangle3D() [1/2]

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle3D ( const Point gA,
const Triangle gB 
) -> double

distance between a Point and a Triangle

◆ distancePointTriangle3D() [2/2]

SFCGAL_API double SFCGAL::algorithm::distancePointTriangle3D ( const Point p_,
const Point a_,
const Point b_,
const Point c_ 
) -> double

◆ distancePolygonGeometry()

SFCGAL_API double SFCGAL::algorithm::distancePolygonGeometry ( const Polygon gA,
const Geometry gB 
) -> double

dispatch distance from Polygon to Geometry

◆ distancePolygonGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distancePolygonGeometry3D ( const Polygon gA,
const Geometry gB 
) -> double

dispatch distance between a Polygon and a Geometry

◆ distancePolygonPolygon()

SFCGAL_API double SFCGAL::algorithm::distancePolygonPolygon ( const Polygon gA,
const Polygon gB 
) -> double

distance between two Polygons

◆ distancePolygonTriangle()

SFCGAL_API double SFCGAL::algorithm::distancePolygonTriangle ( const Polygon gA,
const Triangle gB 
) -> double

distance between a Polygon and a Triangle

◆ distanceSegmentSegment()

SFCGAL_API double SFCGAL::algorithm::distanceSegmentSegment ( const Point a,
const Point b,
const Point c,
const Point d 
) -> double

◆ distanceSegmentSegment3D()

SFCGAL_API double SFCGAL::algorithm::distanceSegmentSegment3D ( const Point a,
const Point b,
const Point c,
const Point d 
) -> double

◆ distanceSegmentTriangle3D()

SFCGAL_API double SFCGAL::algorithm::distanceSegmentTriangle3D ( const Point sA_,
const Point sB_,
const Point tA_,
const Point tB_,
const Point tC_ 
) -> double

◆ distanceSolidGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distanceSolidGeometry3D ( const Solid gA,
const Geometry gB 
) -> double

dispatch distance between a Solid and a Geometry

◆ distanceSolidSolid3D()

SFCGAL_API double SFCGAL::algorithm::distanceSolidSolid3D ( const Solid gA,
const Solid gB 
) -> double

distance between two Solids

◆ distanceTriangleGeometry()

SFCGAL_API double SFCGAL::algorithm::distanceTriangleGeometry ( const Triangle gA,
const Geometry gB 
) -> double

dispatch distance from a Triangle to a Geometry

◆ distanceTriangleGeometry3D()

SFCGAL_API double SFCGAL::algorithm::distanceTriangleGeometry3D ( const Triangle gA,
const Geometry gB 
) -> double

dispatch distance between a Triangle and a Geometry

◆ distanceTriangleSolid3D()

SFCGAL_API double SFCGAL::algorithm::distanceTriangleSolid3D ( const Triangle gA,
const Solid gB 
) -> double

distance between a Triangle and a Solid

◆ distanceTriangleTriangle3D()

SFCGAL_API double SFCGAL::algorithm::distanceTriangleTriangle3D ( const Triangle gA,
const Triangle gB 
) -> double

distance between two Triangles

◆ extrude() [1/3]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
const double &  dx,
const double &  dy,
const double &  dz 
)

Returns a Geometry equal to the specified Geometry, extruded by the specified displacement.

Parameters
gThe specified Geometry.
dxThe component of the specified displacement in the x-direction.
dyThe component of the specified displacement in the y-direction.
dzThe component of the specified displacement in the z-direction.
Returns
A Geometry equal to g extruded by the displacement vector {dx, dy, dz}.
Precondition
g must be a valid geometry.
dx, dy and dz must all be finite.
Note
If g is such that g.isMeasured() is true, then, since there is no common expectation of the values of the measures on the returned Geometry, all measures from the result are removed.
Warning
No actual validity check is conducted.

◆ extrude() [2/3]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
const Kernel::Vector_3 &  v 
)

Returns a Geometry equal to the specified Geometry, extruded by the specified displacement vector.

Parameters
gThe specified Geometry.
vThe specified displacement vector.
Returns
A Geometry equal to g extruded by the displacement vector v.
Precondition
g must be a valid geometry.
Note
If g is such that g.isMeasured() is true, then, since there is no common expectation of the values of the measures on the returned Geometry, all measures from the result are removed.
Todo:
Improve extrude for 3D surfaces - Extrude only faces whose scalar_product(v,normal) > 0 and use Polyhedron union to get output geometries with a clean topology.

◆ extrude() [3/3]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::extrude ( const Geometry g,
Kernel::FT &  dx,
Kernel::FT &  dy,
Kernel::FT &  dz,
NoValidityCheck nvc 
)

Returns a Geometry equal to the specified Geometry, extruded by the specified displacement.

Parameters
gThe specified Geometry.
dxThe component of the specified displacement in the x-direction.
dyThe component of the specified displacement in the y-direction.
dzThe component of the specified displacement in the z-direction.
nvcA NoValidityCheck object.
Returns
A Geometry equal to g extruded by the displacement vector {dx, dy, dz}.
Precondition
g must be a valid geometry.
dx, dy and dz must all be finite.
Note
If g is such that g.isMeasured() is true, then, since there is no common expectation of the values of the measures on the returned Geometry, all measures from the result are removed.
Warning
No actual validity check is conducted.

◆ intersection() [1/3]

template<int Dim>
void SFCGAL::algorithm::intersection ( const GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b,
GeometrySet< Dim > &  output 
)

◆ intersection() [2/3]

template<int Dim>
void SFCGAL::algorithm::intersection ( const PrimitiveHandle< Dim > &  pa,
const PrimitiveHandle< Dim > &  pb,
GeometrySet< Dim > &  output 
)

◆ intersection() [3/3]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::intersection ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.

◆ intersection3D()

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::intersection3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done

◆ intersects() [1/3]

template<int Dim>
bool SFCGAL::algorithm::intersects ( const detail::GeometrySet< Dim > &  a,
const detail::GeometrySet< Dim > &  b 
)

Intersection test on GeometrySet.

◆ intersects() [2/3]

template<int Dim>
bool SFCGAL::algorithm::intersects ( const detail::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b 
)

Intersection test on a PrimitiveHandle.

◆ intersects() [3/3]

SFCGAL_API bool SFCGAL::algorithm::intersects ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection test on 2D geometries.

Force projection to z=0 if needed

Precondition
ga and gb are valid geometries
Warning
the validity is assumed, no actual check is done

◆ intersects3D()

SFCGAL_API bool SFCGAL::algorithm::intersects3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Intersection test on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
the validity is assumed, no actual check is done

◆ isClosed()

SFCGAL_API bool SFCGAL::algorithm::isClosed ( const SurfaceGraph graph)

test if a surface is closed, the graph should be build beforehand

Note
the surface may not be connected, eg. two spheres will yield a true result

◆ isConnected()

SFCGAL_API bool SFCGAL::algorithm::isConnected ( const SurfaceGraph graph) -> bool

test if a surface is connected, the graph should be build beforehand

◆ isPlane3D()

template<typename Kernel >
bool SFCGAL::algorithm::isPlane3D ( const Geometry geom,
const double &  toleranceAbs 
)

Test if all points of a geometry lie in the same plane.

◆ minkowskiSum()

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::minkowskiSum ( const Geometry gA,
const Polygon gB,
NoValidityCheck   
)

2D minkowski sum (p+q)

Warning
If gA is a polygon, its orientation is taken into account. A "reversed" polygon (with a clockwise-oriented exterior ring) will involve a minkowski difference rather than a sum.
Todo:
missing cases (union)
Precondition
gA and gB are valid geometries
Warning
@ No actual validity check is done.

◆ offset()

SFCGAL_API std::unique_ptr< MultiPolygon > SFCGAL::algorithm::offset ( const Geometry g,
const double &  r,
NoValidityCheck   
)

[experimental]compute polygon offset

Warning
test in order to compare with minkowski sum
Precondition
g is a valid Geometry
Warning
No actual validity check is done.

◆ opentriangulatePolygon3D()

SFCGAL_API void SFCGAL::triangulate::opentriangulatePolygon3D ( const GeometryCollection g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D MultiPolygon.

Todo:
unittest

◆ selfIntersects() [1/3]

bool SFCGAL::algorithm::selfIntersects ( const LineString l) -> bool

Self intersection test for 2D LineString (false if only endpoint touch)

◆ selfIntersects() [2/3]

bool SFCGAL::algorithm::selfIntersects ( const PolyhedralSurface s,
const SurfaceGraph g 
) -> bool

Self intersection test for 2D PolyhedralSurface (false if only point touch)

◆ selfIntersects() [3/3]

bool SFCGAL::algorithm::selfIntersects ( const TriangulatedSurface tin,
const SurfaceGraph g 
) -> bool

Self intersection test for 2D TriangulatedSurface (false if only point touch)

◆ selfIntersects3D() [1/3]

bool SFCGAL::algorithm::selfIntersects3D ( const LineString l) -> bool

Self intersection test for 3D LineString (false if only endpoints touch)

◆ selfIntersects3D() [2/3]

bool SFCGAL::algorithm::selfIntersects3D ( const PolyhedralSurface s,
const SurfaceGraph g 
) -> bool

Self intersection test for 3D PolyhedralSurface (false if only point touch)

◆ selfIntersects3D() [3/3]

bool SFCGAL::algorithm::selfIntersects3D ( const TriangulatedSurface tin,
const SurfaceGraph g 
) -> bool

Self intersection test for 3D TriangulatedSurface (false if only point touch)

◆ serialize()

template<class Archive >
void SFCGAL::Geometry::serialize ( Archive &  ,
const unsigned int   
)
inline

Serializer.

◆ sfcgal_geometry_make_solid()

SFCGAL_API sfcgal_geometry_t * sfcgal_geometry_make_solid ( const sfcgal_geometry_t geom)

Convert a PolyhedralSurface to a Solid.

Precondition
isValid(geom) == true
Postcondition
isValid(return) == true

◆ signedArea() [1/2]

SFCGAL_API Kernel::FT SFCGAL::algorithm::signedArea ( const LineString g) -> Kernel::FT

Compute the 2D signed area for a closed LineString.

◆ signedArea() [2/2]

SFCGAL_API Kernel::FT SFCGAL::algorithm::signedArea ( const Triangle g) -> Kernel::FT

Compute the 2D signed area for a Triangle.

◆ straightSkeleton() [1/2]

SFCGAL_API std::unique_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton ( const MultiPolygon g,
bool  autoOrientation = true,
bool  innerOnly = false,
bool  outputDistanceInM = false,
const double &  toleranceAbs = 1e-8 
)

build a 2D straight skeleton for a Polygon

Exceptions
NotImplementedExceptionIf g is a Polygon with point touching rings.

◆ straightSkeleton() [2/2]

SFCGAL_API std::unique_ptr< MultiLineString > SFCGAL::algorithm::straightSkeleton ( const Polygon g,
bool  autoOrientation = true,
bool  innerOnly = false,
bool  outputDistanceInM = false,
const double &  toleranceAbs = 1e-8 
)

build a 2D straight skeleton for a Polygon

Exceptions
NotImplementedExceptionIf g is a Polygon with point touching rings.

◆ tesselate()

SFCGAL_API std::unique_ptr< SFCGAL::Geometry > SFCGAL::algorithm::tesselate ( const Geometry ,
NoValidityCheck   
)

Tesselate a geometry: this will triangulate surfaces (including polyhedral and solid's surfaces) and keep untouched points, lines, etc.

Precondition
g is a valid geometry
Warning
No actual validity check is done.

◆ triangulatePolygon3D() [1/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Geometry g,
TriangulatedSurface triangulatedSurface 
)

Triangulate 3D polygons in a Geometry.

Parameters
ginput geometry
triangulatedSurfaceresulting TriangulatedSurface
usePolygonPlanesuse polygon plane or Triangulate in OXY plane
Todo:
unittest

◆ triangulatePolygon3D() [2/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Polygon g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D Polygon.

Todo:
unittest

◆ triangulatePolygon3D() [3/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const PolyhedralSurface polyhedralSurface,
TriangulatedSurface triangulatedSurface 
)

Triangulate 3D polygons in a PolyhedralSurface.

Todo:
unittest

◆ triangulatePolygon3D() [4/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Solid g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a Solid.

Todo:
unittest

◆ triangulatePolygon3D() [5/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const Triangle g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D Triangle (copy triangle)

Todo:
unittest

◆ triangulatePolygon3D() [6/6]

SFCGAL_API void SFCGAL::triangulate::triangulatePolygon3D ( const TriangulatedSurface g,
TriangulatedSurface triangulatedSurface 
)

Triangulate a 3D TriangulatedSurface (copy triangles)

Todo:
unittest

◆ union3D()

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::union3D ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Union on 3D geometries.

Assume z = 0 if needed

Precondition
ga and gb are valid geometries
Warning
@ No actual validity check is done

◆ union_() [1/3]

template<int Dim>
void SFCGAL::algorithm::union_ ( const detail::GeometrySet< Dim > &  a,
const detail::GeometrySet< Dim > &  b,
detail::GeometrySet< Dim > &   
)

◆ union_() [2/3]

template<int Dim>
void SFCGAL::algorithm::union_ ( const detail::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b,
detail::GeometrySet< Dim > &   
)

◆ union_() [3/3]

SFCGAL_API std::unique_ptr< Geometry > SFCGAL::algorithm::union_ ( const Geometry ga,
const Geometry gb,
NoValidityCheck   
)

Union on 2D geometries.

No validity check variant

Precondition
ga and gb are valid geometries
Warning
No actual validity check is done.

◆ volume()

SFCGAL_API const Kernel::FT SFCGAL::algorithm::volume ( const Solid g,
NoValidityCheck   
)

Computes the volume of a Solid.

Precondition
(not checked) volume is closed and consistently oriented