Arch Add: Difference between revisions
(API and scripting links) |
(Code more complete) |
||
Line 37: | Line 37: | ||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
addComponents |
addComponents(objectsList, host) |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:8--> |
<!--T:8--> |
||
* Adds the given |
* Adds the given objects in {{incode|objectsList}} to the given {{incode|host}} object. |
||
** {{incode|objectsList}} can be a single object or a list of objects. |
|||
* Returns nothing. |
|||
<!--T:9--> |
<!--T:9--> |
||
Line 49: | Line 50: | ||
{{Code|code= |
{{Code|code= |
||
import FreeCAD, Arch, Draft, Part |
import FreeCAD, Arch, Draft, Part |
||
line = Draft.makeWire([FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,2,0)]) |
|||
p1 = FreeCAD.Vector(0, 0, 0) |
|||
wall = Arch.makeWall(line) |
|||
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() |
|||
⚫ | |||
FreeCAD.ActiveDocument.recompute() |
|||
}} |
}} |
||
<translate> |
<translate> |
Revision as of 18:09, 1 December 2018
Arch Add |
Menu location |
---|
Arch → Add |
Workbenches |
Arch |
Default shortcut |
None |
Introduced in version |
- |
See also |
Arch Remove |
Description
The Add tool allows you to do 4 kinds of operations:
- Add shape-based objects to an Arch component, such as a wall or structure. These objects make then part of the Arch component, and allow you to modify its shape but keeping its base properties such as width and height
- Add Arch components, such as a walls or structures, to a group-based arch object such as floors.
- Add axis systems to structural objects
- Add objects to section planes
In the above image, a box is being added to a wall.
How to use
- Select the object(s) to be added, then the "host" object (the host object must be the last one you selected).
- Press the Add button.
Scripting
See also: Arch API and FreeCAD Scripting Basics.
The Add tool can be used in macros and from the Python console by using the following function:
addComponents(objectsList, host)
- Adds the given objects in
objectsList
to the givenhost
object.objectsList
can be a single object or a list of objects.
Example:
import FreeCAD, Arch, Draft, Part
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()
Arch.addComponents(Wall2, Wall)
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