Reinforcement UShapeRebar: Difference between revisions

From FreeCAD Documentation
(API and scripting links)
(Code more complete)
Line 60: Line 60:
</translate>
</translate>
{{Code|code=
{{Code|code=
Rebar = makeUShapeRebar(f_cover, b_cover, r_cover, l_cover,
makeUShapeRebar(FrontCover, BottomCover, RightCover, LeftCover, Diameter, Topcover, Rounding, AmountSpacingCheck, AmountSpacingValue, Orientation, Structure, Facename)
diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation="Bottom",
structure=None, facename=None)
}}
}}
<translate>
<translate>

<!--T:14-->
<!--T:14-->
* Creates a {{incode|Rebar}} object from the given {{incode|structure}}, which is an [[Arch Structure]], and {{incode|facename}}, which is a face of that structure.
* The UShape Rebar have four different orientations:
** If no {{incode|structure}} nor {{incode|facename}} are given, it will take the user selected face as input.
** Bottom
* {{incode|f_cover}}, {{incode|b_cover}}, {{incode|r_cover}}, {{incode|l_cover}}, and {{incode|t_cover}} are inner offset distances for the rebar elements with respect to the faces of the structure. They are respectively the front, bottom, right, left, and top offsets.
** Top
* {{incode|diameter}} is the diameter of the reinforcement bars inside the structure.
** Right
* {{incode|rounding}} is the parameter that determines the bending radius of reinforcement bars.
** Left
* {{incode|amount_spacing_check}} if it is {{incode|True}} it will create as many reinforcement bars as given by {{incode|amount_spacing_value}}; if it is {{incode|False}} it will create reinforcement bars separated by the numerical value of {{incode|amount_spacing_value}}.
* Adds a UShape reinforcing bar object to the given structural object.
* {{incode|amount_spacing_value}} specifies the number of reinforcement bars, or the value of the separation between them.
* If no Structure and Facename is given, it will take user selected face as input.
* {{incode|orientation}} specifies the orientation of the rebar; it can be "Bottom", "Top", "Right", or "Left".
* Returns the new Rebar object.


<!--T:12-->
<!--T:12-->
Example:
Example:
Creating UShape rebar.
</translate>
</translate>
{{Code|code=
{{Code|code=
import Arch, UShapeRebar
import FreeCAD, Arch, UShapeRebar

structure = Arch.makeStructure(length=1000.0, width=1000.0, height=400.0)
Structure = Arch.makeStructure(length=1000, width=1000, height=400)
structure.ViewObject.Transparency = 80
Structure.ViewObject.Transparency = 80
FreeCAD.ActiveDocument.recompute()
FreeCAD.ActiveDocument.recompute()

rebar = UShapeRebar.makeUShapeRebar(20, 20, 20, 20, 8, 20, 4, True, 10, "Bottom", structure, "Face1")
Rebar = UShapeRebar.makeUShapeRebar(50, 20, 20, 20,
8, 50, 4, True, 6, "Bottom", Structure, "Face4")
Rebar.ViewObject.ShapeColor = (0.9, 0.0, 0.0)

Rebar2 = UShapeRebar.makeUShapeRebar(50, 50, 20, 20,
8, 50, 4, True, 6, "Bottom", Structure, "Face6")
Rebar2.ViewObject.ShapeColor = (0.0, 0.0, 0.9)
}}
}}
<translate>
<translate>

<!--T:13-->
<!--T:13-->
Changing properties of UShape rebar.
You can change the properties of the rebar with the following function
</translate>
</translate>
{{Code|code=
{{Code|code=
editUShapeRebar(Rebar, f_cover, b_cover, r_cover, l_cover,
import UShapeRebar
diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation,
UShapeRebar.editUShapeRebar(rebar, 25, 25, 25, 25, 16, 25, 2, True, 15, "Top")
structure=None, facename=None)
}}
}}
<translate>
<translate>

* {{incode|Rebar}} is a previously created {{incode|UShapeRebar}} object.
* The other parameters are the same as required by the {{incode|makeUShapeRebar()}} function.
* {{incode|structure}} and {{incode|facename}} may be omitted so that the rebar stays in the original structure.

{{Code|code=
import UShapeRebar
UShapeRebar.editUShapeRebar(Rebar, 50, 50, 20, 20,
16, 20, 5, True, 5, "Top")

UShapeRebar.editUShapeRebar(Rebar2, 70, 50, 20, 20,
16, 70, 5, True, 5, "Top")
}}



<!--T:15-->
<!--T:15-->

