4x4 APC WIP

 From:  Michael Gibson
446.17 In reply to 446.16 
Mini tutorial on object repair techniques.


Matt is building an armored vehicle and only later realized that one part was not centered when it was unioned on to the main body:




This looks like a perfect opportunity to do a mini tutorial on how to use surface-level tools to repair this. I'll try to add various tips and tricks along the way so this may be a bit wordy.

The first step is that we want to detach that assembly and erase the holes it left to reform the main body as it was before the boolean.

Start by selecting all the surfaces of that center view-port assembly. You can select surfaces by doing a second click on an object - the first click on an object selects it as a "whole object". You can then do a second click to drill-in to select a sub-object instead - a sub-object is a face or an edge. Edges get precedence so to select a face you must pick in an area kind of near the center of the face not nearby other edges. Sometimes you may need to zoom in a bit so that face is larger on the screen to make this possible.

Once you select one sub-object, then the selection will switch to that sub-object mode and make it easier to select other sub-objects of just that type. For instance if you select one face, then it you will be in face-selection mode on that object and edges will stop being targeted. Sometimes you can use this as a trick to select faces without needing to zoom in - instead of zooming in, just grab the biggest face that you can see on the screen to select it and go into face-selection mode, then select the actual smaller faces you are interested in, and then deselect that initial big face by clicking on it again. Clicking on an already-selected object will deselect it (except for doing whole-object to sub-object drill down as mentioned before).

Another tip - once you go into a sub-object selection mode you can use area selections to target those sub-objects. So for instance, select one face and then you can drag an area select which will then select faces. Also when you are in sub-object selection mode, Select All or Invert will also operate on that sub-object type for just that object as well.

One note on area selection - if you do an area select starting from the left and dragging towards the right, you will see a solid rectangle - this mode will only capture objects that are completely contained inside the area rectangle. If you drag from right towards the left, you will get a dashed rectangle and this will capture objects that intersect the rectangle in any way, including just partially going through it.

Another tip - you can use sub-object selection combined with Reset on the view controls panel at the bottom of the viewport, to more easily zoom in on a small region of the model. When you push that reset button, it will fit the selected object to take up the whole view. You can push reset a second time to fit the view to everything including unselected stuff. One frequent technique is to fit to a sub-object selection, but then zoom out slightly to see a bit more - the reason for doing it this way is to make rotation work properly in the 3D view. The fit-to-selected-object also places the view rotation pivot at the center of that selected object, so when you zoom out a bit from there your view rotations will happen anchored around that spot. You can also set your view rotation pivot by using the area zoom - the center point you pick there becomes the rotation pivot.

Ok, did I mention this would be a bit wordy? But this is a good opportunity for me to mention these various techniques in a real world application.


Ok, back to the model - first we want to separate that view-port assembly from the main model. To do this we need to select only those faces. Start by selecting the entire model with one initial click, then doing a second click on the fairly large top face to go into face selection mode.

In this case it looks like the easiest way to select the rest is to go to the front view, and drag an area selection from left to right to capture all these parts:



Note that this also grabbed the narrow fillet surfaces on the left side as well - fix this by going in the 3D view and clicking on those fillet surfaces to deselect them. Sometimes it is quicker to select just a little bit too much and then deselect the extra stuff.

In this case there aren't any small surfaces on the back side of the model from the part we're working on - if there was then you would probably need to select them first and hide them, before doing the area zoom on the front. You can hide selected sub-objects to get them out of the way temporarily and help you focus on and select specific parts.



Now that all the faces of this sub-assembly are selected, you can use Edit/Separate to break it off from the main assembly as a separate object, leaving holes in the main object where it used to be attached.

When you do Edit/Separate on a group of faces, it will separate that group from the main object but keep the group itself still connected together. If you do an Edit/Separate on something that is selected as a whole object, or has all every single face selected, then it will break it into completely separate individual surfaces.

Also, if you are interested in doing a more major re-build of this part instead of just re-positioning it, you may just delete the selected faces instead of separating them.


Oh, another note - if you make a mistake when selecting things, like click off somewhere and lose your selection you've just spent a bunch of time building up, do an undo and it will restore your previous selection. You can't use undo to step through multiple selections (this would be tedious and get in the way of regular object-change undo too much), it is just a one-shot thing to save you from your last selection mistake.


Now hide the view-port assembly, exposing the hole in the main object:




