I D E N T S L O C S ===================== IDENTS is an acronym for "Interactive Digitise and Entity Selection", it is the system used by XCAD to collect location, entity or view data for all commands. IDENTS is made up of three different modules each of which is concerned with collecting one of these data types. This section describes how IDENTS is used to enter location data to commands. The general command format for all XCAD commands is: VERB NOUN MODIFIERS : IDENTS Commands that require location information such as DRAW LINE must be terminated with a colon to indicate location data is going to be entered. The general promt delivered after the colon is entered is "Loc", as in: #DRAW LINE :Loc At this stage location information - in the above case to define the line end-points - can be entered in various ways. The simplest method for entering locations is to move the cursor to the required point and click the left-hand button. This will generally be displayed on the drawing as a small 'x' symbol confirming the location has been registered. However, this type of free-hand data entry has it's limitations when accurate drawings are required, so IDENTS provides a number of ways to enter locations in a more accurate fashion. The three main groups are free-hand digitising, explicit locations or point-on-entity type locations where existing entities can be referenced to define a point on the drawing. The following section are broken into the three main groups highlighting the keywords found in the IDENTS automenu. FREE-HAND LOCATIONS =================== The simplest method of entering locations as described above to just digitise locations on the drawing. For example #DRAW LINE :Loc x1 x2 (return) or (colon) will draw a line between the points 'x1' and 'x2'. o keyword GRIDON GRIDOFF If a grid has been selected and is displayed in the current viewport, the digitise will automatically snap to the nearest grid point. Grid snapping can be temporarily disabled by entering the GRIDOFF keyword. Once this keyword has been entered, the grid will be ignored for all futher digitises untill the GRIDON keyword is entered. This will enable grid snapping once again. o keyword backspace del If the location entered was incorrect, it can be rubbed out by either clicking the right-hand button of the mouse or by pressing the 'backspace' or 'del' key on the keyboard. To confirm the rub-out was registered, a '#' symbol is displayed at the location that was last entered. Clicking the right-hand button of the mouse or pressing the 'backspace' or 'del' key repeatedly will rub out any digitises in the reverse order they were entered. Rubbing out more locations than were entered will result in IDENTS terminating prematurely. This method of undoing locations in a last entered order is applicable to all forms of data entry within IDENTS. o keyword XYLOCK To aid with entering freehand locations orthogonally, there are three key- words that may to used to affect a lock in either or both the x and y axis. If the keyword XYLOCK is entered, all locations entered will lock to either the x or y value of the last entered location. Wether an x lock or y lock is chosen depenends on the difference between the x and y values of the location just entered and the last location. If the difference between the x values is greater than the difference between the y values, the new location will lock to the y value of the last location. If the difference between the x values is less than the difference between the y values, the new location will lock to the x value of the last location. This ensures that all locations following the XYLOCK keyword will be spaced horizontally or vertically adjacent to the previous location. o keyword XLOCK If the keyword XLOCK is entered, a digitise is entered to define a point on the drawing to lock the x value of any following location. A symbol shown as a vertical line with an upwards and downwards pointing arrowhead at each end is displayed at the location immediately following the XLOCK keyword. Any location entered after this will lock to the x value of the XLOCK location. This ensures that all following locations will be vertically adjacent. o keyword YLOCK The keyword YLOCK acts in the same way, but will lock the y value of all following locations making then horizontally adjacent. o keyword LOCKOFF To disable XYLOCK, XLOCK or YLOCK, the keyword LOCKOFF must be entered. EXPLICIT LOCATIONS ================== o keyword X Y Explicit locations may be entered in their cartesian form, ie a value for the x-axis and a value for the y-axis of the drawing. For example: #DRAW LINE :Loc X 23.4 Y 34.6 X 100 Y 38.5 will draw a line between the points at the locations x23.4,y34.6 and x100, y38.5 . To enter an explict location, the letter X followed by a space is typed. This is then followed by a real or integer value defining the x-axis component of the location, the value should be followed by a space. XCAD will then automatically issue the prompt 'Y'. This is followed by a value defining the y-axis component of the location. A small 'x' symbol will then be displayed at the entered location if it is visible in the currently displayed window of the drawing. A cartesian coordinate can be entered with just a Y value if the X value is known to be zero: #DRAW LINE :Loc Y 10 Y 20 will draw a vertical line between the points x0,y10 and x0,y20 . If the Y value is known to be zero, a comma can be entered at the Y prompt to save having to type 0 followed by a space: #DRAW LINE :Loc X 10 Y ,X 20 Y , will draw a horizontal line between the points x10,y0 and x20,y0 . Explicit cartesian coordinates will always override grid snapping or any axis lock that is in effect. o keyword IX IY Locations can also be entered explictly as an increment in the x and/or y axis relative to the last point. For example: #DRAW LINE :Loc x1 IX 20 IY 30 will draw a line starting from the location 'x1' ending at a point that is 20 units in the x-axis and 30 units in the y-axis distance from 'x1'. As with entering cartesian coordinates using the X and Y keyword, XCAD will automatically prompt IY after IX and a value has been entered. To enter just an increment in the x-axis, type a comma at the IY promt: #DRAW LINE :Loc x1 IX 20 IY , will draw a horizontal line 20 units long starting at the point 'x1'. Or: #DRAW LINE :Loc x1 IY -20 will draw a vertical line 20 units long starting at the point 'x1'. o keyword IR Another way to specify incremental coordinates or locations is by using the IR keyword. This is used to enter a location in a vector format; a combination of angle and distance. For example: #DRAW LINE :Loc x1 IR 45 L 100 will draw a line starting at the point 'x1' and ending at a point which is at a distance of 100 units and at an angle of 45 degrees from the point 'x1'. IR is followed by the vector angle in degrees, XCAD will automatically issue the L promt which should be followed by the vector length. Angle zero is orientated at 3 o'clock, positive angles are made anti-clockwise. o keyword LORG IA Locations can also be incremented radially by using the LORG and IA keywords. The LORG keyword is followed by a location used to define a local origin for radial increments. A symbol shown as 2 arrows, one pointing up and one pointing to the right is displayed at this location. The keyword IA can then be used to define an angular increment relative to the last location. For example: #DRAW CIRCLE DIAMETER 10 :Loc LORG x1 x2 IA 45 will draw one circle at the point 'x2' and a second circle at a point that would result from rotating the point 'x2' 45 degrees about the point 'x1'. Negative or positive increments can be used. Positive increments are made anti-clockwise while negative increments are made clockwise. o keyword N All of these methods for entering locations incrementally can be repeated by using the N keyword. For example: #DRAW CIRCLE DIAMETER 10 :Loc x1 IX 3 IY 4 N 20 will draw a circle at the point 'x1' and another 21 circles each at a point 3 units in the x-axis and 4 units in the y-axis distant from the previous circle. The value following the N keyword defines how many times the last incremental location should be repeated. For the above case a total of 22 circles will be drawn; one at the point 'x1', a second at the increment ix3,iy4 and a further 20 repeated at the same increment. Angular increments can also be repeated in the fashion. For example: #DRAW STRING :Loc LORG x1 IX 20 IA 60 N 5 will draw a hexagon. The centre of the hexagon will be at the location 'x1' which is also used as the local origin for the following angular increments. The first point of the hexagon is 20 units to the right of 'x1' ( IX 20 ). The rest of the points of the hexagon are located by rotating the first point through an angle of 60 degrees ( IA 60 N 5 ) about the point 'x1'. o keyword UNITS When entering explicit or incremental coordinates, it is possible to change the units type of the current viewport to facilitate automatic conversion of units. If the idents automenus are active, the keyword UNITS can be entered to display a second menu showing the various units types that can be chosen. Alternatively, the units keywords may be entered on their own. For example, if the current viewport units are millimetres, to enter explicit coordinates or incremental coordinates in inches, the keyword IN is entered: #DRAW LINE :Loc x1 IN IX 1 IY 1 will draw a line starting at the point 'x1' and ending at a point that is 1 inch in the x-axis and 1 inch in the y-axis distant from 'x1'. The units conversion keyword are: MM for millimetres. CM for centimetres. M for metres. KM for kilometres. IN for inches. FT for feet. ML for miles. The selected units type stays in effect untill a different units type is chosen. POINT-ON-ENTITY LOCATIONS ========================= One of the most useful ways of defining a location on the drawing is to reference a point on an existing entity. IDENTS provides a number of ways to do this. The methods described below are all enabled with a specific keyword such as END or NEAR. Once the keyword has been entered, the method stays in effect untill cancelled by a different point-on-entity method is entered or the LOC keyword is used. o keyword END If the keyword END is entered, locations will automatically snap to the nearest end-point or vetice of an existing entity. The entity selected will be the entity nearest to the location entered. For entities such as full circles or full ellipses which do not have an end-point, the location found is generally at the 3 o'clock point of the entity. Example: #DRAW CIRCLE :Loc END x1 x2 will draw a circle at the nearest end-point of the entities nearest to the locations 'x1' and 'x2'. o keyword ORG The ORG keyword is used to automatically snap locations to the origin point of an entity. All entities have only one origin point, for circle and ellipses this is the centre, for line, string and polygons etc., this will be the first location that was entered when creating the entity. o keyword MID The MID keyword is used to automatically snap locations to the mid-point of the nearest entity. For lines, the mid-point is the point half way between the 2 line end-points. For strings, polygons and xhatch polygons, the mid- point found will be the mid-point of the segment nearest to the location entered. For arcs, circles and ellipses, the mid-point is the point on the circumference half way between the start and end angles. o keyword NEAR The NEAR keyword is used to snap locations to the nearest point on an entity. The location found is the point of intersection of a normal from the entered location to the nearest entity. Both the methods invoked by MID and NEAR are not applicable to spline entities. o keyword INTOF As well as being able to locate points on existing entities, the inter- section point of two existing entities can also be found using the INTOF keyword. This requires two locations to be entered for each point. The point found will be the virtual intersection of the two entities nearest the two locations entered - if they intersect at all. The intersection of any combination of cpoints, lines, string, polygons, arcs or ellipses can be found. When using strings or polygons, the segment of the entity nearest to the location entered is used as if it were a line entity. The intersection of some entity combinations such as a line and a circle or two ellipses can have up to 4 solutions. To obtain the correct point of intersection, the entities should be identified using locations close to the required point. o keyword GENERATE The methods described in the previous sections for locating points on existing entities are all used to find a single point. IDENTS also provides a method for generating a series of locations on a single entity. This method is invoked by entering the GENERATE keyword. When an entity is identified in GENERATE mode, a series of locations are generated along the contour of an entity. Valid entities are lines, strings, polygons, arcs, ellipses or splines. If the entity is a line, string or polygon, a location is generated at each end-point and vertice of the entity. The order of locations generated is determined by the location used to identify the entity. Locations are always generated in order starting from the end-point of the entity nearest to the identifying location. If the entity identified is an arc, ellipse or spline, locations are generated at equi-distant points along the circumference or contour of the entity. The spacing of the points is determined by the current arc quality setting - (see SELECT DISPLAY). As with lines and string, locations are generated in order starting at the end-point nearest to the identifying location. One of the main uses for GENERATE is the ability to use existing entities to define a boundry for commands such as DRAW POLYGON or DRAW XHATCH. For example: #DRAW POLYGON :Loc GENERATE x1 will draw a polygon whose boundry will follow the entity identified by digitise 'x1'. If the entity was a circle for example, a filled circular polygon will be drawn. o keyword CHAIN Often, when commands such as DRAW XHATCH are used, a border made up of a whole series of existing is required. The locations for the border can be identified using a combination of GENERATE, END, INTOF etc., or in some cases a method similar to GENERATE call CHAIN can be used. When an entity is identified in CHAIN mode, a search process is set up starting at the end-point of the entity farthest from the identifying location. If any entities are found that have an end-point sharing this position, the search continues at the opposite end-point of the new entity. This process is repeated untill a free end-point is found or the search loops back to an already found entity. In this way, all entities that are 'chained' to the identified entity are found. When all of the entities in the chain are found, locations are generated along the contour of all of the entities in the same way as GENERATE. The locations are generated in the order the entities were found starting the original entity identified. If there is any contention regarding the route to follow in the chain - cases where there are more than one entity having an end-point at the current search position - then the route chosen is arbitary. There is a way of forcing CHAIN to follow a particular route. This is done by excluding certain entities from the search using the EXCLUDE keyword.