Shaped Viewports

William Forty
William Forty

Here's a quick tip for today.

No doubt you're aware that you can have custom shaped viewports - select a viewport, right click, and choose the option to clip the viewport based on a bounding object such as a polyline.

While this can be useful, be careful on drawings that contain a lot of information. There's a reason rectangular ones are the default. Rectangles are easy for a computer to deal with. They have a set width and height, and it is easy to know what should and should not be displayed through the viewport.

Polygonal viewports are different - your computer has to mathematically determine what should and should not be displayed, and that is much more difficult to figure out for odd-shaped viewports. Incidentally, if you're interested in how this might be done take a look at my ray casting algorithm for AutoCAD®.

Therefore, where possible, try to stick to rectangular ones. That doesn't mean use rectangular ones at all costs, just be aware that if you have a busy drawing (like a survey) and view it through a polygonal viewport, you're in for some rendering lag!

Hope this helps,

Will


Comments

neil jones
2011-09-28 08:52:03

How do I get the Ray casting algorithm to run??

Will
2011-09-28 09:32:09

Open the VBA editor using VBA IDE and paste it into a new module. Then run it using VBARUN.

Jigar
2011-11-28 12:27:57

Sir, How do we get the layout view rotated? Thanks.

Will
2011-11-30 10:24:24

You'll be looking to manipulate the UCS. Each viewport has its own UCS. Simply double click into the viewport, and type UCS to edit the UCS of the viewport. Rotate it to the desired orientation and then type PLAN, and select the option to use the current UCS.