In this paper, 3DSolid models are widely used in
many fields. Although it is easy in modeling, the repeat work is
large. Automatic building for 3DSolid models can be performed
by developing programs based on VBA for AutoCAD. The
3DSolid modeling method by VBA is discussed in this paper,
and notices in modeling by VBA, which is obtained in author’s
work, are given.

© All Rights Reserved

Просмотров: 15

In this paper, 3DSolid models are widely used in
many fields. Although it is easy in modeling, the repeat work is
large. Automatic building for 3DSolid models can be performed
by developing programs based on VBA for AutoCAD. The
3DSolid modeling method by VBA is discussed in this paper,
and notices in modeling by VBA, which is obtained in author’s
work, are given.

© All Rights Reserved

- Additive-manufacturing-innovations-advances-and-applications.pdf
- Elliptical Trammel
- MA Tutorial Creating Fixtures for MA 3D
- Evermotion Hdmodels Cars Vol 3 PDF
- 5th grade unit 4 parent letter 13-14
- Auto CAD 2004
- B3.2-R3
- Color Cryptography
- 3D Design I/II
- Prob Boxes
- ansys1
- Vector (Butterfly ) Diagrams for Osteoarthritic Gait a Preliminary Report_Khodadadeh
- linear relations intro
- EDU_CAT_E_SKE_FF_V5R8
- 6063 bsc
- Weights
- Constructing Ellipses
- MATH 37 Lecture Guide UNIT 5 (No Exercise)
- u4.22.01
- Open Thrust Calculation for Valve

Вы находитесь на странице: 1из 3

Shiming Liu

School of Applied Technology, University of Science and Technology Liaoning, Anshan, China, 114000

Email : 591409021@qq.com

Abstract: In this paper, 3DSolid models are widely used in contains this elliptical table; 3. use order AddEllipticalCone to

many fields. Although it is easy in modeling, the repeat work is create an elliptical cone whose underside ellipses core is WCSs

large. Automatic building for 3DSolid models can be performed origin; 4. use order SliceSolid to cut this elliptical cone as the

by developing programs based on VBA for AutoCAD. The needed elliptical table(its name is TYTObj, located left at the

3DSolid modeling method by VBA is discussed in this paper, picture); 5. get UCS switch matrix by following orders and then

and notices in modeling by VBA, which is obtained in authors put the elliptical table at designed place using this switch matrix.

work, are given. ' set new-created UCS as current UCS

Keywords: VBA; modeling; AutoCAD ThisDrawing.ActiveUCS = NewUcsObj

' get switch matrix of UCS

1. INTRODUCTION Dim TransMatrix As Variant

TransMatrix = NewUcsObj.GetUCSMatrix()

Three types of 3D models are supported by AutoCAD: wireframe ' put the elliptical table from WCS to UCS(that is to put it to

model, curved surface model and solid model. Because of the predesigned place)

most application of solid model in 3D space, this paper only TYTObj.TransformBy (TransMatrix)

discusses modeling methods using solid model. [1]. Modeling the elliptical table can be achieved through these

operations above

2. METHODS OF 3d MODELLING

This way is to create a solid according to fundamental solids.

VBA provides several modeling orders of solids: AddBox,

AddCone, AddCylinder, AddEllipticalCone,

AddEllipticalCylinder, AddSphere, AddTorus and AddWedge

Although this way is very easy, but compared with modeling with

AutoCAD directly, it is a little more complex. Some points

should be concentrated on: when using VBA to model, the

coordinate used by all points is that in word coordinate

system(WCS) and models are created under WCS. And the

fundamental underside of models is parallel to XY plane in WCS. Fig 1. Elliptical tables modeling

It means that models cannot be created in predesigned place by

using user coordinate system(UCS) directly, which causes some 2.2 Creating solids by way of stretching, revolving and so on

troubles in modeling by using these orders. Reasons are as This way is to create solids by stretching and revolving 2D or 3D

follows: the underside of models(like cylinders two back planes line objects. VBA provides several modeling order

and cones undersidemay be planes in space, which are not AddExtrudedSolid, AddExtrudedSolidAlongPath and

certainly parallel to WCSXY plane, and modeling by using these AddRevolvedSolid.

orders cannot achieved directly. There are two methods of This method is similar to modeling with AutoCAD directly,

solving this problem. which needs to create a UCS and activate it. Then create planes

Number1. Creating the model in WCS first, then put it at the which should be stretched or revolved to make them become

correct place by moving, revolving, aligning and so on. Modeling solids in UCS.

in this way is similar to modeling in AutoCAD directly. It can be Compared with the first method, this way is easier and more

achieved but is comparatively complicated. practical. For example, Box, cylinder, elliptical cylinder and so

Number2. Creating models at certain place first in WCS then on can be created by being stretched; cone, cylinder, torus and so

using UCS at this place, get the switch matrix of this UCS and put on can be made by revolving.

the model at predesigned place using this matrix. For example, to In addition, for some complicated solids, realizing their modeling

create the elliptical table showed in picture 1(located right at the should use operations like intersect, union, subtract and so on

picture, the models underside is an ellipse that is not parallel to among solids based on that fundamental models have been

XY plane in WCS), the procedures to model are as follows: 1. created.

setting the underside ellipsecore as origin, the ellipses long axis

as X axis and the ellipses short axis as Y axis, create user 3 NOCICES IN 3d MODELLING BASED ON VBA

coordinate system(name: NewUcsObj showed in the picture); 2.

get relevant size parameters about the elliptical cone which 3.1 user coordinate systems construction

International Journal of Engineering Research ISSN:2319-6890 (online),2347-5013(print)

V Volume No.6, Issue No.11, pp : 472-474 1 Nov. 2017

It is easy to construct UCS in AutoCAD, taking picture 2a as an 3.3 No dependence on eventsorder of occurrence and

example. If you want to set point O as the coordinateorigin, line operation

OA as X axis and the line which is perpendicular to line OA and When you are writing events operation programs, dont rely on

up as Y axis, you can use the UCS order:founding coordinate the order that you think is the one in which this event occurs and

system with three points. That is to choose point O as coordinate is operated. For example, as for following programs:

origin at first; set point A at positive X axis and choose point B ThisDrawing.SendCommand "_Circle 0,0,0 50 "

directly among all points in positive Y axis. Then regardless of Dim Center(0 To 2) As Double

whether line OB is perpendicular to line OA or not,the UCS can Dim Radius As Double

be constructed successfully like just like picture 2b. Center(0) = 0: Center(1) = 0: Center(2) = 0: Radius = 20

However, when founding UCS with VBA, line OB must be Dim circleObj As AcadCircle

perpendicular to line OA. Otherwise, UCS can not be constructed. Set circleObj = ThisDrawing.ModelSpace.AddCircle(Center,

Therefore, to found UCS in plane AOB, two assistant Radius)

perpendicular lines should be made . Then UCSs construction ThisDrawing.SendCommand "_LINE 0,0,0 -20,80,100 "

can be realized. The author applies following operations by The result(when the programs are alone) can be: drawing a circle

practicing: first cut or stretch line OB to the strength of line OA whose radius is 50 first then drawing a circle whose radius is 20

and create a rhombus whose connecting sides are line OA and and finally drawing a line. This order is consistent to programs

line OB; then use the characteristic that the rhombuss two operation. However, the result(when programs are with the form

diagonals are perpendicular and create two perpendicular lines to and other sentences) can also be: drawing a circle whose radius is

construct UCS; finally delete all assistant lines. 20 first then drawing a circle whose radius is 50 and drawing a

line finally. This order is not the same as that of programs'

operation. That is, when VBA and SendCommand order are used

together, they are not operated in the order which they are sent in

certainly.

3.4 plane domains formation and application

In AutoCAD, when a plane domain is formed, each part(line,

curve) that contributes to this plane domain will not be alone and

then become an element of this plane domain. Whats more,

when the plane domain is stretched or revolved, it will disappear.

It will be a part of the constructed solid. However, in VBA, when

a plane domain is formed, each part of the plane domain exists

alone as well. Similarly, when the plane domain is stretched or

revolved, it will be reserved. Therefore, they should be deleted.

3.5 Using circumference ratio correctly

When forming revolved solid with method AddRevolvedSolid,

its unit for revolving angle is radian. Circumference ratio is used

here. If the revolving angle is less than 360, choices of will not

a b have any influence on the picture to be formed. But when the

Fig 2. Construction of UCS revolving angle is equal to 360, the last number of value after

3.2 useing method SendCommand correctly the point must be plus 1. Otherwise, the formed revolved solid

When modeling with VBA, to visit AutoCAD and realize the will not close. For example, the value of can be 3.14160 but not

alternation with AutoCAD, it is feasible to send commands to 3.14159. Picture 3 is the figure when is 3.14159. From it we can

AutoCAD order line directly by using method SendCommand. see that after romancing, there is a crack in this figure. But when

This method sends single string which must contain parameters is 3.14160, the figure closes and this phenomenon does not

of commands to be operated to order line, and then arrays these appear.

parameters according to this commands reference order. The

space bar and return keys ASCII in strings are equal to pressing

ENTER key in a keyboard.For example,when drawing a circle

whose radius is 10 and core is at point (0,0,0), the following two

commands are equal:

ThisDrawing.SendCommand "_Circle 0,0,0 10 "

ThisDrawing.SendCommand "_Circle" & vbCr & "0,0,0" &

vbCr & "10" & vbCr

Using method SendCommand can make up for VBAs defects in

drawing commandsshortage. For instance, there is no command

to align in VBA. When this command is required, sending it to

AutoCAD order line directly using method SendCommand to Fig 3. unclosed revolved solid

complete this operation. 3.6 Using stretching and inclining angle correctly

International Journal of Engineering Research ISSN:2319-6890 (online),2347-5013(print)

V Volume No.6, Issue No.11, pp : 472-474 1 Nov. 2017

Just like mo`deling in AutoCAD directly, when using 4 CONCLUSIONS and PERORATIONS

AddExtrudedSolid to stretch a plane domain in VBA, if the

stretching inclining angle is positive, it means that the plane As a secondary development tool of AutoCAD, VBA is easy to

domain is getting thinner gradually from standard object by being use and its functions are very strong. Developing parameterized

stretched; otherwise, if the value is negative, the plane domain is modeling programs by using it, designers can be set free from

stretched to be thicker gradually from standard object. The complicated and repeated work. Work efficiency can be

default angle 0 means that the plane domain is stretched towards improved obviously.

the direction which is perpendicular to the 2D object plane.

3.7 Addition 5 References

When modeling by using VBA, some commandsinput

parameters are different from those in modeling directly with i. Wang Sheng-zhi, Lan Xiao-min. Journal of Liaoning Shihua

AutoCAD .It is necessary to figure out significance of these input University Vol.32 (2012), p.73

parameters carefully. For example, when constructing a ii. XU Yan-ming. Journal of Jinling Institute of Technology Vol.28

cylinder(or cone), its undersidecore should be input;however, in (2012).p.10

iii. GAO Yuan, KANG Zhuo and JIN Bo. Guangzhou Architecture

VBA, we should input its own core (that is,core of its height). Vol. 40 (2012), p.42

The input array number is one more than actual value when using iv. SUN Qiang, YU Hong-yu. Geomatics & Spatial Information

command ArrayPolar to realize annular array in VBA. Technology Vol. 34 (2011), p.279

Parameters of rotation axis are its starting point and the 3D vector

pointing its direction when using method AddRevolvedSolid to

form solids by revolving.But we should input rotation

axisstarting point and end point in AutoCAD.

- Additive-manufacturing-innovations-advances-and-applications.pdfЗагружено:Alan Ivan Tafoya
- Elliptical TrammelЗагружено:Nitin Sharma
- MA Tutorial Creating Fixtures for MA 3DЗагружено:Silvana Bidirinis Ramirez
- Evermotion Hdmodels Cars Vol 3 PDFЗагружено:Amy
- 5th grade unit 4 parent letter 13-14Загружено:api-260132447
- Auto CAD 2004Загружено:Anurag Goel
- B3.2-R3Загружено:api-3782519
- Color CryptographyЗагружено:Himanshu Bhatt
- 3D Design I/IIЗагружено:Spencer Hill
- Prob BoxesЗагружено:masteroflittle
- ansys1Загружено:Nguyen Ngoc Huy
- Vector (Butterfly ) Diagrams for Osteoarthritic Gait a Preliminary Report_KhodadadehЗагружено:petcudaniel
- linear relations introЗагружено:api-310503032
- EDU_CAT_E_SKE_FF_V5R8Загружено:BJ Kiran Kumar
- 6063 bscЗагружено:Manraj Gill
- WeightsЗагружено:uzairmetallurgist
- Constructing EllipsesЗагружено:Zoran Danilov
- MATH 37 Lecture Guide UNIT 5 (No Exercise)Загружено:Jenesis Carlo Sy
- u4.22.01Загружено:lbo33
- Open Thrust Calculation for ValveЗагружено:Prashant Malve
- CATIA V5R17tataЗагружено:Nikhil Raj
- AutoCAD BasicsЗагружено:ketipakketipung
- Autocad Commands-nri CollegeЗагружено:giridhar
- EG Manual 2013_ODDЗагружено:Harmish Bhatt
- Solidworks Tutorial_ Basic SketchingЗагружено:aap1
- 3] GD&T.pdfЗагружено:Nithin Basava
- SPE-98-PAЗагружено:Sarahi Maya
- Bodum GlassЗагружено:Sahil Sharma
- Case Studt DeЗагружено:Purvesh Pandya
- Vektor Kelompok.pptЗагружено:Zenonissya Galwan Batara

- Computational ElectromagneticsЗагружено:Innovative Research Publications
- Case Study: Implementation of 5S Methodology in JCB Assembly Business Unit Material StorageЗагружено:Innovative Research Publications
- Named Data NetworkingЗагружено:Innovative Research Publications
- Power Transformer Protection using Fuzzy Logic based ControllerЗагружено:Innovative Research Publications
- Surveillance NetworksЗагружено:Innovative Research Publications
- Analysis on the Generation and Control of Strip Defects on the Surface of Color Coated PlatesЗагружено:Innovative Research Publications
- The Experimental Study of Eccentric Loadingfor Piled Raft Foundations Settling on Slope CrestЗагружено:Innovative Research Publications
- Social Network Analysis for Web-based CommunityЗагружено:Innovative Research Publications
- Computational Physics : An IntroductionЗагружено:Innovative Research Publications
- Rainfall-Runoff Modeling Using Artificial Neural Networks and HEC- HMS (Case Study: Catchment of Gharasoo)Загружено:Innovative Research Publications
- Structural Analysis of a Charcoal Sieving Machine Under Dynamic LoadЗагружено:Innovative Research Publications
- Analysis on Quenching Cracks of Engine CrankshaftЗагружено:Innovative Research Publications
- Design of Quick-sensing Device for Temperature Difference Generation Environment Based on Single Chip MicrocomputerЗагружено:Innovative Research Publications
- Computational EconomicsЗагружено:Innovative Research Publications
- Fluoride Removal Efficiency of Commercially Available Reverse Osmosis Water Purifying Systems in Removing Fluoride Ions from Drinking Water in IndiaЗагружено:Innovative Research Publications
- Review of the Development of Several True 3D Display TechnologyЗагружено:Innovative Research Publications
- Mobile HealthЗагружено:Innovative Research Publications
- Wearable ComputingЗагружено:Innovative Research Publications
- Estimating Sea Level Change at the Egyptian Coasts Using Different Data SourcesЗагружено:Innovative Research Publications
- Preliminary Study on Dimocarpus Longan Peel as Inhibitors for the Pitting Corrosion of 5052-O and 6061-O Aluminium Alloys in Artificial Brine SolutionЗагружено:Innovative Research Publications
- Internet AddictionЗагружено:Innovative Research Publications
- Mobile InternetЗагружено:Innovative Research Publications
- Online LaboratoryЗагружено:Innovative Research Publications
- Identity TheftЗагружено:Innovative Research Publications
- 095.pdfЗагружено:bhavitarora
- Numerical Investigation of Fluid Flow and Heat Transfer in a Rectangular Channel with Longitudinal Vortex GeneratorsЗагружено:Innovative Research Publications
- Effect of Alccofine and Foundry Slag on Compressive Strength of High Strength ConcreteЗагружено:Innovative Research Publications
- Comparative Print Quality Analysis of Screen Printing and Liquid Ink Based Digital Printing MachinesЗагружено:Innovative Research Publications

- Weight Estimation of Vessels Apps.xlsЗагружено:Alvin Smith
- Midterm Progress ReportЗагружено:duncmcleod
- Preantation of SSVЗагружено:atilla
- Zill Calc CatalogЗагружено:rrockel
- Math FormulaЗагружено:Nisha Sajwan
- Chapter 8Загружено:Arisil23
- SSC CHSL 2013Загружено:Ias Aspirant Abhi
- ASTM F 16 - 67 R00 _RJE2Загружено:phaindika
- 3d Figures Volume and Surface Area 12215Загружено:jinimajur3000
- 10.23.2 Modeling Bolted ConnectionsЗагружено:jingyong123
- Theoretical Density Study of Winding Yarns on SpoolЗагружено:harishkumar.ravichandran
- Documents.tips Surface Area and Volume 5584a9a68e712Загружено:Umar Syaid
- Add Maths ProjectЗагружено:Levinthran Kuruparam
- Manufacturing TolerancesЗагружено:Harsh
- Suggested Solution to Assignment 1_MATH4220.pdfЗагружено:jhonmt7
- mc_series_hЗагружено:nvkjayanth
- PROJECTION OF SOLIDSЗагружено:proddatur
- Quadric SurfacesЗагружено:Rifqi Andi
- 0580_w10_qp_41Загружено:MohammedKamel
- 11 RUNOUTЗагружено:Imran
- 2_Coordinate Systems and TransformationЗагружено:Junaid Zaka
- c2_sЗагружено:benjyman2014
- Pitot Tube StandartЗагружено:desrytandi
- Pmr Mat Kertas 1 Set 11Загружено:Prathib Sooria
- VISI_ModellingЗагружено:goatack
- Chapter 05 TorsionЗагружено:Charles Chivengah
- Solutions] Mastering Physics HW11Загружено:jamie_heinecke
- Generate a Unique Shadow Casting SculptureЗагружено:UmeshSanghvi
- MATH13 CoursewaresЗагружено:Paolo Gochingco
- Test on ErrorsЗагружено:Shiva Ram Prasad Pulagam