FIX:fix Gizmo Text displays the location layout

Change-Id: I0696725660d3640486750259f7643d1809989db0
This commit is contained in:
xiangdong.yang 2022-08-24 16:36:53 +08:00 committed by Lane.Wei
parent 5aaa785655
commit 7bb227df2c
1 changed files with 3 additions and 0 deletions

View File

@ -2076,6 +2076,9 @@ void ObjectList::load_mesh_part(const TriangleMesh& mesh, const wxString& name,
apply_object_instance_transfrom_to_all_volumes(mo);
ModelVolume* mv = mo->add_volume(mesh);
Vec3d instance_bbox = mo->mesh().bounding_box().size();
Vec3d offset = mv->get_offset() + Vec3d(0, 0, instance_bbox[2] / 2);
mv->set_offset(offset);
mv->name = name.ToStdString();
std::vector<ModelVolume*> volumes;