AutoCAD .NET :: Calculating Angle Between UCS And WCS

Jun 3, 2011

A question regarding converting angles between co-ordinate systems in AutoCAD .NET.

Im creating my first little utility to form selected block attribute references into a nice neat list. The current version takes a selection of blocks and a list insert location and then moves the attribute references to the location and rotates them to WCS angle of 0.

I now want to expand the program to make it a little more flexible and allow you to form the list parallel to the currently selected UCS x axis (the i.e. and angle of 0 in relation to current ucs's).

I have managed bumble my way through and transform the attribute positions correctly to form a list relative to the current UCS but am strugling on how to work out in code what the equivlanent WCS angle value would be.

I have done some calcs using .net framework to calculate an angle between two vectors (see code extract below). But this introduces a small error into the angles (i.e. if my ucs is set rotated 45 degrees around the zed and i use the below maths, the resulatant angle is 45.0000002 when read in acad afterwards).

Matrix3d ucsCur = ed.CurrentUserCoordinateSystem;
CoordinateSystem3d cs = ucsCur.CoordinateSystem3d;

// the below seems to work by calugulating the angle between two vetrex using .net maths class but this introduce a small accuracy error. Is there a better way?

Double rotAngle = Math.Acos((1 * cs.Xaxis.X) + (0 * cs.Xaxis.Y) + (0 * cs.Xaxis.Z));
//set the attribute reference rotation to the calculated WCS radian rotation value "rotAngle" 
attRef.Rotation = rotAngle;

Im sure there is a better way built into the managed autocad wrapper using a tranform matix and the ucs vertex information but dont really know how to go about it. Any links explaining how to work with the UCS in .net.

View 3 Replies


ADVERTISEMENT

AutoCAD .NET :: Calculating Angle Between UCS And WCS?

Aug 19, 2013

how to Translate WCS coordinates to PSDCS? where can find the C# code?

View 2 Replies View Related

AutoCad :: Change Default Drawing Angle From 30 Degrees To Another Angle?

Oct 15, 2008

Im drawing in isometric view and want to change the default drawing angle from 30 degrees to another angle.

View 9 Replies View Related

AutoCad 2D :: Rotate An Object To Match An Angle Without Knowing The Angle?

Oct 5, 2011

Is there a quick way to rotate an object to match an angle without knowing what the angle is? I am using AutoCAD 2011 now. I was using 2007 and I had an add on command the would rotate an object using a base point and picking the two lines that make up the angle, and it would match the angle you wanted. I can not get that command to load in 2011.

View 4 Replies View Related

AutoCad :: Rotation Angle Doesn't Match Angle Inquiry

Jul 25, 2012

I have a property line that is N 36d19'52" E but needs to be N 12d52'18" E. The obvious and calculated rotation angle would be 23d27'34" but when I rotate the line by the calculated angle it doesn't rotate to the right angle. It's off by 0d11'10"!? When I draw a line by bearing at N12d52'18" E and inquiry the angle between the property line and the drawn line the angle difference is in fact 23d27'34".

View 1 Replies View Related

AutoCad :: How To Read Angle Of Line And Insert Block To That Angle

Feb 11, 2011

Let's say I am inserting a square block into a dwg and want to get it parallel to an existing angled line. Do I have to read the angle of the line and insert the block to that angle or is there a quicker way?

View 6 Replies View Related

AutoCAD Inventor :: Make One Angle Half Of A Driven Angle

May 26, 2013

I have used a driven contraint in a sketch.

Can that also be done in an assembly?

In one assembly I want to make one angle half of a driven angle.

View 3 Replies View Related

AutoCAD VB :: DXF ELLIPSE Relationship Between Actual Angle And DXF Angle

Jul 6, 2013

how to convert "real world" angles of elliptical arcs into those shown in a dxf file?

Say that I have drawn an elliptical arc with its start angle on 210 degrees and an end angle of 324 degrees. The values in a DXF file, for an elliptical arc, have something to do with the contant "PI" (3.14159). I know that a full circle is 2*Pi but how to do this with elliptical arcs!!

View 1 Replies View Related

Illustrator :: Shortcut To Draw A 45 Or 90 Degree Angle From Drawn Line On Angle?

Nov 13, 2013

Is there a shortcut to draw a 45 or 90 degree angle from a drawn line on an angle using the pen tool?  ie. Rather than just from the x and y axis.
 
I trace a lot of maps and site plans.

View 19 Replies View Related

AutoCAD VB :: Calculating 4th Point Of A Square

Sep 12, 2012

i have 3 known points, and i know they are 3 of the 4 corners of a square, how do i calculate the 4th? these points are on a skewed square, where the square has been rotated in the x axis and then rotated in the z axis. It must be simple geometry, but i cant see it.

View 4 Replies View Related

AutoCad :: Calculating Area Of Floorplan

Nov 1, 2012

Any good tips when it comes to calculating the area of a floor plan? You are supposed to start measuring from the outermost part of the walls, but when I do that I run into trouble with the porch on the bottom of the drawing and the room on top left.

The problems are basically that the porch is not supposed to be included in the total area, and in the room on the top I end up measuring a small area twice if I start my measuring from the outermost part of the walls. This is not very well explained but I've drawn two red lines on the drawing to try to show where the problem areas are.

View 5 Replies View Related

AutoCad 3D :: Calculating Volume In A Basin?

Dec 23, 2013

I am currently still using AutoCAD version 2006. I have two lines with different Z coordinates. Is there a way to calculate volume in a basin?

View 3 Replies View Related

AutoCad :: Calculating Area With 2010?

Jul 15, 2012

When I am trying to calculate area, i got wrong answer. At very first i thought it calculates area with inches (iam in metric sys), but then i checked options and its answer should be in mm, but I am getting wrong answer. In my object (which is rectangular) there's many other things, like hatch, buildings and so on. Maybe this can abstract for direct answer, because when i draw just a simple square or rectangle.

View 9 Replies View Related

AutoCAD 2013 :: Calculating Values On Fly

Jul 26, 2013

A fundamental question that comes across regularly is calculating values for offset distances, move, radii, etc. If I want to calculate a value of .5 the interface does not accept 1/2 as a valid entry.

View 7 Replies View Related

AutoCad :: Lisp For Calculating Sum Of Blocks?

Mar 5, 2008

Lisp for calculating the sum of blocks? So if I was to create a block to represent trees in plan for example, I could automatically tally the number of trees.

View 9 Replies View Related

AutoCAD Civil 3D :: Calculating Cut And Fill?

Nov 20, 2013

My background is actually in Microstation (mainly 2D). I was asked if I could calculate the cut and fill between two topo surfaces. Unfortunately, I don't have the files yet but I will eventually receive them. When I do, what would be the correct method to achieve this task?

View 3 Replies View Related

AutoCAD Civil 3D :: Calculating Volumes Between 2 Elevations

Nov 20, 2013

We have a good size channel and the section for the channel varies quite a bit.  We want to find the volume excavated in the channel between 2 elevations (it is the area of sand per the goetech report)?  A template was not used to create the channel surface, breaklines and gradings were used.

View 9 Replies View Related

AutoCAD Civil 3D :: Calculating Slope Area

Sep 12, 2005

How I can calculate my area for different slope regions?

View 7 Replies View Related

AutoCAD Inventor :: Calculating Total Volume

Apr 11, 2012

I want to know if it is possible to calculate the water displacement volume of an assembly if it were immersed in water.

In other words,  I want to create a file in which ALL hollow spaces inside structural members, valves, pipework etc are assumed to be solid so that when that assembly is dropped in water, the total volume of water being displaced will be equal to the iProperty value for volume.  I know its possible to hole patch when creating a shrinkwrap,  but this is only effective for 'circular' hollow spaces and does not fill obscure or rectangular shaped empty volumes.

View 8 Replies View Related

AutoCAD Inventor :: Calculating Weight Of A Part?

Nov 14, 2012

I would like to find the actual weight of a part in pounds.

I have attached one of the parts I would like to know the total pounds or ounces for.  I’m using a specific material that I set in the Physical tab of iProperties.

Version = Inventor Pro 2009

View 4 Replies View Related

AutoCad :: Calculating Total Area Of Windows

Oct 31, 2012

I have a building like this and it has a lot of windows.

I know how to calculate an individual window area by using 'area' or 'ls' command. But this is just partial drawing and the whole building has hundreds of windows and it will take forever to calculate one by one and add them together to get the total area. Is there any way to get the whole area easily?

windows are just rectangles (and solid hatch inside the rectangle).

View 9 Replies View Related

AutoCAD Civil 3D :: Calculating Average Parcel Area

May 16, 2013

Any quick way of calculating average Parcel Area?  I used to export to LandXML and do an area report in CSV.  That doesn't seem to be working for me when I export out of C3D 2012.

The workaround I found was to select all the parcels in Prospector, copy to clip board, paste in excel, find and replace "_Sq. Ft._" with 0, then do the average. 

View 1 Replies View Related

AutoCAD Inventor :: Calculating Distance Using Rectangle Pattern?

Apr 16, 2012

When using the rectangular tool how do i calculate equal distances between each Fin.The picture shows 11 Fins but they are not equal distances between each Fin which causes the Fins to be higher on the right side.Which formula / calculation do i need to use in Rectangle Tool to produce equal distances between each fin and therefore the 1st and 11th fin are in the same position on each side of the cylinder.Using Inventor 2012

View 9 Replies View Related

AutoCAD Inventor :: Calculating Surface Area For IParts

Sep 12, 2009

I want to calculate aurface area of iparts automatically. there are about 100 ipatrs and i want to find surface area of each ipart. is there any way that i just click the desired surface and its area is written in some file so that i can just go to the next ipart click the desired surface and its area is written automatically on some file.

Is there some option in inventor to define macro for it coz i hav no knowledge of defining macros.

View 9 Replies View Related

AutoCAD Architecture :: Calculating Number Of Certain Block In 2D Plan

Nov 11, 2013

I am electrical engineer and I have little experience with autocad .  How can I calculate the number of  acertain block in a 2D plan , such as the number of electrical socket in abig plan  with autocad 2010

View 2 Replies View Related

AutoCAD 2013 :: Calculating Three-dimensional Surface Area?

Nov 11, 2012

How to calculate the three-dimensional surface area of a revolved arch (such as attached file)  by autocad 2007? such as an irregular dome.

Which software can do the job? Autocad or Matlab software or .....

View 9 Replies View Related

AutoCAD Civil 3D :: Calculating Volume From Corridor Models?

Sep 19, 2013

I've been learning civil3d for some time now and I really want to understand how the program calculates volumes from road corridors.

When the top code is used to create surface from a road corridor, the created surface coincides with the top of the road pavement (binder/wearing course), which is not part of earthworks.

How can I create a surface at the formation level so as to compute actual earthworks?

View 5 Replies View Related

AutoCAD Civil 3D :: Calculating Existing Berm Volumes?

Aug 12, 2013

I am looking to calculate the volume of an existing berm from a TIN surface.  I have read through some of the Civil 3D tutorials, and realize that I will need to have two surfaces (base and comparison), but need to figure out how to create the comparison surface. 

View 9 Replies View Related

AutoCad :: Calculating And Drawing Vehicle Turning Circles?

Jan 24, 2013

I am designing a piazza that most types of vehicles need to circumnavigate. On a scaled location plan, I would like to draw the scaled turning circles of cars and lorries - especially emergency vehicles.

I have the Metric Handbook beside me which has typical 90 degree turns drawn but it is not obvious how they were drawn in the first place.

I have all the vehicle dimensions that I need, I just need to know how to calculate and draw the geometry.

View 5 Replies View Related

AutoCAD Civil 3D :: Calculating Volumes With Out Of Date Surfaces

May 9, 2013

I have been provided a file with a surface, however I have not been provided with the point files referenced to define the surface.  As a result, when I try to calculate the quantities in the volume dashboard using a volume surface, I get the error that the surface is out of date.  Is there a way to calculate volumes with an out of date surface?

I am trying to calculate the amount of material required to be cut when creating a flat bottom ditch.

View 4 Replies View Related

AutoCAD Civil 3D :: Calculating Volume Using 2 Existing Surfaces?

Jun 9, 2013

I have create my surfaces and now need a volume between to two surfaces.  I created the surface by using the Surface/Create TIN Surface tool for both my OG and the surface after material has been imported.  I have gone to the volume dashboard and it will not let me add existing surface. How do I calculate the volume?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved