Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Stretch on an angle or skew

Patchy
Mentor

Stretch on an angle or skew

Patchy
Mentor
Mentor

Question.JPG

 

Is there a command to stretch from the picture left to picture right?

Responder
Soluciones aceptadas (2)
1.227 Vistas
16 Respuestas
Respuestas (16)

AVCPlugins
Advisor
Advisor
Solución aceptada

No, the stretch command doesn't do that. It's more like some sort of distortion. This can only be done using parametric constraints in the source lines.


Plugins for AutoCAD
A>V>C>
AppStore | Facebook | Twitter | YouTube | Blog

Washingtonn
Collaborator
Collaborator

If the outline is a single polyline and the hatch was done within the polyline then it should work.  If the outline has separate lines and the hatch down inside separate lines (even if the outline is then turned into a single polyline) then it will not work.

You could stretch the outline and then adjust the hatch to match the outline.

ВeekeeCZ
Consultant
Consultant
No issue IF the horizontal lines are actually a HATCH pattern associated to its boundary.

JBerns
Advisor
Advisor

I would agree with the others that if the interior lines are actually a hatch pattern that is associated to the exterior object (polyline), then the hatch pattern should adjust after the polyline is skewed.

 

Otherwise, if the interior objects are individual lines, then parametric constraints would be needed to keep them attached to the vertical edges during the skew process.

-----------------------------------------------------------------------------------------
CAD Administrator
Using Inventor 2022
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional

Patchy
Mentor
Mentor

Unfortunately the red lines are lines and not a hatch.

 

0 Me gusta

Washingtonn
Collaborator
Collaborator

Here is an option you could use ....

Washingtonn_0-1673553421633.png

Patchy
Mentor
Mentor

Thanks for the suggestion.

I'm looking for a quick way such as LISP to move by Window or Crossing the

red lines to touch the whiteQuestion.JPG box without using stretch and trim.

I'm lazy to draw that's all.

I'll search the internet.

 

0 Me gusta

pendean
Community Legend
Community Legend

@Patchy wrote:

Thanks for the suggestion.

I'm looking for a quick way such as LISP to move by Window or Crossing the

red lines to touch the whiteQuestion.JPG box without using stretch and trim.

I'm lazy to draw that's all.

I'll search the internet.

 


EXTEND command (with TRIMEXTENDMODE on) and a lasso selection takes fewer clicks that whatever it is you seek with a stretch if I understood your exact need correctly :cara_guiñando_un_ojo:

0 Me gusta

Patchy
Mentor
Mentor

Thanks Dean, I'll try that with new PC at work.

Still using 2008 at home.

 

0 Me gusta

pendean
Community Legend
Community Legend

@Patchy wrote:

Thanks Dean, I'll try that with new PC at work.

Still using 2008 at home.


In R2008, tap <enter> twice after staring EXTEND command for the same effect.

FENCE might be your only option too, if you find an intersecting window too cumbersome.

0 Me gusta

Kent1Cooper
Consultant
Consultant

If the boundary is always a parallelogram as in the example, there's another possibility, though it requires doing something with each Line individually [but only one thing, not both Extend and Trim]:  After skewing the boundary, select all the Lines collectively.  With INTersection Object Snap included among running Osnap modes, grab the [in the configuration shown] left-end grip of a Line, hit Enter to go into Move mode, and Move it to its INTersection with the newly-angled left side of the boundary.

Kent Cooper, AIA
0 Me gusta

Patchy
Mentor
Mentor

Thanks Kent.

The question was asked from a user in the office and I told him all it is not possible with Autocad.

I said there is a routine I used that "drop" the points to a line as shown but I have not seen a routine

that can "drop" the lines to a select line.

Align.JPG

 

0 Me gusta

ВeekeeCZ
Consultant
Consultant
Solución aceptada

Well, such a routine could be quite easy to do.

 

(defun c:LineShift  ( / e p g1 g2 i e d e1 e2 x)

  (if (and (setq p (cadr (entsel "\nSelect target edge: ")))
	   (setq s (ssget "_:L" '((0 . "LINE"))))
	   (setq g1 (trans (osnap p "_end") 1 0))
	   (setq g2 (trans (osnap p "_nea") 1 0))
	   )
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i)))
	    d (entget e)
	    e1 (cdr (assoc 10 d))
	    e2 (cdr (assoc 11 d))
	    x (inters e1 e2 g1 g2 nil))
      (if (< (distance e1 x) (distance e2 x))
	(entmod (append d (list (cons 10 x) (cons 11 (mapcar '+ (mapcar '- x e1) e2)))))
	(entmod (append d (list (cons 10 (mapcar '+ (mapcar '- x e2) e1)) (cons 11 x)))))))
  (princ)
  )

 

Just a side note.

If you need to move something messy, pick an edge from which are the lineends that should be moved there clearly CLOSER than to the other lineends.

 

BeekeeCZ_0-1673622374632.png

 

Patchy
Mentor
Mentor

That's Beautiful.

Thank you BeeKeeCZ.

0 Me gusta

ВeekeeCZ
Consultant
Consultant

Text version.

 

(defun c:TextShift  ( / s p g1 g2 i e d e1 e2 x c)

  (if (and (setq p (cadr (entsel "\nSelect target edge: ")))
	   (setq s (ssget "_:L" '((0 . "TEXT"))))
	   (setq g1 (trans (osnap p "_end") 1 0))
	   (setq g2 (trans (osnap p "_nea") 1 0))
	   )
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i)))
	    d (entget e)
	    e1 (cdr (assoc (setq c (if (= 0 (cdr (assoc 72 d)) (cdr (assoc 73 d))) 10 11)) d))
	    e2 (polar e1 (cdr (assoc 50 d)) 1.)
	    x (inters e1 e2 g1 g2 nil))
      (entmod (subst (cons c x) (assoc c d) d))))
  (princ)
  )

 

Patchy
Mentor
Mentor

Thanks again BeeKeeCZ.

It worked as I wished.

0 Me gusta