Extremely minor bug with the export function

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
waterlubber
Posts: 7
Joined: Tue Nov 06, 2018 12:32 am

Extremely minor bug with the export function

Post by waterlubber »

Tracker Ticket: issue #3680

I've come across what might break a record as the most minor bug ever recorded in FreeCAD, mostly by accident.
Anyway, the GUI will allow you to export a Spreadsheet as an .stl (or other 3D model type), without any warnings or errors. This confused me for several minutes while I wondered why my exported STL was blank until I realized that I was exporting the spreadsheet.

Version information:

Code: Select all

OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15162 (Git)
Build type: Release
Branch: master
Hash: 1d72ee43435fa099ae97a2f6e3d15a225d4f32d3
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Steps to Reproduce:
1. Create a new document and a blank spreadsheet
2. Select the spreadsheet on the "Labels and Attributes" window
3. Press Ctrl+E to export
4. Select STL
5. Watch as a mysteriously small STL is created silently


In case you're curious, this is the contents of the STL:

Code: Select all

4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 2D 4D 45 53 48 0A 00 00 00 00 

MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH
and here is the file itself:
hwat.stl
(84 Bytes) Downloaded 16 times
This could probably go straight to the tracker but I figured I had to post it here first.
Last edited by waterlubber on Sat Nov 10, 2018 5:00 pm, edited 2 times in total.
triplus
Veteran
Posts: 9472
Joined: Mon Dec 12, 2011 4:45 pm

Re: Extremely minor bug with the export function

Post by triplus »

Hi @waterlubber

Without looking into it more in depth. What i am guessing happens is you select something to be exported to STL/DXF... and as the selection doesn't provide anything useful, the result is an empty file. Now if this will be improved in the future. I don't know. But likely this is not than much of a bug than it is of a missing feature. That would i guess inform the end user there is nothing to export. As for on how hard would be to achieve that. I am guessing this would need to happen on individual exporter level. Like adding checks to STL, DXF ... exporters.
User avatar
waterlubber
Posts: 7
Joined: Tue Nov 06, 2018 12:32 am

Re: Extremely minor bug with the export function

Post by waterlubber »

triplus wrote: Sat Nov 10, 2018 1:37 am Hi @waterlubber

Without looking into it more in depth. What i am guessing happens is you select something to be exported to STL/DXF... and as the selection doesn't provide anything useful, the result is an empty file. Now if this will be improved in the future. I don't know. But likely this is not than much of a bug than it is of a missing feature. That would i guess inform the end user there is nothing to export. As for on how hard would be to achieve that. I am guessing this would need to happen on individual exporter level. Like adding checks to STL, DXF ... exporters.
Yeah, it's a very minor "bug" and more comes down to something that will just improve the UI, a bit of polishing. I guess it could also be considered a feature. The best way to handle it would probably just include a check in the exporter that whatever your exporting is a model or something that can be modelled rather than a random object.
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Extremely minor bug with the export function

Post by Kunda1 »

waterlubber wrote: Sat Nov 10, 2018 1:05 am This could probably go straight to the tracker but I figured I had to post it here first.
Yes, thanks for posting here. Pleaase open a ticket for this and reference this thread, if you don't mind. Thanks!
@wmayer committed a fix already. That goes to show me not to get too ahead of Werner. Respect ;)
Last edited by Kunda1 on Sat Nov 10, 2018 11:30 pm, edited 1 time in total.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Extremely minor bug with the export function

Post by wmayer »

git commit 04005b5e45
The mesh export is supposed to be very error tolerant where objects that cannot be exported as a mesh don't raise an error message. However, if none of the selected objects are valid then instead of creating an empty mesh an error message should be raised. The above change fixes this now.
triplus
Veteran
Posts: 9472
Joined: Mon Dec 12, 2011 4:45 pm

Re: Extremely minor bug with the export function

Post by triplus »

Good to hear that. I am guessing for all exporters therefore checks would need to be added on individual exporter level? Anyway this report was about STL exporter and this should be addressed now.

Thanks.
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Extremely minor bug with the export function

Post by Kunda1 »

OP can you please mark this thread [Solved] by editing the summary of the first post ? Thanks
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply