Working with CAD objects

Starting from version 15, you can work with CAD objects in Artec Studio. You can both create CAD primitives and then export them into CAD files or import CAD objects designed in external applications. This allows you to:

  • Modify and design new parts for existing objects.

  • Reverse engineer scanned objects.

  • Ensure quality control by comparing scanned objects to their CAD models.

Constructing CAD Primitives

CAD primitives are constructed on the basis of polygonal meshes (models) and then are fit into the latter.

CAD workflow

Figure 128 From left to right: original object, scanned model, a set of constructed primitives.

At present it is possible to construct the following types of primitives:

  • Cylinder,

  • Cone/Truncated cone,

  • Sphere,

  • Plane,

  • Torus,

  • Freeform patch.

A torus is a donut-like figure, which is determined by the radii of its outer and inner circumferences: major and minor radii, respectively.

A freeform patch can be thought of as a sheet of paper that you wrap around the portion of the object’s surface. The freeform patch can be used for complicated surfaces that are not covered by usual types of primitives, such as surfaces of organic objects, for example. The following parameters are required for constructing a freeform patch:

  • Padding — the percentage by which the selected surface area is expanded before building the patch.

  • Number of points — the number of control points (patch mesh nodes) on each axis of the patch.

  • Order — the order of splines used for building the patch.

Note

The more points and the higher the order of splines, the more detailed surface curvature and the closer fit to your model you can get. However, you need to keep in mind that increasing the number of points and the order of splines requires more CPU time for fitting the primitive.

To construct a CAD primitive, follow these steps:

  1. Load a polygonal model in which you will fit the CAD primitive.

  2. Open the Construct panel.

  3. Select one of the available primitive types you want to construct (in the example below it is Cylinder).

  4. Choose Selection type and specify the required area on the model:

    • 2D brush and 3D brush slightly differ in how they work: the former is circlular and marks the model surface on the basis of the current viewpoint, whereas the latter is sphere-shaped and selects the surface that falls inside that sphere. Use the Brush size slider to change the brush size.

    • Lasso allows you to specify a polygon on the surface of the model by clicking the vertices of that polygon. A surface is selected that falls inside it.

    • Lasso and 2D brush allows you to select the model’s backface using the Select through checkbox.

    • Segment is the most convenient of the selection tools. It automatically expands the area you mark with your brush and shows you the result. Thus, you can evaluate which of the regular primitives Artec Studio identified. This selection tool has two settings available: the Brush size slider to adjust the size of your brush and the Segmentation sensitivity slider to adjust the degree of expansion of the area marked with your brush (the higher the sensitivity, the more Artec Studio will expand the marked area).

    Note

    The Segment option is not recommended for the Freeform CAD primitive or for simplified models (models with fewer polygons).

    To select an area on the model, use Ctrl+LMB above the model surface.

    To clear the current selection partially, use Ctrl+Alt+LMB above the selected area.

    Working with 3D brush.

    Figure 129 Construct panel: specifying region using the 3D brush.

    Use the Invert button to invert selections, and also use the Deselect button to reset all the selections you made.

  5. Once the required area has been selected, choose a Fitting mode:

    • Expanding is the fastest one, it allows selecting only portion of the surface where to fit the future primitive.

    • Robust is the optimal one, it is tolerant to extraneous selections.

    • Exact works exactly with the selected region.

    Note

    It is not recommended to use the Expanding mode with the Segment selection tool as their implementing algorithms contradict to each other.

  6. Click the required primitive icon on the Primitive type bar.

  7. If the selected primitive (cylinder or truncated cone) should fit into a hole of a given depth, such as a hole in a plate, then check the Smart height evaluation option. In this case, Artec Studio will use an algorithm that provides a more accurate fitting of the primitive to the model.

  8. If necessary, specify the desired parameters of the primitive to be created:

    • For a cylinder or sphere — its radius

    • For a cone — its angle

    • For a torus — its major and minor radii (find the description above in this section)

    • For a freeform patch — padding, number of points, and order (find the description above in this section)

  9. Click Fit cylinder button (or Fit sphere, etc.) to confirm your choice. Artec Studio will create a CAD primitive and fit it into the selected area.

    Constructed cylinder.

    Figure 130 Cylinder (blue) fit into the model.

CAD Primitive Properties

To see the properties of the created CAD primitive, do the following:

  1. Click the name or the icon of the primitive in the Workspace panel.

  2. At the bottom of the Workspace panel, click the Properties section to expand it.

The presence of certain geometric parameters in the Properties section will depend on the type of the selected CAD primitive (see table below).

Table 15 Presence of geometric parameters in the Properties section for different CAD primitives.

Primitive

Radius

Height

Angle

Cylinder

Yes

Yes

No

Truncated cone/Cone

Yes (large and small radii)

Yes

Yes

Sphere

Yes

No

No

Torus

Yes (major and minor radii)

No

No

For the freeform primitives the Properties section displays:

  • U and V points count — the number of nodes along the axes of the primitive

  • U and V order — the order of splines used for constructing the primitive

Setting constraints for CAD primitives

After creating CAD primitives, you can adjust their size and relative position by applying various constraints to them. Artec Studio supports the following kinds of constraints: conditions (they are set for one primitive) and relations (they are set for two or more primitives). Below see the table of available constraint types.

Table 16 Constraint types for primitives.

Icon

Kind of constraint

This constraint …

Applicable to …

parallel_icon

Relation

requires the axes (or normals) of the selected primitives to be parallel

cylinder, cone, plane, torus

perpend_icon

Relation

requires the axes (or normals) of the selected primitives to be perpendicular

cylinder, cone, plane, torus

angle_icon

Relation

sets a given angle between the axes (or normals) of the selected primitives

cylinder, cone, plane, torus

coaxial_icon

Relation

requires the selected primitives to be coaxial

all types of primitives except freeform

length_icon

Condition

sets a given value for one of the sizes of the selected primitive, for example, cylinder radius/height, torus minor/major radius, etc.

cylinder, cone, sphere, torus

equality_icon

Relation

requires the selected sizes of the selected primitives to be equal

cylinder, cone, sphere, torus

lock_icon

Condition

prohibits changes to the primitive during the Refit operation

all types of primitives except freeform

Note

Freeform primitive does not support any constraints.

You can set several different constraints for each primitive. There is no limit to the number of constraints.

Applying constraints to CAD primitives consists of two stages. First, you specify the desired constraints, and on the second stage, you force Artec Studio to rebuild the primitives to meet the constraints you set (the refitting process).

Important

Artec Studio does not keep a history of the constraints you specify. Therefore, they are only “alive” and are available for editing and for the refitting process from the moment when you have built the primitives until the moment when you close the Construct panel.

You should also keep in mind that if the primitive for which the constraints are set is deleted and then restored (using the Undo or Redo button), then the previously set constraints will not be restored.

To specify and apply constraints to CAD primitives, follow these steps:

  1. Open the Construct panel and create the CAD primitives you need (see Constructing CAD Primitives for details).

  2. Click the desired primitive. The Constrain pop-up toolbar appears with icons for the applicable constraint types (see an example of such a toolbar for the case of a cylinder in Figure 131, a and Figure 132, a).

  3. Click the icon of the desired constraint type.

  4. Perform the appropriate actions depending on the constraint type you selected:

    • For lock_button (lock), no actions are required.

    • For length_button (set length), click one of the icons of primitive sizes on an additional pop-up tool bar if it appears (see an example in Figure 131, b). Specify the desired primitive size value and click set_constraint on the appropriate pop-up toolbar (see Figure 131, c).

    • For parallel_button (parallel to …), perpend_button (perpendicular to …), angle_button (at angle to …), and coaxial_button (coaxial to …), click all other primitives to be involved into the new relation (see an example in Figure 132, b). When done, click set_constraint on the appropriate pop-up toolbar (see Figure 132, c).

    • For equality_button (equal to …), select one of the primitive sizes on an additional pop-up toolbar (it appears if two or more sizes are available). Then click the second primitive and select one of its sizes. To establish an equality relationship between the two selected sizes, click set_constraint on the appropriate pop-up toolbar.

    The corresponding constraint icon will be displayed next to each primitive participating in the constraint but no changes to the size or position of the primitives will occur at this point (see examples in Figure 131, d and Figure 132, d). A pop-up toolbar with the Refit button will appear at the top of the 3D View window.

Example for specifying CAD primitive constraints: setting the raduis of a cylinder

Figure 131 Example for specifying CAD primitive constraints: setting the height of a cylinder.

Example for specifying CAD primitive constraints: setting the requirement that the axes of two primitives are at a given angle to each other

Figure 132 Example for specifying CAD primitive constraints: setting the requirement that the axes of two primitives are at a given angle to each other.

  1. Repeat steps 2 to 4 to add more constraints if required.

  2. Before proceeding to the next step, you can click the icon of any constraint and make the necessary changes or remove it by clicking remove_constraint on the constraint’s pop-up toolbar.

  3. To apply the newly added constraints to the CAD primitives, click the Refit button on the panel at the top of the 3D View window.

The primitives will be rebuilt to satisfy the specified constraints. Figure 133, b presents the result of applying both constraints illustrated in Figure 131 and Figure 132.

Example for applying CAD primitive constraints

Figure 133 Example for applying CAD primitive constraints.

Note

If the constraints are applied successfully, the symbols in their icons remain yellow, otherwise—the symbols turn red.

  1. If red constraint icons appear as the result of step 7, follow step 6 to change or remove such incompatible constraints, and then repeat step 7 if necessary.

Note

The Refit primitives command triggered by the Refit button is recorded in History and can be undone or redone (for example, using the Undo and Redo buttons).

