Jump to content

Draw line snapped to 45 degrees angle of circle block


Edgtrimmer

Recommended Posts

Anyone ever come up with a good way to start a line at one of the 45 degree angles of a circle block? Easy to snap to quadrants or center.

 

Thanks for any ideas.

Link to comment
Share on other sites

  • Replies 39
  • Created
  • Last Reply

Top Posters In This Topic

  • Edgtrimmer

    18

  • alanjt

    7

  • Jack_O'neill

    4

  • nestly

    4

Top Posters In This Topic

Posted Images

Perhaps you could take the time to first of all use Divide with 8 segments, then you would have points where you wanted to start all your lines :D

45circle.jpg

Link to comment
Share on other sites

Anyone ever come up with a good way to start a line at one of the 45 degree angles of a circle block? Easy to snap to quadrants or center.

 

Thanks for any ideas.

 

If you actually make the circle into a block, you can rotate it 45° and use the quadrant points. Inside a block, they rotate with the circle.

Link to comment
Share on other sites

You could draw your line from the quadrant, then rotate (or rotate with copy option) line with the center of the circle as the basepoint 45d.

Link to comment
Share on other sites

I have rotated the circle block before to use the quadrants. Often I need to snap to the 0-90-180-270 degree angles of the block as well and then the quadrants are rotated out of position for that. Adding some nodes to the block at 45 degree increments is an interesting idea.

Link to comment
Share on other sites

I usually just snap to the center and them use the circle of the block to trim the line. That's probably as easy as rotating the line after the fact. I have a simple macro that will allow snapping to 15 degree increments of a circle but it doesn't work on circles embedded in blocks.

Link to comment
Share on other sites

I often need to connect lines to the 90 degree increments as well as the 45 degree increments of the circle block so that idea is kind of wash. Thanks.

Link to comment
Share on other sites

I have rotated the circle block before to use the quadrants. Often I need to snap to the 0-90-180-270 degree angles of the block as well and then the quadrants are rotated out of position for that. Adding some nodes to the block at 45 degree increments is an interesting idea.

 

The nodes are probably the best way. You can change their positions by changing how many there are using the divide command.

 

Of course, if you wanted to get silly, draw a circle, make it a block, rotate it, then lay another circle on top of it. :lol: ( for the humor impeded members of the group, that was not a serious suggestion).

 

However, this one is. You refer to a circle block. Not sure what you may have in your circle block, but you might consider doing this a couple of other ways too. Add a line to your circle block, only make it a dynamic block with a rotation parameter. Then you'd only need to drag the line to the angle you want after inserting the block.

Link to comment
Share on other sites

Sorry, just meant that what I would gain form rotating the block 45 degrees to snap to the quadrant would be lost when I had to snap to where the quadrant used to be before the rotation. I often have lines connecting to a circle block at 0 degrees as well as 45 degrees for example.

Link to comment
Share on other sites

And the second way, if I hadn't hit the post button before I was finished, was to simply add a parametric angular constraint to the line that references something in the block that's vertical or horizontal. You could even add a line and the parameter in the block, then erase them both when you have it where you want it.

Link to comment
Share on other sites

I download the qs.lsp and tried it out. It's the same thing I had for snapping to 15 degree increments around a circle. It doesn't work if the circle in part of a block.

Link to comment
Share on other sites

(defun c:LFC (/ circle data ang)
 ;; Line From Circle
 ;; Alan J. Thompson, 08.15.11

 (vl-load-com)

 (if (and (setq circle (car (entsel "\nSelect circle: ")))
          (eq (cdr (assoc 0 (setq data (entget circle)))) "CIRCLE")
          (setq ang (getangle (trans (cdr (assoc 10 data)) 0 1) "\nSpecify angle for line: "))
     )
   (vl-cmdf
     "_.line"
     "_non"
     (trans (vlax-curve-getPointAtDist circle (* ang (cdr (assoc 40 data)))) 0 1)
     (strcat
       "<"
       (angtos (if (zerop (getvar 'WORLDUCS))
                 (- ang (angle '(0. 0. 0.) (trans (getvar 'UCSXDIR) 0 (trans '(0. 0. 1.) 1 0 T) T)))
                 ang
               )
               (getvar 'AUNITS)
               4
       )
     )
     PAUSE
   )
 )
 (princ)
)

Link to comment
Share on other sites

Thanks Allen. I tried out your LFC command. Unfortunately, the LFC.lsp command you wrote seems to have the same limitation as the QS.lsp command referenced above. It will not select a circle nested inside of a block. You are a coding machine though.

Link to comment
Share on other sites

With a rotation parameter, all you have to do is click on the block to turn on the grips, then click the round grip where the line hooks on. You can either drag it where you want it or type in an angle. Put it any where you want it.

 

circle block.jpg

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...