mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 12:52:07 +00:00
Support larger printer sizes by using 64-bit.
SuperSlicer is referenced for some changes. Co-authored-by: Merill <merill@free.fr>
This commit is contained in:
@@ -248,7 +248,7 @@ struct AMFParserContext
|
||||
// Current volume allocated for an amf/object/mesh/volume subtree.
|
||||
ModelVolume *m_volume { nullptr };
|
||||
// Faces collected for the current m_volume.
|
||||
std::vector<Vec3i> m_volume_facets;
|
||||
std::vector<Vec3i32> m_volume_facets;
|
||||
// Transformation matrix of a volume mesh from its coordinate system to Object's coordinate system.
|
||||
Transform3d m_volume_transform;
|
||||
// Current material allocated for an amf/metadata subtree.
|
||||
@@ -632,7 +632,7 @@ void AMFParserContext::endElement(const char * /* name */)
|
||||
// Verify validity of face indices, find the vertex span.
|
||||
int min_id = m_volume_facets.front()[0];
|
||||
int max_id = min_id;
|
||||
for (const Vec3i& face : m_volume_facets) {
|
||||
for (const Vec3i32& face : m_volume_facets) {
|
||||
for (const int tri_id : face) {
|
||||
if (tri_id < 0 || tri_id >= int(m_object_vertices.size())) {
|
||||
this->stop("Found a malformed triangle mesh");
|
||||
@@ -644,8 +644,8 @@ void AMFParserContext::endElement(const char * /* name */)
|
||||
}
|
||||
|
||||
// rebase indices to the current vertices list
|
||||
for (Vec3i &face : m_volume_facets)
|
||||
face -= Vec3i(min_id, min_id, min_id);
|
||||
for (Vec3i32 &face : m_volume_facets)
|
||||
face -= Vec3i32(min_id, min_id, min_id);
|
||||
|
||||
indexed_triangle_set its { std::move(m_volume_facets), { m_object_vertices.begin() + min_id, m_object_vertices.begin() + max_id + 1 } };
|
||||
its_compactify_vertices(its);
|
||||
|
||||
Reference in New Issue
Block a user