Jump to content

Recommended Posts

Posted

Hello!!

 

I have a lots of survey points that i have to join with a common point

then i have to join those points with an arc contineously to form a circle.

 

Is there any lisp or code to ease the work.

 

look at the attached sample drawing.

Course-2.dwg

Posted

This should get you started...

 

(defun c:Test (/ ss pt)
 (princ "\nSelect points: ")
 (if (and (setq ss (ssget '((0 . "POINT"))))
          (setq pt (getpoint "\nSpecify center point to connect points: "))
     )
   ((lambda (i p)
      (while (setq e (ssname ss (setq i (1+ i))))
        (entmake (list '(0 . "LINE")
                       '(100 . "AcDbEntity")
                       '(100 . "AcDbLine")
                       (assoc 10 (entget e))
                       (cons 11 p)
                 )
        )
      )
    )
     -1
     (trans pt 1 0)
   )
 )
 (princ)
)

Posted
This should get you started...

 

(defun c:Test (/ ss pt)
 (princ "\nSelect points: ")
 (if (and (setq ss (ssget '((0 . "POINT"))))
          (setq pt (getpoint "\nSpecify center point to connect points: "))
     )
   ((lambda (i p)
      (while (setq e (ssname ss (setq i (1+ i))))
        (entmake (list '(0 . "LINE")
                       '(100 . "AcDbEntity")
                       '(100 . "AcDbLine")
                       (assoc 10 (entget e))
                       (cons 11 p)
                 )
        )
      )
    )
     -1
     (trans pt 1 0)
   )
 )
 (princ)
)

Thanks,

your code works fine for the first part of my requirement. Also hope something for my second part. I use the command PLINE and select the first point then for the nextpoint option I use the sub command Arc by typing A and then the option for second by typing S and the select the other point as end point and then type the S and so on.

 

Here is the text from the command history pasted.

Specify start point:

Current line-width is 0.0000

Specify next point or [Arc/Halfwidth/Length/Undo/Width]: a

Specify endpoint of arc or

[Angle/CEnter/Direction/Halfwidth/Line/Radius/Second pt/Undo/Width]: s

Specify second point on arc:

Specify end point of arc:

Specify endpoint of arc or

[Angle/CEnter/CLose/Direction/Halfwidth/Line/Radius/Second pt/Undo/Width]: s

Specify second point on arc:

Specify end point of arc:

Specify endpoint of arc or

[Angle/CEnter/CLose/Direction/Halfwidth/Line/Radius/Second pt/Undo/Width]: s

Specify second point on arc:

Specify end point of arc:

Specify endpoint of arc or

[Angle/CEnter/CLose/Direction/Halfwidth/Line/Radius/Second pt/Undo/Width]:

 

thanks

Posted
Thanks,

your code works fine for the first part of my requirement. Also hope something for my second part. I use the command PLINE and select the first point then for the nextpoint option I use the sub command Arc by typing A and then the option for second by typing S and the select the other point as end point and then type the S and so on.

 

This should get you started...

 

I understand your second request and as I said, this should get you started. Have you given it a shot yourself?

Posted

In the other branch of your multiple posting (see how easy it is to confuse and break up lines of thought), I was uneasy about the geometrical validity of your method.

 

The way you do it, you create 16 individual arcs (when you do it properly), that are not tangential. Is that what the powers that be want? :shock:

 

The picture shows what the effect is (exaggerated)

ArcExaggerated.jpg

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