PDA

View Full Version : 2D AND 3D Software problem



Ed Bartlett
22-05-2009, 12:02 PM
Hi,
I work for an architectural firm in London, in the Modelshop department. I'm looking for a software package for our new 3-axis CNC that can do a particular task that would save us a lot of time.
After sending a 3D landscape file to the CNC that it has roughed and finished, I want to be able to cut multiple building locations out of this landscape with a set depth. The problem I have is that the drawing of the buildings, as they haven't yet been designed, is just a 2D outline.
A company that we outsource to has a CNC software that allows you to place a 2D drawing on top of the 3D landscape, and will translate that 2D into the 3D by a set depth, and obviously recognises the form of the landscape. At the moment we're doing this in a seperate software and is quite a lengthy slow process.
Does this make sense? Can your software help?

Cheers

Ed

irving2008
22-05-2009, 12:25 PM
Hi,
I work for an architectural firm in London, in the Modelshop department. I'm looking for a software package for our new 3-axis CNC that can do a particular task that would save us a lot of time.
After sending a 3D landscape file to the CNC that it has roughed and finished, I want to be able to cut multiple building locations out of this landscape with a set depth. The problem I have is that the drawing of the buildings, as they haven't yet been designed, is just a 2D outline.
A company that we outsource to has a CNC software that allows you to place a 2D drawing on top of the 3D landscape, and will translate that 2D into the 3D by a set depth, and obviously recognises the form of the landscape. At the moment we're doing this in a seperate software and is quite a lengthy slow process.
Does this make sense? Can your software help?

Cheers

Ed
Ed, welcome to the forum.

I dont know of any software that will do this directly but there's always more than one way to approach a problem. Just so I understand the problem, am I right in assuming you want the building cutouts to be a set depth relative to the landscape surface at that location? If so, why is that important? Why not make all cutouts the same depth relative to some arbitrary horizontal surface, say the max landscape height? I can see that might make the building models slightly more complex in that each will need a spacer under them equal to the height delta at that location (assuming they are created seperately and slotted into the landscape later).

Ed Bartlett
22-05-2009, 12:28 PM
Thanks for such a quick response Kip!

Can you expand........? Do you know of a CNC software that will do this?

Thanks

Ed

Ed Bartlett
22-05-2009, 12:33 PM
Ed, welcome to the forum.

I dont know of any software that will do this directly but there's always more than one way to approach a problem. Just so I understand the problem, am I right in assuming you want the building cutouts to be a set depth relative to the landscape surface at that location? If so, why is that important? Why not make all cutouts the same depth relative to some arbitrary horizontal surface, say the max landscape height? I can see that might make the building models slightly more complex in that each will need a spacer under them equal to the height delta at that location (assuming they are created seperately and slotted into the landscape later).
Thats exactly what i was trying to explain yes.
I've taken that approach before and was working out to be taking too long. The solution we're looking for is to cut down on time significantly. If only the company that does it for us would tell us the name of the software it could be solved! But obviously then we'd stop sending them work so they're keeping it to themselves!

Ed

Ed Bartlett
22-05-2009, 12:42 PM
These two images show the problem i have. The 3D is what i'm aiming for as a finished result. I have the landscape 3D file but using the 2D drawing of the outlines of buildings, it becomes more complicated.

irving2008
22-05-2009, 12:54 PM
These two images show the problem i have. The 3D is what i'm aiming for as a finished result. I have the landscape 3D file but using the 2D drawing of the outlines of buildings, it becomes more complicated.
What form are the 2D and 3D files in when you send them to the 3rd party or to the CNC machine?

Ed Bartlett
22-05-2009, 12:57 PM
At the moment we start with the 3D file as a .stl file. We run it through Mill Wizard to get a .goo file that is read by our machines. The 2D files are .hpg when we send them to the machines.

irving2008
22-05-2009, 01:05 PM
At the moment we start with the 3D file as a .stl file. We run it through Mill Wizard to get a .goo file that is read by our machines. The 2D files are .hpg when we send them to the machines.So ideally you want something to read the .stl (stereolithography file) and .hpg (hp graphics vector language) files and create a merged .stl file where the Z-axis in the original .stl file is depressed a fixed amount inside the outlines of the elements in the .hpg file.

Oh joy, brings back my Computer Science MSc Graphincs Programming Module... many moons ago!

Ed Bartlett
22-05-2009, 01:07 PM
Thats sounds like exactly what i'm after............

irving2008
22-05-2009, 01:18 PM
I'd set the heights of the individual buildings in cad-cam turn 3D on and hit go to generate G-code....Maybe I'm seeing it too simple but I see nothing in-between to get trashed by fast traverse? (no toolclamps for instance...I do great at milling toolclamps lol)Kip, I think Ed's point is that they dont have the heights individually, they need to work them out based on the height of the landscape at that point which means merging the files.

Ed Bartlett
22-05-2009, 01:21 PM
Yeah thats right. I need to use the 2D outlines of the buildings that are obviously on one flat plane, and have them cut out of freeform landscape a set depth. There is a software that does it but i cant define it well enough when searching.

irving2008
22-05-2009, 01:34 PM
I suspect this is either some proprietary software or a function in a very high-end CAD package. What have you been searching on?

Some of the terrain functions in GIS tools such as Geomantics GenesisIV might do the trick. But they are very expensive just for this purpose.

Ed Bartlett
22-05-2009, 01:37 PM
Thats what i figured. It seems to be pretty state of the art. I've just been brute force searching on google for "CNC software" and having alook at whats around, reading specs etc.

irving2008
22-05-2009, 01:48 PM
Does the 2D file have to be .hpg, can you output it in .stl or some other format?