At this point it is a good idea to rotate around a bit in the 3D view and make sure that everything is as expected - if there are any unexpected extra pieces missing from the main body it probably means you accidentally grabbed a few extra surfaces when you separated.


Now we want to erase this hole - you can erase a hole by selecting edges that are not attached to anything and hitting delete - this will remove trim curves from a surface and restore the original underlying surface.

But there is a bit of a complication right now - you can only erase a hole if you select all the edges that make up the entire boundary on a single surface for the hole. There are 2 holes here which are completely self-contained and easy to erase - a little tiny one in the middle, and the bottom one - the edges for these can be selected and deleted right away:




The remaining hole is a lot trickier - it is pretty deceptive because you're not actually seeeing the entire hole ( the "whole" hole ) there - the actual entire hole on the main angled surface looks like this:



The part that we're seeing is only part of a bigger hole in the surface which also provides the base for that neighboring panel assembly. So to remove it we're going to have to go in and detach that neighboring assembly as well.

So basically, grab all the surfaces of that neighboring panel assembly, and detach them just like you did with the view-port assembly and hide it. Now you can select the entire boundary for the big hole:

entire_big_hole_selected.jpg


And then hit delete to remove it - now that full slanted surface is fully repaired with no holes.


Now let's work on restoring the panel. Hide everything except the panel:



Separate out the 3 surfaces on the side, hide the others, and then separate the 3 again into individual surfaces:




Delete the little surface on the left - these 2 straight pieces came from a single surface that got split and we will be recovering that single surface from the other part so we don't need this little duplicate split piece.

Select all edges of both these surfaces - the quickest way to do this is to do a single edge sub-selection on each of them and then do Ctrl+A (or Select/Select All) to get all edges. Delete all the edges to get to the full underlying surfaces:



Now these need to be trimmed back again - I'll show you these one at a time - first take the fillet piece and show the panel:



Now the fillet can be trimmed to the panel - to do this select the fillet surface, run Edit/Trim, and then select the panel as the cutter, then either select the two end pieces as pieces to remove, or you can switch the Trim mode to be "Keep" mode and select the center piece as the piece to keep. Sometimes the "keep" mode can be easier if you have only one central piece to keep and a lot of little pieces to throw away. Here it doesn't really make much difference. Also sometimes it may be a good idea to select just the appropriate edge curves of the panel as the cutting objects to do a more surgically precisely specified trim, but in this case it is figuring out properly that those are the intersecting areas. After that is trimmed, select the fillet surface and the rest of the panel and use Edit/Join - here is one part of the panel restored.

Now for the side piece - in this case it is a simple plane so you could just draw a new one in the right spot using Draw solid / Plane / 3 pts. But if it was more complex you would need to trim it back just like we did for the fillet. To trim it back, you're going to trim it using both the panel and the main body as cutters. In this case it is hard to select the pieces to remove, so you'll want to switch the trim mode to "keep" and click on the center portion. After trimming the side-wall piece, select it and the panel and do another Edit/Join - now the panel is fully restored.

Now you want to re-attach the panel the main body - to do this select the main body and do Edit/Trim, select the panel as a cutting object, use Mode=Keep and select on the main body - this trims out a hole underneath the panel, it would look like this if you hide the panel now:



This now gives the opening to re-join the panel to the main body - select the panel and the main body and do Edit/Join and now the main body is fully restored:




Ok, at this point I think I'm going to quit with the tutorial - to completely finish the job you may need to now do some similar restoration on the view-port assembly before you can properly union it back to the body in the correct position. Or in this case that view-port piece is not too complicated so you might just reconstruct a new one from scratch.


A few notes as an overview - you basically can use Separate to work on individual surfaces, use Delete to remove trim boundaries and restore original underlying surfaces, use Trim to re-trim those surfaces, and then Join stuff back together.

These are "low-level" techniques that you can use to repair models at a surface level.

You use Join when you want to glue surfaces together along their unattached common edges - use Union when you want to combine 2 solids (which may be intersecting) together.


Oh yeah, and in this case you could actually skip all the panel reconstruction steps because you have a mirror image of the panel available on the other side, you can select that other panel and do a mirror to get a new copy of the panel instead of rebuilding the other one in place. But I wanted to show you the manual rebuilding technique here.


Let me know if you have questions on any of these stages.

- Michael


Edit: added Reconstruct_example.zip that contains the model file with the relevant parts in case anyone else wants to go through these steps to practice.

EDITED: 3 Mar 2007 by MICHAEL GIBSON