Revision as of 16:27, 30 November 2018

Arch Rebar UShape

Menu location
Arch → Rebar tools
Workbenches
Arch, BIM
Default shortcut
None
Introduced in version
0.17
See also
LShape Rebar, Arch Rebar

Description

The UShape Rebar tool allows the user to create a set of U-shaped reinforcing bars inside an Arch Structure object.

This command is part of the Reinforcement Addon, that you can install with the Addon Manager, via the menu Tools → Addon manager → Reinforcement.

Two sets of U-shaped reinforcement bars inside an Arch Structure

How to use

  1. Select any face of a previously created Arch Structure object.
  2. Then select UShape Rebar from the rebar tools.
  3. A task panel will pop-out on the left side of the screen as shown below.
  4. Select the desired orientation.
  5. Give the inputs like front cover, right side cover, left side cover, bottom cover, top cover, rounding factor and diameter of the rebar.
  6. Select the mode of distribution either amount or spacing.
  7. If spacing is selected, a user can also opt for custom spacing.
  8. Pick selected face is used to verify or change the face for rebar distribution.
  9. Click OK or Apply to generate the rebars.
  10. Click Cancel to exit the task panel.

Taskview panel for the Arch Rebar UShape tool

Properties

  • DataOrientation: It decides the orientation of the rebar (like a bottom, top, right and left).
  • DataFront Cover: The distance between rebar and selected face.
  • DataRight Cover: The distance between the right end of the rebar to right face of the structure.
  • DataLeft Cover: The distance between the left end of the rebar to the left face of the structure.
  • DataBottom Cover: The distance between rebar from the bottom face of the structure.
  • DataTop Cover: The distance between rebar from the top face of the structure.
  • DataRounding: A rounding value to be applied to the corners of the bars, expressed in times the diameter.
  • DataAmount: The amount of rebars.
  • DataSpacing: The distance between the axes of each bar.

Scripting

See also: Arch API, Reinforcement API and FreeCAD Scripting Basics.

The UShape Rebar tool can be used in macros and from the Python console by using the following function:

Rebar = makeUShapeRebar(f_cover, b_cover, r_cover, l_cover,
                        diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation="Bottom",
                        structure=None, facename=None)
  • Creates a Rebar object from the given structure, which is an Arch Structure, and facename, which is a face of that structure.
    • If no structure nor facename are given, it will take the user selected face as input.
  • f_cover, b_cover, r_cover, l_cover, and t_cover are inner offset distances for the rebar elements with respect to the faces of the structure. They are respectively the front, bottom, right, left, and top offsets.
  • diameter is the diameter of the reinforcement bars inside the structure.
  • rounding is the parameter that determines the bending radius of reinforcement bars.
  • amount_spacing_check if it is True it will create as many reinforcement bars as given by amount_spacing_value; if it is False it will create reinforcement bars separated by the numerical value of amount_spacing_value.
  • amount_spacing_value specifies the number of reinforcement bars, or the value of the separation between them.
  • orientation specifies the orientation of the rebar; it can be "Bottom", "Top", "Right", or "Left".

Example:

import FreeCAD, Arch, UShapeRebar

Structure = Arch.makeStructure(length=1000, width=1000, height=400)
Structure.ViewObject.Transparency = 80
FreeCAD.ActiveDocument.recompute()

Rebar = UShapeRebar.makeUShapeRebar(50, 20, 20, 20,
                                    8, 50, 4, True, 6, "Bottom", Structure, "Face4")
Rebar.ViewObject.ShapeColor = (0.9, 0.0, 0.0)

Rebar2 = UShapeRebar.makeUShapeRebar(50, 50, 20, 20,
                                     8, 50, 4, True, 6, "Bottom", Structure, "Face6")
Rebar2.ViewObject.ShapeColor = (0.0, 0.0, 0.9)

You can change the properties of the rebar with the following function

editUShapeRebar(Rebar, f_cover, b_cover, r_cover, l_cover,
                diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation,
                structure=None, facename=None)
  • Rebar is a previously created UShapeRebar object.
  • The other parameters are the same as required by the makeUShapeRebar() function.
  • structure and facename may be omitted so that the rebar stays in the original structure.
import UShapeRebar
UShapeRebar.editUShapeRebar(Rebar, 50, 50, 20, 20,
                            16, 20, 5, True, 5, "Top")

UShapeRebar.editUShapeRebar(Rebar2, 70, 50, 20, 20,
                            16, 70, 5, True, 5, "Top")