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> 26 #include <deal.II/fe/mapping_q1.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
110 std::tuple<unsigned int, unsigned int, unsigned int>
120 TopoDS_Shape
read_IGES(
const std::string &filename,
121 const double scale_factor=1e-3);
127 const std::string &filename);
136 TopoDS_Shape
read_STEP(
const std::string &filename,
137 const double scale_factor=1e-3);
144 const std::string &filename);
171 const double tolerance=1e-7);
180 TopoDS_Edge
join_edges(
const TopoDS_Shape &in_shape,
181 const double tolerance=1e-7);
203 const bool closed=
false,
204 const double tolerance=1e-7);
212 std::vector<TopoDS_Face> &faces,
213 std::vector<TopoDS_Edge> &edges,
214 std::vector<TopoDS_Vertex> &vertices);
228 template <
int spacedim>
253 template <
int spacedim>
264 std::vector<TopoDS_Compound> &compounds,
265 std::vector<TopoDS_CompSolid> &compsolids,
266 std::vector<TopoDS_Solid> &solids,
267 std::vector<TopoDS_Shell> &shells,
268 std::vector<TopoDS_Wire> &wires);
285 std::tuple<Point<dim>, TopoDS_Shape, double,
double>
288 const double tolerance=1e-7);
299 const double tolerance=1e-7);
324 const double tolerance=1e-7);
337 const double tolerance=1e-7);
351 const double tolerance=1e-7);
361 template <
int spacedim>
368 template <
int spacedim>
382 const double tolerance = 1e-10);
392 <<
"The point [ "<<arg1<<
" ] is not on the manifold.");
401 <<
"Projection of point [ "<< arg1
408 IFSelect_ReturnStatus,
409 <<
"An OpenCASCADE routine failed with return status " 424 DEAL_II_NAMESPACE_CLOSE
426 #endif // DEAL_II_WITH_OPENCASCADE std::tuple< unsigned int, unsigned int, unsigned int > count_elements(const TopoDS_Shape &shape)
TopoDS_Shape read_IGES(const std::string &filename, const double scale_factor=1e-3)
Point< dim > push_forward(const TopoDS_Shape &in_shape, const double u, const double v)
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)
Point< spacedim > point(const gp_Pnt &p, const double &tolerance=1e-10)
TopoDS_Shape read_STEP(const std::string &filename, const double scale_factor=1e-3)
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)
Point< dim > line_intersection(const TopoDS_Shape &in_shape, const Point< dim > &origin, const Tensor< 1, dim > &direction, const double tolerance=1e-7)
static ::ExceptionBase & ExcOCCError(IFSelect_ReturnStatus arg1)
bool point_compare(const Point< dim > &p1, const Point< dim > &p2, const Tensor< 1, dim > &direction=Tensor< 1, dim >(), const double tolerance=1e-10)
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)
static ::ExceptionBase & ExcEdgeIsDegenerate()
void write_IGES(const TopoDS_Shape &shape, const std::string &filename)
void create_triangulation(const TopoDS_Face &face, Triangulation< 2, spacedim > &tria)
#define DeclException1(Exception1, type1, outsequence)
void write_STEP(const TopoDS_Shape &shape, const std::string &filename)
Abstract base class for mapping classes.
#define DeclException0(Exception0)
Point< dim > closest_point(const TopoDS_Shape &in_shape, const Point< dim > &origin, 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::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)
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)
std::vector< TopoDS_Edge > create_curves_from_triangulation_boundary(const Triangulation< 2, spacedim > &triangulation, const Mapping< 2, spacedim > &mapping=StaticMappingQ1< 2, spacedim >::mapping)
static ::ExceptionBase & ExcPointNotOnManifold(Point< dim > arg1)
static ::ExceptionBase & ExcProjectionFailed(Point< dim > arg1)
static ::ExceptionBase & ExcUnsupportedShape()
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)