Jump to content

Alignment of midpoints of dashed lines


rock1

Recommended Posts

I want to align two perpendicular long dash-small dash lines with their centres in Autocad 2012. I have to do it manually by trial and error. Is there a smart way to do it?

 

CENTRE ALIGN.png

Link to comment
Share on other sites

In short 'Not really'

 

A little longer :

The dash/space sequence is actually a display feature, not an entity construction like that of a hatch is made of. In other words you directly cannot explode a linetype.

 

You could probably come close but need to :

  • Read the line type definition
  • Adjust the boundry points based on either LTSCALE or CELTSCALE
  • Translate the intersection point to the current UCS
  • Calculate the point matrix based on the above.

 

Not a lot of fun.

 

-David

Link to comment
Share on other sites

In short 'Not really'

 

A little longer :

The dash/space sequence is actually a display feature, not an entity construction like that of a hatch is made of. In other words you directly cannot explode a linetype.

 

You could probably come close but need to :

  • Read the line type definition
  • Adjust the boundry points based on either LTSCALE or CELTSCALE
  • Translate the intersection point to the current UCS
  • Calculate the point matrix based on the above.

 

Not a lot of fun.

 

-David

 

I don't understand the third and fourth steps. It seems complicated. My trial and error method is better I suppose? Please explain the steps anyway.

Link to comment
Share on other sites

You will have to declare if the center intersection is of a space segment or line segment and/or which part of the sequence. Then you can calculate start and end points of the line segments in all 4 directions. ( and in the current ucs/elevation/thickness/layer/ctab ). I will try and make a small sample if I get a chance. It will require an AutoLISP routine at the very minimum. And probably at the minimum of an intermediate programming level. Not for novicies -David

Link to comment
Share on other sites

Going down the unconventional route, I modified the Text Explode lisp in Express Tools so that it exploded lines.

 

The downside is that you now have a number of short and long lines not connected. But the advantage is that now you can get the two short lines to cross as you want.

Line-Explode.PNG

Link to comment
Share on other sites

Going down the unconventional route, I modified the Text Explode lisp in Express Tools so that it exploded lines.

 

Interesting, Does it honor PLINEGEN ? Can it take LTSCALE or CELTSCALE (48 . 1) into consideration ?

 

PHANTOMX2 at 0.5 scale

 

The magenta line connects the midpoint of each line. The red line aligns in various parts to pattern based on overall lengths

 

Each line increases by 1 unit. The the display length of the first and last segment are determined by autocad. I don't the rules that determines this.

 

-David

ltype.jpg

Link to comment
Share on other sites

Interesting, Does it honor PLINEGEN ? Can it take LTSCALE or CELTSCALE (48 . 1) into consideration ?......

 

I think that the way TXTEXP does it is to export the screen image as a WMF, and then re-import the image as lines and arcs.

Link to comment
Share on other sites

Perhaps an alternative place a circle and trim, but again makes more lines but makes a gap. Can snap circle then erase.

 

+1 for this one

Link to comment
Share on other sites

Perhaps an alternative place a circle and trim, but again makes more lines but makes a gap. Can snap circle then erase.

 

+2, and one can use a rotated pline square (rect) to place the center lines at a particular angle. Circles don't seem to rotate, do they. Draw the center lines to the midpoints of the square rotated to any angle, then draw new plines off those ends along the same angle if they need to be longer.

 

One of the nice professional looking touches in drafting is always crossing center lines at the center of the short dashes.

 

You can even make a block of two crossed aligned center lines, and use that as a starter kit. Insert point at the center intersection, of course.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...