Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/19/2023 in all areas

  1. The image of the spiral is distorted as noted below. Position the image so that the center is at 0,0 then lock its layer. CReate points above the center to define where the helix should pass. Make sure the helix center is also at 0,0. Create a CW helix of 3 turns. Drag its grips so that it looks like the red helix below. Make a copy of the red helix (copy 0,0) and change the number of turns of the copy to 4. Then drag its start and end handles as needed. Use splines and or arc to complete the geometry.
    2 points
  2. This? (vl-load-com) (defun add_vtx (obj add_pt ent_name / bulg) (vla-addVertex obj (1+ (fix add_pt)) (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 0 1)) (list (car (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name)) (cadr (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name)) ) ) ) ) (setq bulg (vla-GetBulge obj (fix add_pt))) (vla-SetBulge obj (fix add_pt) (/ (sin (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4)) (cos (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4)) ) ) (vla-SetBulge obj (1+ (fix add_pt)) (/ (sin (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4)) (cos (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4)) ) ) (vla-update obj) ) (defun c:div-vertex_po ( / ss max_l n ent obj_vla pr dist_end dist_start seg_len div l_div l) (princ "\nSelect polylines.") (while (null (setq ss (ssget '((0 . "LWPOLYLINE"))))) (princ "\nSelect is empty, or isn't POLYLINE!") ) (initget 7) (setq max_l (getdist "\nMax length between vertex: ")) (repeat (setq n (sslength ss)) (setq ent (ssname ss (setq n (1- n))) obj_vla (vlax-ename->vla-object ent) pr (fix (vlax-curve-getEndParam ent)) ) (repeat (fix (vlax-curve-getEndParam ent)) (setq dist_end (vlax-curve-GetDistAtParam ent pr) dist_start (vlax-curve-GetDistAtParam ent (setq pr (1- pr))) seg_len (- dist_end dist_start) div (1+ (fix (/ seg_len max_l))) l_div (/ seg_len div) l l_div ) (while (< l seg_len) (add_vtx obj_vla (vlax-curve-getparamatdist ent (- dist_end l)) ent) (setq l (+ l l_div)) ) ) ) (prin1) )
    2 points
  3. The RECTANG command is already have fillet option within so you need to specify it only once then draw the rectangle required.
    1 point
  4. Yes, a spline is created. Rather than creating two helixes, one representing the centerline of the groove could be made and then offset used to create the two sides of the grove.
    1 point
  5. No I tried with another dwg which contained group names with accents. But that's ok, I'll change the group names to remove the accents.
    1 point
  6. The helix command should be a big help.
    1 point
  7. This one is much more better with a table . (defun c:Test (/ entities i number integer layers lst object point1 p height point2 result selectionset selectionsetname singlelayer model table r c inc ) (vl-load-com) ;;; Tharwat 15. May. 2012 ;;; (if (and (setq point1 (getpoint "\n Specify first point :")) (setq point2 (getpoint point1 "\n Specify Second point :")) (setq selectionset (ssget "_F" (list point1 point2) '((0 . "LINE,*POLYLINE")) ) ) (setq p (getpoint "\n Table insertion point :")) ) (progn (setq height (if (zerop (cdr (assoc 40 (setq st (entget (tblobjname "STYLE" (getvar 'textstyle)) ) ) ) ) ) (cdr (assoc 42 st)) (cdr (assoc 40 st)) ) ) (repeat (setq integer (sslength selectionset)) (setq entities (cons (setq selectionsetname (ssname selectionset (setq integer (1- integer)) ) ) entities ) ) (if (not (member (setq singlelayer (cdr (assoc 8 (entget selectionsetname))) ) layers ) ) (setq layers (cons singlelayer layers)) ) ) (setq i 0) (foreach layer layers (repeat (setq number (length entities)) (if (eq (cdr (assoc 8 (entget (nth (setq number (1- number)) entities)) ) ) layer ) (setq lst (cons layer (setq i (1+ i)))) ) ) (setq result (cons lst result)) (setq i 0) ) (setq model (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)) ) ) (setq table (vla-addtable model (vlax-3d-point p) (1+ (length result)) 2 (* height 2.) (* height 10.) ) ) (vla-settext table 0 0 "Section A - B") (setq r 0 c 0 inc -1 ) (repeat (length result) (vla-settext table (setq r (1+ r)) c (car (nth (setq inc (1+ inc)) result)) ) (vla-settext table r (setq c (1+ c)) (itoa (cdr (nth inc result))) ) (setq c 0) ) ) ) (princ) )
    1 point
×
×
  • Create New...