a Surface_geom consisting of a set of 3D Trimmed_surfaces
More...
#include <brep.hpp>
Public Member Functions | |
| Geom_3d (std::string file_name, Int n_div_min, Int n_div_max, double coincidence_bbox_tol, double coincidence_abs_tol, double coincidence_precision_tol, double tangency_angle_tol, double tangency_precision_tol) | |
| void | visualize (std::string format, std::string file_name, Int n_div=100, bool vis_volume=true, Mat< 3, 2 > bounds=Mat< 3 >::Ones() *Mat< 2 >::Unit(1).transpose()) |
| Writes visualization files of the geometry to help diagnose import/translation bugs. | |
| Nearest_point< dyn > | nearest_point (Mat<> point, double max_distance=huge, double distance_guess=huge) override |
Computes the point on the surface which is nearest to point within max_distance. | |
| std::vector< double > | intersections (Mat<> point0, Mat<> point1, bool high_prec=true) override |
| Computes the set of intersection points between a line and the surface. | |
| next::Sequence< const Geom_edge & > | edges () override |
| Returns a list of any geometry edges that require mesh edges to be snapped to them. | |
| next::Sequence< const Trimmed_surface & > | surfaces () |
Public Member Functions inherited from hexed::Surface_geom | |
| virtual next::Sequence< Mat< 3 > > | points () |
a Surface_geom consisting of a set of 3D Trimmed_surfaces
| hexed::brep::Geom_3d::Geom_3d | ( | std::string | file_name, |
| Int | n_div_min, | ||
| Int | n_div_max, | ||
| double | coincidence_bbox_tol, | ||
| double | coincidence_abs_tol, | ||
| double | coincidence_precision_tol, | ||
| double | tangency_angle_tol, | ||
| double | tangency_precision_tol ) |
| file_name | Name of file containing geometry. Must be in IGES format. |
| n_div_min | See Trimmed_surface::Trimmed_surface |
| n_div_max | See Trimmed_surface::Trimmed_surface |
| coincidence_bbox_tol | Tolerance for determining whether features are coincident, relative to the size of the overall bounding box. |
| coincidence_abs_tol | Absolute (dimensional) tolerance for determining coincidence. relative to the size of the overall bounding box. |
| coincidence_precision_tol | Coincidence_tolerance relative to the length of descretized edge segments. |
| tangency_angle_tol | Absolute tolerance on the angle (in radians) at which features join for determining whether they are tangent. |
| tangency_precision_tol | Tangency angle tolerance as a fraction of \(2\pi/\)n_div_max. |
|
overridevirtual |
Returns a list of any geometry edges that require mesh edges to be snapped to them.
Only used in 3D. Default implementation returns an empty sequence, but derived classes may override.
Reimplemented from hexed::Surface_geom.
|
overridevirtual |
Computes the set of intersection points between a line and the surface.
The line is defined parametrically to be the set of points \( [\text{point0}] + t [\text{point1}] \) for all \( t \in \mathbb{R} \). Returns the (potentially empty) set of \( t \) values where the line intersects the surface.
Implements hexed::Surface_geom.
|
overridevirtual |
Computes the point on the surface which is nearest to point within max_distance.
If no point is found, returns an empty Nearest_point.
| point | The point you want to find the nearest point to. |
| max_distance | Only consider points within max_distance of point. |
| distance_guess | If you have some reason to suspect the nearest point is within a certain distance of the input point, you can pass it to this parameter as a hint to possibly improve performance. |
Implements hexed::Surface_geom.
| void hexed::brep::Geom_3d::visualize | ( | std::string | format, |
| std::string | file_name, | ||
| Int | n_div = 100, | ||
| bool | vis_volume = true, | ||
| Mat< 3, 2 > | bounds = Mat< 3 >::Ones() *Mat< 2 >::Unit(1).transpose() ) |
Writes visualization files of the geometry to help diagnose import/translation bugs.
For visualization purposes, entities will be discretized with n_div segments. This is not the same as the n_div passed to the constructor, and need not be a power of 2. It should usually be much less than the n_div passed to the constructor, because visualization is more expensive than nearest-point calculations and requires less precision.
If the input file is named INPUT_FILE and the file extension of the specified visualization format is EXT, the visualization files are:
FILE_NAME_curves.EXT: Contains all bounding curves of all surfaces.FILE_NAME_surfaces.EXT: Contains all parametric surfaces (for all parameters in \( [0, 1] \times [0, 1] \)). The surfaces have a field variable "inside" which is set to 1 for all points that are inside the bounding curves and 0 for all that are outside. Pro tip: In Paraview, you can get a sense of the actual geometry by enabling opacity mapping so that the trimmed regions are transparent.FILE_NAME_distance.EXT (only if vis_volume = true): A 3D block with corners given by the columns of bounds and a field variable indicating the distance from the nearest point on the surface. This can be a good way to debug the distance calculations, assuming the geometry is correct.