Sign in to follow this  
bzroom

creating a milling cycle from polygons

Recommended Posts

Does anybody have any resources or ideas on how I could generate a milling cycle from a polygon soup? My project is to create a 5 axis mill to cut out car bodies out of a foam block. I think I will need to take cross sections of the mesh and then just follow those silouetes with the mill. So I guess my real question is how do I create a silouete of a mesh at different depths at a given axis? If anyone has any information or suggestions I'd apreciate them.

Share this post


Link to post
Share on other sites
At first, you need to identify the edges in mesh structure, for evaluate which edge should belong to the silouette.

If you have the mesh structure as a collection of triangles referenced with face indices as array of integers,
you can create a array that contains the connectivity between triangle edges
I have the following code for that:

for(i=0;i<siz-vertices_x_face;i++)
{
if(faceconnectivity->at(i)==INFINITY)///not connected
{
if(i%vertices_x_face==(vertices_x_face-1))
{
v1 = this->at(i);
v2 = this->at(i-(vertices_x_face-1));
}
else
{
v1 = this->at(i);
v2 = this->at(i+1);
}
for(j=(i/vertices_x_face +1)*vertices_x_face ;j<siz;j++)
{

if(j%vertices_x_face==(vertices_x_face-1))
{
u1 = this->at(j);
u2 = this->at(j-(vertices_x_face-1));
}
else
{
u1 = this->at(j);
u2 = this->at(j+1);
}
if(v1==u2&&v2==u1)
{
faceconnectivity->at(i) = j;
faceconnectivity->at(j) = i;
}
}/////for(j=(i/vertices_x_face +1) *vertices_x_face ;j<siz;j++)
}/////if(faceconnectivity->at(i)==GLEON_UINT_INFINITY)
}////for(i=0;i<siz-3;i++)

Share this post


Link to post
Share on other sites


Thank you but I dont really understand your coding style and you gave little description. Can you please elaborate on what it's actually doing? In like a psuedo code.

This is what I think I have to do.

1.) Figure out all the edges in a mesh that intersect a given plane.
2.) Calculate the points and normals at which the plane intersects the plane.
3.) Order the points into a CW/CCW direction. (I think this is the tricky part)

Then I can use an interpolation of these points, normals, and a known tool length to control the 5 axis of the machine.

This is will provide a crude way to do it and the quality would be directly related to the tesselation of the model. In future, or present versions I'd like to use some sort of curve model. I think in the end it's always going to come down to a linear interpolation, at the machine level at least.

If anyone has any information in those or any other suggestions. I'd apreciate them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this