If you do any of the foregoing, your rights under this license will automatically terminate. Such termination shall be in addition to and not in lieu of any criminal, civil or other remedies available to Software Forge Inc. LIMITED WARRANTY Except as specifically stated in this agreement, the Programs are provided and licensed "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Software Forge Inc. warrants that the media on which the Programs are furnished will be free from defects in materials and workmanship under normal use for a period of 15 days from the date of delivery to you. Software Forge Inc. does not warrant that the functions contained in the Programs will meet your requirements or that the operation of the Programs will be entirely error free or appear precisely as described in the Documentation. LIMITATION OF REMEDIES AND LIABILITY To the maximum extent permitted by applicable law, the remedies described below are accepted by you as your only remedies, and shall be available to you only if you register LinuxCAD with Software Forge Inc. within 15 days after delivery of the Programs. Software Forge Inc.'s entire liability and your exclusive remedies shall be: if the Programs media are defective, you may return them within 15 days of delivery to you along with a copy of your receipt and Software Forge Inc. will replace them free of charge. The customer is responsible for shipping charges. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL Software Forge Inc. BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAMS, EVEN IF Software Forge Inc. OR A OEM OR DEALER AUTHORIZED BY Software Forge Inc. HAD BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. GENERAL If any provision of this Agreement is held to be unenforceable, the enforceability of the remaining provisions shall in no way be affected or impaired thereby. This Agreement shall be governed by the laws of the state of Illinois. If you have any problems with the License or have any further questions, please contact your supplier: Software Forge Inc. Phone 913 663 1724 e-mail unixguy@aol.com web: www.linuxcad.com www.softwareforge.com
Starting LinuxCAD
linuxcad {filename} lcad {filename} linuxcad - is an executable file linked to static Motif libraries. lcad - is a script that sets customized preferences for drawing dimensions and other emvironment variables. Then sets the backup trace mode and calls linuxcad afterwards. {filename} - is a file to edit, we do not enforce particular filenames or file extensions. LinuxCAD will detect its format automatically by looking at contents. We recommend to use the following file extensions: .dxs - for LinuxCAD drawings, .scr - for LinuxCAD scripts, .dxf - for export files to Acad. If {filename} does not exist it will be created at the first SAVE command. Whenever you start LinuxCAD with a file name of a new or non-existing file you will see a message "... is not a regular file! error!". Disregard this message and proceed with your work. The message just means the file was not found and it will be created.
Files in the distribution
linuxcad - executable.
linuxcad.caf - command aliases configuration data.
linuxcad.lin - linetype configuration data.
airplane.dxs - sample drawings.
bolt12.dxs
bs75.dxs
columbia.dxs
housing.dwg
housing.dxs
inqueries.mnu - loadable menus.
display.mnu
draw.mnu
edit.mnu
setup.mnu
stars.mnu
dim.tbr - loadable toolbars.
draw.tbr
demo - demo shell script.
demo.scr - sample command script.
lcad - startup shell script with dimensioning variables customized to the English system.
lcadm - startup shell script with dimensioning variables customized to the Metric system.
license.txt - copying license.
linuxcad.txt
paintl.scr - this script creates a more versatile set of layers. This is more appropriate for drawing signs, trademark symbols and logos.
readme.txt
userguide.html - this manual.
adsl.mak - sample make file to build ADSL programs in C and C++. Or you may also call them LinuxCAD loadable modules
adsl_cmd.so - sample LinuxCAD loadable module.
adsl_sample1.cpp - source code of the sample LinuxCAD loadable module.
linuxcad_c_exposed.h - Application Development System for LinuxCAD include file.
sample_blib.dxl and sample_blib.slb - sample attachable block library and slide library related to it for the purposes of browsing.
mech_sample.slb - another extensive slide library. You can browse this one by command BROWSESLB. These slides cannot be utilized as part of your designs. They serve only for demonstration. We can create similar symbol libraries for LinuxCAD as a special order.
./ads - Directory contains sample programs that demonstrate how user can write extensions to LinuxCAD.
./fonts - Directory contains LinuxCAD fonts. You can add more fonts to LinuxCAD using TTF2LTF command.
./libs - Directory three contains all LinuxCAD symbol libraries.
./lisp - Directory contains sample programs in embedded LinuxCAD Lisp.
./more_samples - Directory contains sample drawings that were created in LinuxCAD by other users, and distributed here with their permission.
./winprint - Directory contains executable code of LinuxCAD MS-Windows print server.
LinuxCAD User Interface
LinuxCAD User Interface consists of:
Controlling and Giving Commands to LinuxCAD
LinuxCAD accepts all commands through a command line. Entering commands, points and scalars from the command line produces drawing output in the graphics area of the LinuxCAD. You can execute commands either by manually typing them or through pull down menus.
In many of the commands described below you will be asked to enter objects. The LinuxCAD prompt for entering objects looks like this:
You can select objects by choosing individual objects or by selecting a group using the Window frame or the Crossing frame. To switch to the Window frame group selection mode just type "W" ( do not type quotes ).
To switch to the Crossing frame group selection mode type "C" . A specific set of objects is affected by every command. This set is referred to as the selection set and will be highlighted. There are two modes of LinuxCAD operations when you create a selection set. The first mode is ADD mode, when objects are added to the selection set. Another mode is REMOVE when objects are removed from the selection set. For instance, when an object is selected (which we will call B1) for deletion by the ERASE command you may cancel the delete of B1 by switching the selection set from ADD mode to REMOVE mode. Now, once in REMOVE mode B1 can be unhighlighted by picking it with the mouse.
To switch in REMOVE mode enter "R" at the Select object: prompt. To switch back to the ADD mode enter "A" at the Select object: prompt. The initial mode is of course ADD. For your convenience object selection keywords can be accessed from the pull down menu: ***/Select objects You can enter points as coordinate pairs X and Y in two distictly different coordinate systems (x,y) and polar (angle, radius), points in both systems can be entered as absolute or as relative to a previous location.Example: X,Y A comma must separate x from y. Do not use spaces. Sometimes you may want to enter a point as a displacement from the previous point. In that situation you enter the "at sign" ("@") in front of the coordinate pair. For instance: @10,20 - says we want a point 10 units above the previous point and 20 units to the left from previous point. @45<1.125 - says we want a point in the direction of 45 degrees 1.125 inches away from the previous location. X,Y - absolute Decarte point A < R - absolute polar point @X,Y - relative Decarte point @A < R - relative polar point
The 3D capabilities of LinuxCAD is whole another story. It might be particularly challenging for some users enter 3D geometry coherently. Therefore we added such capability as Named 3D point to LinuxCAD 3D system. The 3D system of LinuxCAD will be discussed later in detail. Here we would like to say that if 3D point is defined, it can be entered by name later. Whenever user expect 3D point, you can either enter 3D point by its coordinates separated by commas or you can enter a name of the existing Point 3D object preceded by a dollar sign. For example $P4 enters point P4. LinuxCAD will find the 3D point object in file and substitute it's coordinates right there in the command.
Example: Command:L3D First 3D point (x,y,z):$pa Entity "PA" not found, discarding input. Point was expected ! First 3D point (x,y,z):$pb Found 3D point "PB"(10.000000,10.000000,10.000000). Second 3D point (x,y,z):$p444 Found 3D point "P444"(4.000000,4.000000,4.000000).
In the above example point PA does not exist in the drawing but points PB and P444 do exist. Note that LinuxCAD will automatically generate names of 3D points such as to exclude duplicate names when selections sets containing 3D points are copies. Many LinuxCAD 3D commands will automatically generate named 3D points when the visibility of 3D points is turned On. Use Options/Settings 3D/Control 3D points to change display mode of 3D points.
You can enable ORTHO mode any time by selecting Ortho/On in the pull down menu.
ORTHO mode will only allow drawing of vertical or horizontal lines. In order to draw skewed lines, disable ORTHO. In addition to ORTHO, LinuxCAD allows you to control drawing with other modes. For example, by setting SNAP mode on, movement of the cross hair is now discrete with a particular fixed step. GRID mode will show you a constant Cartesian grid overlaying your drawings.
It is very convenient to start or end a line at a very specific position in relation to other objects in the drawing. For example, you might want to start another line from the exact middle of another vector or from the intersection point of two objects. This is possible. LinuxCAD provides an object attachment feature.
You can attach to the end point, the intersection point, the middle point and to a perpendicular projection of the previous point to an object.
Any time LinuxCAD expects you to enter point, you may enter an object attachment keyword first and the point second.
All object attachment keywords can be found in the ***/Osnaps and ***/Osnaps 3D pull-down menus. Here they are: NEA, END, PER, INT, TAN, MID, CEN, VER, EDG, POI.
2D object attachments NEA - Nearest point on a line of an object. END - End point of a line. INT - Intersection point of two lines. TAN - Tangent to arcs,ellipses and circles. MID - Middle point of line segments. CEN - To the center of arcs,lines,ellipses. Simple 3D object attachments ( require one point click ): VER - To one of the end points of a 3D object. This mode will attach to the corner of 3D Face, to the endpoint of 3D Line and to any vertex of 3D Polyline. EDG - 3D middle point of a rib of 3D wireframe object. Use this attachment when you already have an existing segment of another object. This mode will find a middle point of 3D Line, middle point of an edge of 3D Face or middle point of a segment of 3D Polyline. POI - Attaches to a "close located" point of 3D Line. This mode is not very precise but the resulting point is guaranteed to lay exactly on the 3D Line or rib. Complex 3D object attachment modes ( require several point click ): MID3 - this mode will ask you to enter two new 3D points. Then LinuxCAD will compute the middle point in between of these two and that will be the 3D point that command in progress gets. Example: First 3D point (x,y,z):MID3 - LinuxCAD 3D command prompt. MID3 OSNAP: Start Pnt (x,y,z):VER - first point prompt of MID3 mode. MID3 OSNAP: Start Pnt (x,y,z):3.232708,11.561254 Caught 3D point at [7.270650,3.688106,10.000000] . MID3 OSNAP: End Pnt (x,y,z):VER - second point prompt of MID3 mode. MID3 OSNAP: End Pnt (x,y,z):3.050029,11.199957 Caught 3D point at [7.100357,3.295584,10.000000] . Caught 3D point at [7.185503,3.491845,10.000000] . - is final 3D point that command gets. In the example above the VER simple 3D attachment mode is used inside of MID3 complex 3D attachment mode. This is optional but commonly used supperposition of attachments. PROD - this mode will ask user to enter 3 3D points, the points must not be located on the same 3D line. LinuxCAD will compute a vector product of the two vectors defined by the 3 points entered. The resulting vector tip will be the point the top level command gets. Example: Second 3D point (x,y,z):PROD VECTOR PRODUCT OSNAP: Start Pnt of Vector1 (x,y,z):VER VECTOR PRODUCT OSNAP: Start Pnt of Vector1 (x,y,z):3.236767,11.553135 Caught 3D point at [7.270650,3.688106,10.000000] . VECTOR PRODUCT OSNAP: End Pnt of Vector1 (x,y,z):VER VECTOR PRODUCT OSNAP: End Pnt of Vector1 (x,y,z):2.368030,11.382635 Caught 3D point at [6.390835,3.492592,10.000000] . VECTOR PRODUCT OSNAP: Start Pnt of Vector2 (x,y,z):VER VECTOR PRODUCT OSNAP: Start Pnt of Vector2 (x,y,z):3.228648,11.545016 Caught 3D point at [7.270650,3.688106,10.000000] . VECTOR PRODUCT OSNAP: End Pnt of Vector2 (x,y,z):VER VECTOR PRODUCT OSNAP: End Pnt of Vector2 (x,y,z):2.842994,10.846779 Caught 3D point at [6.930255,2.903502,10.000000] . Computed vector product 3D point : [7.270650 3.688106 10.623754]
Do not get confused if you can not undertsand these descriptions of attachment modes completely at this stage of learning, it will all become self evident when you start actually using LinuxCAD 3D features. Using of 2D features of LinuxCAD requires no knowledge of 3D attachments or any 3D features.
Regarding 3D Polylines, it is very convenient to use 3D Polylines as a skeletons for the construction of your 3D point assembly, use 3D Polylines together with VER 3D object attachment mode for this purpose. This provides for more natural way to enter 3D geometry.
2D attachment modes will not catch 3D Objects and vice versa.
When customizing environment variables it is important to know color numbers.
LinuxCAD standard color numbers are: BLACK 0 RED 1 YELLOW 2 GREEN 3 CYAN 4 BLUE 5 MAGENTA 6 WHITE 7 LIGHTRED 8 In all commands you can enter either one of the colors above or a color as a combination of RGB values. But in dim variables you must specify one of the standard LinuxCAD colors above.
LinuxCAD Print Server
Is a separate MS-Windows program which can read files written by selecting
in the LinuxCAD pull down menu. LinuxCAD print server can print these files on any MS-Windows system printer.
We have noticed that printer manufacturers with microsoft corporation are very organized folks. They have put a great deal of efforts and dollars into creation of printer drivers for ms-windows. That is why we have decided to take advantage of that and provide you with LinuxCAD print server for ms-Windows.
The menu choice above creates binary plot file. Print server can accept the file either from the disk or on the fly from TCP connection.
Currently you may use LinuxCAD ms-Windows print server only in file printing mode, the TCP/IP connection mode will be added in one of the next releases.
lwps32.exe - 32 bit LinuxCAD MS Windows print server for Windows 95 and NT.
lwps16.exe - 16 bit executable for Windows 3.1 and Wabi under Linux.
bwcc.dll - Borland C++ runtime DLL, required for LinuxCAD Print Server.
bwcc32.dll - Borland C++ 32 bit runtime DLL, required for LinuxCAD Print Server.
You may use the "Setup" button in LinuxCAD MS-Windows Print Server dialog
to set the line width for the lines with a width of 0 in the drawing.
LinuxCAD Pull Down Menus
Pull Down menu has a tree structure. Most of the branches and leafs of the menu are commands. But some are keywords that make sence only within a context of a commend.
Menu *** (far right permanent menu) has three sub-menus, Select objects and Osnaps and Osnaps 3D. These sub-menus contain simple keywords instead of commands that can be run. Keywords for object selection and object attachment that were described earlier Keywords can not be executed in a command area but they are used quite often in a context of other commands.
Whenever you run a command that requires entering a point (and almost every command requires that). You may want to go to Osnaps menu and use object attachment modes available there. Similarly, when you work with a command that requires you to select an object or objects, you may want to use object selection control keywords available in ***/Select objects menu.
Keys - is a far left menu, you may or may not see it while you are reading this, Keys is a temporary menu. Whenever an active command gives you a list of choices in a command area it will simultaneously create "Keys" menu consisting of all those choices and make it visible. So it is almost never necessary to enter choices in the command area while they always duplicated in keys menu.
Keys menu does not get cleared until some subsequent command will give you some new choice. The presence of the Keys menu on the screen does not always mean the choices given in it are acceptable.
What input is acceptable at the time is shown in the command area prompt.
File Command History - bring up the command history window New LinuxCAD - start new instance of LinuxCAD on another or the same file. ( If you have started two copies of the LinuxCAD on the same file, you are responsible for consistency of the changes and mutual updates. Use menu command File/Re Open for synchronization ). New - Detach current file from LinuxCAD Open - Open another drawing file. Symbol libraries - Select one of the preloaded symbols for reuse in your drawing. Symbol libraries 3D - Some of the libraries, especially architectural ones are accessible in 3D mode here, these parts when inserted will be placed in 3D model space instead of paper space. More commands/Re open - open the drawing again, therefore abandoning the changes you have made since last SAVE command. More commands/Copy the Filename - copies the name of the current file to the clipboard ( might save you an effort to retype the file name at times ). Save & Print Save - regular save command designed to use most of the time. Also accessible by pressing F2. Export to DXF (acad10) - write DXF file consisting of all DXF (acad13) entities of the current drawing. SLD - save as AutoCAD slide Print To X11 Bitmap To X11 Pixmap Write Postscript in colors - output colored postscript. Write Postscript BW - output black&white postscript. Change Postscript settings - set the postscript line width, etc. Print to DeskJet - print to attached DeskJet type Print to DeskJet in Colors printer ( Hewlett-Packard ). Print to Laserjet - print to attached LaserJet type printer ( Hewlett-Packard ). To LinuxCAD MS-Windows Print Server All printing commands have the following modes: Print View - will print whatever is now visible in the LinuxCAD drawing area. Print Window - will ask you to select a window and will print all objects contained within Print Extents - will print all objects in the drawing. Normally this command should be executed within 3 - 8 seconds. If you are experiencing longer delays, it is because you have distant, small objects in your drawing. That forces LinuxCAD to do extensive calculations which cause the delay. We recommend that you run command Display/Zoom extents and make sure your Zoom Extents contain nothing more than you want to print before you chose "Print Extents". Windows Printing Print - command only shows up in Micrsosfty Windows version of LinuxCAD. Save as... - save to a file with different name. Exit Edit Pull Down Menu ------------------------------------------------------------ Edit Clipboard Cut - select objects and cut them to X-clipboard Copy - select objects and copy them to X-clipboard Copy Color - copy the current color specification to the X-clipboard Paste - paste objects from the X-clipboard into current drawing. That is a simple, quick way to cut and paste between different instances of LinuxCAD Paste Text - paste from clipboard but paste as text strings only, do not attempt to interpret the information on the clipboard like LinuxCAD drawing. Paste Color - copies the color from clipboard and allows the user to select objects that to be converted to this color. Paste/Set Color - take color from the X-clipboard and set it to be the current color. Please open colors.dxs sample drawing file that comes with LinuxCAD. Now you should understand that in conjunction with such color palette file this menu command is very useful. Paste Command - the contents of a clipboard will be pasted into LinuxCAD command line and executed as a command. This is convenient when you insert blocks by name from deep directory three hierarchies, you can just have a list of your blocks in text file and paste them when you need them instead of typing. Edit... Undo - allows to go back and restore the previous state of the drawing. This command does not yet allows you to restore deleted objects. You may be able in future versions. Set mark Undo to last mark Select - select objects Break&Divide Break - break a line, removes part of the line or separates line to two lines. Break Lines - breaks all line type objects at their intersection points. Divide - divides any objects to specific number of parts. Divide Line - divides a line in two proportional parts Extend - extend one or more lines until intersection with a boundary Trim - trim object Chamfer - create chamfer in a place where two lines meet Fillet - create a fillet in the place where two lines meet Hatch - create hatch, hatch will be created as fully "exploded" set of lines. Hatch Patterns - brings up a graphics (iconic) menu of hatch patterns, after selecting pattern the hatching starts automatically using the pattern yiou have selected. Stretch - moves and stretches objects with preserving their links with the rest of the drawing. Edit2... Change Props - changes generic object properties of a group of objects ( like Line type color etc. ). Change - changes specific object attributes, such as radius starting point, angle and so on. Change Text - select text and modify contained string by using text editor. You can configure the name of text editor used here setting LINCAD_EDITOR environment variable. If none specified the command uses vi and xterm together. Create Block - creates a block by associating several simple objects together. Explode - breaks a block back to simple objects. Convert to Lines - converts objects to line segments Traces - converts object to trace segments Solids - converts filled objects to Solid filled triangles. Single Block - combines group of objects "in place" in a block, the name of the block is generated automatically. Single Polyline - converts a 2D object to polyline. Tesselate 3D objects - breaks 3D objects to elementary triangular Face 3D type objects, this is a canonic (sort of) form for many 3D algorythms to work. Edit Polyline - modifies a polyline type drawing object. Text Magnifier - magnifies text until its readable. Change EXEC - changes an executable contents of the drawing object. EXEC - executes an executable contents of a drawing object. Edit 3D Move 3D - move command that moves objects in model space and will affect only 3D objects, 2D objects are invisible for this command. Copy 3D - copying 3D objects in 3D space. Offset 3D - a form of copying of 3D objects with somewhat alternative user interface. Scale 3D - scales 3D objects in 3D model space. Rotate 3D Rotate around 0X Rotate around 0Y Rotate around 0Z Rotate Any Axis - LinuxCAD will ask user to enter two 3D points that define rotation axis. Rotate&Copy Any Axis - this command rotates 3D a copy of 3D objects. It copies objects first and then rotates the copy. Mirror 3D - mirroring 3D objects across the "mirror plane". Copy&Rotate 3D - this command is misnamed ( for the lack of better name ), it computes "complex spacial transformation" of coordinates of 3D objects in such a way that three 3D points are "best aligned" to other three 3D points. It is usefull for virtually assembling 3D parts together. It supposed to be easy to put one floor of a building on top of another using this command. Extrude - these group of commands extrudes 2D polyline in 3D space therefore creating 3D bodies. Extrude Extrude Group Conic Extrude Move&Scale Extrude Revolve - revolves 2D polyline in 3D therefore creating "body of rotation". Copy - copy objects within single drawing, option MULTIPLE allows to you place many copies with a single command. Move - move drawing objects within one file. Mirror - mirror objects Rotate - rotate objects Scale - scale objects Offset - offsets one of the offsetable objects. There are some objects that can not be offset, such as SOLIDs. Erase - delete objects from the drawing Draw Pull Down Menu ------------------------------------------------------------ Draw Draw... Dimensions... Horizontal Vertical Aligned Radius Diameter Angular Leader Leader&Text 2D Splines Quadratic Spline Edit Quadratic Spline Bezier 2D Curves B-Spline 2D Curves Rectangle - creates a rectangle, nonfilled. Filled Rectangle - creates a rectangle, filled with color. Polygon - creates any type of proper polygon. Multiline Text Polyline - creates a polyline object. Polyline Vector - creates a special type of single segmented polyline. Polyline Arc - creates a special type of an ARC object. Array - creates rectangular or polar arrays of objects. Angles for polar array have to be specified in degrees. Insert Attdef Sketch - free hand drawing(press to toggle pen up/down). Pencil - free hand drawing(pen is down while you press). Draw 3D... 3D Line 3D Solid Sphere Torus Cone Cylinder Spline surface Line - create 2D line Solid - create 2D solid triangle Circle - create 2D circle Arc - create 2D Arc Text - create Text Ellipse - create 2D ellipse Point - create point, LinuxCAD draws points as small squares. Trace - create 2D trace Doughnut - create 2D filled doughnut Display Pull Down Menu ------------------------------------------------------------ Display - commands from this menu change current visible part of World Coordinate System Zoom 3D Zooming... X Y Z Rotate camera Y Rotate camera X Rotate camera Z Zoom Previous - LinuxCAD remembers 20 previous zooms for later recall. Zoom Next - When you zoomed with Zoom Previous you can return in opposite direction to the last view you have set. Zoom All - View all within the drawing limits. Drawing limits are special variable. LinuxCAD sets those variables when you run DWGLIMITS command and stores them in your drawing when you do SAVE command. Enlarge - Enlarges objects, changes magnification alone so a smaller sized area of World Coordinate System will be visible without changing overall position of the Viewport relatively to WCS. Diminish - Enlarges objects, so a bigger size area of WCS will be visible without changing overall position of the Viewport relatively to WCS. Zoom to Extents - Recalculates coordinates of all objects and changes zoom so all of them become visible. Zoom Window - Allows you specify visible window as rectangular part of the current view Pan - Move visible window without changing magnification Redraw - Refresh the current view Inquiries Point ID? - display the precise coordinates of the point you choose . Angle ? - Displays an orientation angle of your choosing. Included Acute Angle? Distance ? - Displays the distance between two chosen points. Entity data? - Displays the LinuxCAD's data about selected object. Insert Data? - Displays the LinuxCAD's data about selected INSERT type object and prints the entire block contents associated with it also. All objects? - prints information about all objects in the drawing. All blocks? - prints information about all blocks in the drawing. Inquiries 3D Distance? - computer 3D dstance. Point ID? - reports coordinates of picked 3D point. Angle 3D? Angle with 3D Axes? - reports andle of a picked vector with all three 3D coordinate axes. Which 3D viewport? - prints the 3D viewport number that the picked object is displayed through. Vector,Scalar prod? - computes vector and scalar product of two vectores that you select by picking 4 points. Are they parallel? - checks if picked 3D faces are parallel or not. 3D faces intersect? - computes intersection of two planes. Hide Remove hidden lines - just what it is, WARNING: TIME CONSUMING. (up to 3000 3D Faces on Intel i7 takes 8 minutes). End hide - abandons "HIDE" command results and returns to wireframe view. Make Hide Permanent - removes original wireframe objects from the drawing and inserts flat view instead. Render Render Status - Produces status report on renderer parameters that are active. Render Config - allows to adjust renderer parameters one by one. (while this may help mosty common mistake when rendering is not having the light sources in drawing). Show render pallete - quick test if your display hardware and display mode are capable enogh for render to work Render Scene - thise is where it shades the 3D wireframe. New Window(RO) - Open another uneditable (read only) window. normal inverse Options Pull Down Menu ------------------------------------------------------------ Options Settings Text Style - Set the current text style, currently supports only SHX. List Loaded SHX - see what fonts are loaded. Query Font Codes - see which symbols exist in an SHX font. PickBox Size - Change size of the object selection rectangle (that little yellow box when there are prompt "Select object:" in the command area below ). other size 2 4 6 8 10 12 14 16 18 20 Ortho enables or disables the mode so you can not draw any but the orthogonal lines. On Off Axis displays or hides the coordinate axes. On Off Setup Snap When set to on makes the movement of the cross hair discrete. On Off Setup Grid Displays or hides dots of the coordinate grid. This feature is very convenient. We recommend that you always set GRID four times larger then SNAP. SNAP does not produce the performance overhead the grid does. On Off Setup Screen Extents - Changes the size of the scrollable black area where your graphics objects are. This parameter does not change magnification or origin of the view, it just gives more pixels to LinuxCAD. This allows you to take full advantage of high resolution displays. Set 640x480 Set 800x600 Set 1024x768 Set 1024x1024 Set 1400x1200 Set 2048x2048 Set 4096x4096 Drawing Limits - sets the limits of the current drawing and draws boundary lines for them. If you do not need boundary lines you can remove them later. Setup Landscape ISO A4 A3 A2 A1 A0 ANSI A B C D E Portrait ISO A4 A3 A2 A1 A0 ANSI A B C D E Circumference Number - Changes the value of circumference. The circumference is a number of segments LinuxCAD uses to represent analytical functions (such as a circle or an ellipse). A larger circumference yields a more precise your drawing. It is obvious the drawing should not be more precise that you can see or that the paper can take. Excessively large circumference values may significantly impact the performance of LinuxCAD. Change Color Set ByLayer Black Red Yellow Green Cyan Blue Magenta White Lightred Gray RGB - Select new color visually in a dialog as combination of RGB values from 0 to 255 for each color dimension. Change Line Type - Menu for managing line types. Linetype List All Line Types Set CONTINUOUS - Sets plain line without breaks Set HIDDEN - Sets dashed line, usually used for drawing hidden objects Set CENTER - Sets center line (alternate long dash and short dash). Set DOTTED - Sets line from dots only. Change Layers Layer - Enter layer command and select what to do next (about layers) in a command line, this command is an AutoCAD compatible. Set Layer - allows to select current layer in more intuitive way. Set Layer ON Set Layer OFF List All Layers Order By Layer - sorts objects in the drawing in the stacking order of their layers. All Layers On - turns all layers on simultaneously, good for finding hidden objects. Named Views Views List All Views Save View Restore View Drawing Settings Insertion Base point Specify Units of the Drawing - tell LinuxCAD about Inches or millimeters whichever you prefer. Editor Settings Spool commands to ... - Activate spooling of the all commands you run to specified file. Spool Off - Exit spooling mode. Autosave - Enable autosave mode. We suggest that you keep the Autosave mode on at all times to prevent loss of work. Every 1 min. Every 2 min. Every 3 min. Every 5 min. Every 10 min. Off OS Services lpr linuxcad.ps - if you have a LaserJet printer this is the one you will use often. xterm xcalc - other X-window programs that is xclock good to have an access to. Help * * * Pull Down Menu (Object attachments and object selection keywords) ------------------------------------------------------------ * * * Osnaps - Object attachments menu, can be entered in every place where the point can be entered. NEArest ENDpoint INTersect PERpend TANgent MIDpoint CENter Select objects - Object selection keywords menu Window Crossing Add Remove Previous Keys Pull Down Menu ------------------------------------------------------------ Keys - Transient keyword menu. ...
Customization of the LinuxCAD Dimensioning System
You can customize the way LinuxCAD creates dimensions by setting Linux environment variables in the current execution environment, before you start LinuxCAD. The standard way of doing that in Korn and Bourne shell is:
For instance:
LINCAD_DIM_DIMLINES_COLOR=3Example: LINCAD_DIM_DIMLINES_COLOR=white export LINCAD_DIM_DIMLINES_COLOR LINCAD_DIM_ARROW_COLOR=WHITE export LINCAD_DIM_ARROW_COLOR linuxcad ATM_API_ObjectModel.dxs -inverse
LINCAD_ANGLES_IN_RADIANS - Chooses the angular units. If this variable is 0 LinuxCAD reads the angles in degrees. If this variable is 1 LinuxCAD reads angles in radians. That is not what you enter them in, but what they are measured in by LinuxCAD for the default dimension text.
We recognize that these long variable names are hard to type. But their names are self explanatory and they only need to be entered once and saved. You can save them in a special startup script or your shell ~/.profile file.
Other Environment Variables of LinuxCAD
LINCAD_EDITOR - text editor executable name for modifying text (if none specified vi and xterm are used in combination). We recommend to use any X windows based text editor which takes file name as its first argument.
LINCAD_PRINTER - system name of the printing device for the LinuxCAD or special name lpr This device will be used for printing your drawings
Depending from your system configuration you will set there one of the following:
LINCAD_PRINTER =/dev/lp0 if your parallel port address is 0x03bc
LINCAD_PRINTER =/dev/lp1 if your parallel port address is 0x0378
LINCAD_PRINTER =/dev/lp2 if your parallel port address is 0x0278
LINCAD_DIR - full path to the directory where LinuxCAD will look for menus and some other files.
LINCAD_LENGTH_UNITS - by default LinuxCAD uses inches as its drawing units. Units are not relevant when you draw but they become relevant when you export or print your drawing. To make Millimeters the default, you have to assign something like Metric or MM to this environment variable, actually any word starting from letter M will do. This environment variable assigns drawing units for new drawings. For existing drawing the units will be read from the file itself. Drawing units can be verified or changed using DWGUNITS command of LinuxCAD.
LINCAD_PS_LINEWIDTH - related to postscript output, specifies width of the thin lines. Thin lines are the ones originated from width less graphics objects as Lines, Circles, Ellipses and Splines. This opposite to objects that define their width in the drawing editor model like: Traces, Polylines, Doughnuts. You have to specify it in the Postscript units. It may be less then 1.0 and does not have to be an integer. Line width specified by this variable can be changed while you work with drawing editor by using PRINTPS/SETTINGS/LINE_WIDTH command.
LinuxCAD Hot Keys
Hot keys are only available when the command area below the drawing area is the current active widget. Widget is the UNIX name for window. To make the command area the current widget set your mouse cursor over it and click left mouse button. You will see the border of the command area becomes a thicker to confirm the activation of the widget.
F4 - maximize command area, so you can see command history. F2 - save drawing on disk F3 - toggle ortho mode. (at present time the ortho mode toggles which were entered through this key do not get written to the script file, that may cause script file to produce incorrect output later, this is a minor problem and it will be corrected in later versions). F5 - cancels current command (Enters Nil or imitates right button pressed ), or repeat the last command if you are not in the middle of a command. This however can not abort the ERASE command that already has a non empty selection set. To abort ERASE command use Ctrl/C combination of keys. Ctrl/C - abort command immediately and unconditionally. This is especially convenient way (the only way) to end the unwanted ERASE command without deleting the selected objects. F6 - toggles snap mode. Ctrl/Q - enables object attachment to NEAREST point. Ctrl/A - enables object attachment to END point. Ctrl/Z - enables object attachment by PERPENDICULAR. Ctrl/W - enables object attachment to MID point. Ctrl/S - enables object attachment to CENTER point. Ctrl/X - enables object attachment to NEAREST point. Ctrl/Q - enables object attachment to INTERSECTION point. The key for object attachments have been selected such that it is very easy to reach them both Control key and letter key simultaneously by using the fingers of your left hand while you move the mouse with your right hand. THE FOLLOWING HOTKEYS ARE FOR MICROSOSFT WINDOWS VERSION OF LINUXCAD ONLY: Ctrl/Q - Opens up command history. Ctrl/A - Toggles ORTHO. Ctrl/S - Saves the drawing.
You will get a button menu in the next release of LinuxCAD. And it will be possible to assign arbitrary length command script to almost every functional key or Ctrl/Alt modified key of the keyboard.
LinuxCAD Command Line Arguments
The program recognizes the following arguments: -trace when specified, this enables the output of all your editing operations in the LinuxCAD editing session to the linuxcad.trc file. WE RECOMMEND TAHT YOU USE EITHER THIS OPTION OR AUTOSAVE MODE. This protects your work in case of a program or computer failure. This function also allows for: 1) Full backup of your session in linuxcad.trc, so you can rerun the script and restore your drawing completely, even if you were not working in AUTOSAVE mode 2) You may assist us with product developement by e-mailing your drawing, as it was before that editing session and this linuxcad.trc file. That information alone is enough to fix any bug. 3) Use the following restart procedure after crash: - open in text editor the linuxcad.trc file and delete very last few lines, - restart linuxcad and use SCR button to repeat all your editing operations. -autosave{number of minutes} - start LinuxCAD with autosave mode enabled. Specify number of minutes between saves. Type in the number of minutes between saves without using any spaces. For instance: -autosave5 - when specified, this means the program will automatically save every five minutes. -dwglimits{world min X, world min Y, world max X, world max Y } - used to set initial drawing limits, by default initial drawing limits correspond to US letter size. -ro -readonly either option will disable the Save commands. The purpose of this command is to provide you with an opportunity to edit the drawing in one window while at the same time, you can observe different parts of it in another window. Even two people separated geographically can view the same drawing at the same time because X widow can be displayed anywhere from anywhere on the internet. -screensize { width in pixels, height in pixels } - sets the initial screen drawing area size. You may change the drawing area size later by pull down menu command "Option/Settings/Screen Extents" For example, this is how you can start LinuxCAD with custom window and drawing area size: linuxcad your_dwg.dxs -screensize 1100,900 -geometry 1200x1000+1+1 The example above will work only if you start it on an existing drawing file. When the file does not exist the screen will came up in standard screen size. That happens because "File not exist" message box will intercept X-events before LinuxCAD is able to get modify the size of the window and drawing area. -aliases {name of the command aliases file} Command aliases file helps you customize LinuxCAD environment. You can actually assign the name you like to any LinuxCAD command. Every line of the Command Aliases File has the following format: {standard linuxcad name of a command} {new name for a command} If you put the character # in the first position of a line in Command Aliases File, the whole line will be ignored as if it was remarks. Incorrectly formatted, duplicated, and logically erroneous entries are ignored. We have provided a sample command alias file called linuxcad.caf. It is located in LinuxCAD distribution directory. Please note that for all command line arguments to take effect the drawing file must exist. Otherwise the argument parsing will not proceed all the way. Anotherwords: linuxcad test.dxs -aliases linuxcad.caf will not work, if the test.dxs does not exist.
-inverse - changes black background of the drawing to white background. White lines will still be visible as they will be displayed in black color instead of white. This has been implemented only to make screen shots look better when sending them to laser color copiers. We recommend you use black background for most other tasks. -script {.scr file name} this allows LinuxCAD to run the commands from the specified script first and then transfer control to the user interface.
List of LinuxCAD Commands
ANGLE - measure an absolute slope of a line.
ALIGN - aligns groups of objects along specified vertical or horizontal line.
ARC - draw an arc.
ARCHIT - bring up a selection tool for the library of architectural symbols of LinuxCAD. If you are using dynamic build of LinuxCAD this command may require a separate lodable extension library ( .so file ).
ARRAY - draw a rectangular or polar array of objects.
ATOMS - prints all variable names and function names known to LinuxCAD Lisp ( our version of AutoLisp ).
ATREDIT - selects and edits a text of an attribute within an inserted block.
ATTACHLIB - attach a specially formatted LinuxCAD block library ( .dxl file ). To insert blocks from library you have to attach it first.
ATTDEF - define an attribute.
AUTOSAVE - enable automatic saving of the current drawing to disk at regular intervals of time ( recommended 3 - 10 minutes ).
AXIS - show and configure coordinate axes [x0,x] and [y0,y] .
BASE - establish a new base point of this drawing. LinuxCAD uses the base point when it inserts the drawing into another drawing.
BEZIER2D - draws or edits 2D Bezier curves. You may draw four, five and six node curves and also four node composite curve.
BITMAP - creates non scalable bitmap object in the drawing. This command can insert in the drawing any bitmap in X-Window .xbm format.
BLOCK - defines a block.
BLOCKLIB - create drawing archive file for block library.
BMTEXT - draws multiple lines of text and boxes them automaticaly when done.
BREAK - make two lines out of one, with possible removal of some middle segment of the line, arc or circle.
BRKINT - breaks a single X-shaped intersection of lines to separate segments.
BRKLINES - breaks all selected lines at X-shaped intersections. This command does not exist in Acad.
BROWSESLB - brings up the slide library browsing Icon menu. Menu is organized in the format 3x3. The name of the slide you select will be printed for your convenience in the command line. .SLB files or so called slide libraries were originally introduced in Acad. LinuxCAD, as a step up from Acad, naturally provides support for them. You can create your own slide library by using LinuxCAD SLIDELIB command. You may also use the utility program appendslb for adding slides one by one to the existing slide library.
BTEXT - draws a single text line and boxes it afterwards.
CHAMFER - make a chamfer at the corner of intersection of two lines.
CHANGE - modifies geometrical characteristics of the object. This command can only be used to modify the idiosyncratic properties of an object, like the center of a circle, text height, vertexes of a solid, etc.
CHGCOL - change current object creation color. This command also has synonym COLOR to make it the same as the similar command in AutoCAD.
CHGSPLINE2D - a command to edit 2D spline object.
CHPROP - change properties of one or more objects. The changeable properties are color, layer, line type.
CIRCLE - draw a circle.
CIRCUM - change the global variable that controls the accuracy of curve approximation.
CMDSPOOLOFF - disable command spool to file. If you started LinuxCAD with trace mode enabled (command line option -trace) this command will disable trace mode as well.
CMDSPOOLON - enable spooling of every command to a spool file. Henceforth every drawing command you run will be written to the spool file and later rerun again.
COLOR - sets the current color.
COMMANDS - print the list of all commands known to LinuxCAD, this is a nice command because this documentation is often behind and does not cover features that have been added the most recently in the newest versions of LinuxCAD.
COMPUTING - bring up a selection tool for the library of computing symbols of LinuxCAD. If you are using dynamic build of LinuxCAD this command may require a separate lodable extension library ( .so file ).
COPY - copy graphics objects.
COPYROTATE - copies a group of objects and rotates the copy.
CRTLAYER - creates layer with the specific number and gives it a name.
DBLIST - prints all objects existing in the drawing to the LinuxCAD text window. Use HISTORY command to see the output.
DDFONTS - allows to create new text style by selecting a particular font typeface from user friendly graphics menu.
DELAY - Insert a specific number of idle seconds in a running command script.
DELETE - erase graphics objects. The ERASE command does the same thing. This is just an alternate name for your convenience.
DIMHOR - create horizontal dimension. When you have to accept default dimension text here, you press the Space key and the press the Enter key. Without pressing the Space first, the program will not continue. This may not seem very convenient and it will be corrected in the future.
DIMVERT - create vertical dimension. Similar use and restrictions as DIMHOR.
DIMRAD - create radius dimension.
DIMDIAM - create diameter dimension.
DIMANG - create angular dimension.
DIMLEAD - create leader with dimension text or without.
DIST - measure a distance between two points.
DIVLINE - divides a line in specified proportion by some object and simulatenously breaks line in two pieces.
DIVIDE - divides any non-filled object to specified number of equidistant segments with a specified divider object or block.
DONUT - create a doughnut.
DRAWFONT - creates in the current drawing a complete font map. In a rectangular table every character defined in the font will be drawn.
DWGBG - creates a background filled area on layer 0. Similar to DWGLIMITS command. You may create a background area for the all ANSI and ISO standard formats in portraight and landscape layouts.
DWGLIMITS - change the limits of the current drawing. There are built-in options for portrait and landscape in all ANSI and ISO standard formats. This command will create 4 bounding lines in the drawing.
DWGUNITS - specify units of the current drawing whether they are inches or millimeters. LinuxCAD does not care what units your drawing is in, microns, intergalactic parsecs or meters, until it needs to produce a hard copy. Printing commands to DeskJet, LaserJet, HP/GL compliant plotter, then LinuxCAD print server will interpret drawing as created in inches. If you work in the metric system, you will want to use this command. If you fail to do this, you may get hundreds of empty pages instead of A4 sized drawing.
DXFIN - import DXF files form AutoCAD.
ELECTRIC - bring up a selection tool for the library of electrical symbols of LinuxCAD. If you are using dynamic build of LinuxCAD this command may require a separate lodable extension library ( .so file ).
ELLIPSE - create an ellipse.
ERASE - erase one or more graphics objects.
ERASEID - erase one graphics object. You may have to use this command if you accidently created an object that does not have a graphics representation. For exapmle and Insert with negative scale factor.
EXIT - exit LinuxCAD
EXPLODE - disassemble a Block to its components. In LinuxCAD this command can also break polyline to an individual segments. It can also break test string to an individual characters.
EXPORTDXF10 - export all objects of the current drawing in Acad interchange file DXF. The DXF file written by this command can be read by all versions of AutoCAD including those later than v.10.
EXPORTDXF13 - at present time the command does exactly the same thing as the one above.
EXTEND - extend line or multiple lines until intersection with one of the boundary objects.
FILENAME_XCLPCOPY - copies the file name of the current drawing file to X-clipboard.
FILLET - rounds a corner where two lines join.
FILLRECT - creates a rectangle filled with current drawing color.
GRID - enable or configure coordinate grid.
HATCH - hatch a contour.
HELP - display contact information for LinuxCAD.
HISTORY - brings up the command history window. The command history window keeps last 2000 lines and responses you have entered and received in the command area.
HOST - submits a string to Linux shell for execution.
ID - print coordinates of a point.
INBLOCK - combines objects in a block so they can be selected as a single entity later. The name of the block is chosen automatically.
INCLANGA - measures the acute angle included between vertex and two points on bounding rays.
INSERT - insert a block in the drawing.
INSERT3D - insert a 3D block in the drawing. 3D blocks consist of 3D objects. and placed in 3D modelspace when inserted.
LAYER - creates and deletes layers. It can be used also to control the visibility and editability of objects on a layer by setting the layer on or off.
LIBS - invokes a LinuxCAD symbol libraries access tool. In some dynamic builds of LinuxCAD this command may require a loadable module.
LINE - create a line.
LINETYPE - set current line type. There are 7 standard line types. They are CONTINUOUS, HIDDEN, CENTER, DOTTED and their metric equivalents MHIDDEN, MCENTER, MDOTTED. We recommend you use regular line types if you work in an inch system and metric types when you work in metric dimensions. When exporting to DXF for the metric line types to be converted, you have to created line types of MHIDDEN, MCENTER, MDOTTED in Acad.
LISP - load and execute a LinuxCAD Lisp program from specified .lsp file.
LIST - display parameters of a graphics object in the command history window.
LISTDEEP - display parameters of a graphics object in the command history window. This command has the advantage of listing the entire contents of the block when user selects an Insert object, something that the above LIST command can not do.
LINK - create a link between two INSERTs that have their part names defined.
LOADADSL - load an external program on C/C++ into LinuxCAD. This command will work properly only in dynamic build of LinuxCAD that is compatible to your Linux version.
LTYPEIMPORT - imports ACAD.LIN file into LinuxCAD.
MAPS - bring up a selection tool for the library of geographical and mapping symbols of LinuxCAD. If you are using dynamic build of LinuxCAD this command may require a separate lodable extension library ( .so file ).
MIRROR - mirror one or more objects.
MOVE - move one or more objects.
MSLIDE - create Acad slide. For the file to be viewed properly in Acad it has to have World coordinate system drawing extents the same or about the same as the resolution of the target monitor. For example, on a 640x480 monitor you have to fit you slide to be saved in 0.0,0.0 - 640.0,480.0 window in the world coordinate system.
MTEXT - allows to create multiple lines of text in a single command.
NEW - clear the current drawing are and start a new work. The old data will be in the current drawing file until you do your next save command (or until AUTOSAVE will do it for you).
NEWCAD - select a file and start another copy of LinuxCAD on it.
OFFSET - offset an object one or multiple times. This command does somewhat different processing for different graphics objects. It moves lines, for objects with a center (circles, arcs, ellipses, doughnuts) it changes their radius or axes lengths proportionally. This command does not process Solids.
OPEN - open another file in the current editing session.
ORDLAYER - order objects by their layer number. Therefore making some objects on top of others in stacking order, depending from the numbers of their layers.
ORTHO - enable or disable ortho mode. Enabling or disabling Ortho can also be done while another command is running by pressing F3 in the command area.
OVERLAY - sets the scanned bitmap image at the background of the current drawing. This command requires an image in LinuxCAD bitmap format .pix. PIX files can be created by tif2pix program from uncompressed TIFF files. Images from the optical scanners usually arrive in TIFF format. tif2pix is included with LinuxCAD package.
PAINT - Free hand painting. This command similar to SKETCH. The difference is that this command creates filled areas composing them from little triangles.
PAN - move the visible window in world coordinate system. Many users enter points here in the wrong order. If you do so and the screen moves in the direction to where you wanted it to move, simply rerun the PAN using opposite points twice.
PARTNAME - assigns a name to an INSERT object. You can join the named INSERT object with a links using a LINK command.
PASTE - this command pastes previous or deleted objects (which are not the same) to the drawing. If the previous objects do not exists, but deleted objects do, it will paste the deleted objects only. This command may change in the future. We do not recommend you use it currently. Use XCLPCOPY, XCLPCUT, XCLPPASTE commands instead.
PEDIT - edit the AutoCAD style polyline.
PICKBOX - change the current size of the object pick box.
PLINE - draw the AutoCAD style polyline.
PLINEVEC - draw the LinuxCAD style polyline line segment. Polylines of this type are individual segments. They can have only two vertexes but they do have line type, start and end width.
PLINEARC - draw the LinuxCAD style polyline arc segment. Polylines of this type are individual segments that can have only two vertexes. However, they do have line type and a start and end width (linetype is currently stored but not rendered for the created graphics object).
PLOT - produces the HP-GL printed output from LinuxCAD, the output is written to linuxcad.plt file.
POINT - create a point. LinuxCAD displays points as small squares. In reality, they are created as points in a mathematical model. They do not occupy any space. As Euclid says, "A point is that which has no part". You can attach to a point by such object snaps as MIDpoint, ENDpoint, NEArest, CENter.
POLYGON - draws a right polygon of any number of sides.
PREVTOMARK - copies all objects created after the last Undo Mark was set to the Previous selection set.
PRINTDJ - print to Hewlett-Packard DeskJet compatible printer in black and white. Requires a printer attached to a local port.
PRINTDJCOL - print to Hewlett-Packard DeskJet compatible printer in colors. Requires a printer attached to a local port.
PRINTLJ - print to Hewlett-Packard LaserJet compatible printer. Requires a printer attached to a local port. If your LaserJet is accessible on network only you can use PRINTPS command instead. And then just do lpr linuxcad.ps.
PRINTPS - print to postscript device, the command actually writes a file ( linuxcad.ps in the current directory ). Later you can print this file on a true Postscript device.
PRINTSRV - produce a print file for LinuxCAD MS windows based print server. Command will give you three choices, whether you want to print current View, specified Window or all drawing ( Extents choice ). Before you can use this command, you have to specify current drawing units by DWGUNITS command.
PRINTXBM - print to X11 bitmap ( .xbm file ). Bitmaps are black and white pictures used for icons in X-window system.
PRINTXPM - print to X11 pixmap ( .xpm file ).
PURGE - removes unused objects from the drawing. Unlike AutoCAD, you can run PURGE any time and not only when the drawing editor just started. You may remove unused blocks, linetypes, layers and text style references.
QUERYFONT - prints the list of all charcters defined in specified SHX font.
RECTANGLE - draws four line rectangle, using current color and line type.
REDRAW - refresh the current view. This command will erase any point markers which are left on the screen by previous commands. Another way to accomplish redraw is to pull a scrollbar of the graphics area.
REM - the command does nothing and may be used to insert a remark in LinuxCAD command script.
REOPEN - abandones all changes in the drawing and reverts to the last saved version of the drawing.
ROTATE - rotate one of more objects.
SAVE - save drawing
SAVEAS - save drawing with different file name
SAVE_AS_DXS - save drawing to different file. That other file becomes the current drawing from now on.
SAVE_DWG10 - save drawing in the DWG Release 10 format.
SAVE_DWG13 - save drawing in the DWG Release 13 format.
SCALE - scale one or more objects.
SCREENEXT - set the size of the scrollable graphics area.
SELECT - select one or more objects.
SETLAYER - set the current layer by selecting from the pull down menu. All new object that LinuxCAD commands create are created on the current layer. That is why this is important.
SETLAYEROFF - sets a layer invisible, be careful not to make invisible current layer. Command asks user for layer name.
SETLAYERON - makes layer visible. Command asks user for layer name.
SETUNDOMARK - set mark in time, every object created past that mark will be considered a "Past undo mark object". All "Past undo mark" objects can be removed from the drawing all at once by UNDOTOLASTMARK.
SKETCH - free hand drafting or sketching. An arbitrary sketch can be ceated using this command. This command creates curves of any irregular shape as supperposition of very short line segments.
SLIDELIB - this command will create a slide library or .slb file. Slide libraries were used by CAD application developers for long time. The command will ask to enter .slb file name and names of all slides which go into the library. You must enter all file names without their extensions. LinuxCAD assumes .slb extension for slide library file and .sld extension for individual slide member files.
SNAP - set snap on, off or set horizontal and vertical snap length. The horizontal and the vertical Snap length can be set equal to grid length. We recommend you avoid very small settings for the grid relative to visible world coordinate system area. When there are too many grid points on the screen, it impacts the redraw performance.
SOLID - create a filled triangle. We are trying to implement a command to draw spine bounded filled areas. Let us know if you think this is a good idea and would use this command.
SPLINE2D - creates second degree 2D spline curve.
STRETCH - move a group of objects and preserve their connections to the drawing outside of the group in the same time.
STYLE - Load Acad SHX font file, SHX fonts are fully supported for ACAD versions 10,11,12,13. Let us know if you have a requirements to use SHX fonts from the versions of Acad past 13.
TOLINES - breaks drawing objects to separate lines (if it can be done for the kind of object you have selected). Use this command for text,arcs,circles ellipses and the like.
TOOLMENU - command loads a user programmable menu in a new child window. The child window created resides outside the main LinuxCAD window and more importantly, off the drawing area. That avoids useless redraw events which otherwise may be required if you used the pull-down menu. You can load one menu file, all menu files in LINCAD_DIR or you can recreate standard tool menus by using keyword RECREATE. After you have recreated menus, do not forget to load them with LOADALL command, otherwise they will not be visible. Also take into consideration that menus save their position on the screen when you press exit button inside menu. Understanding this fact is important for successful customization of LinuxCAD menu environment. We recommend that you set LINCAD_DIR variable to some path and load menus from there, so they will not mix with your drawings.
TOSOLIDS - breaks drawing objects to separate filled triangles (if it can be done for the kind of object you have selected). Use this command for wide polylines, doughnuts and the like.
TRACE - draw a non-zero length line segment. At present time you can create only traces with CONTINUOUS line type. Let us know if you need line types on traces.
TRIM - trim one or more lines. Bounding area can be combined from objects of any type but only lines can be trimmed. Trim boundary can consist of any types of objects, including filled objects (like Solids, Traces and Doughnuts). Please keep in mind that when you use filled objects as a boundary, you almost always get unexpected results, because the line will cross the filled object boundary twice.
TEXT - create text object. Text objects can have only one line of text. Multi-line texts require many drawing objects.
TXTBOX - draws an enclosing frame ( or rectangular box ) around the text object.
TXTCHG - edit text in the drawing using preconfigured text editor.
TXTCHGEXEC - edit executable contents of a drawing object using preconfigured text editor. In LinuxCAD an OS command string can be attached to any drawing object.
TXTEXEC - execute executable contents of a drawing object.
TXTMAGNIFIER - temporary change the height of the text object so it is readable.
UCS - set the User Coordinate System. This will affect Ortho, Snap and Grid modes as well as interpretation of the coordinates you enter from the command line. Currently UCS implemented only for 2D case.
UNDOTOLASTMARK - remove from the drawing all objects created after you have issued SETUNDOMARK command. One such removal turns Undo Mark off and you have to use SETUNDOMARK command again if you want to keep it.
VIEW - set the current view to one of the stored in the drawing views or create new stored view.
VSLIDE - view slide in the main editing window. Drawing will be temporary replaced by slide image, first subsequent redraw event will discard slide and revert back to the drawing. You can end the slide viewing by entering REDRAW command at any time. LinuxCAD uses Acad r10. slide format for its own slides.
WBLOCK - write a Block to external OS file.
WINRO - starts another instance of LinuxCAD on the current file , but in Read Only mode.
WTEXT - create wide character text object. Wide character text objects have 16 bit (or two bytes) per every character position so they can be used with national alphabets and respective SHX fonts (including Kanji).
XCLPCOPY - copy one or more graphics objects to X Windows clipboard. Object from the clipboard can be pasted in another LinuxCAD session running on the same X display server. This makes it possible to access your graphics objects from another computer as long as you have an X-protocol connection established and the copy of LinuxCAD at the remote location. Objects on the X Windows clipboard stay there until overwritten by another Cut/Copy command or other than LinuxCAD application.
XCLPCUT - cut one or more graphics objects to X Windows clipboard.
XCLPPASTE - paste the LinuxCAD drawing from the X Windows clipboard in the current drawing. Only LinuxCAD drawings can be pasted in such a way. Another important feature might be to paste a plain text. When plain text is pasted, you can create an array of text objects in the drawing. Plain text paste is not implemented now. Again let us know, we will consider it for future development.
XCLP_PASTETEXT - paste text from X-window system clipboard to the LinuxCAD drawing.
XMESSAGE - prints message in a pop-up dialog box. It prompts with ">" at a command line and you type message which up on carriage return will appear in a dialog box. This command is for use in demo scripts only. And is not relevant to the drafter.
ZOOM - AutoCAD alike 2D zoom command.
ZOOMALL - change current view to the limits of the drawing.
ZOOMEXT - change current view in such a way that every and all object in the drawing become visible. Be aware if that a single run away point at some distant location may distort the view in a way your main drawing will appear too small.
ZOOMTEXT - Will search an entire drawing for the occurence of a specified text, and when done will zoom in a way that the text found will be visible. Searches the string within a drawing and changes the current zoom that strings become visible as they found. Allows to step through multiple occurences of the strings that have been found.
ZOOMMINUS - view bigger area of the world so your objects will look smaller.
ZOOMNEXT - move forward to the next view, will do any good only if there one or more ZOOMPREV commands were executed beforehand.
ZOOMPLUS - view smaller area of the world so your objects will look larger.
ZOOMPREV - switch back to the previous view.
ZOOMW - select the visible area by window.
Useful Things to Know
Left Mouse Button generally used in LinuxCAD for entering points, picking ( selecting ) objects, selecting menu items in pull down menu. Speaking simply its meaning is "Yes", just the word "Yes", a positive desire to enter information and act.
Right Mouse Button has meaning similar to word "No" in most cases. Right Mouse Button submits negative reply, desire to end information entry process or abandon the command execution immediately.
Sometimes you have to press Right Mouse Button a few times before command actually aborts.
In many places where you have to enter some sort of text string pressing right mouse button will actually submit empty string to LinuxCAD. Commands react to this differently. Some accept default and some refuse to proceed.
Sometimes it may appear that you are unable to pick a filled object when you select objects, you click and solid or traces remain not highlighted.
The solution for this problem is to pick the object from the edge. When you pick a filled object such as Solid or Arc, pick it from the edge or corner !!!
In many LinuxCAD commands you have to press right mouse key to end the command or to give a default value. In some places you may see a message appears "Command aborted!" when you press right mouse button.
It does not mean that something is wrong with your input to the program or with LinuxCAD itself. The "Comand aborted!" message simply means that the previus command is terminated, completed or cancelled upon user request.
LinuxCAD Linetype Customization Guide
SMPDOTTED 14 1.0,0.02,0.125,0.02,0.125,0.02,0.125,0.02,0.125,0.02,0.125,0.02,0.125,0.02
SMPMHIDDEN 14 25.4,0.125,0.0625,0.125,0.0625,0.125,0.0625,0.125,0.0625,0.125,0.0625,0.125,0.0625,0.125
Column one is a line type name. A line type definition follows a line type name.
In our example above: 14 - is total number of floating point values, including total length and dashes. Total length of the pattern for line type SMPDOTTED is one inch. For line type SMPMHIDDEN, the length is also one inch, but this time it has been expressed in millimeters. Because SMPMHIDDEN line type is for use in metric drawings.
File linuxcad.lin in distribution is an example of line type definition file. It has the definitions for the standard LinuxCAD line types. You can use the data in that file as a basis for your customization.
Line types with names duplicate to the names of line types from the current drawing will not be loaded. You can see what type has been loaded and what type has not been loaded from the LINETYPE/LOAD command messages.
When LinuxCAD writes dxf for importing to Acad it writes entities only. We export no tables. We can not do it any other way because we would have to export the default values for most of the other parameters which we just do not have in LinuxCAD drawings.
There is a small problem, when you import dxf in Acad, Acad is going to complain if it does not have some of LinuxCAD layers and Line types defined in the current drawing, this problem can be solved by user. To overcome that use the same line type and layer names in LinuxCAD and Acad.
Additional Unique Features of LinuxCAD
We target LinuxCAD for more than Computer Aided Design applications. Other areas where LinuxCAD can be used are visual analysis and modeling of systems with complex structure, such as real time equipment or computer networks. Therefore we will and we do add some features not usually found in CAD software.
One of those features is an executable seed of a text entity. Besides its textual value text in LinuxCAD may have an executable contents which is simply a command line that can be executed by user with EXEC command. EXEC command asks user to select the text entity and then this command will be executed. You can easily understand how such a feature allows navigation of hierarchically organized information.
A Word About Format of the Drawings
Currently LinuxCAD uses ASCII format for storing the drawings. That has as an up-side as well as a down-side. On the up-side we have: - you can see what is in drawing database and you can create your own processing programs and use LinuxCAD for visualization only. - you can send drawings by e-mail without mime conversion. - you can archive drawings and they take less disk space then. On the down-side: - ASCII drawings cannot be loaded as fast as binary drawings would. The difference in speed is very insignificant, besides LinuxCAD only reads from the disk once, when it starts. Therefore we can conclude the ASCII format, although is not very traditional, is a completely feasible way of storing the drawings. We will provide full binary format in one of the upcoming versions of LinuxCAD.
ORTHO mode allows you to draw lines , traces and polylines only in two orthogonal directions that coincide with X and Y directions of the current active UCS. Normally you should use ortho only when you draw. When you edit and select objects you should turn the Ortho off, because Ortho modifies the points that come from mouse clicks and this may create difficulty in selecting object. The problem appears as the following: when you try to select objects by pick , it may not pick the object even if the pickbox was right on it. Solution: turn the ortho off (F3 key) then select object and then enable ortho again by pressing F3 key one more time.
This is the first command a new user will probably try in LinuxCAD. Creates a line in the drawing, using current layer color and line type. Enter points using left mouse button or command line. To exit command instead of drawing the next vector, press right mouse button or enter Nil in a command line. Please disregard the "Command aborted!!!" message that may appear when you exit the line command.
Example: Command:LINE From point:492.101381,305.282219 To point:629.668320,238.717571 To point:483.226095,156.177408 To point:Nil
The SOLID command draws solid, filled triangles. These polygons are special LinuxCAD drawing objects called Solids. LinuxCAD Solids can have only three vertexes, but any shape can be formed as their superposition. That can be done using LinuxCAD programming extensions.
Example: Command:SOLID Enter point:559.553557,317.707620 Enter point:660.731822,259.130730 Enter point:548.015685,232.504871
The CIRCLE command creates a circle in the drawing. You can activate the CIRCLE command by selecting it from the Draw menu.
LinuxCAD uses most of the possible ways to create Circles.
One of the simplest, to enter center point and point on the radius.
Example: Command:CIRCLE Enter {{Center point:}/3P/2P/TTR/}:485.888680,253.805558 Enter {{Radius:}/DIAMETER/}:516.064654,202.328897
If you enter the DIAMETER keyword at the second prompt LinuxCAD will take your second point as point on the diameter instead of the radius. You do not need to type in the word DIAMETER, just select DIAMETER keyword from the "Keys" pull-down menu.
Example: Command:CIRCLE Enter {{Center point:}/3P/2P/TTR/}:10.990834,0.783750 Enter {{Radius:}/DIAMETER/}:12.787500,-0.339167 Command:CIRCLE Enter {{Center point:}/3P/2P/TTR/}:11.119167,8.868750 Enter {{Radius:}/DIAMETER/}:DIAMETER Enter point:13.300834,5.532083
LinuxCAD's user interface is very intuitive. The best way to learn is by drawing and trying various menu commands and options.
To draw circle by three points, use 3P keyword instead of entering point when responding to "Enter {{Center point:}/3P/2P/TTR/}:" prompt. Again you may select keyword from the "Keys" menu or type the first unique letters of the keyword in the command line.
Example: Command:CIRCLE Enter {{Center point:}/3P/2P/TTR/}:3P First point:639.431135,306.169748 Second point:666.944522,323.920320 Third point:651.856536,311.494919
Option 2P is for creation of a circle by two end points of the diameter.
Example: Command:CIRCLE Enter {{Center point:}/3P/2P/TTR/}:2P Enter point:446.837420,256.468144 Enter point:579.966716,157.064936
Use the LinuxCAD ARC command to create circular (non-elliptical) arcs. To create elliptical arcs you may use the ELLIPSE command with Start and End angles option. Arc is one of the supported LinuxCAD drawing object types.
To create an Arc using 3 points, you will enter the chosen point on every one of the three ARC command prompts.
Example: Command:ARC Enter {{Start point:}/CENTER/}:495.651495,241.380157 Enter {{Second point:}/CENTER/END_POINT/}:708.658368,292.856818 End point:616.355390,203.216426
If you need to draw arc using the center point, there are two methods. You may enter the start angle and the end angle or you may enter the center point coordinates and the direction and length of a chord. To begin either method choose the keyword CENTER and follow the commands from there.
Don't forget that any keyword may be entered using only the first few letters. If you do not enter enough letters to distinguish a keyword, LinuxCAD will give you a narrowed list of keywords, all beggining with the prefix you have entered. You may then select the keyword from that list.
Creates a text object. Text objects in LinuxCAD can not have more than one line. This restriction is true for most CAD systems and should not be viewed as a limitation. If you need multi-line text you have to create multiple text objects. There is a special LinuxCAD command for creation of multi-line text objects. The command is MTEXT. You can also insert multiple text lines in the drawing by using "Paste" command from Edit/Clipboard pull down menu. The TEXT command lets you place text in the drawing, one line at a time, and adds the text when the command is completed.
Example: Command:TEXT Enter {Start point:/ALIGN/FIT/CENTER/MIDDLE/RIGHT/JUSTIFY/}:-2422.175126,973.810142 Height {4.000000} or point to accept:3 Rotation angle {0.000000} or point to accept:0 Text:Have a nice day!
Normally LinuxCAD creates text left-justified, but you also have other text placement options:
To select a different text justification, enter your keyword of choice instead of the point at the "Enter {Start point..." prompt.
ALIGN - lets you align a text string above the direction line, which you will enter as two points. If you enter two points, LinuxCAD draws the text so that its baseline starts and ends at the two selected points and fits exactly between them. The distance between two points determines only the text angle not the text height.
Example: Command:TEXT Enter {Start point:/ALIGN/FIT/CENTER/MIDDLE/RIGHT/JUSTIFY/}:ALIGN First text line point:3.226667,1.232917 Second text line point:14.423750,5.981250 Height {0.000000} or point to accept:3 Text:ALIGNED TEXT
FIT - aligns text between two points and also changes width between letters so the letters become evenly distributed between the specified two points.
CENTER - creates text string as centered horizontally on either side of a specified point.
MIDDLE - creates string centered horizontally and vertically about the specified point.
RIGHT - interpret the start point of the text string as right alignment point.
JUSTIFY - exists only for compatibility with AutoCAD, adds no value.
Please note: You have to specify rotation angle of a text in degrees and not in radians.
The command creates a rectangular frame or a box around the text object. You may find yourself using this command often when creating flowcharts, entiry relationship diagramms, organizational charts, databases, object models, and other similar diagramms.
The command allows you to either select a text object that will be surrounded with a frame immediately or you may eneter a INDENT_DISTANCE keyword. The later will give you the opportunity to specify the distance of the frame from the text for this command.
In this example first TXTBOX command sets a distane and second draws a frame: TXTBOX , the command puts text into a frame ( indent dist = 0.059055 ) or : (Select text object/INDENT_DISTANCE/):INDENT_DISTANCE Enter distance from the text to box frame<0.059055>:0.7 INDENT_DISTANCE from the text to box frame is 0.700000 now. Command:Nil TXTBOX , the command puts text into a frame ( indent dist = 0.700000 ) or : (Select text object/INDENT_DISTANCE/):3.827083,8.479167 Found 1 object! Command:Nil
The ELLIPSE command creates an ellipse. Ellipse is one of the supported object types of LinuxCAD. The LinuxCAD ellipse command provides several methods for drawing ellipses. In LinuxCAD, ellipse object is not polyline but a completely independent entity. You can activate ELLIPSE command by selecting it from Draw menu.
Example of an ellipse creation by one axis and other axis distance ( or length: )
Command:ELLIPSE Enter {{Axis endpoint 1}:/ARC/CENTER/}:-2425.819132,996.460604 Axis endpoint 2:-2376.612593,1000.219437 Enter {{Other axis distance}:/ROTATION/}:-2409.075240,1004.832550
You may sometimes want to enter absolute angles and distances as scalar values, instead of points. If you need to do so, enter the angle as a relative point in polar coordinates and distance as a relative point in cartesian coordinates.
Example: @1<<30 if you need to enter 30 degrees absolute orientation angle. @1.25,0 if you need to enter length of 1.25 drawing units.
Select ARC keyword if you would like to create an elliptic arc:
Command:ELLIPSE Enter {{Axis endpoint 1}:/ARC/CENTER/}:ARC Enter {{Axis endpoint 1}:/CENTER/}:-2301.674040,1076.538998 Axis endpoint 2:-2193.243276,1144.537952 Enter {{Other axis distance}:/ROTATION/}:-2233.675086,1137.186714 Start angle:-2138.108989,1132.592190 End angle:-2229.999467,1191.402096
Yet another way to create an ellipse:
Command:ELLIPSE Enter {{Axis endpoint 1}:/ARC/CENTER/}:CENTER Center point:-2524.048998,965.351519 Axis endpoint:-2297.998421,1090.322570 Enter {{Other axis distance}:/ROTATION/}:-2555.291761,997.513187
In the example above, you would enter the center point first and then the axis endpoint and then either the other axis distance or circle rotation angle.
Example of an ellipse creation as center, axis endpoint and rotation of a the circle:
Command:ELLIPSE Enter {{Axis endpoint 1}:/ARC/CENTER/}:CENTER Center point:1.494167,4.184583 Axis endpoint:11.119167,0.559167 Enter {{Other axis distance}:/ROTATION/}:ROTATION Rotation:1.109167,4.505417
The simplest command yet! Just enter the point's coordinates and it will be created in the drawing. Remember, points are displayed as small squares, but in reality they do not occupy any space.
Example: Command:POINT Enter point:-2559.886285,1052.647474
The TRACE command creates a LinuxCAD drawing object of the Trace type. Traces are lines without line type attributes. They have a non-zero width. The proposed use of the trace is for printed circuit board design.
Example: Command:TRACE Trace width {4.000000} :2 From point:-2575.507666,1111.457380 To point:-2254.809896,1131.673285 To point:-2197.837800,983.729615 To point:-2603.074810,1020.485806 To point:Nil
TRACE command works similarly to a line command. It will draw vectors until you press the right mouse key.
The very first TRACE command prompt asks you to enter new trace width and offers a default value. LinuxCAD stores trace width in the drawing file.
This command creates the LinuxCAD drawing object Doughnut in the drawing (a solid filled circle). LinuxCAD Doughnuts have inner and outer diameter and are filled by the Doughnut entity color. The first two questions of the command define the inner and outer diameters of the doughnut. Later you can create many doughnuts. Exit the command as usual by pressing right mouse button.
Command:DONUT Inside diameter {20.000000} or point to accept:10 Outside diameter {30.000000} or point to accept:11 Center of doughnut:-2261.242230,1034.269378 Center of doughnut:-2331.997898,1076.538998 Center of doughnut:-2188.648752,950.649043 Center of doughnut:-2158.324894,1028.755949 Center of doughnut:NilSome more drawing commands accessible in Draw/Draw... sub-menu.
The RECTANGLE command is for insertion of rectangles in the drawing. LinuxCAD does not have a rectangle entity type, instead the command simply adds four lines to the drawing. All you need to do to create a rectangle is to enter two points at the ends of a rectangle diagonal line. This works very similarly to selecting a window in the Zoom Window command.
Command:RECTANGLE First corner of rectangle:-2715.392942,1279.180825 Second corner of rectangle:-2649.693759,1314.220390
Multi-line Text Creation command, creates multi-line text (another way to access this is from Draw/Draw.../Multiline text pull down menu.
Command:MTEXT Enter {Start point:/ALIGN/FIT/CENTER/MIDDLE/RIGHT/JUSTIFY/}:-2912.490493,328.732635 Height {3.000000} or point to accept:2 Rotation angle {0.000000} or point to accept:30 Text:String 1, Hello world !! Text:String 2, Hello world again !! Text:String 3, Good by boring world. Text:Nil
This command resembles the ordinary TEXT command but later Text: prompt will loop and you can create many text strings with the same text height and rotation angle. The start point will progress from the top to bottom with the predefined step. This command is especially useful for putting extensive text into the drawing. Again, text rotation angle has to be entered in degrees.
The ARRAY command is for creation of rectangular and polar arrays from the selected set of objects. It lets you copy any number of objects quickly, using rectangular or circular patterns.
Example of a rectangular array creation:
Command:ARRAY Select object:-2887.441159,344.226709 Found 1 object! Select object:Nil Rectangular or Polar array {R/P/}:R Number of Rows (---) range ( 1 ... 1000 ):100 Number of Columns (|||) range ( 1 ... 1000 ):20 Unit cell or distance between Rows (---):1 Distance between Columns (|||):2
When doing an array, select object or objects first, terminate selection of objects by right mouse key, then choose what array type you are going to create. R - stands for rectangular array, P - stands for polar array. Once you have done that LinuxCAD asks you to enter the number of rows and columns in rectangular array and the distance between rows and columns. Then LinuxCAD creates an array by adding new copies of the objects you have selected to the drawing.
Let us review the creation of the polar array too:
Command:ARRAY Select object:3.452755,2.545149 Found 1 object! Select object:Nil Rectangular or Polar array {R/P/}:P Center point of array:3.554618,2.536123 Number of items: range ( 1 ... 1000 ):40 Angle to fill in decimal degrees ( +=ccw, -cw ):3 Rotate objects as they copied {YES/NO/}:yes
Keyword P in the 5th line takes you to the polar array mode. You have to enter the number of items in the polar array and the total angle to fill. For example, if you enter 360 degrees, your objects will be evenly distributed around the circle.
This zooming command works exactly in the same way as zoom command in AutoCAD. When invoked, the command will produce the following menu:
Select (1st window point/Scale factor/ALL/CENTER/EXTENTS/PREVIOUS/WINDOW):
If you select a point, you then will proceed in zoom window mode. The same zoom window occurs when you select the WINDOW option.
For example: Command:ZOOM Select <1st window point/Scale factor/ALL/CENTER/EXTENTS/PREVIOUS/WINDOW/>:2.612500,6.027083 Second corner of zoom rectangle:5.568750,8.341667 or Command:ZOOM Select 1st window point/Scale factor/ALL/CENTER/EXTENTS/PREVIOUS/WINDOW :WINDOW First corner of zoom rectangle:2.429167,5.362500 Second corner of zoom rectangle:6.279167,7.837500
If you enter a real number, LinuxCAD will just change magnification of the current view by that factor ( something similar to what you can accomplish by commands ZOOMPLUS and ZOOMMINUS
Option ALL will make all area which has been set as drawing limits by DWGLIMITS command visible.
Option EXTENTS will make all objects in the drawing visible, even if they are outside of the specified drawing limits.
Option PREVIOUS will return you to the zoom previously specified. LinuxCAD keeps up to 20 of the previous zooming windows in its buffer.
Option CENTER will ask you to enter a point and will then move the center of the current visible window to that point.
For example: Command:ZOOM Select <1st window point/Scale factor/ALL/CENTER/EXTENTS/PREVIOUS/WINDOW/>:CENTER New view center point:11.870833,10.106250
The command changes the visible part of the drawing so all of the drawing is visible. It will zoom according to the format you set earlier by DWGLIMITS command ( A,B,C,D ... ISO A4 etc. )
The command alters the view of the drawing so that all objects become visible. This view can be distorted by distant objects which are not important but still ended up in the drawing as the result of sketching or user errors.
This command is tied to the menu item Display/Enlarge and enlarges the view of the objects. This command makes objects appear closer by a multiple of 1.6. In some other CAD programs they call this function Zoom In.
ZOOMMINUS command is also accessible as menu item Display/Diminish. It moves objects 1.6 times away from the viewer. In some other CAD programs they call this function Zoom Out.
It is a frequently needed task to find out whether part with certain name located in the drawing. You could search for a part name or for a town name or street name. All these types of objects are represented as a text strings in LinuxCAD drawing. Whenever you want to find an object labeled by some text in your LinuxCAD drawing use this command.
Example: Command:ZOOMTEXT This command will find a text in the drawing and ZOOM to that part of the drawing. Enter string to search:PLAZA Search for text where ?:TEXT Found 1 occurences. Continue search ? :NEXT No more found.
The above example searches and zooms to all occurences ( in this example only one was found ) of the word PLAZA in the drawing.
The most common Zooming command, which zooms by Selecting Window frame. ZOOM Window is accessible from Display/Zoom Window pull down menu item too.
Commands ZOOMPLUS and ZOOMMINUS. Can also be used in the transparent mode, when some other drafting, editing or zooming command is in progress. To run transparent ZOOMPLUS, use "+" button in right top corner of LinuxCAD main window. To run transparent ZOOMMINUS, use "-" button in right top corner of LinuxCAD main window.
About other buttons in that area of LinuxCAD main window:
Save button - saves the drawing. Also can be used when some other command is in progress.
"?" button, displays "about" information, your location in UNIX system and program creation date and time.
"SCR" button invokes File selection dialog where you can select a command script to run.
You can create command scripts, by using menu selections: "Options/Editor Settings/Spool commands to ..." and "Options/Editor Settings/Spool Off" when you are done.
If you start LinuxCAD with the -trace option on, all commands will be saved to the trace file. This trace file can be used as a script later.
The PAN command, or otherwise called Panning Zoom, changes current viewing area without a change in magnification. The command asks you to enter two points. The screen crawls over the drawing from point 2 to point 1.
The UCS command defines a User Coordinate System. This is very convenient when you need to do relatively complex work in a coordinate basis which is different from standard vertical and horizontal. When you set UCS, it immediately will affect orientation of the Ortho, Snap and Grid. The coordinates you type in the command line are now assumed by LinuxCAD as UCS coordinates. The related ACAD command PLAN is not yet implemented.
The main menu of the UCS command is the following:
Select any of ORIGIN/ANGLE/TWO_POINTS/RESTORE/SAVE/?/WORLD:
Option ORIGIN changes only the origin of the coordinate system. For example, you can move the origin of UCS to point 100,100 and, when you work in UCS , the point of 101,101 would seem the same as 1,1.
UCS Select any of ( ORIGIN/ANGLE/TWO_POINTS/RESTORE/SAVE/?/WORLD ):ORIGIN Enter new origin of the UCS:0.090956,0.181913
Option ANGLE creates new UCS by rotating the horizon on the angle you specify by entering scalar in decimal degrees.
For instance the following will rotate coordinate system on 35 degrees counter clockwise. Command:UCS Select any of ( ORIGIN/ANGLE/TWO_POINTS/RESTORE/SAVE/?/WORLD ):ANGLE Enter angle of rotation of new UCS (decimal degrees):35.0
Using option TWO_POINTS you can change the origin of the coordinate system as well as its rotation angle simultaneously.
The example: Command:UCS Select any of:TWO_POINTS Enter the origin of the new UCS:3.328383,7.139756 Enter the point on positive 0X axis of the UCS:4.591664,7.554113 New UCS origin = 3.328383,7.139756, Rotation Angle = 18.159525
Option WORLD will take you back to the world coordinate system and will make everything "normal" again.
SAVE stores UCS and the visible 2D window under the name you choose, so you can return to both easily later.
RESTORE makes a stored UCS active
? prints the list of all named User Coordinate Systems the LinuxCAD keeps.
The commands above are from "Edit/Clipboard" menu. These commands utilize the X-server clipboard buffer to store graphics objects on their way from one drawing file to another. You can cut and paste between different drawings as well as within the same drawing.
XCLPCUT - Cuts object or objects and stores them in the X-clipboard.
XCLPCOPY - Copies object or objects and stores them in the X-clipboard.
XCLPPASTE - Pastes object or objects from the X-clipboard and put them into the current drawing.
XCLP_PASTETEXT - Pastes plain text from the clipboard into the current drawing using a process similar to repeating TEXT commands.
Examples: Command:XCLPCUT Select objects:4.224844,4.316565 Found 1 object! Select objects:4.240623,4.127215 Found 1 object! Select objects:4.524647,4.253448 Found 1 object! Select objects:4.051273,4.379681 Found 1 object! Select objects:Nil Base point:3.656795,4.253448
Now the selected object will disappear from the drawing, they will be gone to the X-clipboard. Be aware when you copy a block (or to be precise an INSERT object) to the clipboard, the block itself will not be copied but rather all the entities composing the block will be copied. LinuxCAD performs deep explode automatically before copying the block to the X-clipboard. The INSERTs in the original drawing, however, will remain as they were. This approach makes sense because the other drawing may not have relevant block definitions in its block table.
Command:XCLP_PASTETEXT 5 lines of text was found on the clipboard. Height: {3.000000} or point to accept:0.3 Rotation angle: {0.401082} or point to accept:0 Distance between strings: {1.500000} or point to accept:0.1 Insert point:-1.778333,10.120000 Plain text pasted. Ok.
As you probably know, the X window system is a networked system, not as ms-windows. Therefore the commands above can be easily used for cutting and pasting between computers separated geographically, but connected over the TCP/IP network (the Internet would be a good example). We very much apologize to those of our users who are computer experts and already know everything that has been said in this paragraph.
When you paste 3D objects using XCLPPASTE you will not see a rubber banding effect. The 3D objects you can only paste in exactly the same place in 3D WCS where they have been in another drawing. Because 2D scale, rotate and move commands do not affect 3D objects. You will have to modify 3D objects you have pasted afterwards using 3D move, scale and similar commands.
The COPY command copies objects within the current drawing from one location to another.
Command:COPY Select object:3.347827,2.813699 Found 1 object! Select object:3.267542,2.635000 Found 1 object! Select object:3.306390,2.637590 Found 1 object! Select object:Nil Enter {Base point:/MULTIPLE/}:3.145819,2.596152 Insertion point:3.593862,2.746363
You select objects first, then select base point and then the new point. Sometimes it is convenient to make multiple copies at once. You can accomplish this by choosing keyword MULTIPLE in the Keys menu or from a command line.
Command:COPY Select object:3.394444,2.629820 Found 1 object! Select object:Nil Enter {Base point:/MULTIPLE/}:MULTIPLE Base point:3.350417,2.487379 Enter target point:3.643069,2.552125 Insertion point:3.842487,2.580613 Insertion point:3.943491,2.681617 Insertion point:4.026366,2.588383 Insertion point:Nil
This time You will be able to place as many copies of the selected objects as you want, not just one.
You find yorself using this command far less often then COPY or MOVE commands. However you'll find COPYROTATE useful whenever you will have to show the motion of rotating parts. This command works much like ROTATE command except it creates second group of objects and rotates them while keeping original objects where they were.
Example: Command:COPYROTATE Select object:c 1-st Crossing point-9.102172,-0.170864 2-nd Crossing point-3.932012,-7.017833 Found 7 objects. Select object:Nil Base point:-6.028023,-9.393312 Enter ((Rotation angle:)/REFERENCE/):-4.421081,-10.091983
The MOVE command is one you will use often. The command changes the position of the object. It does not remove objects, neither does it create objects. It just modifies an existing object or objects.
Command:MOVE Select objects to move:3.479909,2.521047 Found 1 object! Select objects to move:Nil Base point or displacement:3.373726,2.500328 Second point of displacement3.707815,2.609102
Creates a mirrored reflection of the object or objects about the axis you select. You can retain or delete the original objects.
Command:MIRROR Select object:3.790690,2.640180 Found 1 object! Select object:Nil First point of the mirror line:3.806230,2.764492 Second point of the mirror line:3.451421,2.539176 Delete old objects ? {YES/NO/}:NO
Again as always select as many objects as you want, then finish select object process by pressing right mouse button and select the mirror line you need and finally there are two ways of doing the mirror. You can either keep or do not keep the old objects.
The command rotates the object or group of objects around the point.
Command:ROTATE Select object:3.741483,2.712695 Found 1 object! Select object:3.653429,2.875855 Found 1 object! Select object:Nil Base point:3.407394,2.417453 Enter {{Rotation angle:}/REFERENCE/}:3.508397,2.552125
The most important question is the last one. The point entered there allows you to choose the rotation angle. Or you may enter the actual value of the rotation angle in degrees here.
Let us recall the way of entering relative points in polar coordinates:
@A<
This command changes the size of the existing objects or objects in the current drawing.
You can enlarge or reduce objects.
You enter scale factor here as a point. The length of the rubber band will then be taken a scale.
It may not be very convenient as it might take an accurate hand to enter a scale less
than one. In such situations you can also use the REFERENCE feature. Or you may enter a scale as
just a number.
Enter keyword REFERENCE ( select it as usual from the Keys menu ) and then enter point.
Now your scale will be {reference length} / { rubber band length }.
As the name suggests, this command aligns groups of objects so they become
located with their respective edges at exactly the same horisontal or verical position.
After alignement, objects appear evenly located along the alignement line. The ALIGN command
will ask you to select several object groups. And after you select the groups,
LinuxCAD will align them all at the location and the rule that you have specified.
There are currently only four alignement rules:
1. TOP - align the topmost edges of all object groups
2. BOTTOM - align the object groups bottom ends
3. RIGHT - align right edges
4. LEFT align left edges.
At the end of this dialog, the command will ask you to enter the defining point. Depending on what point is needed,
either X or Y, you should enter your choosen value to define the alignement boundary.
Makes a copy of the object and transforms it so that the new object is parallel to the original
object and located at the specified distance from the old object or passes through a specified point for
central symmetrical transformation of the object. For different objects it works
differently. For some object types, it is undefined so the offset command will refuse to
handle those. Examples include Solids and Text.
There are two modes of offsetting. One offsets at a specified length and the other offsets to a point
(THROUGH mode). Offset command creates new entities one at a time. The original entity
which is being offset remains unmodified.
Offset of the Circles, Arcs, Ellipses and Elliptic Arcs, Doughnuts creates concentric objects
of the same type with the same center and start end angle but with different axes and radius.
Offset of a Line or Trace transforms them to parallel Line or Trace respectively.
OFFSET command does not handle Text and Points.
This command removes objects from the drawing permanently.
Select one or more objects, finish selection by
pressing right mouse button and objects are gone.
At present time LinuxCAD does not have Undo command to restore deleted objects, so be careful
and pay attention to what you are doing. One way to restore deleted object does still exists. Before
you have saved and before LinuxCAD has done autosave, you can restore deleted objects by using the
command REOPEN ( File/More commands.../ReOpen ).
REOPEN abandons the current editing buffer and opens the file again from the disk. If you do REOPEN,
you will restore all objects you have delete since the most recent save command and loose all objects
you have created after the last save command.
The command creates a mark in time. This command works in a pair with UNDOTOLASTMARK
command
Removes all objects that have been created after the last SETUNDOMARK command.
Removed object may still be visible on the screen, but they actually are not there
anymore. Touch the scrollbar to invoke a screen repaint and you'll see them disappear.
The command makes two objects from one. Break can split Lines, Arcs, and Circles
You select a single object first, then you enter a second point. The part of the object inbetween
the first point and the second point you have entered will be removed. LinuxCAD will take the pick point
of the object as the first breaking point. Sometimes you may want to remove part of the the object or you may wish to
just split an object into two parts without damaging either side. To do the later,
enter your second point the same as first point.
To enter the second point precisely the same as first point use relative coordinates, like this:
Command:SCALE
Select object:-6.056333,18.221070
Found 1 object!
Select object:-3.982138,17.593988
Found 1 object!
Select object:Nil
Base point:-4.368035,15.953926
Enter {Scale factor:/REFERENCE/}:-4.609220,14.603287
Command:SCALE
Select object:-0.408733,17.005495
Found 1 object!
Select object:Nil
Base point:-0.084580,16.438227
Enter {Scale factor:/REFERENCE/}:REFERENCE
Reference length: {1.000000} or point to accept:10
New length:5.061354,13.845000
This is an example of the typical dialog from ALIGN command:
Command:ALIGN
This command aligns groups of objects.
Align where ?
Command:OFFSET
Enter {Offset distance:/THROUGH/}:4
Object to offset:1.941378,14.371749
Found 1 object!
Side to offset:1.414629,16.114073
Object to offset:1.293071,14.331230
Found 1 object!
Side to offset:2.549166,12.832021
Object to offset:Nil
Command:ERASE
Select object:2.539117,5.029780
Found 1 object!
Select object:2.072142,7.564789
Found 1 object!
Select object:7.942688,9.099136
Found 1 object!
Select object:Nil
Command:BREAK
Select single object:-2.961441,17.451206
Found 1 object!
Enter {Second point of (F-for first point):/F/}:-0.651848,17.086534
Breaks all X-shaped intersections of lines. This command does not exist in Acad.
The command will ask you to select objects. From all the objects you select only lines will be taken. This command will break 2 intersecting lines to 4 lines (in the simplest case).
The command separates any kind of object to specified number of parts using the divider object as marker. The command asks user to select divider object and its base point first. And then the user needs to select the object to be divided and the number of parts. In many cases this command is more convenient then ARRAY command.
Example: Command:DIVIDE Select divider object:7.539583,5.797917 Found 1 object! Enter Base Point for divider object:end Enter point:7.585417,5.087500 Select object to divide:9.281250,5.087500 Found 1 object! Enter number of parts:8
The command extends lines to the first intersection with the boundary edge. The boundary can consist of any types of stroked (non-filled) objects. But only lines can be extended. When you select lines for extension with EXTEND command pick them from the end closest to the boundary edge.
Example: Command:EXTEND Select boundary edge object(s) ... Select object:1.576706,12.102676 Found 1 object! Select object:Nil Select object to extend:0.644765,15.830440 Found 1 object! Select object to extend:1.374110,16.438227 Found 1 object! Select object to extend:4.777720,17.815879 Found 1 object! Select object to extend:-2.232096,13.561366 Found 1 object! Select object to extend:Nil
For an Extend command, select objects that compose the boundary you wish to extend to, then click right mouse button. Then select Lines one by one and see how LinuxCAD extends them synchronously.
EXTEND command as well as TRIM command can work correctly only when boundary line and line to be trimmed or extended, intersect in an X-like intersection. A T-like intersection will not be trimed or extended to. This consideration is more related to the TRIM command than to EXTEND. Therefore in the case of a T-like intersection, we recommend you use BREAK/F/point/same point command and then ERASE command instead of TRIM.
The command cuts a chamfer from the intersection of the two lines. There are two possible dialogs with the command, setting chamfer distances and actual chamfering. In other words the command trims two intersecting lines at a specified distance from their intersection and connects the trimmed ends with a new line.
Command:CHAMFER Enter {Select first line:/DISTANCES/}:DISTANCES Enter first chamfer distance: {0.000000} or point to accept:2 Enter second chamfer distance: {0.000000} or point to accept:2
Command:CHAMFER Enter {Select first line:/DISTANCES/}:2.670723,9.468931 Found 1 object! Internal error, the entity have to be on the stack Select second line:2.143974,6.511031 Found 1 object!
The command cuts a round chamfer from the intersection of two lines. It trims the line ends first and then connects them with the arc of a specified radius. Like in CHAMFER command, there are two modes: set the fillet radius mode and do the fillet operation mode.
Command:FILLET Select { first line or /RADIUS/}:RADIUS Enter Fillet Radius {0.250000} or point to accept:1 Fillet Radius has been set to 1.000000
Command:FILLET Select { first line or /RADIUS/}:1.860340,21.219489 Found 1 object! Select second line:-0.368214,17.734840 Found 1 object! Ok.
The Hatch command creates a hatched area. The hatch and crosshatch areas are often used to show removed sections. This command may logically belong either to edit or draw groups. Before you do hatch, you have to have a hatch contour without any T-shaped intersections. Ellipses Lines, Arcs and Circles can all serve as hatch boundaries.
Command:HATCH Enter pattern or U for angle and spacing {?/U/}:U Angle of crosshatch lines (decimal degrees) {45.000000} or point to accept:9.032232,10.441391 Spacing between lines {0.125000} or point to accept:6.520044,10.198276 Double hatch area ? {Y/N/}:Y Select object:5.912257,19.639241 Found 1 object! Select object:Nil
The first prompt exists for AutoCAD compatibility and will be answered for you if you select HATCH command from the pull down menu. The next prompt asks you to enter you prefered angle for the crosshatch lines. Then you enter the distance between the crosshatch lines and whether you want double hatch or single hatch lines. Finally enter the objects of a closed contour which you wish to form the hatch boundary. For proper hatching it is important that the boundary be closed and do not have a so called T-intersections. All T-like intersections at the corners of hatch boundary has to be broken to adjacent vectors.
The command is available from "Edit/Edit2.../Change Props"
The command changes properties of graphics objects. In LinuxCAD these properties are Color, Linetype and Layer. There are 10 predefined colors and RGB colors combined from levels of green red and blue. Each color component can have a level of intensity from 0 to 255.
There are 1000 possible layers and every layer can have a name. The number of layers can be easily increased on demand. We thought 1000 will be fine for most applications. Objects can be picked only at the layers which are on. If a layer is off, the object on it is invisible.
You can change the line type of any object, including Solids. LinuxCAD will save the line type information. At present time, line types are handled only for Line objects. Later revisions may add line types for Arcs, Circles and Ellipses and possibly for Traces.
The example shows how to change color of one or more objects:
Command:CHPROP Select object:1.586106,13.502046 Found 1 object! Select object:Nil Change what property {COLOR/LAYER/LINETYPE/ELEVATION}:COLOR Enter color: {BLACK/RED/YELLOW/GREEN/CYAN/BLUE/MAGENTA/WHITE/LIGHTRED/RGB/BYLAYER/DIA LOGRGB/}:CYAN
Command:CHPROP Select object:C 1-st Crossing point0.537795,20.744928 2-nd Crossing point7.542424,13.597347 Found 145 objects. Select object:Nil Change what property {COLOR/LAYER/LINETYPE/}:LAYER New layer:lremarks
If you change layer to the layer which is currently off, your objects may visually disappear. They are not lost, they just become invisible when the layer is turned off. To make objects visible, turn the layer on. That can be done by layer command ( or from "Options/Change Layers/Layer" ).
Elevation is a Z-coordinate for 2D objects. The elevation has been introduced in release 1.96 of LinuxCAD.
Another very interesting command is the command CHANGE. As opposite to CHPROP command which changes generic object properties, the CHANGE command changes specific properties which are different from object to object.
For instance, you can change start and end points for a line, inner and outer diameter for a doughnut, as well as text height and rotation angle for text.
Command:CHANGE Select object to change:-3.074117,19.769680 Found 1 object! What to change ? {POINT_1/POINT_2/}:POINT_2 POINT_2:-1.536592,20.030170 Entity was changed.
The common dialog with the CHANGE command looks like this: you select an object first, then a keyword list will appear and you must choose a parameter of the object you want to modify. After you have selected the keyword, LinuxCAD asks you to enter the new value of the corresponding parameter. Depending on the type of the parameter selected, you may have to enter a real or integer value, a point or string.
For changing the text there exists a special command TXTCHG. When changing contents of a text string, it is much easier to do in full screen text editor, even if you have only one line to work with.
Command TXTCHG is very simple to use. Just pick a text string and your text editor with the contents of the string will pop up on the screen.
Command:TXTCHG Select text object:18.043729,9.083115 Found 1 object! Text has been updated without errors.
When you have finished editing, LinuxCAD will transfer the new text string back to your drawing.
LinuxCAD uses a text editor specified by environment variable: LINCAD_EDITOR
If you do not specify any editor, LinuxCAD will cleverly use Xterm and Vi together to give you a primitive X window system text editor.
We recommend you use Sun Open Windows textedit or another similar product.
The command helps to read text when the drawing is big and contains many text strings which cannot be normally observed all at the same time because the view magnification does not allow you to read them. The command asks you to select an object. If the selected object is a text the command will magnify it to a height that is comfortable to read. The magnified text string will remain on the screen until you click a mouse key.
One very interesting feature of LinuxCAD is its ability to bind executable contents to every graphics object. Executable contents is a single line command string that can be executed by LinuxCAD from time to time on user demand. To execute an executable contents bound to graphics object, select command TXTEXEC from "Edit/Edit 2.../EXEC". Simply pick an object and the attached executable content is performed.
Command:TXTCHGEXEC Select executable object (text):16.748726,9.477619 Found 1 object! EXEC string has been updated without errors.
ID - Enter point and print its coordinates.
ANGLE - print absolute orientation angle in radians.
INCLANGA - print the included by 3 points angle.
DIST - print distance between two points.
LIST - list all data about current primitive.
DBLIST - print the properties of all objects in the drawing.
All Inquiries commands are at: "Display/Inquiries" sub-menu.
The CHGCOL command changes the current object creation color.
Example: Command:CHGCOL Enter color: {BLACK/RED/YELLOW/GREEN/CYAN/BLUE/MAGENTA/WHITE/LIGHTRED/GREY/RGB/BYLAY ER/}:Yellow
RGB choice will invoke the RGB selection dialog. Use the RGB selection dialog to compose a customized RGB color.
The LINETYPE command controls the Line Types. The command is accessible from "Options/Change Line Type"
Command:LINETYPE Enter {?/CREATE/LOAD/SET/}:? ? - prints information about all linetypes defined in the current drawing. LOAD - loads linetype definitions from the external file. SET - sets the current object creation line type.
LAYER command controls creation, deletion and state of layers.
Object in LinuxCAD drawing can be grouped in layers which can have color and line type assigned to them. Layers can also be in the On or Off state. When the layer is On, you can select and edit the objects on it. When the layer is Off, you cannot see or edit the objects created on that layer. When you draw objects you are creating them on the current layer.
Speaking of layers we should mention that entities in the drawing can be arranged in such a way that some of them appear on top of others. Normally, objects on layers with smaller numbers are in the background and objects on the layers with larger numbers are in foreground. To activate that mode you should use ORDLAYER command. For example, when drawing the flag of Sweden you may draw TRACE of blue on layer 0 and draw a yellow cross on layer LDIMENSIONS (which has number 1) so that the cross appears to lay on top of the blue field.
The layer command options:
Command:LAYER Enter {?/NEW/SET/ON/OFF/}:?? - lists all layers in the current drawing. You will get some thing similar to the following:
Layer # Name Color Line type State -------------------------------------------------------------------------------------- * 0 0 white CONTINUOUS On 1 LDIMENSIONS red CONTINUOUS On 2 LHATCH red CONTINUOUS On 3 LREMARKS yellow CONTINUOUS Off
In the table above, there are standard predefined LinuxCAD layers. The current layer is marked with a star at the first column.
NEW - creates a layer.
In this next example we created layer QQQQ with color Magenta, line type Continuous and initial state On.
Command:layer Enter {?/NEW/SET/ON/OFF/}:n Enter layer name:qqqq Enter color: {BLACK/RED/YELLOW/GREEN/CYAN/BLUE/MAGENTA/WHITE/LIGHTRED/RGB/DIALOGRGB/} :m Enter layer linetype name:continuous Enter layer state: {ON/OFF/}:on Layer QQQQ created.SET - sets the current layer
Example, in this example layer qqqq is being set as a current entity creation layer.
Command:layer Enter {?/NEW/SET/ON/OFF/}:s Enter NEW CURRENT active LAYER name:qqqq Layer QQQQ is new current layer.
ON - sets the layer On or Off.
Example: Command:layer Enter {?/NEW/SET/ON/OFF/}:on Enter layer name to set ON:qqqq Layer QQQQ has been set ON.
The VIEW command controls Named Views. VIEW command can be also selected as a menu item "Options/Named Views/Views" You can store Views in LinuxCAD using command VIEW/SAVE and you can then return to the saved views using subcommand RESTORE
Command:VIEW Enter {?/SAVE/RESTORE/REMOVE/}:?
? - print all Views.
SAVE - saves current view.
RESTORE - restores current view.
REMOVE - deletes name d view.
Here is an example of the VIEW/? command output:
Command:VIEW Enter {?/SAVE/RESTORE/REMOVE/}:? Named Views Table Lower X Left Y Upper X Right Y View Name ----------------------------------------------------------------------------------------- -35.231593 -20.558426 40.625855 36.334659 A1 -0.384578 5.399044 6.015894 10.199398 A2 -16.229080 -15.997350 -8.406280 -10.130250 AA22 -----------------------------------------------------------------------------------------
As you can see the most interesting column is the last one where the View Name is. We recommend you use descriptive names for your views.
The command defines the insertion base point of the current drawing. This point is used when you insert one drawing into another drawing.
Command:BASE New insertion BASE point:3.218335,2.471840
We created this command to let you to specify in advance the units of your drawing, either millimeters or INCHES. The units are important only in relation to printer output or PostScript export. The command is accessible via menu choice.
"Options/Drawing Settings/Specify units of the Drawing"Example: Command:DWGUNITS Select the Length Units of the Drawing: {INCHES/MILLIMETERS/}:MILLIMETERS Drawing units have been set to Millimeters.
This command controls loading of user programmable tool menus.
Command:TOOLMENU What to do ? {ACTIVATE/LOADALL/RECREATE/}:LOADALL
ACTIVATE - load individual menu file.
LOADALL - load all *.mnu files from the LinuxCAD directory. LinuxCAD directory is a special directory that you specify with environment variable: LINCAD_DIR.
RECREATE - some minimal menu prototype has been built into LinuxCAD. This command forces LinuxCAD to write out the menu prototypes in the current directory. Before Menus may be used by LinuxCAD in LOADALL command they must be manually moved to LINCAD_DIR.
The menu file format: #{menu interpreter command} {menu interpreter command parameters} . . . *{Menu Item Name 1} {Command Input 1} {Command Input 2} . . . {Command Input n} First empty line terminates the batch of LinuxCAD commands activated by this menu. . . . *{Menu Item Name N} {Command Input 1} {Command Input 2} . . . {Command Input m}
An example of the menu file: #GEOMETRY 902 25 107 303 #TITLE Setup *Grid_&_Snap_ON GRID ON SNAP ON *Grid_&_Snap_OFF GRID OFF SNAP OFF *Set_Color CHGCOL *Set_RGB_Color CHGCOL RGB *Set_Format DWGLIMITS *Set_B_portrait DWGLIMITS A *Set_CONTINUOUS LINETYPE SET CONTINUOUS NIL *Set_HIDDEN LINETYPE SET HIDDEN NIL *Set_CENTER LINETYPE SET CENTER NIL *Set_DOTTED LINETYPE SET DOTTED NIL
One of the most convient features of any GUI are standard toolbars. LinuxCad supports toolbars with the TOOLBARS command. The LinuxCAD toolbars are groups of small buttons, sometimes with graphics that concisely illustrate the actions to be done when you click the toolbar button. LinuxCAD toolbars have an extension *.tbr. Toolbars can use built in bitmaps as well as loadable bitmaps. Loadable bitmaps has to have the .xbm extension.
Command:TOOLBARS What to do ? {ACTIVATE/LOADALL/RECREATE/}:
ACTIVATE - activates an individual toolbar.
RECREATE - recreates built-in toolbars .
LOADALL - loads all toolbars from LinuxCAD support sub-directory (the one pointed to by LINCAD_DIR).
The CMDSPOOLON command enables automatic writing of all user commands to the spool file. The command requires you to enter a spool file name.
Example: Command:CMDSPOOLON Enter OS file/path to spool commands to:
The spool starts.
When the spool is no longer needed, stop it using CMDSPOOLOFF command.
Use AUTOSAVE command to specify the interval for regular saving of the current file.
Example: Command:AUTOSAVE Enter Interval in seconds or OFF:60
The AUTOSAVE command is accessible via "Options/Editor Settings/AutoSave"
The HOST command lets you run any OS command (Linux or Unix) without leaving LinuxCAD. Some usefull new feature are in the"Options/Editor Settings/OS services" menu branch.
The STYLE command reports information about loaded SHX fonts and controls the fonts. The command puts SHX fonts in relationship to Logical style. At present time only SHX fonts of ACAD r. 10 and earlier are supported. Special TrueType like fonts in LTF format are supported too. .LTF is a Software Forge Inc. own aproximation of TrueType. LinuxCAD does require you to specify an extension of the font file. LinuxCAD will attepts to load font from current directory of from fonts directory under LINCAD_DIR.
Command:style Text style name(. - to keep default) or ? {STANDARD}:RMC New style. Enter SHX font file name for the style:romanc.shx Style RMC has been created successfully.
When command STYLE reports success, that means LinuxCAD has actually gone out to the disk and loaded the specific SHX font.
? - as usuall will give you a list of text styles in the current drawing.
PICKBOX sets the desired size of the object picking box.
Example: Command:PICKBOX Enter new PICKBOX side length range ( 2 ... 20 ):6 Pickbox size 6 has been set.
PLINE draws an AutoCAD style polyline. Polylines are chains of points that are associated together in a complex entity. Polylines can have a starting and ending line width for every segment. They can also have linetypes. There are two types of polyline segments in LinuxCAD: Arc and Line.
Command:PLINE Enter:LINE Enter :1.833333,9.968750 Enter :6.668750,9.968750 Enter :8.227083,8.456250 Enter :7.677083,6.210417 Enter :5.064583,7.356250 Enter :ARC Enter :2.910417,6.714583 Enter :4.079167,6.072917 Enter :5.087500,5.912500 Enter :HALFWIDTH Start width <0.000000> or point to accept:0.2 End width <0.000000> or point to accept:0.7 Enter :9.120833,6.783333 Enter :10.495833,9.327083 Enter :Nil
The subcommands of the PLINE command do the following:
PEDIT edits polyline command. You can edit the properties common to all vertexes. You can also change the location, insert, or remove individual vertexes. The editing of Arc type vertexes is not specifically supported. Thus all vertexes that are newly inserted by the PEDIT command will be inserted as Line type vertexes.
Once you have selected EDIT_VERTEXES, the PEDIT command will switch to the edit vertexes mode. In this mode you may affect polyline locally at the current vertex position. The current vertex will be marked with a pink cross.
PLINEVEC creates polyline segment. The polyline segments is a new object type in LinuxCAD. It does not exist in AutoCAD. Unlike lines, the polyline segemnts can have starting and ending width and they have a linetype. These properties make them different from traces as well.
Command:PLINEVEC Start width: <0.000000> or point to accept:0.1 End width: <0.000000> or point to accept:0.4 From point:2.222917,7.081250 To point:6.439583,9.120833 To point:9.693750,6.072917 To point:11.733333,9.739583 To point:Nil
PLINEARC create a polyline segment of the Arc type. This entity is also a new object in LinuxCAD which does not exist in AutoCAD. This entity acts as an Arc in every way except it has a starting and ending width.
PLINEARC Start width: <0.000000> or point to accept:0.1 End width: <0.000000> or point to accept:0.3 Enter ((Start point:)/CENTER/):1.672917,8.708333 Enter ((Second point:)/CENTER/END_POINT/):3.552083,10.060417 End point:4.056250,6.462500
ORTHO command controls a special drawing mode where you can only enter vertical or horizontal lines. This command is available from "Options/Settings/Ortho".
Example: Command:ORTHO Enter {?/ON/OFF/}:ON Ortho changed to ON .
The command controls the visibility of LinuxCAD Axes. This command is available from "Options/Settings/Axis"
Command:AXIS Enter {?/ON/OFF/SET/}:ON Axis changed to ON .
SNAP enables incremental cursor movement. If the SNAP is ON your cross hair or cursor position moves non-contiguously. It incrementally jumps between X0 = N*dx and X1 = (N+1)*dx and Y0 = N*dy and Y1 = (N+1)*dy This command is available from "Options/Settings/Snap"
Command:SNAP Enter {?/ON/OFF/SET/}:ON Snap changed to ON .
SET - invokes SNAP setup dialog
GRID creates coordinate dots over the whole surface of the screen. This command is available from "Options/Settings/Grid"
Example: Command:GRID Enter {?/ON/OFF/SET/}:ON Grid changed to ON .
SET - invokes grid setup dialog. Using the grid dialog you can customize all grid parameters. For example GRID can be made equal to SNAP.
SCREENEXT command is accessible from "Options/Settings/Screen Extents". The command changes the size of the black drawing area for graphics output between several predefined sizes.
Command:SCREENEXT Enter {SIZE640X480/SIZE800X600/SIZE1024X768/SIZE1024X1024/SIZE1400X1200/SIZE2048X2048/SIZE 4096X4096/}:SIZE640x480
Predefined sizes, are often enough for the majority of possible applications. It makes sense to use the highest number of pixels so that the largest amount of your screen is allocated to the drawing area. Keep in mind, after you have changed the screen extents you may loose sight of your drawing. You can solved this by using the command Zoom Extents and your drawing will come back.
The command sets drawing limits for most US and international drawing formats. Drawing format and drawing extents as well as current zoom are stored in the drawing file. DWGLIMITS command can set A,B,C,D,E ANSI formats and A4,A3,A2,A1,A0 ISO formats in Portrait and Landscape configurations.
Example: Command:DWGLIMITS Enter: {Lower left point:/LANDSCAPE/PORTRAIT/A/B/C/D/E/ISOA4/ISOA3/ISOA2/ISOA1/ISOA0/}:B
This command sets the new value for the circumference parameter. It directly impacts the precision of LinuxCAD calculations. Circumference is the number of segments LinuxCAD breaks nonlinear curves into before processing them.
Example: CIRCUM Current Circumference = 360 Enter new circumference: range ( 36 ... 360 ):30
Although the upper limit of the circumference is 360, we do not recommend using values above 60. Doing so will unnecessarily increase computational workload for CAD engine and slow down redraw event processing. In general, LinuxCAD will work fastest and best if you minimize the number of Redraw events. One way to do that is to use the Tool Menus. Because Tool Menus not like Pull down Menus they do not obscure the drawing area. The Pull down menus cause redraws even when you are just navigating them. We will do something about redraws in the upcoming releases.
There is only one command that does it all. That is PRINTPS. This command, as well as some other hard copy commands, works in conjunction with DWGUNITS command.
The following options are available to you when you are exporting to Postscript with LinuxCAD's PRINTPS command:
VIEW - prints current visible part of the drawing to linuxcad.ps file.
WINDOW - lets you select the window and will print all the objects within the window to linuxcad.ps file .
EXTENTS - prints all objects of the current drawing to linuxcad.ps
US_A_SIZE_PORTRAIT , US_A_SIZE_LANDSCAPE These commands asks you to enter the location of a chamera that will take a shot of part of the current drawing. The size of the selection box will show you what part of the drawing will fit on a regular letter-sized page. The selected part of the drawing will be sent to linuxcad.ps as postscript formatted data.
ISO_A4_PORTRAIT , ISO_A4_LANDSCAPE Use these commands instead of the two commands above when you working in metric system and your drawing is in metric units.
The linuxcad.ps file in the current working directory is where you will find your output. To print the output or to view it, use the following command:
See documentation for GNU Ghostscript to learn more about what you can do with postscript data using Ghostscript. Ghostscript is included in every Linux distribution. If you do not have it, you probably have not installed the RPM in which it is located.
VIEW, WINDOW and EXTENTS branches sense the current DWGUNITS setting and cut the selected area on either US letter sized parts or IS A4 sized parts. The size of parts LinuxCAD breaks the total window into depends on whether it assumes the drawing are made in millimeters or in inches. LinuxCAD does not make educated guesses. It just queries for an internal variable which the user can affect using DWGUNITS command. It is very wrong to have DWGUNITS not properly set to millimeters when you are actually drafting in millimeters. In that case, LinuxCAD will mistakenly cut your drawing into postal stamp sized pieces, where every piece will be a separate page.
Examples: Command:PRINTPS Method of printing {IN_COLORS/BLACK_AND_WHITE/DITHERING/}:IN_COLORS Choose what to print {VIEW/WINDOW/EXTENTS/US_A_SIZE_PORTRAIT/US_A_SIZE_LANDSCAPE/ISO_A4_PORTRAI T/ISO_A4_LANDSCAPE/}:US_A_SIZE_PORTRAIT Enter point:10.616133,1.662048 Writing color PostScript picture. Command:PRINTPS Method of printing {IN_COLORS/BLACK_AND_WHITE/DITHERING/}:BLACK_AND_WHITE Choose what to print {VIEW/WINDOW/EXTENTS/US_A_SIZE_PORTRAIT/US_A_SIZE_LANDSCAPE/ISO_A4_PORTRAI T/ISO_A4_LANDSCAPE/}:WINDOW First corner of print rectangle:-14.837713,-1.112343 Second corner of print rectangle:27.449834,23.107776 Writing monochrome PostScript picture.
Occasionally you may want to designate a file other than "linuxcad.ps" as a recipient of the Postscript output. In this case you may choose the SETTINGS branch of the PRINTPS command dialog.
This is a sample of how to choose another output file name:
Command:PRINTPS Drawing units are MILLIMETERS. Use DWGUNITS command to change if needed. Method of printing (N_COLORS/BLACK_AND_WHITE/SETTINGS):SETTINGS What to set ? (OUTPUT_FILE/LINE_WIDTH):OUTPUT_FILE Enter new output file name or RIGHT BUTTON to keep "linuxcad.ps":A1.PS Method of printing (IN_COLORS/BLACK_AND_WHITE/SETTINGS):IN_COLORS Choose what to print (VIEW/WINDOW/EXTENTS/US_A_SIZE_PORTRAIT/US_A_SIZE_LANDSCAPE/ISO_A4_PORTRAIT /ISO_A4_LANDSCAPE/ISO_A3_PORTRAIT/ISO_A3_LANDSCAPE/ISO_A2_PORTRAIT/ISO_A2_LANDSCAPE):EXTENTS Writing color PostScript picture.
In the example above, file a1.ps will be used instead of linuxcad.ps. Another parameter of Postscript output that can be changed is the width of thin lines. Unlike Traces and Polylines that can have width in the drawing, the thin lines created by the LINE command, the RECTANGLE command, the ARC command, the CIRCLE and similar commands have a width of zero. Obviously when you print or plot them they will be assigned some non-zero width by plotter or printer driver. That assigned width may be not the one we would prefer, that is why we have provided the opportunity to set thin lines width in the PRINTPS command. Just select sequentially PRINTPS/SETTINGS/LINE_WIDTH to do it.
PRINTDJ - print to HP DeskJet type printer in Black and and White.
PRINTDJCOL - print to HP DeskJet type printer in Colors.
Both commands offer the same dialog to the user with the only difference been that one does not print in colors. The DeskJet printing implementation in LinuxCAD is compatible only to PCL 3 capable Desk Jets. Those are models are 660, 670, 850, 870, 890. Some of Desk Jets were designed as Windows only printers. So those PCL 3 implementations are in the MS-Windows driver, not in the firmware. Examples of Windows only deskjets are 720 and 820 models.
Both Desk Jet printing commands ask you "How many dots per inch you want to print?". They do it by giving a menu of acceptable DPI values:
Command:PRINTDJ Choose what to print or set DPI { current dpi = 75}::SET_DPI Set number of dots per inch to print {current dpi = 75}: :DPI_150 Print quality for DeskJet has been set to 150 dpi.
The more dots per inch you print, the more precise your drawing will look. After selecting the DPI, the PRINTDJ ( or PRINTDJCOL ) command exits, but the printing accuracy is saved and applied to any print command that will follow. If you are satisfied with the DPI value which the LinuxCAD shows you as a default, you do not have to set DPI.
Other interesting options for DeskJet printing are:
VIEW - print View.
This subcommand works internally different from the other two. PRINTDJ/VIEW works similarly to print screen. It prints not in the Model sizes, but in the screen sizes, using the same number of pixels as corresponding objects occupy in the drawing area of the LinuxCAD.
You cannot print View in colors. To print View in colors Scale the drawing for required physical size and then use PRINTDJCOL/Window.
WINDOW - print Window. Just select corner points of your drawing format and LinuxCAD will cut it to the A size or ISO A4 size subparts and print them all, so you can glue them together later.
EXTENTS - prints all objects of the drawing to Desk Jet. This print can be easily distorted by insignificant objects out of view but within the same drawing file.
PRINTLJ - print to HP LaserJet type printer in Black and and White.
Command:PRINTLJ Starting printing process. Method of printingDo not try to print to LaserJet "IN_COLORS". Even if you see the message, LinuxCAD will not tell the LaserJet to print in color. The reason for the option to print "IN_COLORS" is there, is because internally the Postscript output and LaserJet printing work about the same way with minor only differences.:Nil
Imports AutoCAD DXF files. DXF stands for Drawing Exchange Format. LinuxCAD has been tested and is compatible to DXF files exported by AutoCAD rel 10. and AutoCAD rel. 13. Support for other releases of DXF may be provided in future versions of LinuxCAD. We can also can develop the interface to a specific version of DXF on a special order.
There are several methods of installation depending on the installation source. The two most common sources are: delivery by ftp and delivery in a shrink-wrapped box on diskettes or CD-ROM.
From ftp.softwareforge.com LinuxCAD comes as a single tar-red and gzip-ed archive. Do the following to install:
LinuxCAD may be delivered on 1.44MB 3.5'' floppy disks. Usually the disks will have an ext2 file system on them. Therefore in Linux, they must be properly mounted before you can copy their contents on a hard disk. Here is how you do it step by step:
recommended extension for drawing files is ".dxs"
Print option: Printing to DeskJet, LaserJet and to MS Windows based LinuxCAD print server - $100 (included in your release free of charge).
Plot option: To HP-GL compatible plotters $100 (included in your release free of charge).
DXF Import option $100 (included in your release free of charge). To access dxf import type use DXFIN command.
Customization option: Includes hot keys menu and user-programmable pull down menu, command aliases, icon menus, GNU C/C++ programming interface, and Lisp programming interface. $200 ( partially included in your release free of charge).
3D design option: $200 ( partially included in your release free of charge).
DWG compatibility option: provides native Acad-DWG files read and write for the versions of ACAD 10,11,12,13,14 ( partially included in your release free of charge), the full DWG capability may be obtained from Software Forge Inc. for $299.00 for existing LinuxCAD users. The version of LinuxCAD you have received may not support all DWG formats or it may only read and some read and write some of them. The LinuxCAD development team is trying to support all drawing formats of all versions of AutoCAD. It may sound ambitious, but we are trying to do a better job in format support then Autodesk does itself.
LinuxCAD parallel computing extension: consist of LinuxCAD Remote Server and special TCP/IP enabled version of LinuxCAD client. You can set up one or more instances of LinuxCAD Remote Server on your LAN. When certain commands that require considerable calculations (mainly Hidden Line Removal and Rendering) are being executed your drawing editor (LinuxCAD client) will draw additional computing power from those LinuxCAD Remote Servers , you can then utilize the idle power in a "sleeping at LAN nodes computers" and speed up your work with the drawing. $899 (includes the right to install unlimited number of LinuxCAD Remote Servers)..
LinuxCAD Hierarchical Multilayered Optimized Main Graphics Objects List: gives you significant speed-up in the REDRAW operation for large drawings by balancing all of your objects in the drawing according to their probability of being accessed. It replaces the core engine of your LinuxCAD so the complexity and calculations are moved from Redraw operation to Zoom operation, the later is executed relatively rarely and that produces significant better performance when working with large drawings. $699.
LinuxCAD for Microsoft Windows NT $199.00.
All LinuxCAD extensions and optional modules utilize LinuxCAD loadable modules interface in order to run. Usually this is an extension supplied as a shared library .so - file To load extension module it has to be named in linuxcad.ads file and every line has to contain not more then one loadable module name. Linuxcad.ads file may reside either in current directory or in the LinuxCAD home directory.
Programmability is a unique and important benefit of LinuxCAD. Programmability allows the programming-literate user the opportunity to extend the system and further improve the performance of the one's work in LinuxCAD.
We call the technology and tool kit for extending LinuxCAD using external C-programs, The Application Development System for LinuxCAD (or ADSL for short). Application Development System for LinuxCAD and ADSL are trademarks of Software Forge Inc. Every C-application for LinuxCAD technically is a loadable shared library.
User may load existing ADSL programs using the LOADADSL command. The command asks you to, "Enter ADSL program file name:". LinuxCAD may load ADSL programs from any directory mentioned in the environment variable LD_LIBRARY_PATH. or in any other directory where Linux searches for shared library. Normally, it is /usr/lib.
There is a special file, linuxcad.ads, where the names of ADSL applications are saved so you don't need to load every ADSL application manually. When LinuxCAD starts, it loads every ADSL program mentioned in linuxcad.ads. The format of linuxcad.ads is very simple - one loadable module name per line.
Every loadable ADSL program must provide the following callbacks:
void ads_init_callback(void); - LinuxCAD calls this function when it is loading the module. Normally you have to use the code inside this module to allocate all dynamic objects and to register your functions as commands for LinuCAD.
void ads_save_callback(void);- LinuxCAD calls this function when it is about to save the current drawing. Use this function to save any persistent information besides the current drawing, that your application might manage.
void ads_exit_callback(void); Before returning control to the Operating System, LinuxCAD calls this callback for every loaded application. This is a good place to free dynamic memory or close files.
Besides the three functions above, LinuxCAD has a number of other functions which the loadable application program can use to your advantage. All ADSL function definitions are located in the header file linuxcad_c_exposed.h . You must include this header file in your ADSL applications. The most important ADSL function is ads_add_command_to_LinuxCAD . This function has a command name as the first parameter and a pointer to the function of type void()(void) which executes the command. Every command you add to LinuxCAD takes no arguments and returns no result. Everything the command needs, it can obtain by calling on another function or by talking to user by using the mouse pointer and the command line.
When programming in the LinuxCAD ADSL environment, the programmer operates using the following objects:
The functions above return 1 only if the graphics object in_obj has the type specified in the respective function name.
Sometimes you may want to do a switch branching depending on the type of the LinuxCAD drawing objects you are dealing with. In this case you may use the following function:
int ads_get_dwgobj_id( DwgObj *in_obj );LinuxCAD ADSL defines constants prefixed by ADS_DWGOBJ_ID_... that you may use to check the actual object type against the return value of the ads_get_dwgobj_id
The second parameter of all three functions is the prompt to the user. The prompt appears in the command line of LinuxCAD. The first parameter is the pointer to default value. This can be NULL if you do not want to supply a default value.
Usually, the user can either enter what needs to be entered or a user may refuse to do so by pressing the Right Mouse button. If the value is or has been entered, it will be returned as a result of the function. You will assume the ownership of the value since the program has received it and you can then free the memory when you are done using the returned value. You should always check whether you received NULL instead of a valid pointer to a value. When you receive NULL, that usually means the user wants to stop your application. You have to exit the program and return control to the LinuxCAD pull down menu.
For Instance: ============= double *height ; height = ads_get_double( NULL, "Bar height:" ); if ( height == NULL ) { ads_prompt( "Command aborted." ); return ; };ads_get_kword function accepts a variable length argument list. Every argument must be of the type char*. The last argument in a list must be NULL.
char* ads_display_modal_icon_menu( char *NX_x_NY_menu_format, char *in_slb_filepath, char* in_menu_title, ... );
Brings on the screen menu of the specified format. It takes slides from in_slb_filepath. The names of the slides follow in_menu_title argument. There can be many of them but all of type char* and the last slide name must have a NULL value.
char* ads_displ_mod_slb_icon_menu( char *NX_x_NY_menu_format, char *in_slb_filepath, char* in_menu_title );
Brings on the screen menu of the specified format. All slides of the specified library (in_slb_filepath) will be included in this screen menu. For all of these functions, possible values of the NX_x_NY_menu_format argument are: "2x2", "2x3", "3x3", 3x4", 4x4", ... etc.
char* ads_browse_blocklib_and_insert( char *in_blocklib_name, char *NX_x_NY_menu_format , char* in_menu_title );
This function does somewhat complex processing. It opens a block library and conducts dialogs with the user. During the dialog, the user will have a chance to pick the block he or she wants from an attractive icon menu. What is block library? Block library in LinuxCAD consists of two files: the slide library and the drawing archive. The slide library is a collection of viewable but not editable slides. These slides are actually the pictures you see in the icon menu. The Drawing archive has basically the same internal format as slide library, but its members are gzip-ed LinuxCAD drawings. For every slide with name X there should be a corresponding member or a drawing archive with name X. The ads_browse_blocklib_and_insert function returns NULL if the user canceled, if the block does not exist or the block name if everything went OK. If it returns successfully, that means it is garanteed that the block with the specified name exists in the current drawing in the local block table. The function will actually extract blocks from the library and insert them in the local block table of the drawing. If the function returns a non-NULL character pointer, the caller must free it when done.
Besides operating system environment your ADSL program runs also in LinuxCAD environment. The LinuxCAD environment consists of several variables that affect the user process and also the ADSL programs. Some of the environment parameters are color, linetype and layer of newly created objects. The functions prototyped above are for setting and querying such LinuxCAD environment parameters. Some other of LinuxCAD environment parameters are: circumference , trace width, chamfer distance, fillet radius and many others. Most of LinuxCAd environment parameters are not exposed to ADSL developers at this time but they can be exposed very easily by Software Forge Inc. when the specific need will arise or upon request from LinuxCAd application developers.
DwgObj* ads_mkeLineP( double *in_p1 , double *in_p2 , int in_color , int in_linetype , int in_layer ); DwgObj* ads_mkeSolidP( double *in_p1 , double *in_p2 , double *in_p3 , int in_color , int in_layer ); DwgObj* ads_mkePointP( double *in_p , int in_color , int in_layer ); DwgObj* ads_mkeCircleP( double *in_p_center , double inR , int in_color , int in_layer ); DwgObj* ads_mkeTraceP( double *in_p1 , double *in_p2 , double in_TraceWidth , int in_color , int in_layer ); DwgObj* ads_mkeEllipseP( double *in_p_center , double in_rot_ang , double in_a , double in_b , int in_color , int in_layer ); DwgObj* ads_mkeEllipseArcP( double *in_p_center , double in_rot_ang , double in_a , double in_b , double from_arc_ang , double to_arc_ang , int in_color , int in_layer ); DwgObj* ads_mkeDonutP( double *in_p_center , double in_Din , double in_Dout , int in_color , int in_layer ); DwgObj* ads_mkeTextP( double *in_start_p , double in_H , char *in_text , double in_Rot_ANG , double in_Mult_X , int in_color , int in_layer ); DwgObj* ads_mkeSpline2DP( int in_color , int in_layer , ... /* double *in_p_vertex , ... */ /* variable list of arguments of the double* follows */ /* this vertex list should be terminated by NULL pointer */ ); DwgObj* ads_mkeLine( double *in_p1 , double *in_p2 ); DwgObj* ads_mkeSolid( double *in_p1 , double *in_p2 , double *in_p3 ); DwgObj* ads_mkePoint( double *in_p ); DwgObj* ads_mkeCircle( double *in_p_center , double inR ); DwgObj* ads_mkeTrace( double *in_p1 , double *in_p2 , double in_TraceWidth ); DwgObj* ads_mkeEllipse( double *in_p_center , double in_rot_ang , double in_a , double in_b ); DwgObj* ads_mkeEllipseArc( double *in_p_center , double in_rot_ang , double in_a , double in_b , double from_arc_ang , double to_arc_ang ); DwgObj* ads_mkeDonut( double *in_p_center , double in_Din , double in_Dout ); DwgObj* ads_mkeText( double *in_start_p , double in_H , char *in_text , double in_Rot_ANG , double in_Mult_X ); DwgObj* ads_mkeTextCen( double *in_text_center_p , double in_H , char *in_text , double in_Rot_ANG , double in_Mult_X );
Some times it is more convenient to create an object in the background first, without immediatly inserting it in the drawing. To do this, use ads_create... functions.
DwgObj* ads_createLine( double *in_p1 , double *in_p2 ); DwgObj* ads_createSolid( double *in_p1 , double *in_p2 , double *in_p3 ); DwgObj* ads_createPoint( double *in_p ); DwgObj* ads_createCircle( double *in_p_center , double inR ); DwgObj* ads_createTrace( double *in_p1 , double *in_p2 , double in_TraceWidth ); DwgObj* ads_createEllipse( double *in_p_center , double in_rot_ang , double in_a , double in_b ); DwgObj* ads_createEllipseArc( double *in_p_center , double in_rot_ang , double in_a , double in_b , double from_arc_ang , double to_arc_ang ); DwgObj* ads_createDonut( double *in_p_center , double in_Din , double in_Dout ); DwgObj* ads_createText( double *in_start_p , double in_H , char *in_text , double in_Rot_ANG , double in_Mult_X ); DwgObj* ads_createTextCen( double *in_text_center_p , double in_H , char *in_text , double in_Rot_ANG , double in_Mult_X );
LinuxCAD ADS provides two functions to support rubberbanding.
void ads_create_rubberband_context( void (*in_redrawing_xor_function)(double *in_pointer_wcs_location ) ); void ads_free_rubberband_context(void);
To use them, the programmer must provide a preview function ( redrawing_xor_function ) that takes only one point argument to recalculate the previewed graphics objects. We recommned that you use global static variables to pass any additional information to the redrawing_xor_function.
To activate the sliding preview of objects produced in redrawing_xor_function function one has to request that the user enter a point using ads_get_point2D_rb function call.
double* ads_get_point2D_rb( double *in_pnt_base , char* in_prompt );Unusually, theads_get_point2D , ads_get_point2D_rb calls redrawing_xor_function upon every move of the mouse.
When you have finished your rubberbanding and obtained the final input from the user, use the ads_free_rubberband_context function to untie callback and free LinuxCAD resources. The ads_uml.cpp sample LinuxCAD ADS program provides excellent examples of the useage of rubberbanding.
LinuxCAD provides a simplified graphics device interface, API for its main window. The prototypes of the display API functions are:
void ads_gdi_setcolor_rgb( int in_red_0_to_256 , int in_green_0_to_256 , int in_blue_0_to_256 ); void ads_gdi_setcolor_fixed( int in_ega_pallette_color ); void ads_gdi_putpixel( int in_x , int in_y ); void ads_gdi_putpixel_2( int in_x , int in_y ); void ads_gdi_line( int in_x1 , int in_y1 , int in_x2 , int in_y2 ); void ads_gdi_line_2( int in_x1 , int in_y1 , int in_x2 , int in_y2 ); void ads_gdi_bar( int in_x1 , int in_y1 , int in_x2 , int in_y2 ); void ads_gdi_bar_2( int in_x1 , int in_y1 , int in_x2 , int in_y2 ); void ads_gdi_set_solid_line(void); void ads_gdi_set_xor_writemode(void); void ads_gdi_set_copy_writemode(void); void ads_gdi_set_dashed_line(void); void ads_gdi_set_allscreen_viewport(void); void ads_gdi_clearviewport(void); void ads_gdi_setfont_Small(void); void ads_gdi_setfont_Medium(void); void ads_gdi_setfont_Big(void); void ads_gdi_moveto( int in_x , int in_y ); void ads_gdi_outtext( char *str ); short ads_gdi_textwidth( char *str ); short ads_gdi_textheight( char *str );
The objects created by ..._dsp_ style functions are neither scalable, nor constant in the drawing. They can be used only for drawing on transient objects such as a system independent GUI which will work entirely within main LinuxCAD window, banners and logos, various progress bars, and animation. Rendering, although for rendering as such some form of persistence still would very desirable.
Functions ads_gdi_bar,ads_gdi_line,ads_gdi_putpixel accept coordinates where the Y coordinate origin is in top left corner of the display.
Functions ads_gdi_bar_2,ads_gdi_line_2,ads_gdi_putpixel_2 accept coordinates where the Y coordinate origin is in the bottom left corner of the display.
LinuxCAD provides you with the ability to extract and change any of the properties or attributes of any LinuxCAD drawing objects. There are things that are common between all drawing objects for example: color or line type. These are properties. Properties can be modified by the LinuxCAD user level command CHPROP. Every drawing object has also specific attributes that belong only to this object as a type. An example of such attributes would be: radius of a circle or first point of a line or width of the trace. These so called attributes of drawing objects can be modified by user level CHANGE command. Please open LinuxCAD now and practise to use CHANGE command, it is important for understanding of further explanation.
Here are the prototypes of the three functions that exist to read by drawing objects properties:
int ads_extract_color( DwgObj *in_obj );When using two functions above , please free the character pointer returned to you to avoid memory leaks.
And here are the functions to modify properties of drawing objects:
void ads_change_color( DwgObj *in_obj , int new_fixed_color );The attributes that are specific to different LinuxCAD object types may be extracted from drawing objects and stored back using the set of ADSL functions below:
int ads_query_type( DwgObj *in_obj , char* in_change_command_tag );Drawing object attributes differ by data type. They can be either points or real numbers or integers or strings. In the lists above you see separate C functions to modify or extract drawing object properties of every different data type. Usually you will know or have a good guess what is the type of the LinuxCAD object property you are after. But in some cases you may use the ads_query_type function to find out. The first argument of all functions above is a drawing object itself and the second argument is a change command name for an attribute. When you run a change command for example to change an ARC object you will see something like:
Command:change Select object to change:4.997667,5.724584 Found 1 object! What to change ? <CENTER/RADIUS/START_ANGLE/END_ANGLE/>:The keywords that you see after "What to change ?" are change command tags, so you have to give one of those as the second argument to ads_extract_... or ads_extract_... functions. Besides that another thing to remeber about ads_extract_string function is that it returns newly allocated string in the pointer supplied by you. Therefore you will have to free that string later.
The commands you define using ads_add_command_to_LinuxCAD can run other LinuxCAD commands within themselves. Sometimes it will not work and LinuxCAD will crash but usually does work. Functions thet we discuss in this chapter are the ones you will use to simulate input from the user and initiate LinuxCAD commands from within your ADSL function.
void ads_command( char* in_command_string );ads_command starts LinuxCAD command as it would be enetered by user. You should realize that the minute you do this your ADSL program does not loose control and the user does not receive it either. You program continues to run like nothing happened. Actually the only change will be that you will see in the command line that LinuxCAD started a new command, the first message from the corresponding command will show up. For instance you will see "From point:" message after you have done ads_command( "LINE" ); Now you have a choice either respond to the message from your program by one of the functions: ads_command_ent , ads_command_real , ads_command_int , ads_command_sset , ads_command_nil , ads_command_pnt2d or pass the actual control to the user just for a little while using ads_command_pause function.
ads_command_ent submits entity to the LinuxCAD command, the same way as it would be entered by user.
ads_command_real submits real number to the LinuxCAD command, the same way as it would be entered by user.
ads_command_int submits integer number to the LinuxCAD command, the same way as it would be entered by user.
ads_command_nil submits Nil to the LinuxCAD command, the same way as it would be entered by user, Nil will cause most of the command to abort or to finish. If there is no command active the Nil will cause LinuxCAD to repeatedly initialize last succesfull command.
ads_command_pnt2d submits 2D point to the LinuxCAD command, same way as it would be entered by user.
ads_command_pause gives control to the user and lets him or her enter only one value whether it is point , number , or drawing object. Whatever LinuxCAD command is now serving the User will be able to enter but then the control will be passed again back to your program.
LinuxCAD comes with several sample ADSL programs that can be used to learn ADSL by programmers new to LinuxCAD. This chapters will help you understand the included sample programs. None of these programs are meant to be used for anything practically useful, they are just samples demonstrating the proper usage of many function calls available in ADSL. Sample programs and all ADSL related stuff located in the subdirectory /usr/linuxcad/ads. Lets recall thatonly dynamically build LinuxCAD allows loading ADSL applications. These days ( since version 2.27 ) LinuxCAD always comes with two executables builds. linuxcad executable is a static one, it will run at any Linux including probably a.out. It is included here only for compatibility purposes , so we at least can be sure that you'll get some LinuxCAD working. The static build allows all normal LinuxCAD commands including even AutoLisp. It has no limitations besides one (!). The static build can not load ADSL programs. To load ADSL programs you need to use dynamic build. The file name for dynamic build is linuxcad_dynamic. At this time we deliver dynamic build only for a single Linux brand. The very one on which we are developing LinuxCAD on. And that is RedHat 6.0 ( or Linux 2.2.5-15smp ). The dynamic build is guaranteed to work on only that Linux distribution. It is up to the user and his computing expertise to adopt dynamic build of LinuxCAD to work on your system. Some LD_LIBRARY_PATH tweaking may help, but not in every case. The special build of LinuxCAD may be done for you, and usually that will involve an extra charge. Also for sample ADSL programs to load automatically you need to have special lines in your linuxcad.ads file. These lines are:
/usr/linuxcad/ads/adsl_cmd.so /usr/linuxcad/ads/aa.so /usr/linuxcad/ads/adsl_text_query_examp.so /usr/linuxcad/ads/adsl_rband.soEvery shared library listed in linuxcad.ads file is assumed to be an ADSL program and is loaded automatically by LinuxCAD.
Lets pretend that you are working on RedHAt 6.0 or any other compatible system. Start the dynamic build of LinuxCAD using the following command:
linuxcad_dynamic columbia.dxsIf everything is working properly and all ADSL sample programs have been loaded, you will these messages:
LinuxCAD ( or Freedom*Of*Choice*CAD ) v 2.27, Standard Edition. Copyright (C)1998,1999,2000 Software Forge Inc. All rights reserved. http://www.linuxcad.com , http://www.softwareforge.com Loading ... This machine uses "Intel" byte order. BARCHART registered. PULSEZOOM registered. CMD registered. OFFS registered. PIECHART registered. SFLOGO registered. /usr/linuxcad/ads/adsl_cmd.so initialized. LOGO DESIGN tool registered ('DT'). /usr/linuxcad/ads/ads_text_bycircle.so initialized. QUERY_TEXT from ADS sample program adsl_text_query_examp registered. /usr/linuxcad/ads/adsl_text_query_examp.so initialized. "DXS" format detected.If you see the messages above, then you can start trying the new commands exported by the ADSL applications adsl_cmd.so , ads_text_bycircle.so , adsl_text_query_examp.so .
When loaded the adsl_cmd.cpp defines several LinuxCAD commands , they are: BARCHART, PULSEZOOM, OFFS, CMD, SFLOGO. Type names of those commands in the LinuxCAD command line and see what each command does.
BARCHART - shows how dialog with user can be organized from ADSL program. Open file /usr/linuxcad/ads/adsl_cmd.cpp and search for the body of void sample_new_command(void) function. This is the function that implements BARCHART command. It uses ads_prompt function to post messages to command line. It uses ads_get_int to read an integer number from the user and it uses ads_get_kword to let user make a choice from two possible keywords. Please note that the pointer returned from ads_get_kword is later deleted using C-language free function. Further you program asks user to enter point using ads_get_point2D function.
SFLOGO - command is implemented by void sflogo_command(void) function from the same /usr/linuxcad/ads/adsl_cmd.cpp file. The SFLOGO command shows how the ADSL programmer can use LinuxCAD ADS Graphics Device Interface functions to draw on the LinuxCAD drawing area in a platform independent way.
CMD - command implemented by function void yetanother_cmd_func(void) shows a nice example of ADSL command functions( see chapter above ) in action. Please open the /usr/linuxcad/ads/adsl_cmd.cpp file , find the yetanother_cmd_func and follow the code. You'll see that the program asks user to enter point. Then it calculates the corner points of a cross. Then it gets more interesting, ADSL program submits the command back to LinuxCAD using ads_command function. It dispatches to LinuxCAD color change command first and then it creates complex trace command that includes coordinates of points and sends it to LinuxCAD for execution. It is obvious that the last object in the drawing is now the one created last , so we can store it to the e1 variable using ads_entlast function. More interesting is the last part, after initiating an ERASE command the program sends drawing objects back to the LinuxCAD command line. The later done by ads_command_ent function. And finally the ads_command_nil function is used to repeat the last command. In this case it is the CMD command itself. The commands that you run within are not counted.
PULSEZOOM - this sample command is very simple , it just demonstrates that it is possible to change current view very easily from within ADSL program. The command uses standard UNIX function sleep to delay its execution on one second between view changes.
QUERY_TEXT - this command is defined within the adsl_text_query_examp.cpp source file in LinuxCAD ADS directory. The programs shows a way to access and modify drawing object parameters. Most of the text of adsl_text_query_examp.cpp program is listed below. The line numbers are written for every line so we can explain all important steps that program does.
Please note on line 6 , the inclusion of the linuxcad_c_exposed.h header file. Line 56 tell LinuxCAD to invoke function query_text when the user enters QUERY_TEXT command. On line 11 program gets drawing object by allowing the user to select it with a mouse. Further on line 12; the program verifies whether the selected object is text. Lines 24 to 28 extract the internal attributes of the text object. Then ADSL print utility functions used to print extracted values in the LinuxCAD command line. Further the program modifies the attributest of a text on lines 36 through 39. Like when the rotation angle is being set to 45 degrees , text data converted to uppecase and start point moved. New modified attribute values store back to the original text object using ads_change_... functions on lines 41-44 .
This program shows how to use LinuxCAD rubberbanding functions and LinuxCAD SelSets. The program defines a new LinuxCAD command DRAW3DBOX. As the name implies the new command creates several lines in a way that they are together perceived by the obverser as a 3D object.
draw_3d_box is the function that implements new command ( see lines 183 - 186 ). DRAW3DBOX command as we can see implemented by calling a generic placement function box_processor_and_placer.
The later is not a standard LiuxCAD function but the function implemenmted by some ADSL programmer. The text of the box_processor_and_placer occupies lines from 73 to 103. The box_processor_and_placer function has been designed so that it can now be used to draw any type of object that is fully given by two points. First the first point is picked by the user, then a rubber band like changing image of the future object appears and slides and scrolls until user fixes the second point on line 88.
Please recall ads_create_rubberband_context ADSL API Call. This ADSL call takes a single parameter - function pointer. Funtion that is specified there must draw the sliding shape of the object every time it is called, because it writes to the screen in a special XOR mode we can call it XOR-function. In our sample program box_generic_xorview_function is used as a xor function ( lines 49 - 58 ).
This xor function as you can see also is hollow. It is written in such a clever way that it can handle any type of a sliding rubber made figure. The shape definition function that is invoked via local_object_generator_function function pointer actually defines the shape of the moving image. The design contract is such that the function that local_object_generator_function function pointer points to returns an entire set of objects ( line 54 ). Once the SelSet of objects is received by box_generic_xorview_function function the later moves them into current location and displays the entire group of objects using ads_xorview_SelSet ( see line 56 ). Once objects are displayed the limited goal of the box_generic_xorview_function is accomplished and the objects returned from shape definition function are freed at the line 57.
Lets come back now to box_processor_and_placer function where we have left off. So far we know that rubber banding effect is happily on and going after we have passed line 85. Now to complete the creation of 3D box we need to ask the user for one more point, the final or freeze point. And that is what the program does at the line 88. Once again after final point is obtained the generic freezer function box_generic_freeze_function is called at the line 97.
The box_generic_freeze_function function is defined on lines 59 to 70. It's working principle is the same. It calls shape definition function indirectly via pointer. Then it moves the returned group of objects at their final location. Then it sets color and layer for all objects of the group to the values from the current LinuxCAD environment ( see lines 66 , 67 ). The most important is line 68. The ads_freeze_SelSet function of the ADSL API adds a copy of every object in specified SelSet to the drawing. Once a copy of objects has been added to the drawing itself they are no longer needed, so the objects of the SelSet and SelSet itself are freed at the line 69.
One more observation is good to make here. Lines 106 through 181 contain the code for the shape definition function specific to this type of box. If you look at the uml_box3D_object_generator function you'll see it does a bunch of trivial geometric calculations first. Then it creates the selection set to be returned ( see line 166 ) using ADSL API call ads_create_SelSet. The SelSet is populated with objects on lines 168 through 178. Please note that ADSL API calls which start from ads_create.. do not create objects in the drawing, they just return objects. Lines 168 through 178 show typical usage of ads_create.. functions. You call the function and you add the return value immediately to some sort of SelSet and process it later. An entire moving image ready to be either XOR-viewed or frozen is returned to the caller at the line 180. Now revisit line 185 and see how everything is tied together with the function call and the function parameter there.
This program implements EXPORT_TEXT command. The task at hand is to export to an external file all text objects from the one selected by the user set of objects. Let see how it is done. In fact this practically useful program was written by a member of Software Forge Inc. development staff within some 15 minutes ( including the testing ). That demonstrates what a powerful tool ADSL really is.