Giter Site home page Giter Site logo

nestingcshaprt's Introduction

This a port of Nesting library written in Java at https://github.com/exacloud/Nest4J

Not complete yet, but basics work.Working on it, will keep you posted.

i/p is XML format

o/p will be generated in SVG format

sample input file is available in bin folder of NestingConsole project.

Sample use case:

                    //create bin
        NestPath bin = new NestPath();
        double binWidth =1000;
        double binHeight = 1000;
        bin.add(0, 0);
        bin.add(binWidth, 0);
        bin.add(binWidth, binHeight);
        bin.add(0, binHeight);

		//read polygons from xml file
        var nestPaths = SvgUtil.transferSvgIntoPolygons("test.xml");

		//default Config, you can customize(please look into Config class)
        Config config = new Config();

		//Init Nesting
        Nest nest = new Nest(bin, nestPaths, config, 2);

		//perform nesting
        List<List<Placement>> appliedPlacement = nest.startNest();

		//convert to svg polygons for viewing in browser
        var svgPolygons =  SvgUtil.svgGenerator(nestPaths, appliedPlacement, binWidth, binHeight);

		//save file onto disk
        SvgUtil.saveSvgFile(svgPolygons, "output.svg");

UseFul Links: https://github.com/exacloud/Nest4J

https://github.com/Jack000/Deepnest

https://github.com/Jack000/SVGnest

nestingcshaprt's People

Contributors

dharani811 avatar dk-c1 avatar

Stargazers

 avatar  avatar happydcarrot avatar  avatar  avatar  avatar MikewasG avatar  avatar  avatar Muhammad Sulaiman avatar Yemi avatar  avatar MAMAHAHA avatar Fuq188 avatar  avatar  avatar KevinDeng avatar dududu avatar Image avatar Paul avatar  avatar  avatar Burak ÇELEBİ avatar DarkWeiTong avatar  avatar  avatar antony1029 avatar Tony Qu avatar wilmer avatar Süleyman Türkoğlu avatar  avatar  avatar Maxence DELANNOY avatar Kaito Kuroba avatar WI-Hyun-joong avatar  avatar  avatar reznovlee avatar  avatar  avatar http://datavisualization.club avatar MCAI avatar  avatar BensonLaur avatar  avatar anzhenghe avatar  avatar  avatar  avatar Antony May avatar Danton Heuer avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar Süleyman Türkoğlu avatar  avatar onlyliu avatar Antony May avatar  avatar

nestingcshaprt's Issues

NFP generation

@dharani811 that looks amazing! Thank you for sharing it. I have one question again relating to the NFP generation using Clipper. Do you only use the polygon with the largest area produced by the Minkowski Sum for the NFP (referenced code). Would that not yield inaccurate result in some cases if the input has holes or is concave?

Also, it seems you are using both the sliding method for generating the NFP as well as Minkowski. Is there a reason for this and when do you use which?

Placement direction

Placement is prioritizing the Y-axis first then the X-axis. Is it possible to switch this?

Do you accept PR?

Since the last commit of this project is 3 years ago, I'd like to check that if you still accept PR. I reimplement the genetic algorithm based on your implementation.

about curve

I noticed that the information stored in the XML format consists of points. Does this mean that this method can only handle straight-line shapes? Can it handle objects with curves? Also, is there code in the program to generate the input XML file? I want to test it with my own data.

State License Information

Hey there and thanks for porting Nest4J to C#!

I'd like to play around with this library a bit but need port it to dotnet core first and would therefore like to fork the project. I wanted to ask before: Under which license are you providing this? Could you state that somewhere in the project (e.g. Nest4Js MIT License)?

Thanks in advance!

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.