How to prepare and import SOLIDWORKS Parts and Assemblies

We use the CAD-Line dialog-box | Solids tab to import SOLIDWORKS Part and Assembly documents.


Information-24

The correct Type-Library file must be in the MechDesigner installation directory before you can import documents from SOLIDWORKS.

In MD14 and later, the Type-Library installs automatically. If you install or use a different SOLIDWORKS release, when you restart, the correct Type-Library is installed again.

To check that the Type-Library is correct for the SOLIDWORKS release you want to use: see Help menu > About > Type Library tab.

Coordinate Systems in SOLIDWORKS and MechDesigner

This CAD-Line is automatically added with the Added-Part.

This CAD-Line is automatically added with the Added-Part.

COORDINATE-SYSTEM IN MECHDESIGNER

CAD-Lines

There is one CAD-Line along the centre of each Added-Part.

Add more Cad-Lines to all Parts with the Part-Editor.

ALL CAD-Lines have a Coordinate-System

Origin: start-Point of the CAD-Line
+X–axis: from start-Point to end-Point
+Y–axis: +90º (CCW) from +X–axis, on the Mechanism Plane
+Z–axis: perpendicular() to the Mechanism Plane.

The image above shows the default CAD-Line in an Added-Part. The image shows the Origin and the XY-Plane: the X-axis from its start-Point to its end-Point.

SOLIDWORKS CAD model prepared for import to MechDesigner

SOLIDWORKS CAD model prepared for import to MechDesigner

COORDINATE-SYSTEM IN SOLIDWORKS

The image shows the SOLIDWORKS CAD model prepared with a Coordinate System.

The steps I do to add a Coordinate System to the SolidWorks model are usually:

1.Add a new PlaneRed-14-1b

SOLIDWORKS > Insert menu > Reference Geometry > Reference Plane

It becomes the XY-Plane of the new Coordinate System. it will be coplanar with the Mechanism-Plane in MechDesigner.

2.Add a new SketchRed-14-2 to the new PlaneRed-14-1b:

Add two perpendicular(⊥) construction lines, with their intersection to coincide with the start-Point of the CAD-Line.

3.Close the sketch
The lines become the +X-axis and +Y–axis of the Coordinate System.
The intersection of the lines becomes the Origin of the Coordinate System.
The perpendicular(⊥) to the Plane becomes the +Z–axis of the Coordinate System - using the Right-Hand Rule for Coordinate Systems.
Add Coordinate Syastem dialog in SOLIDWORKS

Add Coordinate Syastem dialog in SOLIDWORKS

4.Add the Coordinate SystemRed-14-3

SOLIDWORKS > Insert menu > Reference Geometry > Coordinate System

a.Click the point at the intersection of the lines as the Origin
b.Click the construction line that is the +X-axis
c.Click the construction line that is the +Y–axis.

The +Z–axis automatically becomes normal to the Plane defined by the +X and +Y–axes and the Right-Hand-Rule.

The +Z–axis is towards you, the same direction as the +Z–axis direction of the CAD-Line in MechDesigner.


Procedures to Import SOLIDWORKS Documents

SOLIDWORKS: Add a Coordinate System to the SOLIDWORKS document.

To give me flexibility, I add a Plane, a sketch to the Plane, and the Coordinate System to the sketch.

STEP 1: SOLIDWORKS > Insert menu > Reference Geometry > Reference Plane (most frequently, offset the Plane to be parallel or coplanar to the Front, Top, or Right Plane).
STEP 2: SOLIDWORKS > Tools menu > Sketch Entities > Line (Construction Lines)
STEP 3: SOLIDWORKS > Insert menu > Add Reference Geometry menu > Reference Coordinate System

Selections:

Origin: the intersection of the construction lines
+X-axis & +Y-axis: the constructions lines.
+Z-axis: to be towards you in the MechDesigner model.

MechDesigner:

STEP 1: Visibility toolbar > Show model in Mechanism to see the imported SOLIDWORKS document in the Mechanism-Editor.
STEP 2: Edit the CAD-Line to import the SOLIDWORKS document
STEP 3: In the CAD-Line dialog-box:
1.Click the SOLIDWORKS tab, and Model Import from SOLIDWORKS and the Display Options separators to show their parameters and buttons.
2.Click the Read button - the middle button at the top of the Model Import from SolidWorks

Wait until the SOLIDWORKS Document, Configuration and Coordinate System names show in the dialog data boxes.

3.Click the Import Model button  - the right of two buttons at the bottom of the Model Import from SolidWorks

Wait until the Number-of-Vertices > 0 in the Display Options separator.

STEP 4: Click the 'Rename CAD-Line' button - left of the Import Model button - to rename the CAD-Line to the same as the SOLIDWORKS document file-name.
STEP 5: Click the Colour button to select a colour for the Solid
STEP 6: Does the Solid show 'ghost Lines? See below
STEP 7: Is the Number-of-Vertices number too high? See below

If the sub-assembly has many parts and features that you do not need to see in the MechDesigner model  - for example washers, screws... - then in SOLIDWORKS, create a new Configuration.

In the new SOLIDWORKS configuration, suppress parts and features that you do not need to see. Also, replace fillet with chamfer features from parts.

SOLIDWORKS®:

1.Make active the configuration in which you have suppressed parts and features.
2.Add a Plane and Coordinate System, ... - see Procedure 1: above

MechDesigner

See Procedure 1 above

To import more than one SOLIDWORKS document onto a MechDesigner Part, you must add more CAD-Lines to the Part with the Part-Editor.

We want to add a Coordinate System to each SOLIDWORKS Part, that are all coincident with each other. We want the Coordinate Systems to align with the Start-Point and CAD-Line in the Part in MechDesigner.

PREPARATION

SOLIDWORKS: we want each Coordinate-System in each Part to be coincident

1.At the top level of the assembly: add a Plane. We can call this the Master Plane. Move it to the top of the Assembly Feature-Manager, if possible.

In the assembly, Edit Parts in Context  - that is, do not leave the SolidWorks assembly to edit each Part.

2.Edit Part A in Context:
a.Add Plane, and make it coplanar with the Master Plane
b.Add a sketch to the new Plane, and then add the Coordinate System.
c. Close Edit Part in Context
3.Do 2 for each Part in the Assembly - ALL COORDINATE SYSTEMS SHOULD BE COINCIDENT.

MechDesigner:

4.Add a number of CAD-Lines to one MechDesigner Part equal to the number of documents/parts you will import from SOLIDWORKS
5.Make the start-Point of all CAD-Lines coincident with the origin of the Part, and make each CAD-Line collinear with its X-axis.

IMPORT EACH PART:

SOLIDWORKS:

1.Open a SOLIDWORKS Part.

The Plane, sketch and Coordinate-System should be a feature of the Part and open with the Part.

MechDesigner:

2.Make sure the correct part is the active document in SOLIDWORKS.
3.Edit each CAD-Line: and import the SOLIDWORKS Part.
4.Rename each CAD-Line to the same as each SOLIDWORKS Part.

Do 1-4 for each Part you want to import.

In this case, we need to make the XY-Plane of each Coordinate-System to be coplanar with each other. Their Origins and X-axes do not need to be coincident as they will be imported on to different MechDesigner Parts.

Again, we use a Master-Plane in the SOLIDWORKS document.

In SOLIDWORKS

1.At the top level of the assembly: add a Plane. We can call this the Master Plane. Move it to the top of the Assembly Feature-Manager, if possible.

In the assembly, Edit Parts in Context  - that is, do not leave the SolidWorks assembly to edit each Part.

2.Edit Part A in Context:
a.Add Plane, and make it coplanar with the Master Plane

Do 2 for each SOLIDWORKS part you want to import to MechDesigner.

3.Open each Part
a.Add a sketch to the Plane in each Part, and then a Coordinate System.
b.Make sure each sketch and Coordinate System aligns with the CAD-Line in each MechDesigner Part.

Do 3 for each part you want to import.


In MechDesigner:

1.Make sure the correct part is the active document in SOLIDWORKS.
2.Edit each CAD-Line: and import the SOLIDWORKS Part.
3.Rename each CAD-Line to the same as each SOLIDWORKS Part.

Do 1-3 with each CAD-Line and SOLIDWORKS® Part.

btn_delkeyword Import STL Files directly

When do you need to import STL file-types?

When you do not have SolidWorks.
You can save as STL file-type in your CAD software.

Notes: in your CAD software:

Save as a STL file in the Binary Format and set the units to SI meters
The STL file-type does not use a Coordinate System.

Thus, before you save the STL file:

oMove the original CAD part so that its Origin, +X–axis, and +Y–axis coincide with the Origin,  +X-axis, and +Y–axis of the CAD-Line in MechDesigner.
oMove the original CAD part along the Z-Axis, to move it relative to the Mechanism-Plane in MechDesigner.

Note: It is possible to move the STL part in the X, Y, Z-axis directions, but not rotate the model - see below

Dialog-CADLine-SW-STL

CAD-EdgeLine

To import an STL file onto the CAD-Line:

CAD-Line dialog > SolidWorks tab > STL file import separator:

1.Click the Browse button
2.Select an STL file (Binary)
3.Click the Import STL File Button:

Look at the model in MechDesigner.

Edge Angle Limit parameter and STL files.

We use the Edge Angle Limit parameter to remove 'ghost edges' from facets in the STL file.

If the angle between a facet in the STL file is less than the Edge Angle Limit parameter, then we do not show an 'edge'.

The Edge-Angle-Limit parameter value is a function of the Linear Deviation and Angular Deviation parameters in the 'Model Import from SOLIDWORKS' separator.

Magic Number for Edge Angle Limit to removed unwanted edges from facets.

Enter Edge-Angle Limit = Angular Deviation (Actual Value) * pi / 2


Compare the top image, to the left, with the bottom image.

CAD-EdgeLine-NoEdges

btn_delkeywordNOTES: STL Vertices and File Size

Note: The number-of-vertices is not a function of the physical size of the CAD model. It is a function of the complexity of the CAD part and the Angular-Deviation and Chordal-Deviation parameters (see below).

Complex STL files (with too many Vertices) make MechDesigner less responsive. Thus, it is helpful to understand how to control the size of the STL files.


STL files render the surfaces of CAD models as a mesh of triangles, in a process called 'tessellation'. The number of triangles determine the accuracy of the STL file when compared to the original free-form CAD model.

The complexity of the original model and its tessellation accuracy determines the STL file size and ultimately how responsive is MechDesigner.

When you import many STL files, or the files are complex, or both, then MechDesigner can become less responsive.

You can employ two strategies to reduce the STL file size and keep MechDesigner is responsive.

Reduce the Complexity of the Original CAD Model

Model designs containing 'holes', 'gaps' and 'whiskers' adversely affect the quality of the model. Therefore, you should perform a geometry check of the model files before saving to STL.

Reduce STL file size, create a new configuration of the model in your CAD. In the new configuration:

Delete, or suspend, small fillets, especially if they do not have a real function.
Replace fillets with chamfers, if possible.
Remove all fasteners
Delete fastener holes and hole features.
Remove cosmetic details.

Reduce the accuracy of the STL file in MechDesigner.

We instruct SolidWorks to save the model as an STL file, which we then import.

We use two parameters in MechDesigner to control the accuracy and thus size, of the STL file.

These two parameters are in the Import from SolidWorks separator:

Chordal Deviation:

 

The maximum distance between the surface of the original CAD model and the tessellated surface of the STL triangle.

Maximum Chordal Deviation is 0.5mm.

Angle Deviation:

 

The angular deviation allowed between adjacent triangles.

This setting enables you to increase tessellation for surfaces with small radii.

Maximum Angular Deviation is 30º.

If you save the model as an STL file from other CAD, then look for Angular, Linear or Chordal Deviation parameters, or similar options, before you save the STL file.

btn_delkeywordTrouble-shooting: Active Document does not show in MechDesigner

Occasionally a Part, and more often an Assembly, does not import or show in MechDesigner:

In SOLIDWORKS Parts

Make sure there are not any:

small/tiny, but real, gaps between parts
small parts with complex details - for example, a set-screw.

In the MechDesigner CAD-Line dialog-box and SOLIDWORKS tab

1.Change the File-Quality to Custom, and edit the Linear-Parameter and Angular-Deviation parameters.
2.Re-import.

Experiment with the Linear Parameter and Angular Deviation parameters to import a Solid with 'fine' details, or with 'coarse' details.

Tutorials and Reference Help Files for MechDesigner and MotionDesigner 14.2 + © Machine, Cam, Mechanism, and Motion Design Software by PSMotion Ltd