17 #ifndef dealii__occ_utilities_h 18 #define dealii__occ_utilities_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_OPENCASCADE 24 #include <deal.II/grid/tria.h> 25 #include <deal.II/base/point.h> 30 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
32 #include <TopoDS_Shape.hxx> 33 #include <TopoDS_Face.hxx> 34 #include <TopoDS_Edge.hxx> 35 #include <TopoDS_Vertex.hxx> 36 #include <TopoDS_Compound.hxx> 37 #include <TopoDS_CompSolid.hxx> 38 #include <TopoDS_Solid.hxx> 39 #include <TopoDS_Shell.hxx> 40 #include <TopoDS_Wire.hxx> 41 #include <IFSelect_ReturnStatus.hxx> 44 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
48 DEAL_II_NAMESPACE_OPEN
105 std_cxx11::tuple<unsigned int, unsigned int, unsigned int>
115 TopoDS_Shape
read_IGES(
const std::string &filename,
116 const double scale_factor=1e-3);
122 const std::string &filename);
131 TopoDS_Shape
read_STEP(
const std::string &filename,
132 const double scale_factor=1e-3);
139 const std::string &filename);
166 const double tolerance=1e-7);
175 TopoDS_Edge
join_edges(
const TopoDS_Shape &in_shape,
176 const double tolerance=1e-7);
197 const bool closed=
false,
198 const double tolerance=1e-7);
206 std::vector<TopoDS_Face> &faces,
207 std::vector<TopoDS_Edge> &edges,
208 std::vector<TopoDS_Vertex> &vertices);
228 std::vector<TopoDS_Compound> &compounds,
229 std::vector<TopoDS_CompSolid> &compsolids,
230 std::vector<TopoDS_Solid> &solids,
231 std::vector<TopoDS_Shell> &shells,
232 std::vector<TopoDS_Wire> &wires);
248 std_cxx11::tuple<Point<3>, TopoDS_Shape, double,
double>
251 const double tolerance=1e-7);
261 const double tolerance=1e-7);
281 std_cxx11::tuple<Point<3>,
Tensor<1,3>, double,
double>
285 const double tolerance=1e-7);
295 std_cxx11::tuple<Point<3>,
Tensor<1,3>, double,
double>
298 const double tolerance=1e-7);
311 const double tolerance=1e-7);
334 const double tolerance=1e-10);
343 <<
"The point [ "<<arg1<<
" ] is not on the manifold.");
351 <<
"Projection of point [ "<< arg1
358 IFSelect_ReturnStatus,
359 <<
"An OpenCASCADE routine failed with return status " 374 DEAL_II_NAMESPACE_CLOSE
376 #endif // DEAL_II_WITH_OPENCASCADE TopoDS_Shape read_IGES(const std::string &filename, const double scale_factor=1e-3)
std_cxx11::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)
Point< 3 > line_intersection(const TopoDS_Shape &in_shape, const Point< 3 > &origin, const Tensor< 1, 3 > &direction, const double tolerance=1e-7)
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)
TopoDS_Shape read_STEP(const std::string &filename, const double scale_factor=1e-3)
static ::ExceptionBase & ExcProjectionFailed(Point< 3 > arg1)
static ::ExceptionBase & ExcOCCError(IFSelect_ReturnStatus arg1)
static ::ExceptionBase & ExcEdgeIsDegenerate()
Point< 3 > push_forward(const TopoDS_Shape &in_shape, const double u, const double v)
void write_IGES(const TopoDS_Shape &shape, const std::string &filename)
TopoDS_Edge interpolation_curve(std::vector< Point< 3 > > &curve_points, const Tensor< 1, 3 > &direction=Tensor< 1, 3 >(), const bool closed=false, const double tolerance=1e-7)
std_cxx11::tuple< unsigned int, unsigned int, unsigned int > count_elements(const TopoDS_Shape &shape)
#define DeclException1(Exception1, type1, outsequence)
void write_STEP(const TopoDS_Shape &shape, const std::string &filename)
static ::ExceptionBase & ExcPointNotOnManifold(Point< 3 > arg1)
#define DeclException0(Exception0)
std_cxx11::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)
std_cxx11::tuple< Point< 3 >, TopoDS_Shape, double, double > project_point_and_pull_back(const TopoDS_Shape &in_shape, const Point< 3 > &origin, const double tolerance=1e-7)
Point< 3 > closest_point(const TopoDS_Shape &in_shape, const Point< 3 > &origin, const double tolerance=1e-7)
double get_shape_tolerance(const TopoDS_Shape &shape)
TopoDS_Edge join_edges(const TopoDS_Shape &in_shape, 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)
static ::ExceptionBase & ExcUnsupportedShape()
Point< 3 > point(const gp_Pnt &p)
bool point_compare(const Point< 3 > &p1, const Point< 3 > &p2, const Tensor< 1, 3 > &direction=Tensor< 1, 3 >(), const double tolerance=1e-10)
void create_triangulation(const TopoDS_Face &face, Triangulation< 2, 3 > &tria)