Recent Posts

Pages: 1 ... 8 9 [10]
91
AutoLISP (Vanilla / Visual) / Re: Help:Align Text,Mtext to vertical liine
« Last post by mhy3sx on May 30, 2023, 05:34:27 PM »
(cons 71 3) is for right.
(cons 71 1) is for left but reverse the text.

look the attach file. If you find a solution post all the code

Thanks
92
AutoLISP (Vanilla / Visual) / Re: Help:Align Text,Mtext to vertical liine
« Last post by ScottMC on May 30, 2023, 05:00:57 PM »
Doesn't the (cons 71 3)(assoc.. work?
93
AutoLISP (Vanilla / Visual) / Re: Help:Align Text,Mtext to vertical liine
« Last post by mhy3sx on May 30, 2023, 03:54:00 PM »
Hi ScottMC . I ask to align the text to the right not to left. Is any solution to this problem?
Look the attach file.

Thanks
94
CAD General / Fillet using the Polyline option
« Last post by Bryco on May 30, 2023, 02:44:26 PM »
Why is autocad so poor at filletting when Rhino does it so much better.
the image shows 3 very simple  shapes and under that the results of fillet w/ the polyline option (two of them went to the dark side).
I found that our waterjet runs faster if you fillet each corner (a .030" fillet does the trick) but automating this became a bit of a nightmare.

Using acad 2023 so they have never fixed it.
95
Is there anyone who can suggest me some (preferably SIMPLE) algorithm
to INCREASE and REDUCE the NUMBER of TRIANGLES
(and therefore of vertices) of a 3D MESH?

And in case you increase vertices, these new vertices should be a LITTLE bit, RANDOM ...

Let's imagine a terrain defined by a 3D MESH, and to make it look MORE REAL
we want to make it more DETAILED and a little more IRREGULAR ...

a kind of NOISE of 3DSMAX and not only ...

But also the algorithm to REDUCE the number of triangles and vertices
is VERY USEFUL, because sometimes there are too many points and too many triangles
and then you need to lighten the file size ...
96
AutoLISP (Vanilla / Visual) / Re: Help:Align Text,Mtext to vertical liine
« Last post by ScottMC on May 30, 2023, 11:19:48 AM »
Oops.. correction: 1 = left

Handy tool for sure. Thanks "mhy3sx"
line 21:
      (progn                                  \/ - the 3 = right justify | 5 = cen | 1 = left <<
           (entmod (subst (cons 71 1) (assoc 71 e) e))
          (vla-put-insertionpoint v (vlax-3d-point p))
        )

I decided to delete the line aligned to with..
line: 29 *before the (princ)* - (entdel l)
97
AutoLISP (Vanilla / Visual) / Re: Help:Align Text,Mtext to vertical liine
« Last post by mhy3sx on May 30, 2023, 09:45:53 AM »
Hi, I am trying to align now to align text ,mtest to vertical line at the right. The problem is the texts are reversed . how to fix it?

Code - Auto/Visual Lisp: [Select]
  1. (defun c:AtclR (/ l ss i sn v p e)
  2.   (if (and (setq l (car (entsel "\n Select Line :")))
  3.            (eq (cdr (assoc 0 (entget l))) "LINE")
  4.            (progn
  5.              (prompt "Select TEXT,MTEXT")
  6.              (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT"))))
  7.            )
  8.       )
  9.     (repeat (setq i (sslength ss))
  10.       (setq sn (ssname ss (setq i (1- i))))
  11.       (setq v (vlax-ename->vla-object sn))
  12.                 l
  13.                 (cdr (assoc 10 (entget sn)))
  14.               )
  15.       )
  16.        (if (or (eq (cdr (assoc 0 (setq e (entget sn)))) "TEXT") (eq (cdr (assoc 0 (setq e (entget sn)))) "MTEXT"))
  17.         (progn
  18.            (entmod (subst (cons 71 3) (assoc 71 e) e))
  19.           (vla-put-insertionpoint v (vlax-3d-point p))
  20.         )
  21.         (progn
  22.           (vla-put-alignment v acAlignmentMiddleCenter)
  23.         )
  24.       )
  25.     )
  26.   )
  27.   (princ)
  28. )
  29.  
  30.  

Thanks
98
AutoLISP (Vanilla / Visual) / Re: join lines
« Last post by domenicomaria on May 30, 2023, 08:40:06 AM »
@vovka
if we exclude the case where three or more segments have a common point, your code (but mine too) works perfectly...
99
AutoLISP (Vanilla / Visual) / Re: join lines
« Last post by VovKa on May 30, 2023, 07:00:07 AM »
Your code works perfectly !
my code is by far not perfect
it produces different results depending on many random factors
i'd call it unpredictable :)
100
AutoLISP (Vanilla / Visual) / Re: join lines
« Last post by domenicomaria on May 30, 2023, 06:24:42 AM »
I'm not worried about this type of error anyway ...

which I didn't think about ...

because I suppose that the segments touch each other
and define a shape (closed or open)
without strange or particular situations
Pages: 1 ... 8 9 [10]