Home Page > Programming Samples and Tutorials > Overview > TwoD
TwoD Sample Overview
TwoD Sample
The sample demonstrates programming and manipulation of
Two Dimensional Views
See also All samples
The application
On start the application dynamically constructs a
BRep objects with flat faces and displays
in in the 3D control on the left. This control acts as a server.
The window on the right hand side is another instance of KernelCAD component.
It serves as a Two Dimensional View of the
3D model displayed in the server control. The scene displayed in the 2D View is
a projection to one of three standard planes (x and etc) from two opposite
sides. The four buttons in the bottom right corner allow rotation of the 2D view
along horizontal and vertical axes to change the displayed side.
Properties of the 2D view can be modified using controls at the bottom of the
form.
File > Save 2D menu option allows saving the 2D scene as resizable Windows
Metafile, which can be used in external documents or for printing.
File menu also offers printing of both views. Note that the Print 3D option
takes a couple of minutes to execute and consumes significant amount of memory
as the component uses in-memory rendering with normally much higher resolution
than rendering to a window.
More > Direct Definition menu option displays another independent form with
drawing constructed directly as a Two Dimensional scene. This form also
demonstrates usage of break functionality of 2D views. When the check box is off
the picture becomes obviously too long to fit into the window without
distortions.
Implementation
Go to VB .NET TwoD Sample
Go to C++TwoD Sample
|