Giter VIP home page Giter VIP logo

gsslicer's Introduction

This documentation/commentary is very out-of-date. sorry!*

gsSlicer

In-Progress Slicer for 3D printing, and other toolpath-type things, perhaps.

C#, MIT License (but see notes below!). Copyright 2017 ryan schmidt / gradientspace

questions? get in touch on twitter: @rms80 or @gradientspace, or email [email protected].

Gradientspace no longer offers consulting services. If you are interested in using gsSlicer and would like to hire someone to provide advice, help with the code, or develop things for you, get in touch with Sutro Machine (http://sutromachine.com), they have extensive experience with gsSlicer.

What is this?

gsSlicer is an in-development open-source library for things like slicing 3D triangle meshes into planar polygons, filling those polygons with contour & raster fill paths, figuring out how much material to extrude along the paths, and then outputting GCode. The included SliceViewer project is also a GCode viewer/utility.

The goal with this project is to create a well-structured slicing engine that is designed from the ground up to be extensible. Although the initial focus will be on FDM/FFF-style printers, many of the parts of the system will be applicable to other processes like SLA, etc. Hopefully. Fingers crossed. At least, we'll definitely solve the meshes-to-slices problem for you.

Current Status

Under Active Development. Generated GCode has been used for non-trivial prints, however the output has not been extensively tested.

Shells, solid and sparse infill, roof and floors, have been implemented. Support volumes calculated but not yet filled. ThreeAxisPrintGenerator is top-level driver for FDM printing.

Experimental support for SLS contours & hatching is available in GenericSLSPrintGenerator.

Supported Printers: At this time, only Makerbot Replicator 2 has been significantly tested. Also has been tested with Monoprice Select Mini (and hence should work with any generic RepRap) and Printrbot Metal Plus.

Usage

This project is a source code library, not usable directly. GUI and command-line front ends are under development but very basic at this point, in the gsSlicerApps project.

For an example of how to convert a mesh into GCode, see GenerateGCodeForMeshes() in gsSlicerApps/sliceViewGTK/SliceViewerMain.cs

Dependencies

The slicing & path planning library gsSlicer depends on:

  • geometry3Sharp Boost license, git submodule
  • gsGCode MIT license, git submodule
  • Clipper by Angus Johnson, Boost license, embedded in /gsSlicer/thirdparty/clipper_library

No GPL/LGPL involved. All the code you would need to make an .exe that slices a mesh is available for unrestricted commercial use.

gsslicer's People

Contributors

gregmeess avatar rms80 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gsslicer's Issues

slicing parameters

hi,
i need some assistance in understanding following parameters :

  • PathDefaultWidthMM
  • SupportMinZTips
  • MinZTipMaxDiam
  • MinZTipExtratLayers

what is the use case for these parameters?
Regards,

Having some troubles implementing gsSlicer

Hi, I've been trying to test out your slicer in a windows form application.

Pretty basic one, just a button to generate a Gcode from the exemple given on your website :

`
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using g3;
using gs;
using gs.info;

namespace SlicingApp
{
public partial class Form1 : Form
{

    public static SingleMaterialFFFSettings LastSettings;

    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        CappedCylinderGenerator cylgen = new CappedCylinderGenerator()
        {
            BaseRadius = 10,
            TopRadius = 5,
            Height = 20,
            Slices = 32
        };
        DMesh3 mesh = cylgen.Generate().MakeDMesh();
        MeshTransforms.ConvertYUpToZUp(mesh);       // g3 meshes are usually Y-up

        // center mesh above origin
        AxisAlignedBox3d bounds = mesh.CachedBounds;
        Vector3d baseCenterPt = bounds.Center - bounds.Extents.z * Vector3d.AxisZ;
        MeshTransforms.Translate(mesh, -baseCenterPt);

        PrintMeshAssembly meshes = new PrintMeshAssembly();
        meshes.AddMesh(mesh);

        GenerateGCodeForMeshes(meshes);
    }

    static string GenerateGCodeForMeshes(PrintMeshAssembly meshes)
    {

        // configure settings
        //RepRapSettings settings = new RepRapSettings(RepRap.Models.Unknown);
        MakerbotSettings settings = new MakerbotSettings(Makerbot.Models.Replicator2);

        LastSettings = settings.CloneAs<SingleMaterialFFFSettings>();

        MeshPlanarSlicer slicer = new MeshPlanarSlicer()
        {
            LayerHeightMM = settings.LayerHeightMM
        };
        slicer.Add(meshes);
        PlanarSliceStack slices = slicer.Compute();

        SingleMaterialFFFPrintGenerator printGen =
            new SingleMaterialFFFPrintGenerator(meshes, slices, settings);
        if (printGen.Generate())
        {
            // export gcode
            GCodeFile gcode = printGen.Result;
            using (StreamWriter w = new StreamWriter("generated.gcode"))
            {
                StandardGCodeWriter writer = new StandardGCodeWriter();
                writer.WriteFile(gcode, w);
            }
        }
        return "";
    }
}

}`

Even though I'm almost using the exact same code as the one in your tutorial, my result is kinda weird, the following screenshot is the Gcode displayed in PronterFace :

image

So there is space between my layers and it looks like no shells are rendered as you can see here :

image

The whole slicing looks messed up, Any idea why this happens ?

PS : sorry for bad englendo and formatting!

Seem to have an error with submodules

Looks like there is something wrong with getting sub-modules. Getting this error in SourceTree

image

and $ git clone --recurse-submodules is not getting any submodules.

Hope this helps.

Infill is not generated

When I using the attched example, all the fine

        CappedCylinderGenerator cylgen = new CappedCylinderGenerator() {
            BaseRadius = 10, TopRadius = 5, Height = 20, Slices = 32
        };
        DMesh3 mesh = cylgen.Generate().MakeDMesh();
        MeshTransforms.ConvertYUpToZUp(mesh);       // g3 meshes are usually Y-up

gcode viewer - online gcode viewer and analyzer in your browser - google chrome 2018-05-22 21 06 59

Attempt to generate gcode for this mesh:

unity 2017 3 0f3 personal 64bit - notecam unity - notecad - pc mac linux standalone dx11 2018-05-22 22 01 56

Converted from unity mesh by using this function:

	public static DMesh3 ToDMesh3(this Mesh mesh) {
		DMesh3 result = new DMesh3();
		result.BeginUnsafeTrianglesInsert();

		var indices = mesh.GetIndices(0);
		var polygons = new List<Polygon>();
		var verts = mesh.vertices;
		for(int i = 0; i < indices.Length / 3; i++) {
			var v0 = verts[indices[i * 3 + 0]];
			var v1 = verts[indices[i * 3 + 1]];
			var v2 = verts[indices[i * 3 + 2]];
			result.AppendTriangle(
				result.AppendVertex(new Vector3d(v0.x, v0.y, v0.z)),
				result.AppendVertex(new Vector3d(v1.x, v1.y, v1.z)),
				result.AppendVertex(new Vector3d(v2.x, v2.y, v2.z))
			);
		}
		result.EndUnsafeTrianglesInsert();
		return result;
	}

Resulted in gcode that have no any infill:

gcode viewer - online gcode viewer and analyzer in your browser - google chrome 2018-05-22 22 04 32

STL is watertight.
What I am doing in wrong way?

Support for Collaborative 3D Printing

Feature Request

The project Escher was a great idea, but the slicer on netfabb is very limited, one of the main flaws is the lack of double extruder for support material. Would be great to have this capability on this slicer.

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.