. .

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. 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 05:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Bookmarks

Posting Permissions

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