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

double SFCGAL::algorithm::area (const Geometry &g, NoValidityCheck)
 Compute the 2D area for a Geometry. More...
 
Kernel::FT SFCGAL::algorithm::signedArea (const Triangle &g)
 Compute the 2D signed area for a Triangle. More...
 
Kernel::FT SFCGAL::algorithm::signedArea (const LineString &g)
 Compute the 2D signed area for a closed LineString. More...
 
double SFCGAL::algorithm::area (const Triangle &g)
 Returns Compute the 2D area for a Triangle. More...
 
double SFCGAL::algorithm::area (const Polygon &g)
 Returns Compute the 2D area for a Polygon. More...
 
double SFCGAL::algorithm::area (const GeometryCollection &g)
 Returns the 2D area for a GeometryCollection. More...
 
double SFCGAL::algorithm::area (const TriangulatedSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
double SFCGAL::algorithm::area (const PolyhedralSurface &g)
 Returns the 2D area for a TriangulatedSurface. More...
 
double SFCGAL::algorithm::area3D (const Geometry &g, NoValidityCheck)
 Returns 3D area for a Geometry. More...
 
double SFCGAL::algorithm::area3D (const Polygon &g)
 Returns 3D area for a Polygon. More...
 
double SFCGAL::algorithm::area3D (const GeometryCollection &g)
 Returns the 3D area for a MultiPolygon. More...
 
double SFCGAL::algorithm::area3D (const PolyhedralSurface &g)
 Returns the 3D area for a PolyhedralSurface. More...
 
double SFCGAL::algorithm::area3D (const Triangle &g)
 Returns the 3D area for a Triangle. More...
 
double SFCGAL::algorithm::area3D (const TriangulatedSurface &g)
 Returns the 3D area for a TriangulatedSurface. More...
 
std::unique_ptr< GeometrySFCGAL::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...
 
std::unique_ptr< GeometrySFCGAL::algorithm::collectionHomogenize (std::unique_ptr< Geometry > coll)
 Given a geometry collection, returns the "simplest" representation of the contents. More...
 
bool SFCGAL::algorithm::isConnected (const SurfaceGraph &graph)
 test if a surface is connected, the graph should be build beforehand More...
 
bool SFCGAL::algorithm::isClosed (const SurfaceGraph &graph)
 test if a surface is closed, the graph should be build beforehand More...
 
bool SFCGAL::algorithm::covers (const Geometry &ga, const Geometry &gb)
 Cover test on 2D geometries. More...
 
template<int Dim>
bool SFCGAL::algorithm::covers (const GeometrySet< Dim > &a, const GeometrySet< Dim > &b)
 
template<int Dim>
bool SFCGAL::algorithm::covers (const detail::PrimitiveHandle< Dim > &a, const detail::PrimitiveHandle< Dim > &b)
 
std::unique_ptr< GeometrySFCGAL::algorithm::difference (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Diffrence on 2D geometries. More...
 
std::unique_ptr< GeometrySFCGAL::algorithm::difference3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Difference on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::difference (const GeometrySet< Dim > &a, const GeometrySet< Dim > &b, GeometrySet< Dim > &output)
 
double SFCGAL::algorithm::distance (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute the distance between two Geometries. More...
 
double SFCGAL::algorithm::distancePointGeometry (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
double SFCGAL::algorithm::distancePointPoint (const Point &gA, const Point &gB)
 distance between two Points More...
 
double SFCGAL::algorithm::distancePointLineString (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
double SFCGAL::algorithm::distancePointPolygon (const Point &gA, const Polygon &gB)
 distance between a Point and a Polygon More...
 
double SFCGAL::algorithm::distancePointTriangle (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distanceLineStringGeometry (const LineString &gA, const Geometry &gB)
 dispatch distance from LineString to Geometry More...
 
double SFCGAL::algorithm::distanceLineStringLineString (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
double SFCGAL::algorithm::distanceLineStringPolygon (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
double SFCGAL::algorithm::distanceLineStringTriangle (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
double SFCGAL::algorithm::distancePolygonGeometry (const Polygon &gA, const Geometry &gB)
 dispatch distance from Polygon to Geometry More...
 
double SFCGAL::algorithm::distancePolygonPolygon (const Polygon &gA, const Polygon &gB)
 distance between two Polygons More...
 
double SFCGAL::algorithm::distancePolygonTriangle (const Polygon &gA, const Triangle &gB)
 distance between a Polygon and a Triangle More...
 
double SFCGAL::algorithm::distanceTriangleGeometry (const Triangle &gA, const Geometry &gB)
 dispatch distance from a Triangle to a Geometry More...
 
double SFCGAL::algorithm::distanceGeometryCollectionToGeometry (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
double SFCGAL::algorithm::distancePointSegment (const Point &p, const Point &a, const Point &b)
 
double SFCGAL::algorithm::distanceSegmentSegment (const Point &a, const Point &b, const Point &c, const Point &d)
 
double SFCGAL::algorithm::distance3D (const Geometry &gA, const Geometry &gB, NoValidityCheck)
 Compute distance between two 3D Geometries. More...
 
double SFCGAL::algorithm::distancePointGeometry3D (const Point &gA, const Geometry &gB)
 dispatch distance from Point to Geometry More...
 
double SFCGAL::algorithm::distancePointPoint3D (const Point &gA, const Point &gB)
 distance between two Points More...
 
double SFCGAL::algorithm::distancePointLineString3D (const Point &gA, const LineString &gB)
 distance between a Point and a LineString More...
 
double SFCGAL::algorithm::distancePointTriangle3D (const Point &gA, const Triangle &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distancePointPolygon3D (const Point &gA, const Polygon &gB)
 distance between a Point and a Triangle More...
 
double SFCGAL::algorithm::distancePointSolid3D (const Point &gA, const Solid &gB)
 distance between a Point and a Solid More...
 
double SFCGAL::algorithm::distanceLineStringGeometry3D (const LineString &gA, const Geometry &gB)
 dispatch distance between a LineString and a Geometry More...
 
double SFCGAL::algorithm::distanceLineStringLineString3D (const LineString &gA, const LineString &gB)
 distance between two LineStrings More...
 
double SFCGAL::algorithm::distanceLineStringTriangle3D (const LineString &gA, const Triangle &gB)
 distance between a LineString and a Triangle More...
 
double SFCGAL::algorithm::distanceLineStringPolygon3D (const LineString &gA, const Polygon &gB)
 distance between a LineString and a Polygon More...
 
double SFCGAL::algorithm::distanceLineStringSolid3D (const LineString &gA, const Solid &gB)
 distance between a LineString and a Solid More...
 
double SFCGAL::algorithm::distanceTriangleGeometry3D (const Triangle &gA, const Geometry &gB)
 dispatch distance between a Triangle and a Geometry More...
 
double SFCGAL::algorithm::distanceTriangleSolid3D (const Triangle &gA, const Solid &gB)
 distance between a Triangle and a Solid More...
 
double SFCGAL::algorithm::distancePolygonGeometry3D (const Polygon &gA, const Geometry &gB)
 dispatch distance between a Polygon and a Geometry More...
 
double SFCGAL::algorithm::distanceSolidGeometry3D (const Solid &gA, const Geometry &gB)
 dispatch distance between a Solid and a Geometry More...
 
double SFCGAL::algorithm::distanceSolidSolid3D (const Solid &gA, const Solid &gB)
 distance between two Solids More...
 
double SFCGAL::algorithm::distanceGeometryCollectionToGeometry3D (const Geometry &gA, const Geometry &gB)
 dispatch distance from a collection of geometry (gA) to a Geometry (gB) More...
 
double SFCGAL::algorithm::distancePointSegment3D (const Point &p, const Point &a, const Point &b)
 
double SFCGAL::algorithm::distancePointTriangle3D (const Point &p_, const Point &a_, const Point &b_, const Point &c_)
 
double SFCGAL::algorithm::distanceSegmentSegment3D (const Point &a, const Point &b, const Point &c, const Point &d)
 
double SFCGAL::algorithm::distanceSegmentTriangle3D (const Point &sA_, const Point &sB_, const Point &tA_, const Point &tB_, const Point &tC_)
 
double SFCGAL::algorithm::distanceTriangleTriangle3D (const Triangle &gA, const Triangle &gB)
 distance between two Triangles More...
 
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 std::unique_ptr< GeometrySFCGAL::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...
 
std::unique_ptr< GeometrySFCGAL::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...
 
std::unique_ptr< GeometrySFCGAL::algorithm::intersection (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 2D geometries. More...
 
std::unique_ptr< GeometrySFCGAL::algorithm::intersection3D (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection on 3D geometries. More...
 
template<int Dim>
void SFCGAL::algorithm::intersection (const GeometrySet< Dim > &a, const GeometrySet< Dim > &b, GeometrySet< Dim > &output)
 
template<int Dim>
void SFCGAL::algorithm::intersection (const PrimitiveHandle< Dim > &pa, const PrimitiveHandle< Dim > &pb, GeometrySet< Dim > &output)
 
bool SFCGAL::algorithm::intersects (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Intersection test on 2D geometries. More...
 
bool 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...
 
bool SFCGAL::algorithm::selfIntersects (const LineString &l)
 Self intersection test for 2D LineString (false if only endpoint touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const LineString &l)
 Self intersection test for 3D LineString (false if only endpoints touch) More...
 
bool SFCGAL::algorithm::selfIntersects (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D PolyhedralSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const PolyhedralSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D PolyhedralSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 2D TriangulatedSurface (false if only point touch) More...
 
bool SFCGAL::algorithm::selfIntersects3D (const TriangulatedSurface &s, const SurfaceGraph &g)
 Self intersection test for 3D TriangulatedSurface (false if only point touch) More...
 
std::unique_ptr< GeometrySFCGAL::algorithm::minkowskiSum (const Geometry &gA, const Polygon &gB, NoValidityCheck)
 2D minkowski sum (p+q) More...
 
std::unique_ptr< MultiPolygonSFCGAL::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...
 
std::unique_ptr< MultiLineStringSFCGAL::algorithm::straightSkeleton (const Polygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false)
 build a 2D straight skeleton for a Polygon More...
 
std::unique_ptr< MultiLineStringSFCGAL::algorithm::straightSkeleton (const MultiPolygon &g, bool autoOrientation=true, bool innerOnly=false, bool outputDistanceInM=false)
 build a 2D straight skeleton for a Polygon More...
 
std::unique_ptr< GeometrySFCGAL::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...
 
std::unique_ptr< GeometrySFCGAL::algorithm::union_ (const Geometry &ga, const Geometry &gb, NoValidityCheck)
 Union on 2D geometries. More...
 
std::unique_ptr< GeometrySFCGAL::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 > &)
 
const Kernel::FT 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...
 
bool SFCGAL::detail::algorithm::coversPoints (const Geometry &ga, const Geometry &gb)
 Pseudo cover test on 2D geometries. More...
 
bool 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)

Returns the 2D area for a GeometryCollection.

◆ area() [3/6]

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

Returns Compute the 2D area for a Polygon.

◆ area() [4/6]

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

Returns the 2D area for a TriangulatedSurface.

◆ area() [5/6]

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

Returns Compute the 2D area for a Triangle.

◆ area() [6/6]

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

Returns the 2D area for a TriangulatedSurface.

◆ area3D() [1/6]

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

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)

Returns the 3D area for a MultiPolygon.

◆ area3D() [3/6]

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

Returns 3D area for a Polygon.

◆ area3D() [4/6]

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

Returns the 3D area for a PolyhedralSurface.

◆ area3D() [5/6]

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

Returns the 3D area for a Triangle.

◆ area3D() [6/6]

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

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 
)

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::PrimitiveHandle< Dim > &  a,
const detail::PrimitiveHandle< Dim > &  b 
)

@

◆ covers() [2/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 @

◆ covers() [3/3]

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

@

◆ 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]

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.

◆ difference() [2/2]

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

◆ 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 
)

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 
)

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 
)

dispatch distance from LineString to Geometry

◆ distanceLineStringGeometry3D()

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

dispatch distance between a LineString and a Geometry

◆ distanceLineStringLineString()

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

distance between two LineStrings

◆ distanceLineStringLineString3D()

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

distance between two LineStrings

◆ distanceLineStringPolygon()

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

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 
)

distance between a LineString and a Solid

◆ distanceLineStringTriangle()

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

distance between a LineString and a Triangle

◆ distanceLineStringTriangle3D()

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

distance between a LineString and a Triangle

◆ distancePointGeometry()

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

dispatch distance from Point to Geometry

◆ distancePointGeometry3D()

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

dispatch distance from Point to Geometry

◆ distancePointLineString()

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

distance between a Point and a LineString

◆ distancePointLineString3D()

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

distance between a Point and a LineString

◆ distancePointPoint()

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

distance between two Points

◆ distancePointPoint3D()

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

distance between two Points

◆ distancePointPolygon()

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

distance between a Point and a Polygon

◆ distancePointPolygon3D()

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

distance between a Point and a Triangle

◆ distancePointSegment()

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

◆ distancePointSegment3D()

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

◆ distancePointSolid3D()

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

distance between a Point and a Solid

◆ distancePointTriangle()

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

distance between a Point and a Triangle

◆ distancePointTriangle3D() [1/2]

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

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_ 
)

◆ distancePolygonGeometry()

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

dispatch distance from Polygon to Geometry

◆ distancePolygonGeometry3D()

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

dispatch distance between a Polygon and a Geometry

◆ distancePolygonPolygon()

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

distance between two Polygons

◆ distancePolygonTriangle()

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

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 
)

◆ distanceSegmentSegment3D()

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

◆ distanceSegmentTriangle3D()

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

◆ distanceSolidGeometry3D()

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

dispatch distance between a Solid and a Geometry

◆ distanceSolidSolid3D()

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

distance between two Solids

◆ distanceTriangleGeometry()

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

dispatch distance from a Triangle to a Geometry

◆ distanceTriangleGeometry3D()

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

dispatch distance between a Triangle and a Geometry

◆ distanceTriangleSolid3D()

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

distance between a Triangle and a Solid

◆ distanceTriangleTriangle3D()

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

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]

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.

◆ intersection() [2/3]

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

◆ intersection() [3/3]

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

◆ 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 GeometrySet< Dim > &  a,
const GeometrySet< Dim > &  b 
)

Intersection test on GeometrySet.

◆ intersects() [2/3]

template<int Dim>
bool SFCGAL::algorithm::intersects ( const PrimitiveHandle< Dim > &  pa,
const PrimitiveHandle< Dim > &  pb 
)

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)

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)

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

◆ selfIntersects() [2/3]

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

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

◆ selfIntersects() [3/3]

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

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

◆ selfIntersects3D() [1/3]

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

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

◆ selfIntersects3D() [2/3]

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

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

◆ selfIntersects3D() [3/3]

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

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)

Compute the 2D signed area for a closed LineString.

◆ signedArea() [2/2]

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

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 
)

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 
)

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