Skip to content

Increase max_length for the material_name field#138

Merged
ondratu merged 1 commit into
OpenPrintTag:mainfrom
hadrava:material-name-length
May 15, 2026
Merged

Increase max_length for the material_name field#138
ondratu merged 1 commit into
OpenPrintTag:mainfrom
hadrava:material-name-length

Conversation

@hadrava
Copy link
Copy Markdown
Contributor

@hadrava hadrava commented May 13, 2026

The openprinttag-database currently contains 1655 materials with name longer than actual limit of 31 bytes.
We want to keep the limit somehow round-number to allow for static buffer allocation.

That is why I am suggesting 47 bytes (48 with null termination). This statistics looks much better with for the limit of 47 bytes: Just 193 materials and most of them could be easily shortened to fit if needed.

I have also considered 63 bytes, which leaves only 16 materials with too long name. But this might be already impractical when the field is send with additional bytes.

I am attaching full histogram of material_name lengths from the database:

histogram

Here are few examples of materials, which would not fit even when this gets approved (

  • Panchroma™ Dual Matte PLA Chameleon (Teal-Yellow)
  • PLA Temperature Color Change Black To Red To Yellow
  • Pearlescent Translucent Neon Green PETG PRO v2 - UV Reactive
  • ABS Color Change Green to Yellow (Heat Activated)
  • Sculpt-High Temperature Resistant Resin Ultra White
  • Filaflex 95 Foamy Footwearology edition Lavender
  • Pink Grapefruit: High Temperature Virgin PET-G with Sparkles
  • Magic Silk PLA Tarnished Copper (Gunmetal Gray / Copper)
  • Rapid PLA Gradient Thistle Purple & Ethereal Blue

CZDanol
CZDanol previously approved these changes May 13, 2026
The openprinttag-database currently contains 1655 materials with name longer
than actual limit of 31 bytes.

This statistics looks much better with the limit of
 - 47 bytes: 193 material_name does not fit
 - 63 bytes: 16 material_name does not fit
@hadrava
Copy link
Copy Markdown
Contributor Author

hadrava commented May 15, 2026

I am changing the limit to 63. I was a bit too cautious and 64 byte buffer should be still fine.

@ondratu ondratu merged commit 448ac77 into OpenPrintTag:main May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants