Model Editor

This section covers the introduction of Model Editor and the user guide.

Introduction

The collision models of tools used in Mech-Viz should be OBJ models that are composed entirely of convex polyhedra (convex hulls). With the Model Editor, you can create convex hulls on the original tool model and convert the model file to OBJ format. Besides, you can use the Model Editor to re-create the reference frame of the tool model and export the model file to STL format.

Supported File Formats

  • Imported reference models: STP, STEP, STL, and OBJ

  • Exported reference models: STL

  • Exported convex polyhedral models: OBJ

Interface Introduction

The interface of model editor consists of the following 5 main parts.

../../_images/model_editor_interface.png

Please refer to corresponding links for detailed information.

Menu Bar

Provides functions as importing and exporting the model file, editing, and opening the user guide

Toolbar

Provides basic tools for the Model Editor

Reference Model

Displays the imported reference model files

Resource Tree

For viewing and editing geometric solids, convex hulls and center points

3D Editing Workspace

For viewing and editing models

Create Convex Polyhedral Models

The steps to convert STL models, STP models, STEP models, and illegal OBJ models to OBJ models that are composed entirely of convex polyhedra are as follows.

  1. Import the Reference Model

  2. Create the Reference Frame

  3. Create Convex Polyhedra

  4. Save the Project File

  5. Export the Model after Editing

“Create the Reference Frame” and “Create Convex Polyhedra” Demo Video:

Import the Reference Model

Supported file formats of imported reference models include STP, STEP, STL, and OBJ.

Follow either of these steps to import the reference model.

  • Click File ‣ Import Reference Model and select the reference model file in the file selection window.

  • Drag and drop the reference model file to the interface of the Model Editor.

Select the unit according to the actual dimensions of the model in the pop-up window, and click OK.

Hint

If an error message “Failed to load the model” pops up, please refer to Determine Whether the STEP/STP File Is Eligible to check the model file.

Create the Reference Frame

If the world reference frame in the Model Editor does not coincide with the actual installation reference frame of the model, you should re-create the reference frame. If the world coordinate system coincides with the reference frame of the model, you can skip this topic and continue to read the Create Convex Polyhedra.

../../_images/coordinate_system.png

You will need to set a new origin or adjust the direction of the axis to create the reference frame.

Set a New Origin

You can select the vertices on the model with a cuboid-shaped selection frame, and use these vertices as reference points to generate a “center point”, which can be set as the origin of the reference frame. You can also select a vertex of the model as the origin.

The following steps shows how to set a “center point” as the new origin.

Select the model name in the “Reference Model” panel.

Click 3D Selection Tool, adjust the cuboid-shaped selection frame to cover the vertices on the edge of the flange. Please refer to 3D Selection Tool User Guide for more information on how to use the cuboid-shaped selection frame.

The center point is generated based on the vertices of the model. Please ensure that the vertices on the part to be processed are within the selection frame.

../../_images/coordinate_system_table1.png

Click Create Center Point, and the point will be used as the origin of the reference frame.

../../_images/coordinate_system_table2.png

Click Set Frame.

Select Select center point in the Coordinate Parameters panel on the right.

Click Select on the right of Coordinate Origin.

Click the center point in the 3D editing workspace, and a reference frame with the center point as the origin will be created.

../../_images/coordinate_system_table3.png

If one of the vertices of the model you use can be used as the origin of the reference frame, please follow the steps below:

  1. Click Set Frame.

  2. Click Select on the right of Coordinate Origin in the Coordinate Parameters panel.

  3. Select a vertex of the model in the 3D editing workspace.

Hint

  • If Select center point is not selected, only the vertex of the model can be set as an origin of the reference frame and used as the reference point of axis X, Y, and Z.

  • If Select center point is selected, only the “center point” can be set as an origin and used as the reference point of axis X, Y, and Z.

  • If you wish to further adjust the directions of the axes, do not click Confirm.

Adjust the Axis Direction

If the direction of each axis of the newly-created reference frame is correct, you do not need to adjust the direction of the axis. If not, please follow the steps below to adjust the direction of each axis by using the center point or model vertex.

Unselect Select center point.

Click 3D Selection Tool and adjust the selection frame.

Click Create Center Point to create a reference center point for the Z-axis.

../../_images/coordinate_system_table4.png

Select Select center point in the Coordinate Parameters panel on the right.

Click Select on the right of Axis Z.

Click the reference center point of the Z-axis in the 3D editing workspace, and the direction of the Z-axis will be changed.

../../_images/coordinate_system_table5.png

Unselect Select center point.

Click Select on the right of Axis X.

Click the vertex on the plane where the origin is located in the 3D editing workspace, and the direction of the X-axis will be changed.

../../_images/coordinate_system_table6.png

Click Confirm.

Then the model pose will change, and the origin of the world reference frame in the Model Editor will coincide with that of the model’s actual installation reference frame.

../../_images/coordinate_system_table7.png

Create Convex Polyhedra

The collision models of tools used in Mech-Viz should be OBJ models that are composed entirely of convex polyhedra, and a convex polyhedral model should be created based on the reference model. The final convex polyhedral model should be composed entirely of convex polyhedra and reflect the shape of the original reference model as accurately as possible.

Do not use the 3D selection tool to cover the whole model to create a convex hull. It is recommended to segment the model into multiple parts according to its structure, and use the 3D selection frame to select each part and create convex hulls separately. For example, the model in the figure below can be segmented into 11 parts.

../../_images/create_convex_hull.png

The steps to create a convex polyhedral model are as follows:

  1. Select the model name in the “Reference Model” panel, and click 3D Selection Tool.

  2. Adjust the cuboid-shaped selection frame to cover the vertices on the part to be processed, and click Create Convex Hull.

  3. Repeat step 2 until all 11 parts of the model are covered by convex hulls.

  4. Click icon_display_transform on the left of the reference model name to view the convex polyhedral model.

Note

  • The convex hull or center point are generated based on the vertices of the model. Please ensure that the vertices on the part to be processed are within the selection frame.

  • For parts that cannot be accurately selected by a cuboid-shaped selection frame to create convex hulls, you can use a box or cylinder.

Save the Project File

To facilitate re-editing of the model, you can follow these steps to save the model to M3D format.

  1. Click File ‣ Save.

  2. Specify a save path and enter a file name.

  3. Click Save.

Export the Model after Editing

Follow these steps to save the edited model to OBJ format.

  1. Click File ‣ Export Convex Model.

  2. Specify a save path and enter a file name.

  3. Click Save.

3D Selection Tool User Guide

Hint

Once you select the name of the reference model, click icon_display_transform will hide the model only and the vertices of the model will still be displayed.

Click 3D Selection Tool, and the cuboid-shaped selection frame can be used to select the vertices on the model. You can use either of the following methods to adjust the dimensions and position of the cuboid-shaped selection frame.

  • Adjust in the 3D editing workspace

    • While pressing and holding the Ctrl key, click and hold the left button on the mouse and drag the vertex of the selection frame to adjust its dimensions.

    • While pressing and holding the Ctrl key, click and hold the left button on the mouse and drag the surface of the selection frame to adjust its position.

  • Adjust in the 3D Selection Tool panel on the right

    • Adjust the Dimensions parameters to adjust the dimensions of the selection frame.

    • Adjust the Center and Rotation parameters to adjust the position of the selection frame.

../../_images/select_and_noselect.png

1 Selected model vertices; 2 Unselected model vertices

Create a Box or Cylinder

Besides using the 3D selection tool to create convex hulls, you can also create cuboids or cylinders to cover parts of the model.

Follow these steps to create a box. (The steps to create a cylinder are similar.)

  1. Click Create Box.

  2. Name the object in the pop-up window, and roughly modify the dimensions of the object, and then click OK.

  3. By default, the center of the newly created box coincides with the origin of the reference frame in the 3D editing workspace. While pressing and holding the Ctrl key, click and hold the left button on the mouse and drag the dragger to move the box to the part to be covered.

  4. Double-click the cuboid model, adjust the dimensions and position in the Convex Object Configuration window to make the frame cover the part as accurately as possible.

../../_images/build_cuboid_cylinder.png

Convert the Display Model File to STL Format

Convert the model file in STP or STEP formats to STL format that is supported by the software.

  1. Follow either of these steps to import the model to be processed.

    • Click File ‣ Import Reference Model and select the reference model file in the file selection window.

    • Drag and drop the reference model file to the interface of the Model Editor.

  2. Click File ‣ Export Reference Model.

  3. In the Export Model window, specify a save path and enter a file name, and then click Save.

Once the model is exported successfully, you can add the model to Resources ‣ Model library. Then you can set it as a visualization model for a tool in Resources ‣Tools, or set it as a visualization model for a scene object in Resources ‣ Scene objects.