import a stl file , get empty #100402

Open
opened 2022-08-15 05:51:10 +02:00 by kokutou · 8 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: AMD Radeon R7 450 ATI Technologies Inc. 4.5.14830 Core Profile Context 22.6.1 27.20.20912.1002

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560
Worked: rhino 7 import ok.

Addon Information
Name: STL format (1, 1, 3)
Author: Guillaume Bouchard (Guillaum)

Short description of error
import a stl file , get empty

Exact steps for others to reproduce the error
import a stl file , get empty
stl file:
slider_2_v2_d10.7z

import use rhino 7 works fine.

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: AMD Radeon R7 450 ATI Technologies Inc. 4.5.14830 Core Profile Context 22.6.1 27.20.20912.1002 **Blender Version** Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: `bcfdb14560` Worked: rhino 7 import ok. **Addon Information** Name: STL format (1, 1, 3) Author: Guillaume Bouchard (Guillaum) **Short description of error** import a stl file , get empty **Exact steps for others to reproduce the error** import a stl file , get empty stl file: [slider_2_v2_d10.7z](https://archive.blender.org/developer/F13385300/slider_2_v2_d10.7z) import use rhino 7 works fine.
Author

Added subscriber: @kokutoukiritsugu

Added subscriber: @kokutoukiritsugu

Added subscriber: @rjg

Added subscriber: @rjg
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Validating the mesh using assimp yields:

ERROR: Failed to load file: Validation failed: The mesh SLIDER_2_V2_D10 contains no vertices

So I suspect the file is corrupt. How did you generate that file?

Validating the mesh using assimp yields: ``` ERROR: Failed to load file: Validation failed: The mesh SLIDER_2_V2_D10 contains no vertices ``` So I suspect the file is corrupt. How did you generate that file?
Author

ptc creo export stl

ptc creo export stl
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

It seems the issue is that the file is detected as ASCII while it is in fact a binary STL file.

  • First, note that the file starts with solid SLIDER_2_V2_D10, but that is part of the 80 header bytes, so it is not an ASCII file.
  • The number of triangles in the file is 7658. So the expected file size in bytes should be 80 + 4 + 7658 * 50 = 382984.
  • The actual file size is 382992. So there are 8 bytes unaccounted for. Hence the STL importer decides that this is an ASCII file even though it is a binary one.
  • The file ends with extra 8 null/zero bytes.
    Maybe I am missing something with regards to the STL specification so I will tag the module since we have a new experimental STL importer.
    Maybe the importer should allow extra padding bytes at the end that don't exceed 50 bytes?
It seems the issue is that the file is detected as ASCII while it is in fact a binary STL file. - First, note that the file starts with `solid SLIDER_2_V2_D10`, but that is part of the 80 header bytes, so it is not an ASCII file. - The number of triangles in the file is 7658. So the expected file size in bytes should be 80 + 4 + 7658 * 50 = 382984. - The actual file size is 382992. So there are 8 bytes unaccounted for. Hence the STL importer decides that this is an ASCII file even though it is a binary one. - The file ends with extra 8 null/zero bytes. Maybe I am missing something with regards to the STL specification so I will tag the module since we have a new experimental STL importer. Maybe the importer should allow extra padding bytes at the end that don't exceed 50 bytes?
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:39:30 +01:00
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:54:02 +01:00
Hans Goudey added
Status
Confirmed
and removed
Status
Needs Info from Developers
labels 2024-03-07 16:54:47 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100402
No description provided.