« CADopia - AddTolerance method | Main | CADopia - AddTrace method »

Thursday, December 20, 2007

CADopia - AddTorus method

Adds a torus given the location, torus radius and tube radius. The torus object is created as a polygon mesh.

Syntax

objectVariable = object.AddTorus([Center], [TorusRadius], [TubeRadius])

Where:

     object is one of the ModelSpace or PaperSpace collection objects or a Block object;

     Center is a Point object representing the center point of the torus;

     TorusRadius is a double-precision variable representing the radius of the torus (distance from center of torus to center of tube);

     TubeRadius is a double-precision variable representing the radius of the tube.

AddTorus method example

Private Sub AddTorus_Example()

     ' This example adds a torus to the drawing.

     Dim myDoc As CADopia.Document

     Dim boxObj As CADopia.PolygonMesh

     Dim cenPt As Point

     Set myDoc = ActiveDocument

     Set cenPt = Library.CreatePoint(1, 1, 0)

     Set torusObj = ThisDocument.ModelSpace.AddTorus(cenPt, 4, 2)

     torusObj.Update

ThisDocument.ActiveViewport.ZoomExtents

End Sub

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment