osresearch / plotter-vision Goto Github PK
View Code? Open in Web Editor NEWHidden Wireframe removal demo in p5.js
License: GNU General Public License v2.0
Hidden Wireframe removal demo in p5.js
License: GNU General Public License v2.0
When exporting SVG, the first line reads
<?xm version='1.0'?>
but should be
<?xml version='1.0'?>
Plotting with axidraw reveals that there are quite a few duplicate vectors left.
As demonstrated in @level2three's tweet, curved surfaces end up with very dense numbers of line segments.
stl.min_length = 10; reproject=1
seems to produce reasonable results.
Only binary STL files are currently supported, so the output from OpenSCAD is not always usable. It should be fairly easy to add a parser:
solid OpenSCAD_Model
facet normal -0.0727553 -0.948536 -0.308198
outer loop
vertex -3.89628 -11.9915 -2.40803
vertex -2.92811 -10.8633 -6.10875
vertex -3.2793 -11.9442 -2.69932
endloop
endfacet
The cube test in #8 shows a rendering error in some orientations.
When loading a file it could add to the current STL, rather than replacing it.
Something is messing up coplanar surfaces and adding occasional line segments.
One idea , how about placing the red/blue colours on two seperate layers. If you are going to plot them, this is going to have to be done one way or the other.
Same test as #8 - certain viewing angles make edges invisible that should be present.
When using the scroll wheel to zoom, firefox scrolls up and down a little bit due to canvas window size issues.
It would be useful to allow precise positioning of object / camera for fine grained controls
Duplicate the STL, create a second camera slightly to the side, etc.
I was wondering if you were interested in sample file that were on the largish side, from various apps.
I am a Mathematica user and was experimenting with STL export of various 3D plots. I will upload as a make them. I will also post tips for reducing / simplifying polygons in Mathematica.
Thanks for the ability to easily experiment with SVG for 3D!
Seashell - you can visibly see it redraw from red to white. SVG export looks correct
seashell.stl.zip
The SVG orientation (0,0 in bottom left) does not match the screen (0,0 in upper left).
Currently the exported SVG has a width/weight, that is fixed and much larger than the actual drawn surface.
It would be good to have a view-port that shows the part of the canvas that is really used.
For example the bunny in https://twitter.com/pilhuhn/status/1345759428239364098
has <svg width='1480px' height='885px' ...>
but the actual path data is:
minX : 351, maxX = 1051
minY : 11, maxY = 760
which translates to Height: 700.0, Width : 749.0
The n^2 vector sorter could be applied prior to download so that the SVG doesn't generate double strikes, as seen in Heiko's #plottertwitter tweet
The close_enough()
check on the normals should be tunable by the user to handle curving surfaces.
https://github.com/osresearch/plotter-vision/blob/master/triangle.js#L126
When STL is loaded, it would be helpful to always have the same initial size for any STL.
For example, ln
does this with a unit cube and fits the object inside the unit cube: https://github.com/fogleman/ln/blob/master/ln/mesh.go , https://github.com/fogleman/ln/blob/12e6c6e7445909f817f1b8d5581be4255ffa1437/examples/slicer.go#L18
This way, no matter what STL you load, your zoom level and camera position can remain the same.
The SVG does not have any bounding box, so the object is not located where is should be on the page.
Hi! I was wondering what is the license for this code?
I am planning to build out a collection of tools on Plotterfiles.com and am looking at various tools with permissive license in order to be able to modify the code and implement new features without affecting the original repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.