Code Monkey home page Code Monkey logo

stl's Introduction

STL is a simple file format for representing 3D objects as the triangles which form their surface. It is common in 3D printing workflows.

This Haskell library provides parsing and serialization to and from both text and binary STL formats.

Documentation for the last release is on Hackage. The examples directory contains a couple of simple command-line programs using the library.

Bug reports, patches, and examples of use are welcome.

stl's People

Contributors

bergey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stl's Issues

STL file export contains commas which should not be there.

Hi,

I noticed that the files I export are not loadable in e.g. meshlab. The problem is that the vectors contain commas in the output, which should not be the case in the STL format [1]:

FIX: in Graphics.Formats.STL.Printer
v3 (x, y, z) = mconcat $ intersperse comma [floatDec x, floatDec y, floatDec z]
where
comma = stringUtf8 ", "
->
v3 (x, y, z) = mconcat $ intersperse (charUtf8 ' ') [floatDec x, floatDec y, floatDec z]

Regards,
Georg

[1] http://en.wikipedia.org/wiki/STL_(file_format)

Relax upper bound for builds with base 4.11

GHC 8.4.1 is out with base 4.11, please adjust package constraints.

Also, this time, please make a release on hackage; the current version 0.3.0.5 is not even published there.

stack overflow in Printer

The text-format pretty-printer is very slow and blows the stack. The binary format is probably the right choice anyway for large files, but it would be nice to improve the text output also. The time seems to be mostly in the float and double functions from pretty. Is pretty actually using show for numbers?

Data.ByteString.Builder is using show, with a code comment to instead use double-conversion.

Do something sensible with (0,0,0) normals

For example:

  • define normal :: Maybe Vector
  • write Nothing as (0,0,0)
  • read (0,0,0) as Nothing
  • provide a function to fill in missing values

Is it worth distinguishing STLs with possibly missing normals at the type level?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.