Grasping a model by an endpoint when importing?
-
Here's an illustration of Csaba's point about the location of the component's origin.
I set this knob component's axes so the origin is on the center line and at the base of the knob. When I insert the knob for use on a drawer or door, I place crossing guides or a guide point and the knob will neatly insert to the point.
This is done by context (right) clicking on the component and selecting Change Axes. Set the origin point, the direction of the red axis and then the green. An important thing to consider is that when the component is inserted, its axes will be aligned to the global axes. If you are going to be inserting the component onto faces, you can set Gluing to align the component to the face.
So, putting the knobs on this cupboard in exactly the right places only took seconds to do.
-
Great answers, Gaieus and Dave, thanks. I didn't realize that the files imported relative to the 0,0 coordinate (I think that's what you're saying, right?). So when I make a piece of furniture, one of the steps should be to make (or move) it to 0,0, THEN make it a component?
-
Actually, that's not quite right. When you make the component, the axes will run parallel to the global axes and the origin will be at the lower front left corner (using the standard views, not the direction you drew it) and this happens no matter where the geometry is when you make the componet. You should try to work near the origin anyway but whether you move the geometry close to 0,0,0 before making the component or not, the origin and axes will be in the same place.
One thing that folks sometimes run across with 3D Warehouse models is that the component is made with a bunch of other junk in it. That junk may get deleted before the model gets posted but the origin is too far from the geometry. In some case this results in a component being inserted that doesn't seem to show. It's just out of view of the camera.
-
"and the origin will be at the lower front left corner (using the standard views, not the direction you drew it) and this happens no matter where the geometry is when you make the componet. "
not sure i'm following -do you mean that when I make a component, its origin -which is what is "grasped" when importing it into another file- is its lower left-hand corner? so would the origin of the dresser you posted be on the left side leg (as we're looking at it)?
-
"When using the component browser and inserting a component then immediately grabbing it at a more convenient point, SU will "help" you with the next one and temporarily change the insertion point to that at least during that session but I doubt it does it with imported stuff so if you wish to do this, prepare your files to be imported by moving their content to the origin.
Ok, re-reading the last line, I'm a bit confused ... move a file to which origin, the 0,0,0? which is the origin that is "grasped" when i import a piece of furniture into a house (for example)? the lower left-hand corner of the piece, or the 0,0,0?
-
"you should try to work near the origin anyway ...
...but the origin is too far from the geometry. In some case this results in a component being inserted that doesn't seem to show. It's just out of view of the camera."
Is that why we should build the model near the origin -so that upon import, it is within camera view? Ok, but how does that jibe with the origin being on its lower-left corner, then? Ack, it's late and I'm confused.
-
@rose123 said:
do you mean that when I make a component, its origin -which is what is "grasped" when importing it into another file- is its lower left-hand corner? so would the origin of the dresser you posted be on the left side leg (as we're looking at it)?
If I made the entire dresser into a component, yes, the component's origin would be at the lower front left corner of the dresser.
@unknownuser said:
...but the origin is too far from the geometry. In some case this results in a component being inserted that doesn't seem to show. It's just out of view of the camera."
Is that why we should build the model near the origin -so that upon import, it is within camera view? Ok, but how does that jibe with the origin being on its lower-left corner, then? Ack, it's late and I'm confused.
No. We should build near the origin because if you get too far away, you can run into clipping which makes part of the model disappear as if it is behind you. Besides, working near the global axes allows you to use them for reference.
Let's go back a little bit.
In the standard front view, the solid red axis runs from the origin to the right across your screen. The solid green runs back into the distance. So, if you draw a piece of furniture, draw it so the front is parallel to the red axis. It makes it a lot easier to set the standard views that way. If you want to look at the right side, you can pick the Right standard view.
When you make a component, a bounding box is created that, 1 is oriented so it is aligned to the global axes and 2 fits as tightly around the geometry as possible while maintaining number 1. So in the case of the dresser, the bounding box would fit the total height width and depth of the cabinet. (there's a bit of crown molding at the top and so the box wouldn't fit absolutely tight to the case sides and front) Here you can see the location of the component's axes. This image was made immediately after making the component with component axes set to be displayed.
When that component is made, the [i]component[/i ]axes will be aligned to the global axes and the origin will be at the lower front left corner. It doesn't matter where the component sits relative to global 0,0,0. You can move the origin and axis alignment later if you wish but the origin will always be in the same spot relative to the geometry. in the dresser example as it sits at the moment, you can see the insertion point is at the lower, front left corner. When the component is inserted into another model, the cursor will be there, relative to the component's geometry. It can of course be inserted anywhere in the room.
-
If you are making 'cabinet' components to go onto a wall you'd typically make the component containing all of the sub-parts with it's origin [axes] on the wall face; usually at the bottom of it so it's easier to snap in place at the wall/floor[or worktop] junction, or onto the previous cabinet without you having to place it and then re-pick points to snap from etc.
-
Rose, TIG makes a good point better than I think I did earlier in this thread. After you've made your component for inserting into other models, Move the component axes so that you have a logical insertion point. If it is a cabinet to go on a wall, set the axes so the origin is at the back of the cabinet so it'll sit on the wall. My knob example has the axes and origin set so the base of the knob will snap to the drawer or door front with the tenon inside as it would be in reality.
-
It's almost all the same whether we are talking about files or components. You first mentioned files - that's why I mentioned "move the content to the origin". If you are dealing with a component (inside a file), you can easily set its component axes (right click > change axes...).
Components are actually full fledged SU files "embedded" into another file (that you are working in). Here is a quick window component I have just made and - for your visual convenience - I also made its axes visible. The component origin would be the insertion point if I placed one into my model.
Now let's just right click on the component and "save as..." Now I can open it as a simple model file and notice how my window is lying on its back now - this is because the compőonent axes are set this way (the red/green plane is always the gluing/cutting plane).
Now if I move my geometry anywhere in this file and reload my component in the other one, it will relatively move in that file, too.
-
Ah, it's all clear now. Thanks so much, everyone, for the explanations!
-
While we're at it, and by the same logic, pendant lights are best made hanging below the origin, so that the origin is centre top of the ceiling rose. That way, they can be applied directly to the ceiling when imported.
-
True. Especially with pre-made lighting fixtures of some rendering engine where the "light" itself (any geometry that represents whatever is emitting the light) should not intersect with any other geometry.
And then we have not even talked about exporting geometry to 3rd party software where the model origin may also be(-come) some kind of insertion point so you need to carefully choose what is "practical".
Advertisement