Arch CutPlane: Difference between revisions
(Vertical GuiCommand) |
No edit summary |
||
(16 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:13--> |
|||
{{Docnav |
|||
|[[Arch_CutLine|Cut with a line]] |
|||
|[[Arch_Add|Add component]] |
|||
|[[Arch_Module|Arch]] |
|||
|IconL=Arch_CutLine.svg |
|||
|IconR=Arch_Add.svg |
|||
|IconC=Workbench_Arch.svg |
|||
}} |
|||
<!--T:1--> |
<!--T:1--> |
||
{{GuiCommand |
{{GuiCommand |
||
|Name=Arch CutPlane |
|Name=Arch CutPlane |
||
|MenuLocation=Arch → Cut Plane |
|MenuLocation=Arch → Cut Plane |
||
|Workbenches=[[ |
|Workbenches=[[Arch_Module|Arch]] |
||
|SeeAlso=[[Arch |
|SeeAlso=[[Arch_CutLine|Arch CutLine]], [[Arch_Remove|Arch Remove]] |
||
}} |
}} |
||
Line 12: | Line 22: | ||
<!--T:2--> |
<!--T:2--> |
||
The Cut Plane tool allows you to cut an Arch object according to a |
The Cut Plane tool allows you to cut an Arch object according to a plane: |
||
* You can cut an Arch object with the selected face, normal or opposite of the face |
* You can cut an Arch object with the selected face, normal or opposite of the face plane. |
||
* This add a |
* This add a subtraction component CutVolume to the Arch object |
||
<!--T:11--> |
<!--T:11--> |
||
Line 20: | Line 30: | ||
<!--T:3--> |
<!--T:3--> |
||
{{Caption|Left: Before applying the CutPlane tool. Middle: resulting wall after the cut is done. Right: yet another optional result}} |
|||
''In the above image, two Arch Structure are cut with respective plane.'' |
|||
== |
==Usage== <!--T:4--> |
||
<!--T:5--> |
<!--T:5--> |
||
# Select the object to be cut, then the face (the face must be the last one you selected, and must be selected in the 3D |
# Select the object to be cut, then the face (the face must be the last one you selected, and must be selected in the [[3D View]]). |
||
# Press the {{ |
# Press the {{Button|[[Image:Arch_CutPlane.svg|24px]] [[Arch CutPlane|Cut Plane]]}} button. |
||
# Choose if the object is cut '''behind''' the |
# Choose if the object is cut '''behind''' the normal face or in'''front''' of the normal face. |
||
# Click the |
# Click the {{Button|OK}} button. |
||
==Scripting== <!--T:6--> |
==Scripting== <!--T:6--> |
||
{{Emphasis|See also:}} [[Arch API|Arch API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:7--> |
<!--T:7--> |
||
The CutPlane tool can |
The CutPlane tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
cutObj = cutComponentwithPlane(archObject, cutPlane, sideFace) |
|||
cutComponentwithPlane (archObject,face,faceSide) |
|||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:8--> |
<!--T:8--> |
||
* Creates a {{incode|cutObj}} object from the given {{incode|archObject}}, which is cut by {{incode|cutPlane}}, which is the face of another object. |
|||
* archObject is the object to cut |
|||
** {{incode|archObject}} should be a {{incode|SelectionObject}} obtained from {{incode|FreeCADGui.Selection.SelectionEx()[0]}}. |
|||
* face is the face of an object that come the plan from |
|||
** {{incode|cutPlane}} should be a {{incode|FaceObject}} obtained from {{incode|FreeCADGui.Selection.SelectionEx()[0].SubObjects[0]}}. |
|||
* faceSide is the side of the face to cut. 0 = Behind, 1 = Front |
|||
* {{incode|sideFace}} specifies on which side of the {{incode|FaceObject}} a volume will be created; this volume will then be used to subtract from the {{incode|archObject}}. If {{incode|sideFace}} is {{incode|0}} it will create a volume in the rear of the face, otherwise it create it in front of the face. |
|||
<!--T:14--> |
|||
Example: |
|||
</translate> |
</translate> |
||
{{Code|code= |
|||
import FreeCAD, FreeCADGui, Draft, Arch |
|||
p1 = FreeCAD.Vector(0, 0, 0) |
|||
p2 = FreeCAD.Vector(2000, 2000, 0) |
|||
Line = Draft.makeWire([p1, p2]) |
|||
Wall = Arch.makeWall(Line, width=150, height=2000) |
|||
p3 = FreeCAD.Vector(0, 2000, 0) |
|||
p4 = FreeCAD.Vector(3000, 0, 0) |
|||
Line2 = Draft.makeWire([p3, p4]) |
|||
Wall2 = Arch.makeWall(Line2, width=150, height=2000) |
|||
FreeCAD.ActiveDocument.recompute() |
|||
# Select the Wall |
|||
main_object = FreeCADGui.Selection.getSelectionEx()[0] |
|||
# Select the face of Wall2 |
|||
selection = FreeCADGui.Selection.getSelectionEx()[0] |
|||
cut_face = selection.SubObjects[0] |
|||
cutObj = Arch.cutComponentwithPlane(main_object, cut_face, 0) |
|||
FreeCAD.ActiveDocument.recompute() |
|||
Wall3 = Draft.move(Wall, FreeCAD.Vector(-4000, 0, 0), copy=True) |
|||
Wall4 = Draft.move(Wall2, FreeCAD.Vector(-4000, 0, 0), copy=True) |
|||
FreeCAD.ActiveDocument.recompute() |
|||
# Select the Wall3 |
|||
main_object2 = FreeCADGui.Selection.getSelectionEx()[0] |
|||
# Select the face of Wall4 |
|||
selection2 = FreeCADGui.Selection.getSelectionEx()[0] |
|||
cut_face2 = selection2.SubObjects[0] |
|||
cutObj2 = Arch.cutComponentwithPlane(main_object2, cut_face2, 1) |
|||
FreeCAD.ActiveDocument.recompute() |
|||
}} |
|||
<translate> |
<translate> |
||
<!--T: |
<!--T:15--> |
||
{{Docnav |
|||
[[Category:Arch]] |
|||
|[[Arch_CutLine|Cut with a line]] |
|||
|[[Arch_Add|Add component]] |
|||
|[[Arch_Module|Arch]] |
|||
|IconL=Arch_CutLine.svg |
|||
|IconR=Arch_Add.svg |
|||
|IconC=Workbench_Arch.svg |
|||
}} |
|||
</translate> |
</translate> |
||
{{Arch Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
Revision as of 14:34, 29 November 2020
Arch CutPlane |
Menu location |
---|
Arch → Cut Plane |
Workbenches |
Arch |
Default shortcut |
None |
Introduced in version |
- |
See also |
Arch CutLine, Arch Remove |
Description
The Cut Plane tool allows you to cut an Arch object according to a plane:
- You can cut an Arch object with the selected face, normal or opposite of the face plane.
- This add a subtraction component CutVolume to the Arch object
Left: Before applying the CutPlane tool. Middle: resulting wall after the cut is done. Right: yet another optional result
Usage
- Select the object to be cut, then the face (the face must be the last one you selected, and must be selected in the 3D View).
- Press the Cut Plane button.
- Choose if the object is cut behind the normal face or infront of the normal face.
- Click the OK button.
Scripting
See also: Arch API and FreeCAD Scripting Basics.
The CutPlane tool can be used in macros and from the Python console by using the following function:
cutObj = cutComponentwithPlane(archObject, cutPlane, sideFace)
- Creates a
cutObj
object from the givenarchObject
, which is cut bycutPlane
, which is the face of another object.archObject
should be aSelectionObject
obtained fromFreeCADGui.Selection.SelectionEx()[0]
.cutPlane
should be aFaceObject
obtained fromFreeCADGui.Selection.SelectionEx()[0].SubObjects[0]
.
sideFace
specifies on which side of theFaceObject
a volume will be created; this volume will then be used to subtract from thearchObject
. IfsideFace
is0
it will create a volume in the rear of the face, otherwise it create it in front of the face.
Example:
import FreeCAD, FreeCADGui, Draft, Arch
p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 2000, 0)
Line = Draft.makeWire([p1, p2])
Wall = Arch.makeWall(Line, width=150, height=2000)
p3 = FreeCAD.Vector(0, 2000, 0)
p4 = FreeCAD.Vector(3000, 0, 0)
Line2 = Draft.makeWire([p3, p4])
Wall2 = Arch.makeWall(Line2, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()
# Select the Wall
main_object = FreeCADGui.Selection.getSelectionEx()[0]
# Select the face of Wall2
selection = FreeCADGui.Selection.getSelectionEx()[0]
cut_face = selection.SubObjects[0]
cutObj = Arch.cutComponentwithPlane(main_object, cut_face, 0)
FreeCAD.ActiveDocument.recompute()
Wall3 = Draft.move(Wall, FreeCAD.Vector(-4000, 0, 0), copy=True)
Wall4 = Draft.move(Wall2, FreeCAD.Vector(-4000, 0, 0), copy=True)
FreeCAD.ActiveDocument.recompute()
# Select the Wall3
main_object2 = FreeCADGui.Selection.getSelectionEx()[0]
# Select the face of Wall4
selection2 = FreeCADGui.Selection.getSelectionEx()[0]
cut_face2 = selection2.SubObjects[0]
cutObj2 = Arch.cutComponentwithPlane(main_object2, cut_face2, 1)
FreeCAD.ActiveDocument.recompute()
Arch
- Elements: Wall, Structure, Curtain Wall, Window, Roof, Space, Stairs, Equipment, Frame, Fence, Truss, Profile, Pipe, Pipe Connector
- Reinforcements: Straight Rebar, U-Shape Rebar, L-Shape Rebar, Stirrup, Bent-Shape Rebar, Helical Rebar, Column Reinforcement, Beam Reinforcement, Slab Reinforcement, Footing Reinforcement, Custom Rebar
- Panels: Panel, Panel Cut, Panel Sheet, Nest
- Materials: Material, Multi-Material
- Organization: Building Part, Project, Site, Building, Level, External reference, Section Plane, Schedule
- Axes: Axis, Axes system, Grid
- Modification: Cut with plane, Add component, Remove component, Survey
- Utilities: Component, Clone component, Split Mesh, Mesh to Shape, Select non-manifold meshes, Remove Shape from Arch, Close Holes, Merge Walls, Check, Toggle IFC Brep flag, 3 Views from mesh, Create IFC spreadsheet, Toggle Subcomponents
- Additional: Preferences, Import Export Preferences (IFC, DAE, OBJ, JSON, 3DS, SHP), IfcOpenShell, IfcPlusPlus, Arch API
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub