Jump to content

Required Lsp for interpolate Elevation


pmadhwal7

Recommended Posts

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • pmadhwal7

    15

  • dlanorh

    11

  • BIGAL

    2

  • tombu

    1

Top Posters In This Topic

Like tombu ??

 


(while (setq t1  (vlax-ename->vla-object (car (entsel "pick text object"))))
(setq t2  (vlax-ename->vla-object (car (entsel "pick text object"))))
(setq z1 (nth 2  (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint t1)))))
(setq z2 (nth 2  (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint t2)))))
(alert (strcat "The difference is " (rtos (abs (- z1 z2)) 2 2)))
)

Link to comment
Share on other sites

I thinke he wants to interpolate the elevation base on the text values of the two text items. Would still need to know what to use as the base points or if there is a node, and whether this is a random infill etc

 

 

Link to comment
Share on other sites

28 minutes ago, dlanorh said:

I thinke he wants to interpolate the elevation base on the text values of the two text items. Would still need to know what to use as the base points or if there is a node, and whether this is a random infill etc

yes sir u r right....

 

 

Link to comment
Share on other sites

34 minutes ago, pmadhwal7 said:

yes sir u r right....

 

I can open your drawing, but it is not very informative. Can your repost with a before and after so I can see what you are trying to do. I have 3 or 4 lisps which do something similar to what you require, and this would help me adapt one for your needs.

 

Also is this a random infill, or infill every "?" distance

 

Link to comment
Share on other sites

Ignore the infill request at the end of the day you will end up with a TIN answer irrespective of the number of points. Every 3 original points will make a plane. All you would be doing is add points to this plane. If you contour the points, then convert to lines with a z add end points delete lines infill done. If you want it more surface wise you need more original points. Maybe ucs 3 points then just add point will test.

 

OR

 

Do you just want points between two points given how many 4 10 20  ?

 

pmadhwal7 you really have to explain more.

Edited by BIGAL
Link to comment
Share on other sites

On 7/27/2019 at 10:41 AM, BIGAL said:

Ignore the infill request at the end of the day you will end up with a TIN answer irrespective of the number of points. Every 3 original points will make a plane. All you would be doing is add points to this plane. If you contour the points, then convert to lines with a z add end points delete lines infill done. If you want it more surface wise you need more original points. Maybe ucs 3 points then just add point will test.

 

OR

 

Do you just want points between two points given how many 4 10 20  ?

 

pmadhwal7 you really have to explain more.

 

 

Sir,

 

i just want to points and its not fixed sometime it was more the 3-4 sometime only 1 point

Link to comment
Share on other sites

15 minutes ago, pmadhwal7 said:

 

 

Sir,

 

i just want to points and its not fixed sometime it was more the 3-4 sometime only 1 point

 

Try the attached.

 

This will insert a level ramdomly around the mid point of the two levels selected (0.4 -> 0.6) of the distance

 

 

infill_levels2.lsp

Link to comment
Share on other sites

48 minutes ago, dlanorh said:

 

Try the attached.

 

This will insert a level ramdomly around the mid point of the two levels selected (0.4 -> 0.6) of the distance

 

 

infill_levels2.lsp 2.55 kB · 0 downloads

 

lisp was working but levels is different if i draw one line in between two text and move any text to that line then 

Link to comment
Share on other sites

30 minutes ago, pmadhwal7 said:

 

lisp was working but levels is different if i draw one line in between two text and move any text to that line then 

 

!!??

 

The lisp is designed to create a new text entity between two existing text entities using their insertion points or text alignment points as the as the "line". It assumes said text entities have the correct levels (as text) within them. The text level displayed is an interpolation of the difference in the (text) levels at that point.

Link to comment
Share on other sites

On 7/30/2019 at 6:26 PM, dlanorh said:

 

!!??

 

The lisp is designed to create a new text entity between two existing text entities using their insertion points or text alignment points as the as the "line". It assumes said text entities have the correct levels (as text) within them. The text level displayed is an interpolation of the difference in the (text) levels at that point.

Sir check this,

 

 

 

 

Link to comment
Share on other sites

OK, a misunderstanding on my part. I assumed from your drawing that the text's textstring was the level. I will amend accordingly.

Link to comment
Share on other sites

On 7/25/2019 at 6:07 PM, tombu said:

Rather vague request.

You want the difference in Elevation between two selected text objects?

yes sir...

Link to comment
Share on other sites

20 hours ago, dlanorh said:

OK. Try the attached. I'm not sure if this is exactly what you want but it's a bit closer. This will put a text at the MID point between the two selected texts and display its level.

 

 

infill_levels2.lsp 2.33 kB · 1 download

very close sir but in my dwg i have some code like 'BW , WL, etc. and the given lisp working only on elevation's also i din't want to elevation on particular i want  random distance elevation..

Link to comment
Share on other sites

5 hours ago, pmadhwal7 said:

very close sir but in my dwg i have some code like 'BW , WL, etc. and the given lisp working only on elevation's also i din't want to elevation on particular i want  random distance elevation..

 

Then please try to explain in detail, what you want. A drawing with before and after examples would be fantastic. If you are inserting text that has a code, what should the code for the new text  item be?

Edited by dlanorh
spelling
Link to comment
Share on other sites

1 hour ago, pmadhwal7 said:

 

I give up. These drawings do not help me at all. I cannot see how or between what you wish to interpolate to arrive at final from input since the additional text items bear no resemblance levels wise to the existing.

Link to comment
Share on other sites

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...