Hide Table of Contents
IMatchedBoolean4 Method (IBody2)

Performs a matched boolean on the specified bodies and supports an optional list of faces that match exactly.

.NET Syntax

Visual Basic (Declaration) 
Function IMatchedBoolean4( _
   ByVal OperationType As System.Integer, _
   ByVal ToolBodyCount As System.Integer, _
   ByRef ToolBodyArr As Body2, _
   ByVal NumOfMatchingFaces As System.Integer, _
   ByRef FaceList1 As Face2, _
   ByRef FaceList2 As Face2, _
   ByVal MatchingTolerance As System.Double, _
   ByRef ErrorCode As System.Integer _
) As EnumBodies2
Visual Basic (Usage) 
Dim instance As IBody2
Dim OperationType As System.Integer
Dim ToolBodyCount As System.Integer
Dim ToolBodyArr As Body2
Dim NumOfMatchingFaces As System.Integer
Dim FaceList1 As Face2
Dim FaceList2 As Face2
Dim MatchingTolerance As System.Double
Dim ErrorCode As System.Integer
Dim value As EnumBodies2
value = instance.IMatchedBoolean4(OperationType, ToolBodyCount, ToolBodyArr, NumOfMatchingFaces, FaceList1, FaceList2, MatchingTolerance, ErrorCode)
EnumBodies2 IMatchedBoolean4( 
   System.int OperationType,
   System.int ToolBodyCount,
   ref Body2 ToolBodyArr,
   System.int NumOfMatchingFaces,
   ref Face2 FaceList1,
   ref Face2 FaceList2,
   System.double MatchingTolerance,
   out System.int ErrorCode
EnumBodies2^ IMatchedBoolean4( 
&   System.int OperationType,
&   System.int ToolBodyCount,
&   Body2^% ToolBodyArr,
&   System.int NumOfMatchingFaces,
&   Face2^% FaceList1,
&   Face2^% FaceList2,
&   System.double MatchingTolerance,
&   [Out] System.int ErrorCode



One of the following operation types:





Number of bodies


Array of bodies of size toolBodyCount


Number of matching faces


First face list (see Remarks)


Second face list  (see Remarks)

Tolerance to use to check matching faces

Error indicated as defined in swBodyOperationError_e


The concept of match means that the caller tells the boolean operator beforehand which faces can be considered to coincide. Basically the caller performs part of the boolean operation.

Sometimes the application knows that two faces match because of the way the bodies are constructed; i.e., the application knows which faces are intended to match.

Having a list of matching face pairs may allow the matched boolean operator to resolve other geometric operations that otherwise it would not be able to work out. In general, providing matched faces speeds up the boolean operation and makes results more reliable.

The arguments FaceList1 and FaceList2 arguments can be empty lists. If matching face pairs are passed in, these faces must match such that:

  • the surface geometry is coinciding.

  •  for each edge in a face, there is an edge in the other face that coincides.

If MatchingTolerance is less than 1.0e-8 or 0.0, then a default tolerance of 2.0e-6 is used. You decide the tolerance value based on the similarities and subtle differences between the two bodies.

This method supports multibody parts.


See Also


SOLIDWORKS 2008 SP1, Revision Number 16.1

Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

Subject:   Feedback on Help Topics
Page:   IMatchedBoolean4 Method (IBody2)
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:


We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again

Web Help Content Version: API Help (English only) 2017 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.