16#ifndef dealii_occ_utilities_h
17#define dealii_occ_utilities_h
21#ifdef DEAL_II_WITH_OPENCASCADE
33# include <IFSelect_ReturnStatus.hxx>
34# include <TopoDS_CompSolid.hxx>
35# include <TopoDS_Compound.hxx>
36# include <TopoDS_Edge.hxx>
37# include <TopoDS_Face.hxx>
38# include <TopoDS_Shape.hxx>
39# include <TopoDS_Shell.hxx>
40# include <TopoDS_Solid.hxx>
41# include <TopoDS_Vertex.hxx>
42# include <TopoDS_Wire.hxx>
109 std::tuple<unsigned int, unsigned int, unsigned int>
120 read_IGES(
const std::string &filename,
const double scale_factor = 1e-3);
126 write_IGES(
const TopoDS_Shape &shape,
const std::string &filename);
135 read_STL(
const std::string &filename);
154 const std::string &filename,
155 const double deflection,
156 const bool sew_different_faces =
false,
157 const double sewer_tolerance = 1e-6,
158 const bool is_relative =
false,
159 const double angular_deflection = 0.5,
160 const bool in_parallel =
false);
171 read_STEP(
const std::string &filename,
const double scale_factor = 1e-3);
178 write_STEP(
const TopoDS_Shape &shape,
const std::string &filename);
207 const double tolerance = 1e-7);
217 join_edges(
const TopoDS_Shape &in_shape,
const double tolerance = 1e-7);
240 const bool closed =
false,
241 const double tolerance = 1e-7);
250 std::vector<TopoDS_Face> &faces,
251 std::vector<TopoDS_Edge> &edges,
252 std::vector<TopoDS_Vertex> &vertices);
266 template <
int spacedim>
290 template <
int spacedim>
291 std::vector<TopoDS_Edge>
304 std::vector<TopoDS_Compound> &compounds,
305 std::vector<TopoDS_CompSolid> &compsolids,
306 std::vector<TopoDS_Solid> &solids,
307 std::vector<TopoDS_Shell> &shells,
308 std::vector<TopoDS_Wire> &wires);
325 std::tuple<Point<dim>, TopoDS_Shape, double,
double>
328 const double tolerance = 1e-7);
340 const double tolerance = 1e-7);
352 push_forward(
const TopoDS_Shape &in_shape,
const double u,
const double v);
364 const double tolerance = 1e-7);
377 const double tolerance = 1e-7);
392 const double tolerance = 1e-7);
402 template <
int spacedim>
404 point(
const gp_Pnt &p,
const double tolerance = 1e-10);
410 template <
int spacedim>
426 const double tolerance = 1e-10);
436 <<
"The point [ " << arg1 <<
" ] is not on the manifold.");
445 <<
"Projection of point [ " << arg1 <<
" ] failed.");
451 IFSelect_ReturnStatus,
452 <<
"An OpenCASCADE routine failed with return status "
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcPointNotOnManifold(Point< dim > arg1)
static ::ExceptionBase & ExcEdgeIsDegenerate()
static ::ExceptionBase & ExcProjectionFailed(Point< dim > arg1)
static ::ExceptionBase & ExcOCCError(IFSelect_ReturnStatus arg1)
static ::ExceptionBase & ExcUnsupportedShape()
#define DeclException1(Exception1, type1, outsequence)
TopoDS_Edge interpolation_curve(std::vector< Point< dim > > &curve_points, const Tensor< 1, dim > &direction=Tensor< 1, dim >(), const bool closed=false, const double tolerance=1e-7)
std::tuple< Point< 3 >, Tensor< 1, 3 >, double, double > push_forward_and_differential_forms(const TopoDS_Face &face, const double u, const double v, const double tolerance=1e-7)
void extract_compound_shapes(const TopoDS_Shape &shape, std::vector< TopoDS_Compound > &compounds, std::vector< TopoDS_CompSolid > &compsolids, std::vector< TopoDS_Solid > &solids, std::vector< TopoDS_Shell > &shells, std::vector< TopoDS_Wire > &wires)
Point< dim > push_forward(const TopoDS_Shape &in_shape, const double u, const double v)
std::tuple< unsigned int, unsigned int, unsigned int > count_elements(const TopoDS_Shape &shape)
void write_STEP(const TopoDS_Shape &shape, const std::string &filename)
std::tuple< Point< 3 >, Tensor< 1, 3 >, double, double > closest_point_and_differential_forms(const TopoDS_Shape &in_shape, const Point< 3 > &origin, const double tolerance=1e-7)
void extract_geometrical_shapes(const TopoDS_Shape &shape, std::vector< TopoDS_Face > &faces, std::vector< TopoDS_Edge > &edges, std::vector< TopoDS_Vertex > &vertices)
TopoDS_Edge join_edges(const TopoDS_Shape &in_shape, const double tolerance=1e-7)
TopoDS_Shape read_STEP(const std::string &filename, const double scale_factor=1e-3)
bool point_compare(const Point< dim > &p1, const Point< dim > &p2, const Tensor< 1, dim > &direction=Tensor< 1, dim >(), const double tolerance=1e-10)
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Point< dim > closest_point(const TopoDS_Shape &in_shape, const Point< dim > &origin, const double tolerance=1e-7)
std::tuple< Point< dim >, TopoDS_Shape, double, double > project_point_and_pull_back(const TopoDS_Shape &in_shape, const Point< dim > &origin, const double tolerance=1e-7)
Point< dim > line_intersection(const TopoDS_Shape &in_shape, const Point< dim > &origin, const Tensor< 1, dim > &direction, const double tolerance=1e-7)
void write_STL(const TopoDS_Shape &shape, const std::string &filename, const double deflection, const bool sew_different_faces=false, const double sewer_tolerance=1e-6, const bool is_relative=false, const double angular_deflection=0.5, const bool in_parallel=false)
void create_triangulation(const TopoDS_Face &face, Triangulation< 2, spacedim > &tria)
TopoDS_Shape read_STL(const std::string &filename)
TopoDS_Shape intersect_plane(const TopoDS_Shape &in_shape, const double c_x, const double c_y, const double c_z, const double c, const double tolerance=1e-7)
std::vector< TopoDS_Edge > create_curves_from_triangulation_boundary(const Triangulation< 2, spacedim > &triangulation, const Mapping< 2, spacedim > &mapping=StaticMappingQ1< 2, spacedim >::mapping)
double get_shape_tolerance(const TopoDS_Shape &shape)
void write_IGES(const TopoDS_Shape &shape, const std::string &filename)
TopoDS_Shape read_IGES(const std::string &filename, const double scale_factor=1e-3)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation