Sunday, August 06, 2006
First try at grids...
Laying out the grids and finding out what part of the grid lay inside the STL files was no problem. I used a quasi-boolean approach with a little smoothing added to find the perimeter boundaries.
The light blue grid nodes represent diagonals from the points that test outside of the STL boundaries.
Here you can see the infil diagonals set in purple.
The light blue grid nodes represent diagonals from the points that test outside of the STL boundaries.


Comments:
<< Home
Is there a big problem if the shapes are not outlined?
I can imagine as long as shapes are filled using orthogonal passes with each layer, sides should be relatively smooth. How much error or roughness actually appears if you don't outline?
Wouldn't it make sense to try to keep things ultra simple at first and add additional complexity as requirements are made, or is there more to the outlining of each solid at each layer than I am seeing?
I guess the reason I ask is that control logic seems to be easier if you simply treat the layers being extruded as a sequence of parallel colinear sets, rather than trying to work some 2D magic on them first.
I can imagine as long as shapes are filled using orthogonal passes with each layer, sides should be relatively smooth. How much error or roughness actually appears if you don't outline?
Wouldn't it make sense to try to keep things ultra simple at first and add additional complexity as requirements are made, or is there more to the outlining of each solid at each layer than I am seeing?
I guess the reason I ask is that control logic seems to be easier if you simply treat the layers being extruded as a sequence of parallel colinear sets, rather than trying to work some 2D magic on them first.
I agree that it would be a lot easier if we didn't try to outline the slices. I suspect, though from looking at support structures that Stratasys prototyping machines create that without outlining the object that you were prototyping would look rather nasty.
If you are using a grid, could you not use OpenGL to render the slices and read back the resulting image to get the results? This would be exceedingly fast.
You could use Z-buffer clipping to generate cross sections.
1) Set the near clip plane to the depth of the slice.
2) Clear the screen to black
3) Set the blend mode to ADD.
4) Set the face cull mode to discard front-facing polygons.
5) Using the colour 0,0,1/256, render the object.
The frame buffer now contains a colour equal to the number of backfaced polygons seen from the depth of that slice (divided by 256).
6) Set the face cull mode to discard back-facing polygons.
7) Set the blend mode to SUBTRACT
8) Re-render the object.
Now we have subtracted 1/256 for every front facing polygons. The framebuffer therefore contains zero for every pixel that's outside of the slice and non-zero for every pixel inside the slice. Read it back using glReadPixels and you're done.
With this approach you can slice objects exceedingly quickly using just a polygonal outline. You can even do boolean operations by rendering the objects to be added and subtracted consecutively.
You could use Z-buffer clipping to generate cross sections.
1) Set the near clip plane to the depth of the slice.
2) Clear the screen to black
3) Set the blend mode to ADD.
4) Set the face cull mode to discard front-facing polygons.
5) Using the colour 0,0,1/256, render the object.
The frame buffer now contains a colour equal to the number of backfaced polygons seen from the depth of that slice (divided by 256).
6) Set the face cull mode to discard back-facing polygons.
7) Set the blend mode to SUBTRACT
8) Re-render the object.
Now we have subtracted 1/256 for every front facing polygons. The framebuffer therefore contains zero for every pixel that's outside of the slice and non-zero for every pixel inside the slice. Read it back using glReadPixels and you're done.
With this approach you can slice objects exceedingly quickly using just a polygonal outline. You can even do boolean operations by rendering the objects to be added and subtracted consecutively.
(I forgot the last sentence of that...)
I described how to do this with colours because it's easier to think about - but in practice, you should use the stencil buffer and if it's available, use the 'stencilwrap' extension (nVidia support it - dunno about ATI) to allow an arbitarily complex object.
Post a Comment
I described how to do this with colours because it's easier to think about - but in practice, you should use the stencil buffer and if it's available, use the 'stencilwrap' extension (nVidia support it - dunno about ATI) to allow an arbitarily complex object.
<< Home