Tips for OBJ/LWO export?

 From:  Michael Gibson
3793.2 In reply to 3793.1 
Hi jason, so those kinds of cracks can happen when you only have individual separate surfaces that just happen to be sitting next to each other instead of joined surfaces that are actually topologically connected to one another with a shared common edge.

When you have a connected joined edge, MoI will do extra work in those spots to make sure that the generated meshes have the same vertex structure along that edge to make a "watertight" mesh without cracks.

If they are just separate surfaces, they get meshed without any knowledge of one another and that means the mesh vertices that are created on each one are not necessarily in the same spots, and mesh vertices not in the same spots between 2 pieces makes for little cracks like that.

IGS files most often contain all separate surfaces, so those need to get joined together into connected pieces to get the best mesh generation.

MoI will actually try to automatically join those surfaces together when importing IGES files, unless you have disabled the setting for it which is under Options > Import/Export > IGES options > "Join surfaces on import". So the first thing to do is to take a look at that option and make sure it is turned on.

But also looking at the grid in your screenshot, it looks like your model may be at a pretty large scale which can be a problem. MoI's joining process will join edges that are within 0.005 units apart from one another. If you have models created at a large numeric size, like several thousand units in size or something like that, it's possible that the gaps between the pieces are also at a larger scale than 0.005 units and that can prevent joining from working.

If that's the case and the model is not joining on import properly, then you'll want to try scaling the model down in MoI and then using the Join command on the surfaces to get them joined together.

To scale the surfaces, first do a Ctrl+A to select everything, then run the Transform > Scale command. In the upper-right corner of the window you will see a prompt for what the command is expecting for you to input, it will say "Pick origin point". Type in 0 and push Enter to specify the 0,0,0 point as the origin point of the scale. Then at the second prompt type in 0.01 and push enter. That will scale your model to 1/100 of its previous size. Then use Edit/Join to see if it will join together into one piece.

Another thing that can help to see if things are joining properly or not is to set up the following on a shortcut key:

script:var gd = moi.geometryDatabase; gd.deselectAll(); var breps = gd.getObjects().getBreps(); for ( var i = 0; i < breps.length; ++i ) breps.item(i).getNakedEdges().setProperty( 'selected', true );

That script will select all "naked" edges in the model - naked edges are edges that belong to only 1 surface instead of being joined and shared between 2 surfaces. So running that script will help you to see which edges can potentially make mesh cracks and still need joining together.

To set up the keyboard shortcut, go to Options> Shortcut keys and push the Add button to put in a new empty entry at the top of the list. For the key part put in whatever key you want to trigger the script, like maybe N for naked edges. Then for the Command part paste in the above script. Then when you push N you will get the naked edges highlighted.

Hope this helps!

- Michael