29 #ifndef T8_GEOMETRY_CAD_HXX
30 #define T8_GEOMETRY_CAD_HXX
39 #include <TopoDS_Shape.hxx>
42 #include <Geom_Curve.hxx>
43 #include <Geom_Surface.hxx>
113 double *out_coords)
const;
126 double *jacobian)
const;
163 const Handle_Geom_Curve
170 const Handle_Geom_Surface
176 const TopTools_IndexedMapOfShape
182 const TopTools_IndexedMapOfShape
188 const TopTools_IndexedMapOfShape
265 const double edge_param,
const double *surface_params,
266 double *face_params)
const;
308 t8_geom_evaluate_cad_tri (
t8_cmesh_t cmesh,
t8_gloidx_t gtreeid,
const double *ref_coords,
const size_t num_coords,
309 double *out_coords)
const;
320 t8_geom_evaluate_cad_quad (
t8_cmesh_t cmesh,
t8_gloidx_t gtreeid,
const double *ref_coords,
const size_t num_coords,
321 double *out_coords)
const;
332 t8_geom_evaluate_cad_tet (
t8_cmesh_t cmesh,
t8_gloidx_t gtreeid,
const double *ref_coords,
const size_t num_coords,
333 double *out_coords)
const;
344 t8_geom_evaluate_cad_hex (
t8_cmesh_t cmesh,
t8_gloidx_t gtreeid,
const double *ref_coords,
const size_t num_coords,
345 double *out_coords)
const;
349 TopoDS_Shape cad_shape;
350 TopTools_IndexedMapOfShape cad_shape_vertex_map;
351 TopTools_IndexedMapOfShape cad_shape_edge_map;
352 TopTools_IndexedMapOfShape cad_shape_face_map;
353 TopTools_IndexedDataMapOfShapeListOfShape
354 cad_shape_vertex2edge_map;
355 TopTools_IndexedDataMapOfShapeListOfShape
356 cad_shape_edge2face_map;
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
This geometry uses OpenCASCADE CAD geometries to curve the trees to the actual shape of the underlyin...
Definition: t8_geometry_cad.hxx:50
const TopTools_IndexedMapOfShape t8_geom_get_cad_shape_vertex_map() const
Get the cad_shape_vertex2edge_map.
Definition: t8_geometry_cad.cxx:1121
int t8_geom_is_vertex_on_face(const int vertex_index, const int face_index) const
Check if a cad vertex lies on an cad face.
Definition: t8_geometry_cad.cxx:1185
const Handle_Geom_Curve t8_geom_get_cad_curve(const int index) const
Get an cad curve from the cad_shape.
Definition: t8_geometry_cad.cxx:1106
int t8_geom_is_vertex_on_edge(const int vertex_index, const int edge_index) const
Check if a cad vertex lies on an cad edge.
Definition: t8_geometry_cad.cxx:1171
const Handle_Geom_Surface t8_geom_get_cad_surface(const int index) const
Get an cad surface from the cad_shape.
Definition: t8_geometry_cad.cxx:1114
int t8_geom_is_edge_on_face(const int edge_index, const int face_index) const
Check if a cad vertex lies on an cad edge.
Definition: t8_geometry_cad.cxx:1178
void t8_geom_get_face_parametric_bounds(const int surface_index, double *bounds) const
Finds the parametric bounds of an cad face.
Definition: t8_geometry_cad.cxx:1274
const TopTools_IndexedMapOfShape t8_geom_get_cad_shape_edge_map() const
Get the cad_shape_edge2face_map.
Definition: t8_geometry_cad.cxx:1127
int t8_geom_is_surface_closed(int geometry_index, int parameter) const
Checks if a surface is closed in its U parameter or V parameter.
Definition: t8_geometry_cad.cxx:1296
int t8_geom_is_plane(const int surface_index) const
Check if a cad_surface is a plane.
Definition: t8_geometry_cad.cxx:1091
void t8_geom_get_edge_parametric_bounds(const int edge_index, double *bounds) const
Finds the parametric bounds of an cad edge.
Definition: t8_geometry_cad.cxx:1281
int t8_geom_is_edge_closed(int edge_index) const
Checks if an edge is closed in its U parameter.
Definition: t8_geometry_cad.cxx:1289
virtual void t8_geom_load_tree_data(t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
Update a possible internal data buffer for per tree data.
Definition: t8_geometry_cad.cxx:151
virtual ~t8_geometry_cad()
The destructor.
Definition: t8_geometry_cad.hxx:88
int t8_geom_get_common_face(const int edge1_index, const int edge2_index) const
Check if two cad edges share a common cad face.
Definition: t8_geometry_cad.cxx:1155
virtual void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_cad.cxx:120
void t8_geom_edge_parameter_to_face_parameters(const int edge_index, const int face_index, const int num_face_nodes, const double edge_param, const double *surface_params, double *face_params) const
Converts the parameters of an cad edge to the corresponding parameters on an cad face.
Definition: t8_geometry_cad.cxx:1221
t8_geometry_cad(int dim, std::string fileprefix, std::string name="t8_geom_cad")
Constructor of the cad geometry with a given dimension.
Definition: t8_geometry_cad.cxx:52
const gp_Pnt t8_geom_get_cad_point(const int index) const
Get an cad point from the cad_shape.
Definition: t8_geometry_cad.cxx:1099
int t8_geom_is_line(const int curve_index) const
Check if a cad_curve is a line.
Definition: t8_geometry_cad.cxx:1083
t8_geometry_type_t t8_geom_get_type() const
Get the type of this geometry.
Definition: t8_geometry_cad.hxx:98
int t8_geom_get_common_edge(const int vertex1_index, const int vertex2_index) const
Check if two cad points share a common cad edge.
Definition: t8_geometry_cad.cxx:1139
const TopTools_IndexedMapOfShape t8_geom_get_cad_shape_face_map() const
Get the cad_shape_face_map.
Definition: t8_geometry_cad.cxx:1133
void t8_geom_get_parameter_of_vertex_on_edge(const int vertex_index, const int edge_index, double *edge_param) const
Retrieves the parameter of an cad vertex on an cad edge.
Definition: t8_geometry_cad.cxx:1198
void t8_geom_get_parameters_of_vertex_on_face(const int vertex_index, const int face_index, double *face_params) const
Retrieves the parameters of an cad vertex on a cad face.
Definition: t8_geometry_cad.cxx:1208
virtual void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Maps points in the reference space .
Definition: t8_geometry_cad.cxx:95
Definition: t8_geometry_with_vertices.hxx:40
std::string name
The name of this geometry.
Definition: t8_geometry_base.hxx:183
This is the administrative header file for t8code.
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
We define here the datatypes needed for internal cmesh routines.
@ T8_GEOMETRY_TYPE_CAD
The opencascade geometry uses CAD shapes to map trees exactly to the underlying CAD model.
Definition: t8_geometry.h:47
enum t8_geometry_type t8_geometry_type_t
This enumeration contains all possible geometries.
This header provides the C interface to create a cad geometry.
Implements the inherited struct t8_geometry_with_vertices, which can be used for geometries that use ...