Difference between revisions of "CAD:Vector Based"

From WireCAD Online Help
Jump to: navigation, search
Line 26: Line 26:
 
[[File:Bitmapex2.png]]
 
[[File:Bitmapex2.png]]
  
At the pixel level we see that one pixel is related to, at most, eight other pixels. This is not enough information for use to reliably scale the entire object. At best, we can apply a lossly algorithm to guess at the relationship of one pixel to another. This results in the scaling of pixel maps producing blocky images.
+
At the pixel level we see that one pixel is related to, at most, eight other pixels. This is not enough information for us to reliably scale the entire object. At best, we can apply a lossly algorithm to guess at the relationship of one pixel to another. This results in the scaling of pixel maps producing blocky images.
  
  

Revision as of 17:11, 27 December 2010

The CAD file is a vector based file. That is to say that the items in the file are maintained as entity types (e.g. line, circle, etc) with their coordinates and properties stored in the file as opposed to a pixel map. To view the drawing all entities on visible layers are rendered to a pixel map and rasterized to the monitor.

This approach allows for easy scaling and transformation.

Description

Coordinates are being expressed in drawing units.Drawing units are not expressing particular units(meters,inches etc). In this part user have to make some assumptions in order to define that the coordinates of the drawing mean particular units(meters,inches etc). For example: For a mechanichal drawing we can make the assumption for example: where one drawing unit defines one millimeter(1 D.U=1mm) For a architectural/technical drawing we can make the assumption for example: where one drawing unit defines one meter(1 D.U=1m) This can be very helpfull in designing,dimensioning,retrieving informations from the drawing(distances,area calculations)


Remarks

Bitmap Example

Bitmap files maintain an array of pixels each assigned a color and luminosity.

Consider the following line: Bitmapex1.png


Zoomed In to the pixel level Bitmapex2.png

At the pixel level we see that one pixel is related to, at most, eight other pixels. This is not enough information for us to reliably scale the entire object. At best, we can apply a lossly algorithm to guess at the relationship of one pixel to another. This results in the scaling of pixel maps producing blocky images.


Vector Example

Using the above example we will define an object called Line. We will define its:

  • StartPoint = 0,0
  • EndPoint = 10,-10
  • PenColor = Black

Given this information we then create a pixel map by feeding the object to the render engine.
Bitmapex1.png Scaling the line becomes a simple geometric transformation afterwhich we feed the information back into the render engine to create a new pixel map. Thus eliminating any artifacts or blockiness.