Part JoinEmbed: Difference between revisions

From FreeCAD Documentation
(width of picture)
(→‎Example: fix pictures)
Line 24: Line 24:


==Example==
==Example==
# Create a pipe by applying [[Part_Thickness|thickness]] to a [[Part_Cylinder|cylinder]]:[[image:JoinFeatures_Example_step1.png]]
# Create a pipe by applying [[Part_Thickness|thickness]] to a [[Part_Cylinder|cylinder]]: <br>[[image:JoinFeatures_Example_step1.png|320px]]
# Create another, smaller diameter pipe, and [[Placement|place]] it so that it pierces the wall of the first pipe:[[image:JoinFeatures_Example_step2.png]]
# Create another, smaller diameter pipe, and [[Placement|place]] it so that it pierces the wall of the first pipe: <br>[[image:JoinFeatures_Example_step2.png|320px]]
# Select the first pipe, then the second pipe (order of selection is important), and click the 'Embed object' option from the Join tools dropdown toolbar button.[[image:JoinFeatures_Example_step3_Embed.png]]
# Select the first pipe, then the second pipe (order of selection is important), and click the 'Embed object' option from the Join tools dropdown toolbar button. <br>[[image:JoinFeatures_Example_step3_Embed.png|320px]]
# Use some cross-section tool ([[Std_ClippingPlane|Clipping plane]], [[Arch_SectionPlane|Arch Section Plane]], [[Arch_CutPlane|Arch Cut Plane]]) to reveal internals. [[image:JoinFeatures_Example_step4_Embed.png]]
# Use some cross-section tool ([[Std_ClippingPlane|Clipping plane]], [[Arch_SectionPlane|Arch Section Plane]], [[Arch_CutPlane|Arch Cut Plane]]) to reveal internals. On the picture below, Arch Section Plane is used.<br>[[image:JoinFeatures_Example_step4_Embed.png|320px]]


==Algorithm==
==Algorithm==

Revision as of 20:28, 4 June 2015

Under construction!!

Part_JoinEmbed

Menu location
Part -> Join -> Embed Object
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
None

Description

Embed tool embeds a walled object (e.g., a pipe) into another walled object.



How to use

  1. Select the base object first, then the object to be embedded.
  2. Invoke the Part_JoinEmbed command

Properties

Base

  • DataBase: Reference to base object (the one the other object is to be embedded into). The object should be a single solid.
  • DataTool: Reference to tool object (the object to be embedded). The object can be a single solid, or a valid compound of solids.
  • DataMode: The mode of operation, equals 'Embed' (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).
  • DataRefine: Sets whether to apply Refine operation or not, to the final shape. When DataMode property is 'bypass', Refine is ignored (never applied).

Example

  1. Create a pipe by applying thickness to a cylinder:
  2. Create another, smaller diameter pipe, and place it so that it pierces the wall of the first pipe:
  3. Select the first pipe, then the second pipe (order of selection is important), and click the 'Embed object' option from the Join tools dropdown toolbar button.
  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.

Algorithm

The algorithm behind Join tools is quite simple, and understanding it is important to use it correctly.

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. That largest solid is boolean-fused with Tool object.

4. 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 = 'Embed', mode = 'Embed')
  • Creates an empty Embed 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:

import JoinFeatures
j = JoinFeatures.makePartJoinFeature(name = 'Embed', mode = 'Embed' )
j.Base = FreeCADGui.Selection.getSelection()[0]
j.Tool = FreeCADGui.Selection.getSelection()[1]

Version

The tool was introduced in FreeCAD v0.16.5069