Author Topic: Text explode  (Read 4354 times)

0 Members and 1 Guest are viewing this topic.

77077

  • Guest
Text explode
« on: November 29, 2014, 02:59:36 AM »
Hi guys
I want explode text to curve .
I know ET tools can do this (txtexp) ,but the effect is poor.


I use lisp can do this too, but effect is poor too.

Code - Auto/Visual Lisp: [Select]
  1.  
  2. (defun c:xt (/ bz ss n lvs lss lvp lvl lul ent luu)
  3. (prompt "\nchoose text to explode")
  4. (while (setq ss (ssget ":S" '((0 . "*text"))))
  5. (setvar "cmdecho" 0) (command "undo" "be") (setvar "mirrtext" 1)
  6. (command "zoom" "e")
  7. (setq bz (getvar "osmode")) (setvar "osmode" 0)
  8. (setq lvs (getvar "viewsize") lss (getvar "screensize") lvp (getvar "viewctr")
  9.       lvl (list (list (- (car lvp) (* 0.5 (* lvs (/ (car lss) (cadr lss))))) (- (cadr lvp) (* 0.5 lvs)))
  10.                    (list (+ (car lvp) (* 0.5 (* lvs (/ (car lss) (cadr lss))))) (+ (cadr lvp) (* 0.5 lvs))))
  11.           lul (list (caar lvl) (cadadr lvl)) n 0)
  12.   (setq ent (ssname ss n))
  13.   (setq luu (strcat (getenv "Temp") "\\textb.wmf"))
  14.   (command "mirror" ent "" lvp "@0,1" "y"
  15.   "wmfout" luu ent "" "erase" ent ""
  16.   "wmfin" luu lul "2" "" ""
  17.   "mirror" (entlast) "" lvp "@0,1" "y"
  18.   "explode" (entlast) "erase" (ssget "p") "r" "w"
  19.   (polar (car lvl) (* 0.25 pi) (max (abs (/ lvs (cadr lss))) (abs (/ (* lvs (/ (car lss) (cadr lss))) (car lss)))))
  20.   (cadr lvl) "") ;;end_command
  21.   (setq n (+ n 1))
  22. )
  23. (command "zoom" "p")
  24. (setvar "mirrtext" 0) (setvar "osmode" bz) (command "undo" "e")
  25. )
  26. )
  27.  

This is perfect , who can help optimized code ? Thanks!!!


==================================================================
==================================================================
==================================================================
« Last Edit: November 29, 2014, 03:04:02 AM by 77077 »

David Bethel

  • Swamp Rat
  • Posts: 656
Re: Text explode
« Reply #1 on: November 29, 2014, 07:06:31 AM »

If you use .shx fonts,   search for XSHP.LSP from Upper Canada Software.  -David
R12 Dos - A2K

77077

  • Guest
Re: Text explode
« Reply #2 on: November 29, 2014, 10:02:34 AM »

If you use .shx fonts,   search for XSHP.LSP from Upper Canada Software.  -David

Thanks David.  I download it ,test , But  don't succeed .  need .shp file , ? I Convert *.shx to .shp ,  err...... oh ! bad methods.
« Last Edit: November 30, 2014, 08:59:51 PM by 77077 »

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Text explode
« Reply #3 on: November 30, 2014, 07:09:04 AM »
You could try this by SEANT  :-)

77077

  • Guest
Re: Text explode
« Reply #4 on: November 30, 2014, 08:16:33 AM »
You could try this by SEANT  :-)

Thanks lee, I'll take a look.

David Bethel

  • Swamp Rat
  • Posts: 656
Re: Text explode
« Reply #5 on: December 01, 2014, 07:04:03 AM »
Looks like something has broken XHSP.LSP in newer releases of Autolisp.   Sorry.
R12 Dos - A2K

hmspe

  • Bull Frog
  • Posts: 362
Re: Text explode
« Reply #6 on: December 01, 2014, 08:49:43 AM »
The issue in xshp.lsp appears to be in
Code - Auto/Visual Lisp: [Select]
  1. (lambda()))))))                         ;15 = Illegal cmd.
Change this to
Code - Auto/Visual Lisp: [Select]
  1. (lambda() (setq temp temp)))))))                                ;15 = Illegal cmd.
and the code appears to work.  From a very brief test it appears that the SHP file has to have been created from the SHX file before you run XSHP.LSP.

It looks to me like the text originally posted was truetype, nor SHX.
"Science is the belief in the ignorance of experts." - Richard Feynman