Rounding

Integrated solution for design, manufacturing and management that provides all standard parts and procedures for wood processing.

Moderators: remi77, jacs, Daniel

RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Rounding

Unread post by RaudMees »

Hello

Any idea whats wrong with roundings? Played several hours and no luck. I have several components like this, but direction is X or Y and they works fine. Rounding by Z don't work. Or I am too tired...

RM
Attachments
rounding.png
rounding.png (3.42 KiB) Viewed 2254 times
Woody31
Sergeant
Sergeant
Posts: 68
Joined: Thu Mar 25, 2021 4:39 pm
Answers: 8
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.23
Location: Toulouse
Contact:

Re: Rounding

Unread post by Woody31 »

Well, the value you have looks good to me ( 1 reading )
what value did you expect?
if you expect the closest real value do not put a 2 but a 1 in your round value > round2(n,1) you will get 7
if you place a 2 you will get 6 as 6 is closest to 8 when you have 6.9
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

I like to get highest value, like on the sample in help file. Number 2 means to round it to next full upper value. This new pic have correct data, but when I play with Z value, then it forget that rounding in some cases.

RM
Attachments
round2.png
round2.png (3.84 KiB) Viewed 2242 times
Woody31
Sergeant
Sergeant
Posts: 68
Joined: Thu Mar 25, 2021 4:39 pm
Answers: 8
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.23
Location: Toulouse
Contact:

Re: Rounding

Unread post by Woody31 »

Try round2(n,1)
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

(n,1) rounding to lower full value, but I need higher. I will make a video, something strange in it.
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

Here is the video: http://www.tehnik.ee/round.mp4
Give priority to ends = Yes, but in some distances its going to red.
TSW 6.21, latest update (SP-10).
I have exactly the same expression for X-direction and it's working fine.

RM
Woody31
Sergeant
Sergeant
Posts: 68
Joined: Thu Mar 25, 2021 4:39 pm
Answers: 8
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.23
Location: Toulouse
Contact:

Re: Rounding

Unread post by Woody31 »

Hello
the part goes to red because of the trim tangent i guess to a plane of the part.

just to be sure you know there is 3 way to get values ( ROUND2 / CEIL2 / FLOOR2 )

if there is a problem it's not related to the specific X or Y or Z value it's a numerical issue.
i guess here the files are necessary with an explanation of the value you expect to have.
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

File added.
Attachments
wall.rar
(172.43 KiB) Downloaded 72 times
Woody31
Sergeant
Sergeant
Posts: 68
Joined: Thu Mar 25, 2021 4:39 pm
Answers: 8
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.23
Location: Toulouse
Contact:

Re: Rounding

Unread post by Woody31 »

Hi

not sure my answer is the one you expect, try this
when i change the values it looks good

Image
Attachments
CEIL2(n,1).jpg
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

This one looks good. Thx a lot!
User avatar
Laurens
Sergeant
Sergeant
Posts: 50
Joined: Tue Apr 16, 2019 7:29 am
Answers: 5
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.24

Re: Rounding

Unread post by Laurens »

judging from the replies you already have the answer but just to be clear:

ceil2(A,B) rounds off A to the next multiplication of B, so always up. ceil2(2.1,2) gives 4

round2(A,B) rounds off A to the closest multiplication of B, so either up or down. round2(2.1,2) gives 2 where round2(3.1,2) gives 4

floor2(A,B) rounds off A to the previous multiplication of B, so only down. floor2(2.1,2) gives 2
Laurens

Team leader TSW draftsmen
De Klerk Binnenbouw
RaudMees
Second Officer Cadet
Second Officer Cadet
Posts: 209
Joined: Wed Dec 30, 2015 11:25 am
Answers: 3
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.20
Contact:

Re: Rounding

Unread post by RaudMees »

Yes, I got a point. Just finished 5+h tutorial videos serie and brain need some beers and sleep.

RM
Post Reply