2022-02-10 23:07:11 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2021-09-21 18:56:54 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct CurveEval;
|
2022-01-24 11:16:06 +01:00
|
|
|
struct Mesh;
|
2021-09-21 18:56:54 +02:00
|
|
|
|
|
|
|
/** \file
|
2021-10-06 02:37:50 +02:00
|
|
|
* \ingroup bke
|
2021-09-21 18:56:54 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace blender::bke {
|
|
|
|
|
2021-12-07 07:19:15 +01:00
|
|
|
/**
|
|
|
|
* Extrude all splines in the profile curve along the path of every spline in the curve input.
|
|
|
|
* Transfer curve attributes to the mesh.
|
|
|
|
*
|
|
|
|
* \note Normal calculation is by far the slowest part of calculations relating to the result mesh.
|
|
|
|
* Although it would be a sensible decision to use the better topology information available while
|
|
|
|
* generating the mesh to also generate the normals, that work may wasted if the output mesh is
|
|
|
|
* changed anyway in a way that affects the normals. So currently this code uses the safer /
|
|
|
|
* simpler solution of deferring normal calculation to the rest of Blender.
|
|
|
|
*/
|
2021-10-25 16:10:44 +02:00
|
|
|
Mesh *curve_to_mesh_sweep(const CurveEval &curve, const CurveEval &profile, bool fill_caps);
|
2021-12-07 07:19:15 +01:00
|
|
|
/**
|
|
|
|
* Create a loose-edge mesh based on the evaluated path of the curve's splines.
|
|
|
|
* Transfer curve attributes to the mesh.
|
|
|
|
*/
|
2021-09-21 18:56:54 +02:00
|
|
|
Mesh *curve_to_wire_mesh(const CurveEval &curve);
|
|
|
|
|
|
|
|
} // namespace blender::bke
|