1 #ifndef occ_utilities_h
2 #define occ_utilities_h
5 #include <TopoDS_Shape.hxx>
7 #include <Geom_Plane.hxx>
8 #include <Geom_Curve.hxx>
22 bool operator() (std::pair<unsigned int, double> a,std::pair<unsigned int, double> b)
const
24 return a.second<b.second;
35 TopoDS_Shape
read_IGES(std::string filename,
double scale_factor=1e-3);
43 TopoDS_Shape &out_shape,
48 const double tolerance=1e-7);
51 const double tolerance=1e-7,
52 const unsigned int max_num_edges=20);
59 const unsigned int num_transom_edges,
60 const double tolerance=1e-7);
71 dealii::Point<3> direction=dealii::Point<3>());
76 inline dealii::Point<3>
Pnt(
const gp_Pnt &p)
78 dealii::Point<3> P(p.X(), p.Y(), p.Z());
84 inline gp_Pnt
Pnt(
const dealii::Point<3> &p)
86 gp_Pnt P(p(0), p(1), p(2));
91 inline bool point_compare(
const dealii::Point<3> &p1,
const dealii::Point<3> &p2,
92 const dealii::Point<3> &direction)
94 return (p1*direction < p2*direction);
Handle_Geom_Curve interpolation_curve(std::vector< Point< 3 > > &curve_points)
dealii::Point< 3 > Pnt(const gp_Pnt &p)
Convert OpenCascade point into.
void feature_edges_detection()
TopoDS_Shape extract_transom_edges(const TopoDS_Shape &in_shape, const unsigned int num_transom_edges, const double tolerance)
We collect in this namespace all utilities which operate on OpenCascade entities which don't need cla...
TopoDS_Shape read_IGES(string filename, double scale_factor)
Read IGES files and translate.
void intersect_plane(const TopoDS_Shape &in_shape, TopoDS_Shape &out_shape, const double c_x, const double c_y, const double c_z, const double c, const double tolerance)
Perform the intersection of the.
TopoDS_Shape extract_xz_edges(const TopoDS_Shape &in_shape, const double tolerance, const unsigned int max_num_edges)
bool point_compare(const dealii::Point< 3 > &p1, const dealii::Point< 3 > &p2, const dealii::Point< 3 > &direction)
bool operator()(std::pair< unsigned int, double > a, std::pair< unsigned int, double > b) const
Handle_Geom_Curve interpolation_curve_points_sort(std::vector< Point< 3 > > &curve_points, Point< 3 > direction)