230 def editLShapeRebar(Rebar, f_cover, b_cover, l_cover, r_cover, diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation, structure = None, facename = None):
232 if structure
and facename:
233 sketch.Support = [(structure, facename)]
235 if not sketch.Support:
236 showWarning(
"You have checked remove external geometry of base sketchs when needed.\nTo unchecked Edit->Preferences->Arch.")
239 facename = sketch.Support[0][1][0]
240 structure = sketch.Support[0][0]
247 sketch.movePoint(0, 1, points[0], 0)
248 FreeCAD.ActiveDocument.recompute()
249 sketch.movePoint(0, 2, points[1], 0)
250 FreeCAD.ActiveDocument.recompute()
251 sketch.movePoint(1, 1, points[1], 0)
252 FreeCAD.ActiveDocument.recompute()
253 sketch.movePoint(1, 2, points[2], 0)
254 FreeCAD.ActiveDocument.recompute()
255 Rebar.OffsetStart = f_cover
256 Rebar.OffsetEnd = f_cover
257 if amount_spacing_check:
258 Rebar.Amount = amount_spacing_value
259 FreeCAD.ActiveDocument.recompute()
260 Rebar.AmountCheck =
True 262 size = (ArchCommands.projectToVector(structure.Shape.copy(), face.normalAt(0, 0))).Length
263 Rebar.Amount = int((size - diameter) / amount_spacing_value)
264 FreeCAD.ActiveDocument.recompute()
265 Rebar.AmountCheck =
False 266 Rebar.Diameter = diameter
267 Rebar.FrontCover = f_cover
268 Rebar.LeftCover = l_cover
269 Rebar.RightCover = r_cover
270 Rebar.BottomCover = b_cover
271 Rebar.TopCover = t_cover
272 Rebar.Rounding = rounding
273 Rebar.TrueSpacing = amount_spacing_value
274 Rebar.Orientation = orientation
275 FreeCAD.ActiveDocument.recompute()
def editLShapeRebar(Rebar, f_cover, b_cover, l_cover, r_cover, diameter, t_cover, rounding, amount_spacing_check, amount_spacing_value, orientation, structure=None, facename=None)
def getpointsOfLShapeRebar(FacePRM, l_cover, r_cover, b_cover, t_cover, orientation)
def getParametersOfFace(structure, facename, sketch=True)