Drawing Arcs in a circle with an Over lap

Drawing Arcs in a circle with an Over lap

Emmanuel_Kilama
Contributor Contributor
1,130 Views
15 Replies
Message 1 of 16

Drawing Arcs in a circle with an Over lap

Emmanuel_Kilama
Contributor
Contributor

Hello

How can I quickly draw arcs of known radius along a circle with an overlap?

0 Likes
Accepted solutions (4)
1,131 Views
15 Replies
Replies (15)
Message 2 of 16

Kent1Cooper
Consultant
Consultant

Illustrate, please.  Arcs overlapping the Circle?  Overlapping each other along the Circle?  Lying on the Circle, or is the "known radius" of the Arcs different from that of the Circle?  If so, are they all concentric?  How much overlap, and is that defined as an angle or a length?  Is there a difference between "in a circle" in the Topic heading and "along a circle" in the Message?  Etc., etc.

Kent Cooper, AIA
0 Likes
Message 3 of 16

Emmanuel_Kilama
Contributor
Contributor

The arcs are as shown in pic attached. Red lines are the arcs and the white is just the show the overlap 

0 Likes
Message 4 of 16

Kent1Cooper
Consultant
Consultant

That answers many, but not all, of the questions.  [New one:]  What determines how many Arcs, and [old one]: by how much they overlap?

Kent Cooper, AIA
Message 5 of 16

Emmanuel_Kilama
Contributor
Contributor

I need the arcs to be approx 9.7m with a lap of 2.3m

0 Likes
Message 6 of 16

Kent1Cooper
Consultant
Consultant

That description sounds like what you want is this, with the Arcs themselves at 9.7m [±] long, including their overlaps with adjacent Arcs:

Kent1Cooper_0-1704465295072.png

but the proportions in your image look more like what you want is for the 9.7m [±] to be the "effective" length, or center-to-center-of-overlaps length [the outboard 9.7 dimension here], or midpoint-to-midpoint of Arcs [the inboard one], with the length of the Arcs themselves being the sum of that C-C length plus the overlap:

Kent1Cooper_1-1704465430988.png

Can you clarify?  Whichever way you want it, it should be possible for either:

A.  the 2.3m overlap length to be exact, with the length of the Arcs adjusted by the circumference of the Circle divided into the number of segments that gives the closest result [I assume from Message 5, since you say "approx." about the 9.7 but not about the 2.3], OR

B.  the Arc length to be exactly 9.7m, with the overlap length affected by the Circle circumference, OR

C.  both to be tweaked based on the Circle circumference, so that the ratio between Arc length and overlap length is the same as 9.7 to 2.3.

Do you have a preference?

 

Also, I assume your drawing unit is a meter, not a centimeter or a millimeter, so that the 9.7 & 2.3 are in drawing units the same as what the Circle's data will use for its radius, etc.

Kent Cooper, AIA
0 Likes
Message 7 of 16

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

.... the proportions in your image look more like what you want is for the 9.7m [±] to be the "effective" length, or center-to-center-of-overlaps length [the outboard 9.7 dimension here], or midpoint-to-midpoint of Arcs [the inboard one], with the length of the Arcs themselves being the sum of that C-C length plus the overlap:

Kent1Cooper_1-1704465430988.png

.... it should be possible for either:

A.  the 2.3m overlap length to be exact, with the length of the Arcs adjusted by the circumference of the Circle divided into the number of segments that gives the closest result [I assume from Message 5, since you say "approx." about the 9.7 but not about the 2.3],

....

I assume your drawing unit is a meter ....


Assuming those things from among the choices, this seems to work:

 

