SketchUp / sketchup-stl

A SketchUp Ruby Extension that adds STL (STereoLithography) file format import and export.
http://extensions.sketchup.com/content/sketchup-stl
MIT License
247 stars 68 forks source link

Merge Co-planar Faces for STL Import #12

Closed eternus closed 12 years ago

eternus commented 12 years ago

Its a great feature that seems essential in cleaning up a newly imported and messy STL file.

There are several scripts out there that already do it so it should be somewhat simple to recreate. DWG/DXF Import also has a Merge Co-planar option which gives precedent.

The only question is, should it be a checkbox like it is for DWG or is it safe to assume everyone would want to do it?

scottlininger commented 12 years ago

Personally, I think we should "just do it" for all imports. Other thoughts?

thomthom commented 12 years ago

Scott, the DWG and 3DS imports works poorly like that. I never use those options because they often end up losing faces. These is a mismatch between what the importers think is coplanar and what SketchUp thinks.

My plugin CleanUp works quite well and I can port it into this project, but there are a couple of extreme edge cases where it can fail. For that reason I suggest to keep it as an option.

If your willing to work out these edge cases it'd be best though. I could port that back to Cleanup and maybe you could make some nudges to make the DWG and 3DS imported work properly as well..

jimfoltz commented 12 years ago

The only reason I can think of not to cleanup after importing is possibly to debug the importer or test the validity of the .stl file.

My plugin CleanUp works quite well and I can port it into this project

Best answer!

thomthom commented 12 years ago

And I'm sure there are some users that will find some use of keeping the original triangulation. You know there always will be.

thomthom commented 12 years ago

This repo need some sample files for testing. Can someone with some nice variations of STL files push a folder with some test models?

eternus commented 12 years ago

Is there a way to add test files to a github repository like this or shall I just share a DropBox folder?

On Fri, Oct 26, 2012 at 3:32 PM, Thomas Thomassen notifications@github.comwrote:

This repo need some sample files for testing. Can someone with some nice variations of STL files push a folder with some test models?

— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/12#issuecomment-9827763.

Jody

thomthom commented 12 years ago

Should be possible to upload binary files. So I'd think a folder with STL files should work. But maybe hold on until other people chime in - maybe they don't want binary files in the repo... ?? To it'd make sense so we'd all have easy access to the same test files.

eternus commented 12 years ago

I'll be adding some stuff as I find it here: https://www.dropbox.com/sh/gm8sv1vzcrrp0yb/lzLsnLV-82

On Fri, Oct 26, 2012 at 3:40 PM, Thomas Thomassen notifications@github.comwrote:

Should be possible to upload binary files. So I'd think a folder with STL files should work. But maybe hold on until other people chime in - maybe they don't want binary files in the repo... ?? To it'd make sense so we'd all have easy access to the same test files.

— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/12#issuecomment-9827947.

Jody

jimfoltz commented 12 years ago

Is merging co-planar faces the only type cleanup that will be needed on imported stl files? I don't think we know yet.

thomthom commented 12 years ago

Detect tiny holes?

jimfoltz commented 12 years ago

My point was where is the line drawn as far as including features? My own response is we need to test and refine the importer before we can determine how much cleanup will be needed.

scottlininger commented 12 years ago

For the importer, there's probably not much cleanup past coplanar stuff. I'll agree that fixing colpanar faces should be an option since we already have a UI button for just such things. Might as well give the user the control. It doesn't clutter the UI much.

The export is where cleanup will get interesting... Lots of possibilities there.

thomthom commented 12 years ago

I see there is a system to assign an issue to a user - I was looking to set myself as assignee for this issue to indicate I'm working on it. Just thought it be useful so we avoid working simultaniously on the same fix. Anyone knows how it works?

briangbrown commented 12 years ago

I think only admins can assign issues to people. Not sure if collaborators can. Workarounds I have seen are to claim it in the comments then later on an admin can assign it. I added you to my fork as a collaborator as a test to see if you can assign issues on that fork.

thomthom commented 12 years ago

I'm not finding any UI in the browser. When I use the Android app there is a button, but the list of people to assign is empty.

briangbrown commented 12 years ago

The UI on the Web when you are an admin is a button next to the top of an issue where it say "No one is assigned" In the case of this repo I see nothing, in the case of my fork I see a button where I can assign it to collaborators or anyone by name.

thomthom commented 12 years ago

Yea, I see the button in your fork.

briangbrown commented 12 years ago

Cool, so if we can just get Scott to add us all as collaborators we will be good to go :)

thomthom commented 12 years ago

I cannot close this issue?

scottlininger commented 12 years ago

Hrm. I guess I'll close it then.