Subject:
|
Re: Dimensions of the parts
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Tue, 13 Apr 1999 18:12:01 GMT
|
Viewed:
|
832 times
|
| |
| |
Leonardo Zide skrev i meddelandet
<3712B018.76665708@centroin.com.br>...
>
> But how can the program know if a face from a piece is inside another
> piece ? I've been only testing for intersections between faces.
If any two corners of a (planar) face, from one brick, is on opposite
sides of a (planar) face of the other brick, they must be intersecting
(not completely true, of course, as you have to take the size of the
faces into consideration too).
But perhaps I misunderstood your question? Do you mean: how to find
out if (for example) a peg is inside a hole, and still no _faces_
intersect?
I suppose you could do it (perhaps with a little knowledge of _which_
pieces goes inside things) by testing one piece against a 'bounding
box' of the other one (Or, to get more precision, the 'convex hull' -
computationally heavy).
Or you could edit your pieces and add invisible faces over openings,
so you have a face to test against. One piece _completely_ enclosed by
another would still not be detected this way.
A good newsgroup for this kind of problem is
comp.graphics.algorithms - if you don't already read it take a look!
--
Anders Isaksson, Sweden
BlockCAD: http://user.tninet.se/~hbh828t/proglego.htm
Gallery: http://user.tninet.se/~hbh828t/gallery.htm
|
|
Message is in Reply To:
| | Re: Dimensions of the parts
|
| (...) But how can the program know if a face from a piece is inside another piece ? I've been only testing for intersections between faces. Leonardo (26 years ago, 13-Apr-99, to lugnet.cad.dev)
|
14 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|