(defun C:OAOC ; = Overlapping Arcs Overlaying Circle
  ;; Arcs 9.7± units from midpoint to midpoint, extended to overlap 2.3 units
  (/ cir cdata ctr rad circum qu angoff)
  (if
    (and
      (setq cir (car (entsel "\nSelect Circle to overlay with overlapping Arcs: ")))
      (setq cdata (entget cir))
      (member '(0 . "CIRCLE") cdata)
    ); and
    (progn ; then
      (setq
        ctr (cdr (assoc 10 cdata))
        rad  (cdr (assoc 40 cdata))
        circum (getpropertyvalue cir "Circumference")
        qu (fix (+ (/ circum 9.7) 0.5)); quantity of Arcs
        angoff (/ 2.3 rad); angle offset [radians] for end extensions for 2.3-unit overlap
      ); setq
      (command
        "_.arc" "_c" "_non" ctr ;; [spelling out "_center" for option is taken as Osnap call]
          "_non" (polar ctr (- angoff) rad)
          "_non" (polar ctr (+ (/ (* pi 2) qu) angoff) rad)
        "_.array" "_last" "" "_polar" ctr qu "360" "_yes"
      ); command
    ); progn
  ); if
  (prin1)
)

 

The midpoint of an overlap will fall at the right quadrant point of the Circle [0° direction from the center].

 

All can be adjusted if my assumptions were not correct.  It could be built to ask for target lengths instead of having them built in.  And all the usual enhancements can be added, like Layer control, Undo begin/end wrapping, *error* handling, etc.

Kent Cooper, AIA
0 Likes
Message 8 of 16

Emmanuel_Kilama
Contributor
Contributor

Hello @Kent1Cooper 

Thanks for the reply.
My preferred option is that the total length of the arc (C-C of the arc) is approximately 12m (the smaller value should be taken). Meanwhile, the Overlap length is exactly 2.3m meaning the effective length would be  approx 9.7m

0 Likes
Message 9 of 16

Kent1Cooper
Consultant
Consultant

@Emmanuel_Kilama wrote:

.... the total length of the arc (C-C of the arc) is approximately 12m (the smaller value should be taken). ....


Message 7 does it that way except that it calculates the number of Arcs needed around the Circle by rounding the straight division result up or down to the nearest integer value.  That means the Arcs cansometimes come out to longer than 12m.  Does the red part mean it should always round the quantity upward, so that the resulting Arcs are never longer than 12m?

Kent Cooper, AIA
0 Likes
Message 10 of 16

Emmanuel_Kilama
Contributor
Contributor

Hello @Kent1Cooper 

 

The idea is I am trying to represent rebar layout in a circular footing. Each rebar length on site is 12m long.

0 Likes
Message 11 of 16

Kent1Cooper
Consultant
Consultant

They try changing this line:

qu (fix (+ (/ circum 9.7) 0.5)); quantity of Arcs

to this:

qu (+ (fix (/ circum 9.7)) (if (= (rem circum 9.7) 0) 0 1)); quantity of Arcs

so it will always round the quantity of Arcs up, so none will be longer than 12 units.  If the distance divides exactly, it will not add one; if not, it will add one to the quantity of Arcs.

Kent Cooper, AIA
0 Likes
Message 12 of 16

komondormrex
Mentor
Mentor
Accepted solution

hey there,

check the code following

 

(defun c:arc_gap_2_3 (/ circle_sset start_angle start_distance index gap arc_length circle_object arc_gap_number arc_length)
  (if (setq circle_sset (ssget '((0 . "circle"))))
    (foreach circle (vl-remove-if 'listp (mapcar 'cadr (ssnamex circle_sset)))
	  (setq start_angle 0
	  	start_distance 0
	  	index 0
	  	gap 2.3
	  	arc_length 9.7
	  	circle_object (vlax-ename->vla-object circle)
		arc_gap_number (1+ (fix (/ (vla-get-circumference circle_object) (+ arc_length gap))))
	  	arc_length (- (/ (vla-get-circumference circle_object) arc_gap_number) gap)
	  )
	  (repeat arc_gap_number
	    (vla-addarc (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
			(vla-get-center circle_object)
	      		(vla-get-radius circle_object)
	      		start_angle
	      		(angle (vlax-get circle_object 'center) (vlax-curve-getpointatdist circle_object (+ start_distance arc_length)))
	    )
	    (setq start_angle (angle (vlax-get circle_object 'center)
				     (vlax-curve-getpointatdist circle_object (setq start_distance (* (setq index (1+ index)) (+ arc_length gap))))
			      )
	    )
	  )
    )
  )
)

 

0 Likes
Message 13 of 16

calderg1000
Mentor
Mentor

Regards @Emmanuel_Kilama 

Try this code. Take into account the following consideration. If the overlap length is 2.3, then because it is a structural reinforcement element, it should be applied at both ends, therefore the length of the resulting arc should be: 12-2.3-2.3=7.4.
If you require the length of the resulting arc to be 9.7, then the overlap length would be 1.15 at both ends.

It should also be taken into account that under these arc length and overlap conditions, an exact number of 12m elements will not always be obtained. that cover the total length of the circumference. Therefore, the last arc element will have a value different from 12.

 

;;;___
(defun c:nR (/ s sv r c a sp lc la lt al at n cl)
  (princ "\nSelect Circle: ")
  (setq	s  (ssget "+.:E:S" '((0 . "circle")))
	la (getreal "\nEnter total length Arc: ")
	lt (getreal "\nEnter overlap length: ")
  )
  (setq	sv (vlax-ename->vla-object (ssname s 0))
	r  (vlax-get-property sv 'radius)
	c  (vlax-get sv 'center)
	lc (* 2 pi r)			;l_tot
	a  0.
	al (/ la r)			; ang_tot
	at (/ lt r)			; ang_trasl
	n  (fix (/ lc (- la lt)))
	cl 1
  )
  (repeat n
    (entmakex (list '(0 . "arc")
		    (cons 10 c)
		    (cons 40 r)
		    (cons 50 a)
		    (cons 51 (setq a (+ a al)))
		    (cons 62 cl)
	      )
    )
    (setq a (- a at))
    (if	(= cl 1)
      (setq cl (1+ cl))
      (setq cl 1)
    )
  )
)

 


Carlos Calderon G
EESignature
>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.

0 Likes
Message 14 of 16

komondormrex
Mentor
Mentor
Accepted solution

another one with overlaps

(defun c:arc_lap_2_3 (/ circle_sset start_angle start_distance index gap arc_length circle_object arc_gap_number)
  (if (setq circle_sset (ssget '((0 . "circle"))))
    (foreach circle (vl-remove-if 'listp (mapcar 'cadr (ssnamex circle_sset)))
	  (setq start_angle 0
	  	start_distance 0
	  	index 0
	  	lap 2.3
	  	arc_length 12.0
	  	circle_object (vlax-ename->vla-object circle)
		arc_lap_number (1+ (fix (/ (vla-get-circumference circle_object) (- arc_length lap))))
	  	arc_length (+ (/ (vla-get-circumference circle_object) arc_lap_number) lap)
	  )
	  (repeat arc_lap_number
	    (vla-addarc (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
			(vla-get-center circle_object)
	      		(vla-get-radius circle_object)
	      		start_angle
	      		(angle (vlax-get circle_object 'center) (vlax-curve-getpointatdist circle_object (+ start_distance arc_length)))
	    )
	    (setq start_angle (angle (vlax-get circle_object 'center)
				     (vlax-curve-getpointatdist circle_object (setq start_distance (* (setq index (1+ index)) (- arc_length lap))))
			      )
	    )
	  )
    )
  )
)
0 Likes
Message 15 of 16

Kent1Cooper
Consultant
Consultant
Accepted solution

@calderg1000 wrote:

.... If the overlap length is 2.3, then because it is a structural reinforcement element, it should be applied at both ends, therefore the length of the resulting arc should be: 12-2.3-2.3=7.4.

If you require the length of the resulting arc to be 9.7, then the overlap length would be 1.15 at both ends.

It should also be taken into account that ... an exact number of 12m elements will not always be obtained. that cover the total length of the circumference. Therefore, the last arc element will have a value different from 12.


@Emmanuel_Kilama correct me if I'm wrong, but the overlap has half of its length coming from one bar, and the other half from the adjacent bar, so the effective length between midpoints of overlaps is still a maximum of 9.7 for a 12-unit bar [see the second image in Message 6].  Yes, the single-bar stretch between the near ends of overlaps would be a maximum 7.4 units, if that's what you mean.

And the arc elements can all be the same [the original image at Message 3 looks like that, and my suggested code assume that] if either:

A.  The lengths of the bars is a maximum of 12 units, but they can be shorter to fit around the circle equally with the right overlap [requiring cutting them], or;

B.  The length of the overlaps is a minimum of 2.3 units, but can be longer [allowing the bars to be left at their full 12-unit length].

@Emmanuel_Kilama , is there a preference, whether for a different-length one somewhere, or cutting bars shorter, or leaving them un-cut and having greater overlap distance?  I would lean toward the last option -- I don't see any structural reason why the overlaps couldn't be longer, and it seems a waste of time to cut them a little shorter for an exact overlap length [unless you're cutting off enough length to be able to use elsewhere, which doesn't seem likely].

Kent Cooper, AIA
0 Likes
Message 16 of 16

calderg1000
Mentor
Mentor
Accepted solution

Regards, @Kent1Cooper 

According to my opinion, the length of 12 m. It obeys a constructive consideration that depends on the radius of the circle on which the reinforcing rods will be placed and that has to do with the arc shape of the reinforcing steel. The overlap length is due to a structural consideration that has to do with the diameter of the reinforcing rod, to absorb the tensile forces that will act on the concrete structure. It is true that the measurements can be more or less a few centimeters. But for constructive uniformity it may be better to work with integer values, or with rounding to the nearest centimeter. Then there will always be an uncovered length that must be measured at the end and a custom Rod made to close the perimeter including the overlap. It is my interpretation without knowing exact details of the proposed reinforced concrete structure.


Carlos Calderon G
EESignature
>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.

0 Likes