Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scripts and Meshes 1 Scripts and Meshes Meshes –Only way to draw very complex surfaces –Each point on the mesh is defined individually (ie you type in.

Similar presentations


Presentation on theme: "Scripts and Meshes 1 Scripts and Meshes Meshes –Only way to draw very complex surfaces –Each point on the mesh is defined individually (ie you type in."— Presentation transcript:

1 Scripts and Meshes 1 Scripts and Meshes Meshes –Only way to draw very complex surfaces –Each point on the mesh is defined individually (ie you type in each vertex) Scripts –Save repetitive typing –Useful for 3D Meshes

2 Scripts and Meshes 2 3D Mesh Simple 3D Mesh –Draw, Surfaces, 3D Mesh M direction?2 N direction?2 Enter (0,0)10,10 Enter (0,1)10,30,0 Enter (1,0)20,10,0 Enter (1,1)20,30 –This produces a mesh with one element –Notice that the co-ordinates must be entered in the correct order.

3 Scripts and Meshes 3 Larger Mesh Command: 3dmesh Mesh M size: 4 Mesh N size: 3 Vertex (0, 0): 10,1,3 Vertex (0, 1): 10,5,5 Vertex (0, 2): 10,10,3 Vertex (1, 0): 15,1,0 Vertex (1, 1): 15,5,0 Vertex (1, 2): 15,10,0 Vertex (2, 0): 20,1,0 Vertex (2, 1): 20,5,-1 Vertex (2, 2): 20,10,0 Vertex (3, 0): 25,1,0 Vertex (3, 1): 25,5,0 Vertex (3, 2): 25,10,0 View this mesh using 3D orbit.

4 Scripts and Meshes 4 Script Files Run an existing Script File –Tools, Run Script browse to FIRST.scr Create a Script File –Start a new drawing –Start, All programs, Accessories, Notepad –Type the program –Save As, SECOND.SCR –Back to AutoCAD –Tools, Run Script browse to SECOND.scr Line 0,0 100,200

5 Scripts and Meshes 5 Write your own script files –To draw a circle with centre at 0,150 and radius 20 (THIRD.SCR) –To draw a rectangle from 50,20 to 250,50 (FOURTH.SCR) –To draw a 6 sided polygon with centre at 200,150 inscribed about a circle of radius 60 (FIFTH.SCR) –To erase everything and zoom all (SIXTH.SCR)

6 Scripts and Meshes 6 Scripts and 3D Meshes Write a script file to create the simple mesh on Slide 2 Write a script file to create the larger mesh on Slide 3

7 Scripts and Meshes 7 Smoothing Meshes Use the Pedit command to smooth meshes –Start a new drawing –Tools, Run Script, find MESH3.SCR –Modify, Object, Polyline, click on mesh, S –3D Orbit to view the mesh To Desmooth –Modify, Object, Polyline, click on mesh, D To control surface density –At command prompt type Surfu (for m direction density) and change value –Change surfv for n direction density –Smooth again with new mesh density settings.


Download ppt "Scripts and Meshes 1 Scripts and Meshes Meshes –Only way to draw very complex surfaces –Each point on the mesh is defined individually (ie you type in."

Similar presentations


Ads by Google