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