Parallel Mate in SolidWorks: Definition and Usage
Parallel Mate is a constraint that forces two selected faces, edges, or planes to remain parallel to each other. It ensures that the components maintain a consistent orientation without touching or aligning directly. This mate is useful for controlling the relative angles between parts in an assembly.How It Works
A Parallel Mate in SolidWorks works by locking the orientation of two components so that their selected faces, edges, or planes stay parallel. Imagine two books lying on a table side by side but never touching; they always face the same direction without tilting towards or away from each other. This mate keeps the parts aligned like that, regardless of their distance.
It does not fix the distance or position between the parts, only their angle. So, the parts can move closer or farther but will never rotate to become non-parallel. This is helpful when you want parts to move freely but keep a consistent orientation, like two parallel rails or panels.
Example
This example shows how to create a parallel mate between two planes in a SolidWorks assembly using the API.
Dim swApp As Object
Dim swModel As Object
Dim swAssembly As Object
Dim swMate As Object
Sub CreateParallelMate()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swAssembly = swModel
' Select first plane
swModel.Extension.SelectByID2 "Plane1", "PLANE", 0, 0, 0, False, 0, Nothing, 0
' Select second plane
swModel.Extension.SelectByID2 "Plane2", "PLANE", 0, 0, 0, True, 0, Nothing, 0
' Add parallel mate
Const swMateParallel As Integer = 4
Set swMate = swAssembly.AddMate3(swMateParallel, 0, 0, 0, 0, 0, 0, False, False, 0, 0, 0, 0, 0)
If Not swMate Is Nothing Then
MsgBox "Parallel mate created successfully."
Else
MsgBox "Failed to create parallel mate."
End If
End SubWhen to Use
Use a Parallel Mate when you want two parts to keep the same orientation but allow movement along or away from each other. For example:
- Keeping two rails parallel in a sliding mechanism.
- Ensuring panels or walls stay aligned in architectural assemblies.
- Maintaining parallelism between shafts or rods that must rotate but not tilt.
This mate is ideal when angle control is needed without fixing position or contact.
Key Points
- Parallel Mate keeps two faces, edges, or planes parallel in an assembly.
- It controls orientation but not distance or position.
- Useful for parts that move but must stay aligned.
- Can be created manually or via SolidWorks API.