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

howto / documentation #19

Open
ghost opened this issue Feb 28, 2017 · 2 comments
Open

howto / documentation #19

ghost opened this issue Feb 28, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 28, 2017

So you say there is a package that allows me to handle STL-files.
But I can not find any documentation or examples how to use the package?

@ghost
Copy link

ghost commented Jun 9, 2017

I also am wondering about documentation for this package. I have downloaded everything but can not get it to work. Is there another file that explains how it works or has an example?

@JoshMcCullough
Copy link
Member

Sorry but I never got a notification about this issue! Also sorry for the lacking docs. I suggest [checking out the tests[)https://github.com/QuantumConcepts/STLdotNET/blob/master/Source/Test/STLTests.cs) which should give you an idea of how to use this library.

The code itself is also pretty well documented.

Here's a quick primer:

  • Start with the STLDocument class, to...
    • .Read(...) STL content from a stream or string or .Open(...) an STL file
    • .WriteText(...) or .WriteBinary(...) or .SaveAsText(...) or .SaveAsBinary(...)` to write/save the STL instance to a stream/string/file
    • .AppendFacets(...) to add one or more facets to the document

The STLDocument is basically just a set of Facet instances. A Facet is a set of Vertex (X, Y, Z) instances. A Facet also can have a Normal specified to indicate the directional of the facet. Finally, a Facet can have attributes attached via the AttributeByteCount property which can be used to store additional data such as the color of the facet (only applied to binary STLs).

There are some extension methods which allow you to work with vertices and facets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant