2023-08-15 16:20:26 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2021-09-21 18:56:54 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
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 {
|
|
|
|
|
2023-01-06 17:41:36 +01:00
|
|
|
class CurvesGeometry;
|
2023-01-05 14:05:30 +01:00
|
|
|
class AnonymousAttributePropagationInfo;
|
|
|
|
|
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.
|
|
|
|
*/
|
2022-04-15 17:14:54 +02:00
|
|
|
Mesh *curve_to_mesh_sweep(const CurvesGeometry &main,
|
|
|
|
const CurvesGeometry &profile,
|
2023-01-05 14:05:30 +01:00
|
|
|
bool fill_caps,
|
|
|
|
const AnonymousAttributePropagationInfo &propagation_info);
|
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.
|
|
|
|
*/
|
2023-01-05 14:05:30 +01:00
|
|
|
Mesh *curve_to_wire_mesh(const CurvesGeometry &curve,
|
|
|
|
const AnonymousAttributePropagationInfo &propagation_info);
|
2021-09-21 18:56:54 +02:00
|
|
|
|
|
|
|
} // namespace blender::bke
|