Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

3d Face Projection?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
811 Views, 4 Replies

3d Face Projection?

I need to be able to extend a line to a 3d Face in autocad 2006.

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

I need to be able to extend a line to a 3d Face in autocad 2006.


Check this thread for a start:
 

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/to-get-intersection-between-a-line-and-a-3dface/td-p/2745633/highlight/true/page/2 

I attached a routine to Message 14 that determines whether a Line intersects a 3DFace, and if so, where.  It requires the Line to cross or have an end on the plane, but even if it doesn't, it could be a starting point for an altered routine that would find the virtual intersection.  Then you could take the Line's nearer end there, by several methods.

 

Does that sound like what you want to do?

 

Another question: might the 3DFace ever be four-sided and non-planar?

Kent Cooper, AIA
Message 3 of 5
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

I need to be able to extend a line to a 3d Face in autocad 2006.


A question occurs to me:  Do you want to extend a Line that is outside the plane of, but not parallel to, a 3DFace, so that its nearer end meets the plane of the 3DFace?  [That's what I assumed in my first reply.]  Or do you want to extend a Line that lies in the same plane as a 3DFace, so that its nearer end meets an edge of the 3DFace?  Or do you want to do either, depending on the relationship between them?  And would you want the same Extend/No extend option that regular Extend has, in case the extension of the Line would miss the 3DFace?

Kent Cooper, AIA
Message 4 of 5
Anonymous
in reply to: Anonymous

what i have is a round fireplace hood that is one size on the bottom and small size on the top that is flat on back and i am trying to put frame work that is a certain height form the ground to the hood and i just need to be able to extend a line to the hood from the ground and have it hit the hood, i can send you the file in an email and you can see what i am talking about.

Message 5 of 5
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

what i have is a round fireplace hood that is one size on the bottom and small size on the top that is flat on back and ... i just need to be able to extend a line to the hood from the ground and have it hit the hood....


I assume the "flat on the back" part is the 3DFace in question, and that it's planar and sloped [not vertical].  Try the attached, which seems to work in limited testing.  See the comments at the top of the file.

 

However, if the hood is not truly round but is made of a bunch of 3DFaces, and you want the Line to extend to whichever of those it would hit, and not the flat back [if, for example, that's vertical], this won't work unless you pick the right 3DFace -- it requires you to select one.  I suppose it could be made to find the right one from a selection set of them, but it would be a lot more complicated, throwing back in parts of the routine from that link that I took out, and adding more if the 3DFaces are 4-sided.

 

If you like, I think it would be a simple adjustment to make it work like the CHANGE command, that is, move whichever end of the Line is closer to the plane of the 3DFace to the [virtual] intersection of the Line with that plane, shortening or lengthening the Line [kind of like Trim or Extend, whichever is appropriate], and therefore working on Lines that cross the plane as well as those that don't.  That way, if you drew your line from the ground a little too long, it would still find the right length for it.

 

It is probably also possible to make it more like regular Extend in other ways, such as only extending the Line if you pick it nearer the end toward the 3DFace.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost