14#ifdef LAGRANGE_ENABLE_LEGACY_FUNCTIONS
15 #include <lagrange/primitive/legacy/generate_rounded_plane.h>
18#include <lagrange/SurfaceMesh.h>
19#include <lagrange/primitive/PrimitiveOptions.h>
21namespace lagrange::primitive {
31 using Scalar = PrimitiveOptions::Scalar;
62 std::array<Scalar, 3>
normal = {0, 0, 1};
75 width = std::max(
width,
static_cast<Scalar
>(0));
79 (std::min(
width,
height)) /
static_cast<Scalar
>(2));
123template <
typename Scalar,
typename Index>
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
SurfaceMesh< Scalar, Index > generate_rounded_plane(RoundedPlaneOptions settings)
Generate a rounded plane mesh.
Definition generate_rounded_plane.cpp:126
Common settings shared by all primitives.
Definition PrimitiveOptions.h:28
Scalar epsilon
Numerical tolerance used for comparing Scalar values.
Definition PrimitiveOptions.h:76
Options for generating a rounded plane mesh.
Definition generate_rounded_plane.h:30
void project_to_valid_range()
Clamps all parameters to valid ranges.
Definition generate_rounded_plane.h:73
Index width_segments
Number of subdivisions along the width (X-axis).
Definition generate_rounded_plane.h:49
Index height_segments
Number of subdivisions along the height (Z-axis).
Definition generate_rounded_plane.h:53
Scalar height
Height of the plane along the Z-axis.
Definition generate_rounded_plane.h:40
Scalar width
Width of the plane along the X-axis.
Definition generate_rounded_plane.h:36
Scalar bevel_radius
Radius of the bevel/rounding applied to the plane corners.
Definition generate_rounded_plane.h:45
std::array< Scalar, 3 > normal
Unit normal vector for the plane.
Definition generate_rounded_plane.h:62
Index bevel_segments
Number of subdivisions for the bevel/rounded corners.
Definition generate_rounded_plane.h:59