Part JoinConnect

Description
Connect tool connects interiors of two walled objects (e.g., pipes).

How to use

 * 1) Select two objects to be connected. The order of selection is not important, since the action of the tool is symmetric. It is enough to select one sub-shape of each object (e.g., faces).
 * 2) Invoke the Part_JoinConnect command.

A PartJoinFeature object is created, with Mode set to 'Connect'. Original objects are hidden, and the result of conecting is shown in 3D view.

Properties

 * : Reference to base object (one of the objects to be connected). The object should be a single solid.
 * : Reference to tool object (the other of the objects to be connected). The object should be a single solid.
 * : The mode of operation, equals 'Connect' (Changing that will transform the tool into another Part_JoinXXX). The value of 'bypass' can be used to temporarily disable the long computations (a compound of Base and Tool will be created, which is a fast operation).
 * : Sets whether to apply Refine operation or not, to the final shape. The default value is determined by a 'Automatically refine shape after boolean operation' checkbox in PartDesign preferences. When Mode property is 'bypass', Refine is ignored (never applied).

Example

 * 1) Create a pipe by applying thickness to a cylinder: [[image:JoinFeatures_Example_step1.png|320px]]
 * 2) Create another, smaller diameter pipe, and place it so that it pierces the wall of the first pipe: [[image:JoinFeatures_Example_step2.png|320px]]
 * 3) Select the first pipe, then the second pipe (order of selection is important), and click the 'Connect object' option from the Join tools dropdown toolbar button. [[image:JoinFeatures_Example_step3_Connect.png|320px]]
 * 4) Use some cross-section tool (Clipping plane, Arch Section Plane, Arch Cut Plane) to reveal internals. On the picture below, Arch Section Plane is used. [[image:JoinFeatures_Example_step4_Connect.png|320px]]

Algorithm
The algorithms behind Join tools is quite simple, and understanding it is important to use it correctly. The algorithm of Connect, in particular, is quite a bit more complex, but it's generally enough to think of it as a symmetric variant of Embed algorithm

1. Base object is boolean-cut with Tool object.

The resulting shape is a set (compound) of non-intersecting solids (typically, two).

2. The resulting compound is filtered: only the largest solid is kept.

3. Tool object is boolean-cut with Base object.

4. The resulting compound is filtered: only the largest solid is kept.

5. Boolean-common is computed between Base and Tool

6. Results of 2, 4 and 5 are fused together.

7. If Refine property is true, the resulting shape is refined.

Scripting
The Join tools can by used in macros and from the python console by using the following function: JoinFeatures.makePartJoinFeature(name = 'Connect', mode = 'Connect')
 * Creates an empty Connect feature (or other Join feature, depending on mode passed). The properties Base and Tool must be assigned explicitly, afterwards.
 * Returns the newly created object.

Example:

The tool itself is implemented in Python, see /Mod/Part/JoinFeatures.py under where FreeCAD is installed.

Version
The tool was introduced in FreeCAD v0.16.5069