The Cartesian grid technology applied in DSMC (direct simulation Monte Carlo) method was studied. A strategy of counting the boundary triangle surface elements in each Cartesian grid cell for establishing the mapping relationship from bug cells to surface elements was adopted. Further more, the bug cells were distinguished as level one bug cells and level two bug cells. In addition, a variable time step technology was used. With these skills, the Cartesian grid can match complex geometric surfaces smoothly in DSMC calculations. The self-adaptive method of this Cartesian grid was presented. A general DSMC procedure, rarefied gas dynamic tool(RGD-Tool) was developed. The classical DSMC simulations of flows passing around a sphere and an inclined baffle were carried out respectively by using RGD-Tool procedure. The results show that the discussed Cartesian grid technology work well.