Jump to content

Recommended Posts

Posted

hi,all

I search the forum,and lee has wrote a lot of routine for this.

but I found that it seems it don't play this trick.see the picture.

1183688.jpg?t=1288883174

is there any lisp can play this magic?thanks.

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • blueshake

    14

  • Lee Mac

    9

  • Tiger

    2

  • Tharwat

    1

Posted

I can't see the picture at all, just get a big red X. Can you upload the image directly here instead? Or describe the issue?

Posted

So...what is it about your request that Lee's program can't do?

Posted
Use arctext command from Express menu .

 

arctext

 

Tharwat

 

arctext only work for arc,not any curve.:)

Posted
You can't with a single text item (without using the ArcAligned Text Custom Object from Express Tools), but I did experiment with the idea of using multiple items here:

 

http://lee-mac.com/slinkytext.html

that is what I want ,thank you.

Posted
that is what I want ,thank you.

 

Happy I could be of assistance BlueShake.

Posted
Wow, finally.........

 

Well - thanks for your comment, but it's less than ideal with individual text items - however, save creating a custom object in Arx, it was the best I could come up with...

Posted

hi,lee

I test your codes.it is amazing.

here comes my remark.

can we arrange the string in average?

e.g. I have a sting "ABCD" and I choose the curve (circle).then I may want to place them in average.see the picture.the same to any curve.

anyway.that is just my thought.

1745_1288960550JMPz.png

Posted
hi,lee

I test your codes.it is amazing.

 

Thanks! :)

 

here comes my remark.

can we arrange the string in average?

e.g. I have a sting "ABCD" and I choose the curve (circle).then I may want to place them in average.see the picture.the same to any curve.

anyway.that is just my thought.

 

By 'average', do you mean equispaced along the curve? If so, one could retrieve the length of the curve, divide by the number of characters in the string to get the spacing, calculate the points for each character and the first derivative of the curve at such points, then position accordingly.

 

Lee

Posted
Thanks! :)

 

 

 

By 'average', do you mean equispaced along the curve? If so, one could retrieve the length of the curve, divide by the number of characters in the string to get the spacing, calculate the points for each character and the first derivative of the curve at such points, then position accordingly.

 

Lee

yes.

Lee,can you change your codes to do this if you are free?I don't have the ability to do this.:)thank you.

Posted

hi,Lee ,dig into your codes a little.

 

here comes my confuse.

1.according to documents,we can use "strlen" function to get the length of a string.

but if the sting contain wide char ,how can we can get the char numbers of a string.

e.g. if the string is "abc" , the "strlen" return 3.so we can know that string "abc" has three chars.

but if the string is "汉字", the "strlen" also return 4.but actually it only has two chars.

do we have other way to get the char numbers of a string?

 

2.how can I get the length of a curve??

 

thank you for time.:)

Posted
1.according to documents,we can use "strlen" function to get the length of a string.

but if the sting contain wide char ,how can we can get the char numbers of a string.

e.g. if the string is "abc" , the "strlen" return 3.so we can know that string "abc" has three chars.

but if the string is "汉字", the "strlen" also return 4.but actually it only has two chars.

do we have other way to get the char numbers of a string?

 

How about something like:

 

(length (vl-string->list [i]<string>[/i]))

 

2.how can I get the length of a curve??

 

(vlax-curve-getDistatPoint entity (vlax-curve-getEndPoint entity))

Posted

@Lee.

it seems not work.still return 4.

to achieve the function I mentioned above.I think we simple do the following steps.

1.select the curve and the string.

2.break up string a single char sets and stored them.

3.according to the counts of the char sets, resolve the equispaced points along the curve.

4.place the char in the relative point with a rotated point tangential angle.

 

question:

1.how to break up the string.

2.how to get the equispaced points.

3.how to get the points' tangential angle in the curve.

it seems complicated to me.:)

Posted

1)

(mapcar 'chr (vl-string->list <string>))

 

2) Get length of curve using:

 

(vlax-curve-getDistatPoint entity (vlax-curve-getEndPoint entity))

 

Divide it by the number of characters to get spacing, then use vlax-curve-getPointatDist with the spacing as an increment.

 

3)

(angle '(0. 0. 0.) (vlax-curve-getFirstDeriv entity (vlax-curve-getParamatPoint entity point)))

Posted

Don't forget to account for direction of curve.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...