Do you have a simple example of an .stl and .hpg files I can look at? i.e. not 100's of buildings, maybe a landscape with a couple of them?

I have an idea how this might be done, but I dont want to promise anything without being sure.

irving2008
22-05-2009, 03:07 PM
I thought they had 2 files with one having the terrain and the other the building details on......I don't see a difficulty....just join the g-code and press go...... seems simple.


What programs generate the terrain and building details?the buildings file is 2D just the plots not the complete building, therefore has no z-info. Yes you could adapt the file to extrude each building plot by a fixed amount, but what Ed needs is for each building plot to set the Z origin to the contour height at the centre of that plot and then adjust the Z cut to be a fixed depth from there into the surface. It could be done at the G-Code level but you'd need to emulate the landscape tool path and watch for the intersect with a building plot and then use that to adjust the g-code for the building plot (i.e. the pocket).

It would be better to do at the .stl level, not least because its easier to find the intersects and also because it could be reviewed/visualised before machining.

Ed Bartlett
22-05-2009, 03:11 PM
Yeah exactly. I've doing it the long way like you just described. It's the software i'm after more than anything. Will see if i can find a suitable file.

irving2008
22-05-2009, 04:05 PM
I thought so...Drag a box round the plot and then translate it...Simple

What cad-cam are you using on your machine Irving?
Lots of bit n pieces, mainly shareware

Kip, simple maybe but time consuming, if you look at the graphics Ed posted there are 100's of building plots to translate. He wants to automate the process to save time...

irving2008
22-05-2009, 04:50 PM
yes but its an .STL file, a surface made from triangles. Theres no simple way of deriving the height from the file without rendering it in a viewer, navigating to the relevant location and reading the height off the viewer then transfering that to the 2D plot. Which is what Ed has been doing roughly.

Thats why it needs to be done programatically - for each building plot find the triangles that intersect the plot, work out the height at the centre of the plot (not necessarily the vertex of a triangle), possibly average across more than one triangle (think what happens if the plot spans a deep crevice, where do you take the measurement from?) then offset negatively in the Z direction to turn the plot into a solid, so it can be pocketed. Better still, amend the STL file to create the pockets in-situ so it can all be machined in one go.

BillTodd
22-05-2009, 05:40 PM
A quick google finds this:



At 09:59 AM 12/30/2006, tony hakki wrote:

hello;
Can I use the following code for obtain STL file's all (x,y,z) surface coordinates?Thanks in advance
tony


double X[3], Y[3], Z[3];

vtkSTLReader *read = vtkSTLReader::New();

Tony,

Yes, if you first do a:

read>Update();

It seems to me this piece of software may be able extract Z data from an stl file given X & Y



http://www.vtk.org/

irving2008
22-05-2009, 06:01 PM
Bill,

Thanks for that. There are lots of STL tookits available, not all are freeware. I have one for C# as that is my preferred programming language (VTK is for C++). There is also an import for HPGL, but thats a plotter output not the solid model for the building plots so only gives lines not the polygons - another format would be better.

A little explanation as to why the problem isnt as straightforward as it may seem: STL files model the suface by using triangles, therefore there are 3 X,Y,Z tuples for each triangle. Knowing the X,Y of a point on the building plot doesnt help unless it happens to coincide exactly with a X,Y of a vertex on a triangle... and in the building plot data we only have the ends of the lines - 2 X,Y tuples. So the problem is one of how do we decide if a given line on a building plot intersects with a given triangle in the landscape....

Reading the STL and HPG files is easy, its calculating the intersections thats tricky - not technically hard to do, but when you have, as in Ed's case maybe 50000 triangles in the landscape and 100 or so building plot polygons that could be around 5 million intersects to be checked. A polygon to polygon intersect requires around 20 or so floating point calculations to get to the decision whether there is an intersect or not so we are looking at something like 100m calculations, maybe several minutes processing on a 'normal' PC, assuming it can all fit in memory at once (not a problem on a reasonable spec PC).

Still thats quicker than doing it by hand eh?

BillTodd
22-05-2009, 06:33 PM
I see :)

I see it as essentially a sorting problem (I assume the .stl file isn't just a random collection of tuples). Optimising the data handling will be key to speeding things up.

Ed Bartlett
27-05-2009, 02:01 PM
Thanks guys. I think i've found a software that will do it. It seems pretty advanced and a guy i spoke to form the manufacturers says it will do it!

For your info it's called: "OneCNCXR3 Expert Mill software"

Ed

Lee Roberts
27-05-2009, 10:27 PM
He's the Tec Support guy !

enrique
20-06-2009, 03:03 AM
im not sure if this is any use to you but i use hightfields in my work too but in a very different application ,,however your problem seems very simple to me ..if i am correct
you have a map presumably created by point-cloud or splines data or whatever
and you need to mill the bases of your buildings ...meaning that the lowest point in your map would be zero and any increment of hight determined by your method of creation.
if the level of any buildings foundation slab should be determined by the lowest point of contact with the surface or otherwise stepped up or down according to regs or requirements. what you need to do is give a flat hight surface to the regions that are called bases ...the outline vectors would be given a specific hight either as groups or individually and then merged with the ground or surface map
i can see no reason why this cannot be done in autocad, rhino, studio max, cheetah,hexagon,maya,the list goes on. try sketchup its free....but you still have to generate the g code so i recommend looking at artcam after version 7 as they introduced 3d layers its an expensive programme at five grand though
but you could still do this in rhino at a few hundred quid
if your desperate send files to me and ill send you g code back if it works for you id be happy to help..all you need to do is is have the datum for the ground map or lowest point set to zero
and then give each plot or group of plots a hight assuming that you have a scale determined.