When I separate the mashes and use “subdivision surface” their is no straight cut, but curves. If I join the mashes again there are ugly holes when I use sub sur.
please help me.
If not you’ll have two sets of vertices where matching edges come together. One set has to be removed.
Select all vertices to be “welded together” along the edges.
If they are already aligned click Wkey/Remove Doubles.
If they need to be aligned, click S for scale, middle mouse drag along the appropriate axis, and Ctlr to scale in exact units. Scale down to 0 on that axis. Then remove doubles as above.
You’ll then need to recalculate the face normals of the mesh so they all point outward. Hit Ctrl+Nkey then ok. (Gets rid of the weird dark blotches on your joined mesh among other things)