Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extend/ trim a line to/by a 3D surface/ 2D plane

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
votuananhvungtau
2787 Views, 13 Replies

Extend/ trim a line to/by a 3D surface/ 2D plane

Hello,
I am wondering how to extend/ trim/ lengthen a line to/by an 3d surface or by a 2D plane ?

I often do it by draw a 3D object (pipe/round bar) with the center line in the line above and then trim it by surface, find the intersection point... to much steps.

Do you know any more simple ways ?

Thank you so much!

13 REPLIES 13
Message 2 of 14

AFAIK this is only possible with workarounds similar to yours. You can find some examples here in the forum, not significantly less steps as you do.  😞 

 

>>Click<<

 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 3 of 14

Another possibility: 

Use the Imprint command to create a zero length line on the surface. Now you can grab the endpoint of the line you want to "trim" and drag it to the endpoint of the zero length line. 

 

>>Click<<

 

Even if that should work with procedural surfaces too, here it works only with NURBS faces (I don't yet know why). 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 4 of 14

Here's a simple vlisp program I just wrote.   The program creates a section line where the line intersects the surface.  The user then must use the trim or extend command to modify the line to the point of intersection. I'm sure it could be enhanced to be more automatic by using the pick point to determine which end of the line to modify. 

Given:

leeminardi_0-1654265246265.png

The command create a section line (white).

leeminardi_1-1654265301653.png

Which is the trimmed (or extended) and the section line deleted.

leeminardi_2-1654265387884.png

 

 

; Creates a section line on a surface at the intersection of a line
; and the surface.  The TRIM or EXTEND command can then be used to trim
; or extend the line to the surface.
; L. Minardi 6/3/2022
(defun c:surfintr ( / ed e1 e2 enSurf pt)
(setq ed     (entget (car (entsel "\nSelect line.")))
      e1     (cdr (assoc 10 ed))
      e2     (cdr (assoc 11 ed))
      enSurf (car (entsel "\nSelect surface"))
      pt     (mapcar '+ e1 '(100 0 0))
)
(command "_section" enSurf "" 3 e1 e2 pt)
(princ)
  
)  

 

 

 

 

 

 

lee.minardi
Message 5 of 14

Another (non simple) way to di it is use the imprint command. 

 

If you stick this macro in a button it allows you to just select the solid and then select the object you want to trim. It duplicates the solid and imprints the line. Afterwards you can just move your line to the imprinted location and then delete the duplicated solid. 

 

 

^C^CCopy \;@0,0;@0,0;^C^CIMPRINT;LAST;\;N;^C^C

 

 

 

Still a work around but it can cut down on the click using a macro. 

 
 
 

CADnoob

EESignature

Message 6 of 14

Thank you for your helpfull supports.
One more question, how to do that with a 2D plane instead of 3D surface ?

Message 7 of 14

What is a 3DPlane? Which command do you use to create it? Post an example dwg please. 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 8 of 14

So sorry, I used wrong word "3D plane". I just edit it to 2D plane.

Please forgive me.

Message 9 of 14

Please excuse my ignorance, but I still don't know what you mean. Please tell us the command to create it or post a dwg including such an object (or preferably both 😉 ).

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 10 of 14

Sorry because of my incorrect description. Please see picture below:

The 2D plane is stiffener plate surface. I want to extend/trim the line to the plate.

 

votuananhvungtau_0-1654330757096.png

 

Message 11 of 14


@votuananhvungtau wrote:

Please see picture below:


 

Sorry, an image doesn't give us enough information. Post the dwg-file please (including the line you want to trim). 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 14

Please find my attached file

Message 13 of 14

 

>>Click<<

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 14 of 14

You can use the LISP and process I outline in post 4 for trimming/extending a line to its intersection with a solid too.

lee.minardi

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report