Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Hildebrando Pereira  
#1 Posted : 12 September 2022 21:33:22(UTC)
Hildebrando Pereira


Rank: Member

Groups: Registered
Joined: 28/02/2022(UTC)
Posts: 18
Man
Brazil

Was thanked: 2 time(s) in 2 post(s)
Hey Guys,

It's possible to block the negative input in field's using smath viewer?
Offline Davide Carpi  
#2 Posted : 14 September 2022 15:40:10(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,523
Man
Italy
Location: Italy

Was thanked: 1267 time(s) in 833 post(s)
Nope, the best way to accomplish it easily is to filter the output applying abs() to the value before using it.

a:1

a:abs(a)

f(a): ...
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Hildebrando Pereira  
#3 Posted : 14 September 2022 15:47:52(UTC)
Hildebrando Pereira


Rank: Member

Groups: Registered
Joined: 28/02/2022(UTC)
Posts: 18
Man
Brazil

Was thanked: 2 time(s) in 2 post(s)
Thanks Davide! Actually i do this, i will use an formatted label to show some message warning the user
Offline Davide Carpi  
#4 Posted : 14 September 2022 16:51:57(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,523
Man
Italy
Location: Italy

Was thanked: 1267 time(s) in 833 post(s)
You are welcome. As alternative one can develop a region that translates into a TextBox control with mask/validation filters. It might be tricky depending on the filter but it is feasible.
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Hildebrando Pereira  
#5 Posted : 14 September 2022 17:04:57(UTC)
Hildebrando Pereira


Rank: Member

Groups: Registered
Joined: 28/02/2022(UTC)
Posts: 18
Man
Brazil

Was thanked: 2 time(s) in 2 post(s)
Wow! It will be a great plugin! It can be extend the use of smath viewer in so many ways
Offline Hildebrando Pereira  
#6 Posted : 14 September 2022 21:53:11(UTC)
Hildebrando Pereira


Rank: Member

Groups: Registered
Joined: 28/02/2022(UTC)
Posts: 18
Man
Brazil

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Hildebrando Pereira Go to Quoted Post
It's possible to block the negative input in field's using smath viewer ?

Pretty simple to zap negative values:
1. transform negatives to '0'
2. strip vector from '0'
No need using Smath Viewer.
Cheers ... Jean.

Random [rnd(n)] Filter.sm (11kb) downloaded 7 time(s).

Composite clean negatives.

CleanNegative.PNG


Thanks Jean, but it's not the case.

I have an long application developed in Smath Studio using Smath Viewer, and some of my algorithms need's a positive input for bending moment's. For now showing a warning message, and using an absolute value work, it's not the more elegant solution, but work.


Offline Hildebrando Pereira  
#7 Posted : 14 September 2022 22:41:46(UTC)
Hildebrando Pereira


Rank: Member

Groups: Registered
Joined: 28/02/2022(UTC)
Posts: 18
Man
Brazil

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Hildebrando Pereira Go to Quoted Post
I have an long application developed in Smath Studio ... , and some of my algorithms need a positive input for bending moment's.

The very original document at the algorithms level might help.
Not my discipline, but curious.
Refreshed version of the previous Filter Negatives.
Jean.

Random [rnd(n)] Filter.sm (11kb) downloaded 6 time(s).



Sure! The document is here:

DIMIS_219.sm (839kb) downloaded 12 time(s).

The section is called "Flexão Composta" the value of Msd, for this algorithm need's to be positive.
Offline overlord  
#8 Posted : 14 September 2022 22:44:08(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 853
Turkey

Was thanked: 320 time(s) in 220 post(s)
Originally Posted by: Hildebrando Pereira Go to Quoted Post
Thanks Jean, but it's not the case.

Get use to what he do, but never bow down or surrender.

He will try to hijack your topics with totally unrelated replies.
Just report his irrelevant posts, mods will take care it eventually.

Regards
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.