<commit_before>import FreeCAD,Part,math

class WoodenBase:

  def __init__(self,obj, longueurX=4000, largeurY=3000):
		obj.addProperty("App::PropertyFloat","front","WoodenBase","Front Width.").front = front
		obj.addProperty("App::PropertyFloat","depth","WoodenBase","Depth.").depth = depth
		obj.Proxy = self

  def onChanged(self, fp, prop):
 		"Do something when a property has changed"
		pass

  def execute(self, fp):
		fp.Shape=WoodenBase.buildshape(fp.front, fp.depth)
		
  @staticmethod
	def buildshape(front, depth):
		poutrePorteeMax = 5500
		
		shape = Part.Shape()
		return shape
		
def makeWoodenBase(x,y,doc=None):
  doc = doc or FreeCAD.ActiveDocument
  obj=doc.addObject("Part::FeaturePython","WoodenBase")
  WoodenBase(obj)
	obj.ViewObject.Proxy=0 # just set it to something different from None (this assignment is needed to run an internal notification)
  return obj      
            
if __name__ == '__main__':
	makeWoodenBase(4000,2000)
<commit_msg>Working outer frame<commit_after>import FreeCAD,Part,math

class WoodenBase:

  def __init__(self,obj, front=3000, depth=3000, framingTimberX=50, framingTimberY=75, supportTimberX=100, supportTimberY=100):
		obj.addProperty("App::PropertyFloat","front","WoodenBase","Front Width.").front = front
		obj.addProperty("App::PropertyFloat","depth","WoodenBase","Depth.").depth = depth
		obj.addProperty("App::PropertyFloat","framingTimberX","WoodenBase","X of framing timber.").framingTimberX = framingTimberX
		obj.addProperty("App::PropertyFloat","framingTimberY","WoodenBase","Y of framing timber.").framingTimberY = framingTimberY
		obj.addProperty("App::PropertyFloat","supportTimberX","WoodenBase","X of support timber.").supportTimberX = supportTimberX
		obj.addProperty("App::PropertyFloat","supportTimberY","WoodenBase","Y of support timber.").supportTimberY = supportTimberY
		obj.Proxy = self

  def onChanged(self, fp, prop):
    "Do something when a property has changed"
    pass

  def execute(self, fp):
    FreeCAD.Console.PrintMessage("Execute..\n")
    fp.Shape=WoodenBase.buildshape(fp.front, fp.depth,fp.framingTimberX,fp.framingTimberY, fp.supportTimberX, fp.supportTimberY)

  # see http://www.freecadweb.org/wiki/index.php?title=FreeCAD_Scripting_Basics		
  @staticmethod
  def buildshape(front, depth, framingTimberX, framingTimberY, supportTimberX, supportTimberY):
    FreeCAD.Console.PrintMessage("buildshape..\n")
    # result = Part.shape()
    frontPiece = Part.makeBox(front,framingTimberX,framingTimberY)
    leftPiece = Part.makeBox(framingTimberX, depth, framingTimberY, App.Vector(-(framingTimberX),0,0))
    rightPiece = Part.makeBox(framingTimberX, depth, framingTimberY, App.Vector(front,0,0))
    backPiece = Part.makeBox(front,framingTimberX,framingTimberY, App.Vector(0,depth-framingTimberX,0))
    # result.fuse(frontPiece)
    result = frontPiece.fuse(leftPiece)
    result = result.fuse(rightPiece)
    result = result.fuse(backPiece)
    FreeCAD.Console.PrintMessage("finished building.... return.\n")
    return result
		
def makeWoodenBase(x,y,framingTimberX,framingTimberY, supportTimberX, supportTimberY, doc=None):
  FreeCAD.Console.PrintMessage("makeWoodenBase..\n")
  doc = doc or FreeCAD.ActiveDocument
  obj=doc.addObject("Part::FeaturePython","WoodenBase")
  WoodenBase(obj)
  obj.ViewObject.Proxy=0 # just set it to something different from None (this assignment is needed to run an internal notification)
  return obj      

FreeCAD.Console.PrintMessage("running..\n")
makeWoodenBase(4000,2000,75,50,100,100)
App.activeDocument().recompute()
Gui.SendMsgToActiveView("ViewFit")
Gui.activeDocument().activeView().viewAxometric()

{'fraction_non_alphanumeric': 0.1304109589041096, 'fraction_numerical': 0.017534246575342465, 'mean_word_length': 5.862781954887218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6908132', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1173, 'n_words': 212}