18 #ifndef dealii__occ_utilities_h 19 #define dealii__occ_utilities_h 21 #include <deal.II/base/config.h> 23 #ifdef DEAL_II_WITH_OPENCASCADE 25 #include <deal.II/grid/tria.h> 26 #include <deal.II/base/point.h> 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> 47 DEAL_II_NAMESPACE_OPEN
104 std_cxx11::tuple<unsigned int, unsigned int, unsigned int>
114 TopoDS_Shape
read_IGES(
const std::string &filename,
115 const double scale_factor=1e-3);
121 const std::string &filename);
130 TopoDS_Shape
read_STEP(
const std::string &filename,
131 const double scale_factor=1e-3);
138 const std::string &filename);
165 const double tolerance=1e-7);
174 TopoDS_Edge
join_edges(
const TopoDS_Shape &in_shape,
175 const double tolerance=1e-7);
196 const bool closed=
false,
197 const double tolerance=1e-7);
205 std::vector<TopoDS_Face> &faces,
206 std::vector<TopoDS_Edge> &edges,
207 std::vector<TopoDS_Vertex> &vertices);
227 std::vector<TopoDS_Compound> &compounds,
228 std::vector<TopoDS_CompSolid> &compsolids,
229 std::vector<TopoDS_Solid> &solids,
230 std::vector<TopoDS_Shell> &shells,
231 std::vector<TopoDS_Wire> &wires);
247 std_cxx11::tuple<Point<3>, TopoDS_Shape, double,
double>
250 const double tolerance=1e-7);
260 const double tolerance=1e-7);
280 std_cxx11::tuple<Point<3>,
Point<3>,
double >
284 const double tolerance=1e-7);
294 std_cxx11::tuple<Point<3>, Point<3>,
double>
296 const Point<3> &origin,
297 const double tolerance=1e-7);
308 const Point<3> &origin,
310 const double tolerance=1e-7);
316 Point<3>
point(
const gp_Pnt &p);
322 gp_Pnt
point(
const Point<3> &p);
333 const double tolerance=1e-10);
342 <<
"The point [ "<<arg1<<
" ] is not on the manifold.");
350 <<
"Projection of point [ "<< arg1
357 IFSelect_ReturnStatus,
358 <<
"An OpenCASCADE routine failed with return status " 373 DEAL_II_NAMESPACE_CLOSE
375 #endif // DEAL_II_WITH_OPENCASCADE std_cxx11::tuple< Point< 3 >, Point< 3 >, double > closest_point_and_differential_forms(const TopoDS_Shape &in_shape, const Point< 3 > &origin, const double tolerance=1e-7)
TopoDS_Shape read_IGES(const std::string &filename, const double scale_factor=1e-3)
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)
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)
std_cxx11::tuple< Point< 3 >, Point< 3 >, double > push_forward_and_differential_forms(const TopoDS_Face &face, const double u, const double v, const double tolerance=1e-7)
void write_STEP(const TopoDS_Shape &shape, const std::string &filename)
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)
DeclException1(ExcPointNotOnManifold, Point< 3 >,<<"The point [ "<< arg1<<" ] is not on the manifold.")
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)
DeclException0(ExcEdgeIsDegenerate)
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)