Geometrifying Trigonometry NARRAYS(C) Numbering.

Geometrifying Trigonometry NARRAYS(C) Numbering.

dbhunia
Advisor Advisor
1,036 Views
8 Replies
Message 1 of 9

Geometrifying Trigonometry NARRAYS(C) Numbering.

dbhunia
Advisor
Advisor

Dear Experts,

 

This "HP∞HPóHPöHPòHP" is a Number of a particular GTNs(C) i.e. Geometrifying Trigonometry NARRAYS(C). For some kind of work I need to extract a combination from the Number string. So I am trying like this.....(To Extract first two Letter with Symbol i.e. "HP∞")

 

(setq TXT "HP∞HPóHPöHPòHP")
(substr TXT 1 3)                                 

 

But using the above syntax I am getting "HP\\".

 

If I use ... 


(substr TXT 1 9)

 

Then I am getting "HP∞". Even if I am checking string Length by (strlen TXT) it gives me "20" while its actual string length is "14". If I remove "" and check the string length then I am getting the string length "13".

 


Again if I insert the TXT at any co-ordinate like...

 

(command "text" "J" "BL" "_none" "0,0,0" "" "" TXT) or any other way

 

The TXT is placed normally...

 

But if I want to get the TXT value by user selection or programmatically  like....

 

(setq txt_val (vla-get-TextString (vlax-ename->vla-object (car(entsel))))) or
(setq txt_val (vla-get-TextString (vlax-ename->vla-object (entlast))))

 

I am getting "HP8HPóHPöHPòHP"

 

 

Simply if I remove/replace the "∞" with any other symbol then every thing going smooth.

 

So advice me How can I manipulate the Symbol  "∞".

 

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
1,037 Views
8 Replies
Replies (8)
Message 2 of 9

marko_ribar
Advisor
Advisor

I don't know, but why don't you change nomenclature with similar symbol from which you won't have headache...

I mean something like "~" is normal character - it has (ascii "~") number...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 3 of 9

dbhunia
Advisor
Advisor

Hi @marko_ribar  that is the last option..... and practically I do not want to do that.

 

Because for doing that we have to make changes at many places (in theory paper as well as in programming) which is not so easy in this stage.

 

That's the reason to ask in Forum.

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 4 of 9

marko_ribar
Advisor
Advisor

Simply its not standard symbol :

 

Command: (ascii "∞")
92

Command: (chr 92)
"\\"
Command: (ascii "~")
126

Command: (chr 126)
"~"

 

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 5 of 9

marko_ribar
Advisor
Advisor

Unicode character "∞" - https://www.compart.com/en/unicode/U+221E

 

Here are some tests :

 

Command: (strlen "ab∞")
9

Command: (strlen "∞")
7

Command: (strlen "\\U+221E")
7

Command: (prin1 "\\U+221E")
"∞""∞"

Command: (strlen "ab∞")
9

Command: (substr "ab∞" 2)
"b∞"

Command: (substr "ab∞" 3)
"∞"

Command: (substr "ab∞" 3 1)
"\\"

Command: (substr "ab∞" 3 2)
"\\U"

Command: (substr "ab∞" 3 3)
"\\U+"

Command: (substr "ab∞" 3 4)
"\\U+2"

Command: (substr "ab∞" 3 5)
"\\U+22"

Command: (substr "ab∞" 3 6)
"\\U+221"

Command: (substr "ab∞" 3 7)
"∞"

Command: (substr "ab\\U+221E" 3 7)
"∞"

HTH., M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 6 of 9

marko_ribar
Advisor
Advisor

You are right about VLisp (vla-get-textstring)... So only thing you can do is to go through DXF codes...

 

Command: (setq TXT "HP∞HPóHPöHPòHP")
"HP∞HPóHPöHPòHP"

