Posts

SpaTools: Construct Triangle with three known sides

Image
Last week, I was trying to teach my son some basic concepts of elementary geometry to solve some homework questions. One of the question was about “Construct a triangle with three known sides”.     I still remember the days of high school when we used to construct triangles of three known sides using ruler and a drafting compass. Certainly, it was fun and so interesting to make the shapes using Ruler, Compass and set square.     Though I am not good at teaching and teaching is not an easy job but tried my best to make him learn conceptually. The effectiveness of my teaching will be revealed by grading from school after exam. 😊 However, during teaching him, I got an idea to develop a jig in AutoCAD to construct a triangle of three known sides. Conventionally, the same procedure (Ruler & Compass) is used in AutoCAD to construct the triangle. Two different circles are drawn centered at the ends of the line segment. The ends of the line segment...

SpaTools: Clip Features in AutoCAD

Image
Recently, I posted about the workflow to clip features in AutoCAD like ArcGIS. The post named as “How to clip objects in AutoCAD” was much appreciated by readers. The workflow contains following steps: Creation of a polygon in model space Copy that polygon in   a layout with base point (0,0,0) Converting the polygon into viewport object Finally executing EXPORTLAYOUT command to create the clipped drawing file. In order to make it One Click operation, I have developed a tool named as Clip Features and included it as part of SpaTools . The tool requires only a closed polyline in model space and it will create a new layout named as CLIP. This newly created layout will be exported to a new drawing file. As soon as the new drawing file will be created, it will ask to open the new file. The updated DLL can be found at the link at the bottom of the page. Download, Unblock and load it using Netload.

SpaTools: Create 3-Point Rectangle & Right Angle Triangle in AutoCAD

Image
AutoCAD provides a basic command to create a rectangle. The command can be invoked by typing “REC” , “RECTANG” or “RECTANGLE” on command window or by clicking on Rectangle icon button on DRAW panel of Home Tab. Multiple options are there to create rectangle such as: By specifying the opposite diagonal corners of the rectangle By Length and Width By Area By Rotation Refer this Autodesk AutoCAD Knowledge page for further details. All the above workflows to create a rectangle need multiple inputs from user. One of my colleague asked me to create a tool to create the rectangle in a simple way where user can drag both dimensions on screen and the rectangle created without any further inputs such as rotation.   The resulting tool named as “Create 3-Point Rectangle” prompts for only three points and dynamically draws the rectangle as shown below: It takes a baseline dragging from start point to end point and then a perpendicular to that baseline and draws a rectang...

SpaTools: Create Buffer Around Linear Objects (Updated)

Image
My last blog CreateBuffer Around Polyline s  was about creating buffer polygons around Polylines & Spline CAD objects only. Lines and Arc objects were not implemented. Besides that, the resulting buffer polygon was created on both sides of Polylines and Splines with round corners at the ends. The same shortages were indicated by a reader on the blog in a comment too. In the context of the above comment, I have updated the Buffer Around Polylines / Splines tool with following additions: Create buffer polygons around Lines and Arcs Create buffer polygons on either Left side , right side or both. Create buffer polygons either with round ends or flat ends A dialogue box which accepts the input from user. The caption of the button is renamed from Create Buffer Around Polylines / Splines to Create Buffer Around Linear Objects   The command can be invoke by clicking on  “Create Buffer Around Linear Objects” button or by typing command “BUFFERLINE” on com...

SpaTools: Create Buffer Around PolyLines

Image
In the continuation of my last post about buffer around points , I have developed another tool to create buffer polygons around/along the linear AutoCAD objects such as Polylines and Splines. Buffer   is one of the vital tool of Spatial Analysis and it is often needed to create buffers along the linear features such as roads, canals, railway lines etc. To create buffer along a polyline manually is not a One Click operation in AutoCAD rather following operations are needed to create buffer polygons along a single polyline: Offset the polyline object on both sides using OFFSET command. This will create the two identical polylines on each side. Creating two more polylines to close the ends of both offset lines Joining all the polylines to create a closed polyline. In case, if there are hundreds of the polylines,  this operation becomes hectic. Though, merge polygons tool can be used to merge the polylines, but still it is time consuming and inefficient metho...

SpaTools: Create Buffer Around Points

Image
Buffer analysis is a common tool of spatial analysis, which deals with the problem of proximity Buffer analysis can make the complicated problem be more scientifically and visually, and provide valuable information for users. The basic idea is to create a zonal area of a certain distance around its boundary. This zonal area is technically called as buffer.  These buffers are used to identify the impact range and service range to surrounding environment. The process involves generating a buffer around existing geographic features and then identifying or selecting features based on whether they fall inside or outside the boundary of the buffer. Autodesk has provided a tool to create buffers as the part of AutoCAD Map 3D which takes features (AutoCAD Map 3D Objects) as input and generates buffered features as SDF file. In most cases, it is required to create buffers around Points, Polylines and Splines without any hassle of AutoCAD Map 3D Objects and SDF files. Usually, CA...

SpaTools: Merge Polygons into One Closed Polyline

Image
It is often needed to merge multiple closed polylines and circles into one closed polyline in AutoCAD. Different users do it in different ways such as Creating Boundaries using “_boundary” command or creating Regions and then applying UNION (Boolean operation) on those region objects and then exploding and joining all line segments. This method is hectic and time consuming when there are plenty of objects to be merged.  Similar to Cut Polygons , I have developed a tool under SpaTools which merges multiple polygons (Closed Polylines, Circles, Ellipses) into one Closed Polyline. The tool is added to the SpaTools ribbon toolbar. Besides that, it can be accessed via “MERGEPOLYGONS” command. The demonstration of the Merge tool is depicted below: The tool can be applied on multiple disjoint sets of the polygons as depicted below: The updated SpaTools DLL can be downloaded from  Cadomation . Your comments and suggestions are appreciated.