To add more constraints, repeat the above procedure (steps 1 to 8) before closing the Construct panel.

To change the constraints applied to your CAD primitives, perform steps 6 to 8 of the above procedure before closing the Construct panel.

To cancel all constraints applied the last time you used the Refit button, follow these steps:

  1. Before closing the Construct panel, remove each constraint by clicking the constraint icon and then remove_constraint on the constraint pop-up toolbar.

  2. Click the Undo button.

Ambiguity of some constraints

For some relations, the result of applying the constraint is ambiguous. For example, the condition that the axis of one primitive is directed at an angle to the axis of another one is not enough to determine the direction of the axes. This problem has an infinite number of solutions. In this case, Artec Studio will choose one of the solutions. For the solution to be unambiguous, additional constraints must be used.

Let us explain this with the following example. Suppose we have two primitives: a cylinder and a plane (see Figure 134, a), and we would like to adjust the position of the plane so that its normal becomes perpendicular to the axis of the cylinder. For this, we specify and apply the corresponding constraint (perpend_button). The result obtained after refitting the primitives is shown in Figure 134, b. It is correct, but not what we expected. To get the desired result, we need to set an additional constraint, for example, we can lock the cylinder for changes (see the corresponding result in Figure 134, c).

Example of ambiguous CAD primitive constraints

Figure 134 Example of ambiguous CAD primitive constraints.

Positioning CAD Primitives

The Precise positioning mode benefits from the presence of parametric data in the scene. Use the Precise mode to quickly and accurately position CAD primitives, and thus scans and models to which they belong.

  1. In the Workspace panel, select the models and primitives you want to align.

  2. Open EditorPrecise positioning.

  3. In the Primitives box, select the CAD primitive you intend to position. Below the Primitives box you will see the available positioning options (see Table 17 for details), which appear as buttons and vary with the type of the selected primitive.

    Note

    Freeform is not available for precise positioning.

  4. If some other objects belong to the parent group of the selected primitive and you want to apply the same positioning actions to them, check Apply to all objects in parent groups.

  5. Click either of the self-explanatory positioning buttons. Artec Studio will position the primitive in accordance with the selected option and disable this button. You will see the alignment information in the Primitives box next to the name of the selected primitive.

Every positioning action is recorded in the local history, so you can undo or redo it:

  • To undo an action, use EditUndo or Ctrl+Z.

  • To redo an action, use EditRedo or Ctrl+Y.

Aligned CAD primitive is highlighted

Figure 135 Editor → Precise positioning: the aligned CAD primitive is highlighted.

Table 17 Actions for primitives.

Button

Purpose

Status

Move to origin

Place the selected primitive’s point to the coordinate origin. For details, see Primitives’ Points To Use for Positioning.

O

Align with X/Y/Z

Align the primitive with the respective axis.

X, Y or Z

Align with YOZ/XOZ/XOY

Align the plane primitive with the respective coordinate plane.

YOZ, XOZ or XOY

Any

CAD primitive that you first align with any coordinate axis or plane is considered primary. A primary object will be given a priority when conflicting alignments occur.

P

Make primary

Make another object primary and remove this status from the current primary one

Reset origin

Undo the Move to origin action.

Invert direction

Invert direction of the axis or plane in the applied alignment

I

Reset alignment

Reset all the positioning actions applied to the primitive

Note

The Precise positioning tool does not affect objects with the Locked position status (anchor). See Locking Object’s Reposition for details.

Primitives’ Points To Use for Positioning

Depending on the type of a CAD primitive, you can use the following points in the Move to origin action.

Table 18 Primitives’ points to use in the Move to origin action.

Type of primitive

Points for positioning

Cylinder

3 points: the center of the cylinder and the intersections of the cylinder axis with its bases

Plane

The center of the plane

Sphere

The center of the sphere

Cone

3 points: the cone vertex, the middle of the cone axis, and the intersection of the axis of the cone with its base

Truncated cone

3 points: the middle of the cone axis and the intersections of the axis of the cone with its bases

Torus

3 points: the center of the torus and the intersections of the axis of the torus with the sides of the box into which it is inscribed

To select the center of a primitive for using in the Move to origin action, click the primitive or select it in the Primitives box. The selected point and the outline of the primitive will be highlighted in white (Figure 136, left).

When you hover the cursor over the primitive’s axis, other points for positioning will appear on it. To select any of the possible positioning points, click on it. The selected point will be highlighted in white (Figure 136, right).

Positioning points

Figure 136 Selecting a point for positioning.

Working with Imported CAD Models

Imported CAD models can be aligned or compared with polygon models (fusion operation outputs).

Alignment

When aligning CAD models with polygon models, don’t use Nonrigid alignment and employ many point pairs (5–6 pairs). Consult Manual Rigid Alignment with Points and Specifying Points and Editing Their Positions for details.