Add single node mesh
parent
57b1a802f3
commit
7c9626bcab
|
@ -38,6 +38,7 @@
|
|||
#include <dust3d/mesh/trim_vertices.h>
|
||||
#include <dust3d/mesh/tube_mesh_builder.h>
|
||||
#include <dust3d/mesh/weld_vertices.h>
|
||||
#include <dust3d/mesh/box_mesh.h>
|
||||
#include <functional>
|
||||
|
||||
namespace dust3d {
|
||||
|
@ -663,6 +664,10 @@ std::unique_ptr<MeshCombiner::Mesh> MeshGenerator::combinePartMesh(const std::st
|
|||
partCache.joined = (target == PartTarget::Model && !isDisabled);
|
||||
|
||||
if (PartTarget::Model == target) {
|
||||
if (1 == meshNodes.size()) {
|
||||
size_t subdivideTimes = subdived ? 1 : 0;
|
||||
buildBoxMesh(meshNodes[0].origin, meshNodes[0].radius, subdivideTimes, partCache.vertices, partCache.faces);
|
||||
} else {
|
||||
std::unique_ptr<TubeMeshBuilder> tubeMeshBuilder;
|
||||
TubeMeshBuilder::BuildParameters buildParameters;
|
||||
buildParameters.deformThickness = deformThickness;
|
||||
|
@ -681,6 +686,7 @@ std::unique_ptr<MeshCombiner::Mesh> MeshGenerator::combinePartMesh(const std::st
|
|||
for (auto& it : partCache.faces)
|
||||
std::reverse(it.begin(), it.end());
|
||||
}
|
||||
}
|
||||
} else if (PartTarget::CutFace == target) {
|
||||
std::unique_ptr<SectionPreviewMeshBuilder> sectionPreviewMeshBuilder;
|
||||
sectionPreviewMeshBuilder = std::make_unique<SectionPreviewMeshBuilder>(cutTemplate);
|
||||
|
|
Loading…
Reference in New Issue