Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Center object... ???

Author
Message
Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 13th Jun 2010 23:43 Edited at: 13th Jun 2010 23:44
Created object.
But the center of the facility is located in the coordinates 0.0.0

How to move the center of the object to where it should be?






[email protected]
mobil MTS: +375 29 895-98-82
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Jun 2010 01:05
Lookup the command OFFSET LIMB in the help, and use it to offset limb 0.

Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 01:15
...
BuildObjectFromData(10)
offset limb 10,0,20,0,30
...

OFFSET LIMB does not help. Who else will recommend a solution?

[email protected]
mobil MTS: +375 29 895-98-82
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Jun 2010 01:30
Actually, after running it with a slight modification, it seems fine, if the intent was for both objects to rotate on their center point staying stationary.



Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 02:01
This is true in the case to build an object with its center in 0.0.0:
position object 15 +1, 10,0,10
position object 15 +2, 10,0, -10
position object 15 +3, -10,0,10
position object 15 4, -10,0, -10

but what if I do not know where will be the center of the object?

[email protected]
mobil MTS: +375 29 895-98-82
Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 12:01
Who can help?

[email protected]
mobil MTS: +375 29 895-98-82
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Jun 2010 18:26
Build your object at position 0,0,0 instead of relying on the 4 dots.
Once the object is built, you can move it to the proper location and it's center of rotation will be correct.

Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 18:47
Then I have another question, how to find the center of the object consisting of 4 points?

[email protected]
mobil MTS: +375 29 895-98-82
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Jun 2010 19:47
The center point of a rectangle (or square) is the midpoint between opposite corners.

Google is your friend.

http://www.coedu.usf.edu/main/departments/sped/PROPEL/documents/MicrosoftWord-Midpoint.pdf

Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 20:45
can someone have a ready software module for calculating the center of the object consisting of N points?

[email protected]
mobil MTS: +375 29 895-98-82
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 14th Jun 2010 21:01
@Star Vitebsk
Have a look to comands:
object size x(1)
object size y(1)
object size z(1)


Knowing those values you can decide where to fit the center with comand:

offset limb (1,0,?,?,?)

Cheers.

I'm not a grumpy grandpa
Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 21:46 Edited at: 14th Jun 2010 21:49
ange, in my case, the object size is equal to 0





[email protected]
mobil MTS: +375 29 895-98-82
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 14th Jun 2010 22:13 Edited at: 14th Jun 2010 22:21
@Star Vitebsk

Is that what you want?



I'm not a grumpy grandpa
Star Vitebsk
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: Belarus
Posted: 14th Jun 2010 22:25
thank you

[email protected]
mobil MTS: +375 29 895-98-82

Login to post a reply

Server time is: 2026-07-25 16:21:24
Your offset time is: 2026-07-25 16:21:24