Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error exporting this model #173

Closed
thomthom opened this issue Nov 30, 2017 · 1 comment
Closed

Error exporting this model #173

thomthom opened this issue Nov 30, 2017 · 1 comment
Labels

Comments

@thomthom
Copy link
Member

thomthom commented Nov 30, 2017

https://forums.sketchup.com/t/export-to-stl-list-errors/55898/1

FaceBug.zip

Export in mm binary.

SketchUp STL Exporter:
An error occured during export.

undefined method `-' for nil:NilClass
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:226:in `get_vertex_order'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:127:in `write_face_binary'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:102:in `call'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:102:in `write_face'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:80:in `block in find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `each'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:84:in `block in find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `each'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:84:in `block in find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `each'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:84:in `block in find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `each'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:77:in `find_faces'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:68:in `export'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:341:in `block in do_options'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/events.rb:82:in `call'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/events.rb:82:in `block in trigger_event'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/events.rb:78:in `each'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/events.rb:78:in `trigger_event'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:357:in `event_control_callback'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:311:in `callback_handler'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:269:in `block in add_callback'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:203:in `call'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:203:in `show_modal'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/SKUI/window.rb:203:in `show'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:362:in `do_options'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:375:in `main'
C:/Users/tthomas2/SourceTree/sketchup-stl/src/sketchup-stl/exporter.rb:395:in `block in <module:Exporter>'
SketchUp:1:in `call'
@thomthom thomthom added the bug label Nov 30, 2017
@thomthom
Copy link
Member Author

This is some degenerate face:

face = Sketchup.active_model.find_entity_by_persistent_id(17819)

face.area
#> -60277.677227039174

face.mesh.points
#> []
face.vertices.map(&:position)
#> [Point3d(533.677, 593.799, 482.355), Point3d(422.913, 589.904, 382.243), Point3d(421.302, 497.748, 380.786), Point3d(451.409, 495.798, 407.999), Point3d(531.302, 490.625, 480.208)]

thomthom added a commit to thomthom/sketchup-stl that referenced this issue Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant