Introduction to CAD

Embed Size (px)

DESCRIPTION

Introduction to CAD: components of a CAD system, software, hardware, how does a CAD system work?, tasks of CAD & the programming environment.

Citation preview

AnintroductiontoCAD Introduction:distributionsystemautomationisbuilton5pillarswhicharecomputerprogramming, computeraideddesign&drafting(CADD),systemsupervisory&dataacquisitionsystems(SCADA), localnetworksincludingLAN&WANandgeographicinformationsystems(GIS)includingglobal positioningsystem(GPS)software&receivers.InthisarticleanintroductiontoCADsystemswillbe presented.TheCADpackagesarethetoolsusedtoautomatethedrafting/designing/engineering processesinalmostallindustries&technicaloperations.TheCADprogramwas1ofthefirsttoolsto beusedtoautomatethetechnicalofficesofanyorganization.SuchCADpackageshavebeeninuse (commercially)forover20yearsinconsultingfirms,industrialplants,refineries,petrochemicalplants, utilitiesandothersectorsoftheindustry.Theyproducedrawingsofeverytype:electrical,mechanical, civil,architecture,process,instrumentation,....etc.Dependingontheuserfieldofinterest,theCAD systemcantieinwithotherautomating/analysis/productionpackages,forexampleCAM(computer aidedmanufacturing)&GIS(Geographicinformationsystems).Overtherecentfewyearsalotof developmenttookplacewithrespecttoCADsystems.Theinterfacebetweentheuserandsoftwareis becomingeasier&similartootherofftheshelfgeneralsoftwarepackages.Thedrawingscanbe checkedagainstspecifiedstandards.Thedrawingscanbesentovertheinternetforviewingormarking &checking.Theattributes(fields)ofthedrawnobjects(entities)canbeaccessedviaothernonCAD softwarepackages.Thedrawingcanbefedintoanotherprogramforanalysisordisplayingdetailed information. ComponentsofaCADsystem:theycanbeclassifiedbroadlyintothesoftwareandthehardware.The softwarebeingtheprogramthattheuserwillinteractwithtodraw,modify,store&plothis/herwork. Thehardwarecontainstheworkstations(orpersonalcomputers),theplotter&theserver(for networkedsystems). Thesoftware:itprovidestheuserwithallthenecessarytoolstodraw/sketch,modify,adddimensions, crosshatch,send&plothis/herdrawing.Thesetoolsaredisplayedonthemonitor'sscreen.The programwillallowmorethan1approachforenteringthecommandsorperformingtherequired functions.Thescreenmaybedividedintothefollowingsections:menubar(orsometimescalledpull downmenus),standardtoolbar,ribbonbar(orobjectpropertiestoolbar),drawingwindowwithcursor, draw(quick)toolbar,modifytoolbar,coordinatesystemicon,model&layouttab,commandwindow withcommandline,statuslinewithtogglebuttonsandfeature(history)tree.Ingeneral,whenatoolbar iconisclicked1of3actionswilltakeplace:adialogboxwillbedisplayed,afunction(subtool)bar willbedisplayedhavingadditionalfunctionsthatrelatetotheclickedtoolbariconoraspecificaction occurs. Thehardware:ThepersonalcomputerwillbeaPentiumorcompatiblemicroprocessorwithadequate amountofRAM(64MBormorepreferred),compatibleoperatingsystem,SVGA(orVGA)monitor card,harddrivewithsufficientspace(capacity)toinstallthesoftwarepackage,mouse,parallel communicationport,serialcommunicationportandmodemtoconnecttotheInternet.Theplotter connectedtothenetworkcanbeclassifiedintoeithervectororrasterdevices.Thefirstreceivesthe information(tobeplotted)sentbyCADprograms(asvectors(linesbasedonmathematicalcoordinate

data)andhandlesitdirectly(asisvectors).Thelatterhandlestheinformationreceivedindirectlyi.e. translatingthevectordatatoformanimagecomposedofdots(raster).Anexampleforavectordevice isthepenplotter.Anyofthefollowingisarasterdevices:dotmatrix(impact)printers,thermal,laser& electrostaticprinters/plotters. HowdoesaCADsystemwork?Vectorsareusedtodescribespecificobjects(entities)definingtheir size,position&geometry.TheimageseenonscreeninaCADapplicationisonlyavisual representationofthevectorfile.ThevectorinformationinaCADfileismathematical(itisnotstored asanimage).AllCADsoftwarepackagesusesvectorobjectsinsteadofraster.Theprimarybenefitsis theabilitytopreciselydescribe,create,scale&manipulateindividualentities.Allgraphicsobjectsare modeledinrelationtoafixedworldcoordinationsystemswithglobaloriginatthebottomleftcornerof thedrawingarea(Xaxispointingtotheright,Yaxispointingupward).Atanytimetheusercansetup atemporaryusercoordinatesystembymovingtheoriginand/orrotatingtheaxis.Alldataisentered relativetothattemporaryaxissystem(butisconvertedautomatically&storedinworldcoordinates). Anentityisthesmallestobjectthatcanbeplacedonthescreen,forexampleLine,Circle,Arc,Text, Polylines.Theentitiesarestored&referencedinthedrawingdatabase.Eachentityhasadetailed descriptionintheCADdatabase.Forexamplethesinglelinemaycontainthefollowingattributes (equivalenttocolumnheadingorfieldinadatabase):entityname,entitytype,layeruponwhichthe lineisdrawn,colourofline,beginningXYcoordinate,endingXYcoordinate,linetypeplusotherdata thatisneededtofullydescribetheentity.Anentitylistforacirclemaycontainentityname(whichisa hexadecimalnumber,itchangeseverytimeadrawingisopened,itisneversaved),entitytype(inDXF groupcodeitis0,textstringfixedeg."CIRCLE",:LINE",..),colour(inDXFgroupcodeis62), primarypoint(10,thecenterofacircleasinthiscaseorthestartpointofalineortextentity),floating pointvalues(40,radiusofacircleortextheight)&layername(8,eg."0","LAYER1",..).TheCAD databaseobjectsincludebothgeometricalobjectssuchascircles,lines,polylines,...etcandnon geometricalobjectsassymboltables&dictionaries. TheCGMs(computergraphicsmetafile)arecreatedtobecomethefinaloutputthatenduserswilllook at,theIGES(initialgraphicexchangespecification)filesareusedforengineeringdatainterchange betweendifferentCADsystems.TopublishengineeringdrawingstotheInternet,thecompletedCAD drawing(.dwgor.dxffiles)israsterized(converttoarasterfileformat)thatcanbeviewedbyaWeb browser.TherasterizedformatcanbeforexamplePNG,JPEG,GIF.ThesecanbepublishedusingIMG taginHTML.CertainpluginstothebrowserscanallowtheusertoviewDXF,DWG,HPGLorDWF (hybridformat)withouttheneedtorasterizesuchdrawings.Italsoallowshim/hertomodifythe drawingpriortosavingittoalocaldrive. XML(extensiblemarkuplanguage)isamarkuplanguagedesignedtodescribedataratherthan displayingthem.HTMLisusedforthelatterpurpose.XMLtagsarenotdefined.ItisusedwithDTD (documenttypedefinition)todescribethedata.Forwebbased(enabled)CADsoftware,itis consideredidealasitallowsforthedefinitionofanynumberofinformationtags.Itallowsanunlimited definitionoftagsthatdescribethedata.Theschema(dictionary)hastobestoredataknownlocation ontheInternet.TheschemaforaCADsystemhastoanswerthefollowingquestion:howlines,text,

arcsandotherentitiesarepresentedinXML?Anyapplicationthatrequiresthesetagstoprocessthem, looksthemupatthatInternetlocation.HTMLspecifieshowdataisdisplayedinabrowser,XML definesthecontent(data)ofthepage.XMLcanbeusedinconjunctionwithHTML/Javascript,CSS (cascadingstylesheet)orXSL(extensiblestylesheetlanguage)toprovidethedatatotheuserinthe requiredformatandexpecteddetails. TasksofaCADsystem:thefacilitiesandprovisionsthataCADsystemhastoprovidetotheuser,today, differalotthanonlyafewyearsago.Before,themainpurposeofaCADsystemwastoassistin producing&plotting(obtainingahardcopyof)drawingslikelayout,assembly,singleline,detailedand production(shop)drawings.Theplottermaybeconnectedtothelocalnetworkandfoundonthelocal siteorataremoteone.Thedesignandthenecessarydrawingscanbedoneat1location.Theserver thatisconnectedtoaleasedtelephonelineoradialuponecanbeusedtosendthedrawingstoanother city(wheretheshoporsiteislocated)orevenanothercountrytomakehardcopiesavailable,where theyareneeded.Thedrawingsproducedhadtobereviewedmanuallytoverifythattheyadheretothe organizationstandardsanddrawnpercustomerspecifications.Forconsistencypurpose,asymbols libraryisbuiltandincludedintheCADsoftware,thusitcanbeusedtopresentthedifferentdevices andequipmentthatwillbeshownonthedifferentdrawings.Theorganizationmanualmayincludea copyofsuchsymbols,howtoaccessthem,onwhichlayer(level)eachsymbolhastobeinsertedas wellaseachotherobjectorblockofobjectsistobelocatedandthenecessaryinformationregarding thestyleofthedifferentlines,text&dimensioningstandards.Asimpleprogramminglanguage(or scriptinglanguage)andadevelopmentenvironmentwasalsoincludedwiththeCADprogram.They areusedtocustomizetheCADenvironment(menus,toolbars&dialogboxes)aswellasautomating therepetitiveCADoperations.ThiswasthenbutnowadaystheintelligentCADsystemsoffermuch moretoolstotheusersaswellasCAD&standardsmanagers.Someofthesenewfacilitiesare:the drawingscanbesentovertheInternettoobtainapprovalsorgetreviewed,markedup&sentback(all electronically),thedesignsproducedbysuchsoftwarecanbefoundontheInternetavailablefor modificationandotherdiagrams/sketchescanbeaddedtothem,thedrawingscanbecomparedwith thecompany'sand/orstandardsorganization'sand/orcustomerstandardsandthediscrepancies reportedinmorethan1way,morecontrolontheentitiesattributes&properties,improved&easier dimensioning,easeoftextobjectsscaling,aprogrammingenvironmentthatallowsbuilding applicationsthatcommunicatefasterwiththecoreCADprogram,addingruntimefunctionstothe existingCADclasses&dataacquisitionprovision. Goingbacktothebasics,thefundamentalfunctionalityofaCADprogramwouldinclude: 1)Creatingoraccessingfilesasdrawings,plots,merge. 2)Editingfunctionsasundo,redo,cut/copy,paste,mode. 3)2Dviewingfunctionsaszoom,pan,show,hide. 4)Drawingfacilitieswhichcreateobjects(entities)suchaslines,circles,arcs,polylines. 5)Dimensionfunctions. 6)Selecting&unselectingfunctions. 7)Modifyingfunctionsastransform,fillet,modifyingtext. 8)Queryfunctionswhichinquireaboutobjectsasmeasure.

