offset gap type

offset gap type

Anonymous
Not applicable
1,172 Views
8 Replies
Message 1 of 9

offset gap type

Anonymous
Not applicable

is there a way to make fillet or chamfer (using offset gap type) with radius or distance different from the offset distance 
ex. i want to make offset to rectangle wit distance 5 meter (with fillet 3 meter radius) 

is this an option ? or is there any way or trick or something that i can use ??? 

thanks in advance 

0 Likes
1,173 Views
8 Replies
Replies (8)
Message 2 of 9

ВeekeeCZ
Consultant
Consultant

 

No, no more setting. You can OFFSET the polyline, then somehow change the radius.

 

It would be better if you post some dwg example. 

... Does the polyline have more than one segment? More arc segments? More arc segments with different radiuses? What then?

0 Likes
Message 3 of 9

Kent1Cooper
Consultant
Consultant

Nothing built in, but that's not a difficult situation -- in over-simplified terms:

 

(defun C:O5F3 ()

  (command

    "_.offset" 5 (entsel "\nPolyline to offset: ") pause ""

    "_.fillet" "_radius" 3

    "_.fillet" "_polyline" "_last"

  )

)

Kent Cooper, AIA
Message 4 of 9

dbhunia
Advisor
Advisor

Hi 

 

You can also try...

 

For Fillet.....

(defun C:FPL (/)
(setq OD (getdist "\nEnter Offset Distance: "))
(setq FR (getdist "\nEnter Fillet Radius: "))
  (command
    "_.offset" OD (entsel "\nSelect Polyline to offset: ") pause ""
    "_.fillet" "_radius" FR
    "_.fillet" "_polyline" "_last"
  )
(princ)
)

For Chamfer....

 

(defun C:CPL (/)
(setq OD (getdist "\nEnter Offset Distance: "))
(setq CD (getdist "\nEnter Chamfer Distance: "))
  (command
    "_.offset" OD (entsel "\nSelect Polyline to offset: ") pause ""
    "_.chamfer" "_Distance" CD CD
    "_.chamfer" "_polyline" "_last"
  )
(princ)
)

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 5 of 9

Anonymous
Not applicable
thanks its amazing and very helpful
i want to ask for something more if i can and if you dont mind 🙂
cann this offset be multiple ?? i mean many objects at the same time not
only one object ??
0 Likes
Message 6 of 9

dbhunia
Advisor
Advisor

Hi

 

Try this .......

 

This is the to get offset both side.......(for chamfer only).... Hopefully you can manage the rest......

 

(defun C:CPL (/)
(setq OD (getdist "\nEnter Offset Distance: "))
(setq CD (getdist "\nEnter Chamfer Distance: "))
(command "_.chamfer" "_Distance" CD CD)
(Setq selectionset (ssget '((0 . "LWPOLYLINE"))))
(setq N (sslength selectionset))
(repeat (setq N (sslength selectionset))
	(progn
	(setq Data (ssname selectionset (setq N (- N 1))))
	(c:OOF)
	)
)
(princ)
)
(defun c:OOF (/)
  (vl-load-com)
    (setvar 'OFFSETDIST OD)
    (setq d (getvar 'OFFSETDIST))
    (setq o (vlax-ename->vla-object Data))
    (vla-offset o d);;; To get offset inside
    (command "_.chamfer" "_polyline" "_last");;;Chamfer Inside
    (vla-offset o (- d));;; To get offset outside
    (command "_.chamfer" "_polyline" "_last");;;Chamfer Outside
  (princ)
)

 

 Now you have to deside which side you want offset & Chamfer........comment accordingly(with pair) in the code....

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 7 of 9

john.uhden
Mentor
Mentor

Which reminds me to have to mention again that offsetting is not to the inside or outside; it is to the left or to the right.  Just like AutoCAD's angles, positive is to the left (CCW) and negative is to the right (CW).  Arcs are always drawn CCW, but polylines can be drawn in any direction.  You have to determine if the polyline was drawn CW or CCW to determine whether the "inside" is to the left or to the right.  Anyway, a positive offsetdist is to the right and a negative offsetdist is to the left.

John F. Uhden

0 Likes
Message 8 of 9

Anonymous
Not applicable

i tried the lisp of offset with chamfer and its amazing ,

but i need to select multiple polylines in the same command 

0 Likes
Message 9 of 9

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

... i need to select multiple polylines in the same command 


And by that, do you mean:

 

1) You want to select multiple Polylines one at a time, indicating to which side each is to be Offset as you go; or

 

2) You want to select multiple Polylines all at once, and have the command go through and do them all, in the same way [such as all outward]?

 

If the latter, what if there are any that are not closed, and for which there is not necessarily a clear "inside" and "outside"?  [A command could be made to accept selection of only closed ones, if appropriate.]

 

I also assume you want all of them Offset and Chamfered to the same distances  as each other, but it's worth asking -- is that the intent?

Kent Cooper, AIA
0 Likes