Command: (entmake (list '(0 . "TEXT") '(100 . "AcDbEntity") '(100 . "AcDbText") '(10 0.0 0.0 0.0) (cons 1 txt) '(40 . 1.0)))
((0 . "TEXT") (100 . "AcDbEntity") (100 . "AcDbText") (10 0.0 0.0 0.0) (1 . "HP∞HPóHPöHPòHP") (40 . 1.0))

Command: (vla-get-textstring (vlax-ename->vla-object (entlast)))
"HP8HPóHPöHPòHP"

Command: (cdr (assoc 1 (entget (entlast))))
"HP∞HPóHPöHPòHP"
Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 7 of 9

dbhunia
Advisor
Advisor

Dear @marko_ribar  I appreciate your effort on this topic .......

 

The tests you have done I also done all those things & finally I mentioned that...

 

(substr TXT 1 3)         ;;;; Gives "HP\\"

(substr TXT 1 9)         ;;;; Gives "HP∞" (i.e. for getting the "∞" I have to get a difference of 6)

 

And I also noticed (which I forgot to mentioned previously) that....

 

(cdr (assoc 1 (entget (entlast))))     ;;;; Gives "HP∞HPóHPöHPòHP"

 

This all are Heuristic Method, we Indian called this JUGAR Method which can fail anytime...

 

You already tested this...

 

Command: (ascii "∞")
92
Command: (chr 92)
"\\"
Command: (ascii "~")
126
Command: (chr 126)
"~"

 

I want to add little more....If you go through simple Notepad you will get....

 

 

Alt+92 Gives \    where (chr 92) Gives \\
Alt+126 Gives ~ where (chr 126) Gives ~
Alt+236 Gives where (chr 236) Gives ì
Alt+162 Gives ó where (chr 162) Gives ¢ & (chr 243) Gives ó
Alt+149 Gives ò where (chr 149) Gives & (chr 242) Gives ò
Alt+148 Gives ö where (chr 149) Gives & (chr 246) Gives ö

 

There is more ....... If you go through "Character Map" you will get all those things 

 

Why there is mismatch in Alt Key sequence?????

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 8 of 9

marko_ribar
Advisor
Advisor

alt+236 don't give me

 

alt[1-255] are special alt characters
alt[00-0255] are ascii characters
alt0126 = ~ = (chr 126)
unicode characters are all possible characters and their table is totally different than ascii and alt table
https://unicode-table.com/en/#221E
for ex. \\U+0126 = Ħ and \\U+126 = it don't exist there must be \\U+xxxx where xxxx represent char specification
first unicode char is \\U+0000 =  NULL
last unicode char is \\U+D7FF = ퟿

 

(substr TXT 1 2) = "HP"

(substr TXT 1 3) = "HP\\" (\\ is counted as 1)

(substr TXT 1 (2+7=9)) = "HP" - so difference is 7 like it should be "\\U+221E" (\\ is counted as 1)

 

And yes, you can call Start->Run->charmap.exe and from there set "unicode" and in empty box fill 221E - it should give you ...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 9 of 9

SanjoyNath
Advocate
Advocate

Thank you very much @marko_ribar , you have done good research here.I agree with your suggessions

 

Our GT_Query_String(C) of Geometrifying Trigonometry(C) are coming from Oracle with thousands of new theorems on Trigonometric Geometry after validating millions of line segments records through primary key taken with these symbols as ALT + 236 ∞ (as shows in notepad) . I have instructed our Oracle systems developer to change the Symbol of ∞ to ô (ALT + 147) as you have suggested and also as @dbhunia  suggested.

 

Geometrifying Trigonometry(C) is generating several such geometric theorems which were unexplored yet. these strings are commands for Geometrifying Trigonometry(C) NARRAYS shape encoding Nomenclatures which can uniquely define several irregular polygons shapes

 

 

 

Lets see if we can get those effects from Oracle systems. Thank you again

Sanjoy Nath
BIM Manager And Digital Lead (Structures Online)
BOOST, AR , VR ,EPM,IFC API,PDF API , CAD API ,Revit API , Advance Steel API
Founder of Geometrifying Trigonometry(C)
0 Likes