9)Toolsfunctionsassymbols,attributes,preferences. Someofthesefunctionsareaccessedfromthedropdownmenusotherfromthetoolbarsandsomeare availabletoberunfrommenusaswellastoolbars.Certaincommandsareonlyavailablefromthe commandline. Theprogrammingenvironmentcanbeassimpleasatexteditor,wherethecommands(statements), keywords&instructionsareenteredinablankdocument.Itisthensavedtothediskwiththe appropriatefileextension,astextdocument.Theprogramming(interpreted)languageprovidesthe followingfunctionality: 1)Theentrypointtothefunction,thefilecancontainmorethan1function. 2)Theuserinputrelatedstatementswhichcoverpickingapointonthescreen,enteringarealnumber totheprogram,enteringasecondpointonthescreen,enteringastringoftext,enteringadistance (usingthekeyboardorbypickingasecondpointonthescreen),enteringanangleinradians(usingthe keyboardorthemouse). 3)Theassignmentoperatororcommand. 4)Theprintstatementswhichallowtheprogramtosimplyprintamessageonthecommandline(a prompt)ortoprint&returnanexpression. 5)Thearithmeticoperationswhichincludestheaddition,subtraction,multiplication,division, incrementanddecrement. 6)Thelineentityoperationslikethecalculationofthedistancebetween2points,thesecondpointina linegiventhefirstpoint&anangle,obtainingtheintersectionof2lines,returningananglebetween2 points. 7)TheexecutionofthecoreCADfunctionslikedrawinglines,polylines,circles,dimensioningand othercommandsexecutedthroughthedropdownmenuortoolbars. 8)Thelistoperationslikedisplayingthevaluesinthelistvariable,takingalistapart&displayingonly certainvaluesfoundinthelistvariable,joining2ormoreliststogether,returningthenumberof elementsinalist,looksforaduplicatereturningtheduplicateplusalltheothermemberfromittothe endofthelist,lookingforanelementinalistvariablefromagroupoflistvariablesreturningthelist withtheindicatedvariable,constructinganewlistwithanindicatedelementplacedatthebeginningof thelist. 9)Thedatatypeconversionswhichconvertarealnumberintoaninteger,convertanintegertoareal number,returnastringfromarealnumber,convertarealnumberintoastringconvertastringintoan integer,convertanintegerintoastring. 10)Conditionals(decisionmaking),looping&iterationsliketestingforequality,theequivalenttothe standardiftheelse,fornext&loopwhile/untilloops. 11)Operationsonentitieslikeselectingentities,obtainingtheentityname,extractingtheentitylist, substituting1aspectforanotherinagroupoflists,returningthelength(numberofselections), modifingtheentitylist&writingitbacktothedrawingdatabase. 12)Operationsontextlikechangingtextheightanddistance(space)betweentextlines. 13)Stringmanipulationfunctionslikeconvertingthestringoftextfromlowertouppercase, concatenating2stringsinto1,returningthenumberofcharactersinastring,returningpartofastring

fromaspecifiedpositionwithinthestring 14)MiscellaneousfunctionslikereturningasASCIIcodeforacharacter,returningthecharacterforthe indicatedASCIIcode,changingtheselectedentityorobjectlayer,erasingthescreen,movingfromthe graphicsscreentothetextoneandviceversa.