53 const GeoModel3D& geomodel3d_from,
56 geomodel3d_from_( geomodel3d_from ),
60 auto upward_point = plane_.origin +
vec3{ 0., 0., 1. };
61 vec3 v_axis_point_direction;
62 std::tie( std::ignore, v_axis_point_direction ) =
64 if( ( plane_.origin - v_axis_point_direction ).length()
65 < geomodel3d_from.epsilon() )
69 auto towards_x_point = plane_.origin +
vec3{ 1., 0., 0. };
70 std::tie( std::ignore, v_axis_point_direction ) =
73 ( plane_.origin - v_axis_point_direction ).length()
74 < geomodel3d_from.epsilon() );
76 v_axis = normalize( v_axis_point_direction - plane_.origin );
77 u_axis = cross( v_axis, plane_.normal );
83 return { dot( coord3d, u_axis ), dot( coord3d, v_axis ) };
106 const GeoModel3D& geomodel3d_from,
110 info.set_geomodel_name( geomodel3d_from_.name() +
"_projected" );
116 void copy_geomodel_3d_topology();
118 void copy_geomodel_3d_geological_informations();
120 void project_geomodel_3d_mesh_entities();
122 std::vector< vec2 > compute_projected_vertices(
123 const GeoModelMeshEntity3D& entity );
const Geometry::Plane & plane_
Builder of GeoModel2D which project a GeoModel3D onto a plane.
GeoModelBuilder2DProjection(GeoModel2D &geomodel2d, const GeoModel3D &geomodel3d_from, const Geometry::Plane &plane)
void build_geomodel(GeoModel3D &geomodel)
GeoModelBuilder2DFrom3D(GeoModel2D &geomodel2d, const GeoModel3D &geomodel3d_from, const Geometry::Plane &plane)
vec2 get_2d_coord(const vec3 &coord3d)
std::tuple< double, vec3 > RINGMESH_API point_to_plane(const Geometry::Point3D &point, const Geometry::Plane &plane)
#define ringmesh_assert(x)
const GeoModel3D & geomodel3d_from_
Base class for GeoModel2D building from GeoModel3D.
Classes to build GeoModel from various inputs.