Model Viewing

From WikiSTEP

Jump to: navigation, search

This page belongs to the Recommended Practices for the Presentation of GD&T.

Contents

Scope

This page explains how to use instances of the camera entities, to map a draughting_model or a mechanical_design_geometric_presentation_representation (MDGPR) into a presentation_view. The draughting_model may be in 2D or 3D while the MDGPR is always 3D. The provided pattern and example are for the 3D case, but they are quite similar for the 2D case.

See:

Prerequisites

You should be familiar with the following:

Instance pattern for camera and draughting_model entities

The model viewing capability deals with projecting a model that may contain geometric, as well as three-dimensional planar annotation elements, onto a two-dimensional view. The concept to represent the model is draughting_model. Additionally mechanical_design_geometric_presentation_representation could be displayed as well.

As depicted in Figure 1 (an instance diagram of the entities involved in the camera model), the result of projecting the three-dimensional potentially styled model is a camera_image. As an item of a presentation_view, a camera_image maps a camera_model onto its designated viewport (a planar_box). The camera_model is the source part of the projection mapping; it contains the information needed to create the projection from a three-dimensional representation to a two-dimensional picture of that representation, to which it is associated by camera_usage.

A camera_image_3d_with_scale is a subtype of camera_image that includes a derived scale. The scale is given by the ratio between the size of the viewport and the size of the view_window (a planar_box) of the view_volume of the camera_model.

Each camera_model is either a camera_model_d2 or a camera_model_d3. A camera_model_d3 captures the projection information to create a mapping from a three-dimensional representation to a planar projection of that representation. A camera_model_d3_with_hlhsr is a subtype of camera_model_d3 that indicates, via his hidden_line_surface_removal attribute, whether a removal of hidden lines and surfaces shall be performed. Complete Part21 example can be found here callouts.stp.


Image:camera_model_instances3.PNG
Figure 1. Camera model instances
#10300=DRAUGHTING_MODEL('Leader curve callout',(#200, #10311),#10167);
#10310=CAMERA_USAGE(#10311,#10300);
#10311=CAMERA_MODEL_D3_WITH_HLHSR(,#10312,#10320,.T.);
#10312=AXIS2_PLACEMENT_3D(,#10313,#10314,#10315);
#10320=VIEW_VOLUME(.PARALLEL.,#10321,0.,10.,.T.,10.,.F.,.T.,#10322);
#10321=CARTESIAN_POINT(,(0.E0,0.E0,1.E2));
#10322=PLANAR_BOX(,3.,3.,#10323);
#10400=PRESENTATION_VIEW('Front view',(#10410, #10323),#10401);
#10410=(CAMERA_IMAGE()CAMERA_IMAGE_3D_WITH_SCALE()GEOMETRIC_REPRESENTATION_ITEM()MAPPED_ITEM(#10310,#10411)REPRESENTATION_ITEM());
#10411=PLANAR_BOX(,5.,5.,#10412);

Complete Part21 example can be found here callouts.stp.

A view_volume is defined in the view_reference_system of the camera_model that uses the volume. It is either a truncated pyramid or a parallelepiped. The contents of this volume are projected onto the planar_box defined by the view_window that is then mapped onto the viewport.

If the type of projection is parallel (as shown in Figure 2), the projection is made parallel to the line from the projection_point (i.e. from where the items are viewed) to the geometric center of the view_window, and the view_volume is a parallelepiped.


Image:Parallel viewing pipeline.gif
Figure 2. Parallel viewing pipeline


If the type of projection is central, the view_volume is a truncated pyramid emanating from the projection_point.

The view_plane_distance is a signed distance along the z-axis of the axis2_placement indicated by the view_reference_system. This distance positions the origin of the view_window. Front_plane_distance and back_plane_distance define the front and back end of the view_volume. The geometry of the projected representation can be clipped at the front plane (with front_plane_clipping set to TRUE), back plane (back_plane_clipping) and against the planes which are the sides of the view_volume (view_volume_sides_clipping attribute).


Entities and Attributes

Name Explanation
draughting_model The representation of the shape of a product for the purpose of draughting.
name A unique name.
items The elements of the draughting_model. Each item shall be a mapped_item, styled_item, axis2_placement, draughting_callout or a camera_model.
context_of_items Same as context of the geometric shape.
camera_image The result of projecting two- or three-dimensional geometry.
name Due to no requirement defined, it is recommended to instantiate with an empty string.
mapping_source A camera_usage.
mapping_target A planar_box onto which the view window is projected.
presentation_view It is a picture that is the result of the projection of a draughting_model. It needs to be placed onto a presentation_area.
name Inconsequential name of the view.
items The elements of the view. In our context this includes the camera_image, the axis2_placement_2d that is the origin of

the view, as well as all annotation_occurrences that are defined and depicted in the view.

context_of_items A two-dimensional representation context.
camera_model_d3_with_hlhsr A camera_model that contains the information to create a projection. This subtype of camera_model indicates whether hidden line and hidden surface removal shall be performed.
name Due to no requirement defined, it is recommended to instantiate with an empty string.
view_reference_system An intermediate three-dimensional coordinate space in the coordinate space to be projected (see Figure 1).
perspective_of_volume A pointer to a view_volume that is the information required to determine how to project the geometry. It is defined in the view_reference_system.
hidden_line_surface_removal A value of TRUE indicates that hidden lines and surfaces shall be removed during projection.
view_volume Defines the volume that is projected onto the presentation_view.
projection_type Parallel or central]
projection_point The location from which the items are viewed. For a parallel projection, this point indicates a line from itself to the geometric center of the view_window.
view_plane_distance This distance positions the origin of the view_window.
front_plane_distance For a parallel projection, this is the distance to the front of the parallelepiped.
front_plane_clipping A boolean flag indicating whether to clip the projection against the plane given by the front_plane_distance.
back_plane_distance For a parallel projection, this is the distance to the back of the parallelepiped.
back_plane_clipping A boolean flag indicating whether to clip the projection against the plane given by the back_plane_distance.
view_volume_sides_clipping A boolean flag indicating whether to clip the projection against the sides of the view_volume.
view_window A rectangular extent on the view plane. The draughting_model is mapped onto this planar_box, which is then mapped to the viewport of the camera_image.
planar_box A rectangular box and its location in a two-dimensional coordinate system.
name Due to no requirement defined, it is recommended to instantiate with an empty string.
size_in_x The extent in the x-axis direction.
size_in_y The extent in the y-axis direction.
placement The position and orientation of the bottom-left corner of the rectangular box.

Return to the Recommended Practices for the Presentation of GD&T.

Personal tools