문제

As shown in the following, I am trying to move the origin to the center of the bounding box of this 3D object by using its Axes tool. At a result, it seems very hard to find that center because there is not auto-snap to help me move the axes. I am using the free version of Google SketchUp 8 and I do find some handy source code like plug-in to do this for me in Pro version which I don't have.

Could anyone tell know how to perform this to set the origin to the center?

Try to move the origin from default location to the center of the object

도움이 되었습니까?

해결책

(What plugin did you find that did this only in Pro?)

I happen to have a plugin that does this: http://sketchucation.com/forums/viewtopic.php?t=30508

If you want to do this yourself by code, then the gist of it is:

  1. Get the point for the new origin of the axes. instance.bounds.center
  2. Get the vector from the new origin to the old origin.
  3. In the definition of the group or component, transform all the content using the vector.
  4. For each instance belonging to the definition, apply the inverse transformation.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top