me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
Showing only changes of commit 918cf6cd77 - Show all commits

View File

@ -120,7 +120,7 @@ static void fill_mesh_topology(const int vert_offset,
} }
} }
const bool has_caps = fill_caps && !main_cyclic && profile_cyclic; const bool has_caps = fill_caps && !main_cyclic && profile_cyclic && profile_point_num > 2;
if (has_caps) { if (has_caps) {
const int poly_num = main_segment_num * profile_segment_num; const int poly_num = main_segment_num * profile_segment_num;
const int cap_loop_offset = loop_offset + poly_num * 4; const int cap_loop_offset = loop_offset + poly_num * 4;
@ -271,7 +271,7 @@ static ResultOffsets calculate_result_offsets(const CurvesInfo &info, const bool
const int profile_point_num = profile_offsets.size(i_profile); const int profile_point_num = profile_offsets.size(i_profile);
const int profile_segment_num = curves::segments_num(profile_point_num, profile_cyclic); const int profile_segment_num = curves::segments_num(profile_point_num, profile_cyclic);
const bool has_caps = fill_caps && !main_cyclic && profile_cyclic; const bool has_caps = fill_caps && !main_cyclic && profile_cyclic && profile_point_num > 2;
const int tube_face_num = main_segment_num * profile_segment_num; const int tube_face_num = main_segment_num * profile_segment_num;
vert_offset += main_point_num * profile_point_num; vert_offset += main_point_num * profile_point_num;