Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    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.

  2. 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.

  3. #13
    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.

  4. 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.

  5. Quote Originally Posted by Kip View Post
    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.

  6. #16
    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.

  7. Quote Originally Posted by Kip View Post
    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...

  8. 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.

  9. A quick google finds this:

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

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

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

    vtkSTLReader *read = vtkSTLReader::New();


    Yes, if you first do a:

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

  10. 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.

    [edit]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.... [/edit]

    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?
    Last edited by irving2008; 22-05-2009 at 04:13 PM.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Powertran VFD problem
    By phill05 in forum Routers, Spindles & Controllers
    Replies: 7
    Last Post: 29-10-2013, 06:59 PM
  2. Replies: 2
    Last Post: 11-12-2012, 11:58 AM
  3. VHD Mounting problem
    By PWD in forum Routers, Spindles & Controllers
    Replies: 8
    Last Post: 25-11-2012, 09:29 AM
  4. Problem with X
    By gorbo in forum General Discussion
    Replies: 17
    Last Post: 24-02-2011, 04:33 AM
  5. Z Problem
    By airwolf in forum Machine Discussion
    Replies: 2
    Last Post: 10-11-2009, 07:08 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts