bad Normal vector in STL Ascii Export #39755

Closed
opened 2014-04-16 12:18:34 +02:00 by Pierre Pontic · 16 comments

When exporting a mesh with STL ASCII format, normal vector is written for each triangle, that's good.

BUT, the normal vector is always 0 0 0, whatever the triangle orientation. Some softwares (pyCam in my case) are not able to manage this inconsistency.

solutions :

  • don't write the normal vector
  • compute the rightnormal vector
  • have a checkbox that enable to write the right computed normal vector.
When exporting a mesh with STL ASCII format, normal vector is written for each triangle, that's good. BUT, the normal vector is always 0 0 0, whatever the triangle orientation. Some softwares (pyCam in my case) are not able to manage this inconsistency. solutions : - don't write the normal vector - compute the rightnormal vector - have a checkbox that enable to write the right computed normal vector.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Pierre-Pontic

Added subscriber: @Pierre-Pontic

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This bug report is incomplete, no blend file or output STL.

Quick test shows face normals are not zero'd here.

This bug report is incomplete, no blend file or output STL. Quick test shows face normals are not zero'd here.
Author

I just downloaded the last build, and, lol, a wild "Write Normals" checkbox appeared, but it's not super effective.

If checked, normals are OK.

If not checked... Normals are written, and false.

I just downloaded the last build, and, lol, a wild "Write Normals" checkbox appeared, but it's not super effective. If checked, normals are OK. If not checked... Normals are written, and false.

This issue was referenced by blender/blender-addons@9ad943c1a7

This issue was referenced by blender/blender-addons@9ad943c1a74bc4b633c31592086f1185022baf1b

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Closed by commit blender/blender-addons@9ad943c1a7.

Thats bad, somehow this slipped by me when reviewing, fixed now.

Thats bad, somehow this slipped by me when reviewing, fixed now.
Author

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author

Woops, I didn't tested as well as I should :D

With "Write Normals" checkbox unchecked, normals are not written, but the "facet" keyword neither. So it result a parsing error (in pyCam, at least).

Woops, I didn't tested as well as I should :D With "Write Normals" checkbox unchecked, normals are not written, but the "facet" keyword neither. So it result a parsing error (in pyCam, at least).
Author

tested with the latest release (a5b9f22)

tested with the latest release (a5b9f22)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Campbell Barton self-assigned this 2014-04-22 07:22:09 +02:00

My bad, read up on the STL spec and they are NOT optional,

I assumed because Blender's existing exporter didn't originally write correct normals that they weren't required, but seems enough applications ignored the normals that it worked (in some cases).

So, now normals are always written, as they should be.

  • closing.
My bad, read up on the STL spec and they are NOT optional, I assumed because Blender's existing exporter didn't originally write correct normals that they weren't required, but seems enough applications ignored the normals that it worked (in some cases). So, now normals are always written, as they should be. - closing.
Author

The last problem was not they weren't writen (I didn't know they were optional), most of my programs were able to load the files without normals. I think it is a good feature to avoid to write normals if they are not needed, that could save a lot of space (near 25%) for big files...

The last problem was when you skipped the normal information, you skipped the 'facet' keyword too, while you where adding 'end facet' in end of each face definition...

But, if it works like this, it's ok.

The last problem was not they weren't writen (I didn't know they were optional), most of my programs were able to load the files without normals. I think it is a good feature to avoid to write normals if they are not needed, that could save a lot of space (near 25%) for big files... The last problem was when you skipped the normal information, you skipped the 'facet' keyword too, while you where adding 'end facet' in end of each face definition... But, if it works like this, it's ok.
Author

sorry : I didn't know they were NOT optional.

sorry : I didn't know they were NOT optional.
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 project
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#39755
No description provided.