https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SplineUtils.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13
18namespace SplineUtils
19{
27std::vector<Point> circularControlPoints(const libMesh::Point & start_point,
28 const libMesh::Point & end_point,
29 const libMesh::RealVectorValue & parallel_direction,
30 const unsigned int num_cps);
31
42std::vector<Point> bSplineControlPoints(const libMesh::Point & start_point,
43 const libMesh::Point & end_point,
44 const libMesh::RealVectorValue & start_direction,
45 const libMesh::RealVectorValue & end_direction,
46 const unsigned int cps_per_half,
47 const libMesh::Real sharpness);
48
58std::vector<Point> controlPointsAlongLine(const libMesh::Point & start_point,
59 const libMesh::Point & end_point,
60 const libMesh::RealVectorValue & direction_vector,
61 const libMesh::Real sharpness,
62 const unsigned int num_cps,
63 const bool reverse_order = false);
64
74 const libMesh::Point & end_point,
75 const libMesh::RealVectorValue & direction_vector,
76 const libMesh::Real sharpness);
77
86std::pair<Point, Point> closestPoints(const libMesh::Point & point_1,
87 const libMesh::Point & point_2,
88 const libMesh::RealVectorValue & direction_1,
89 const libMesh::RealVectorValue & direction_2);
90}
Utilities useful for splines in general Reference for B-Spline implementation: https://mat....
Definition SplineUtils.h:19
std::vector< Point > bSplineControlPoints(const libMesh::Point &start_point, const libMesh::Point &end_point, const libMesh::RealVectorValue &start_direction, const libMesh::RealVectorValue &end_direction, const unsigned int cps_per_half, const libMesh::Real sharpness)
Creates control points for an open uniform BSpline.
Definition SplineUtils.C:67
libMesh::Point makeControlPoint(const libMesh::Point &start_point, const libMesh::Point &end_point, const libMesh::RealVectorValue &direction_vector, const libMesh::Real sharpness)
Creates a control point.
std::vector< Point > controlPointsAlongLine(const libMesh::Point &start_point, const libMesh::Point &end_point, const libMesh::RealVectorValue &direction_vector, const libMesh::Real sharpness, const unsigned int num_cps, const bool reverse_order=false)
Creates control points along an extrapolated line up to a certain intercept.
std::pair< Point, Point > closestPoints(const libMesh::Point &point_1, const libMesh::Point &point_2, const libMesh::RealVectorValue &direction_1, const libMesh::RealVectorValue &direction_2)
Determines the two points defining the shortest line segment between two lines in space.
std::vector< Point > circularControlPoints(const libMesh::Point &start_point, const libMesh::Point &end_point, const libMesh::RealVectorValue &parallel_direction, const unsigned int num_cps)
Creates control points for the special case of parallel lines using an interpolating circle.
Definition SplineUtils.C:19
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real