This commit ports the fillet curves node to the new curves data-block, and moves the fillet node implementation to the geometry module to help separate the implementation from the node. The changes are similar to the subdivide node or resample node. I've resused common utilities where it makes sense, though some things like the iteration over attributes can be generalized further. The node is now multi-threaded per-curve and inside each curve, and some buffers are reused per curve to avoid many allocations. The code is more explicit now, and though there is more boilerplate to pass around many spans, the more complex logic should be more readable. Differential Revision: https://developer.blender.org/D15346
24 lines
833 B
C++
24 lines
833 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_function_ref.hh"
|
|
#include "BLI_index_mask.hh"
|
|
|
|
#include "BKE_curves.hh"
|
|
|
|
namespace blender::geometry {
|
|
|
|
bke::CurvesGeometry fillet_curves_poly(const bke::CurvesGeometry &src_curves,
|
|
IndexMask curve_selection,
|
|
const VArray<float> &radius,
|
|
const VArray<int> &counts,
|
|
bool limit_radius);
|
|
|
|
bke::CurvesGeometry fillet_curves_bezier(const bke::CurvesGeometry &src_curves,
|
|
IndexMask curve_selection,
|
|
const VArray<float> &radius,
|
|
bool limit_radius);
|
|
|
|
} // namespace blender::geometry
|