# freecad-python generated by Parametrix
# run the script with:
# freecad.cmd myScript.py

import FreeCAD as App
import Part

#print(sys.argv)
outFileName = "scarabase"
if (len(sys.argv) == 3):
    outFileName = sys.argv[2]
print(f"outFileName: {outFileName}")

def ctr_face_scarabase_facePlate_Fa0_Ctr0():
	P000 = App.Vector(0.0000, 0.0000, 0)
	P001 = App.Vector(66.5685, 0.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(66.5685, 18.8321, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(66.8414, 19.8406, 0)
	P004 = App.Vector(67.5857, 20.5739, 0)
	S002 = Part.Arc(P002, P003, P004)
	P005 = App.Vector(95.4536, 36.2989, 0)
	S003 = Part.LineSegment(P004, P005)
	P006 = App.Vector(101.9239, 83.6396, 0)
	P007 = App.Vector(54.5832, 77.1693, 0)
	S004 = Part.Arc(P005, P006, P007)
	P008 = App.Vector(38.8582, 49.3014, 0)
	S005 = Part.LineSegment(P007, P008)
	P009 = App.Vector(38.1249, 48.5572, 0)
	P010 = App.Vector(37.1164, 48.2843, 0)
	S006 = Part.Arc(P008, P009, P010)
	P011 = App.Vector(29.4522, 48.2843, 0)
	S007 = Part.LineSegment(P010, P011)
	P012 = App.Vector(28.4436, 48.5572, 0)
	P013 = App.Vector(27.7103, 49.3014, 0)
	S008 = Part.Arc(P011, P012, P013)
	P014 = App.Vector(11.9854, 77.1693, 0)
	S009 = Part.LineSegment(P013, P014)
	P015 = App.Vector(-35.3553, 83.6396, 0)
	P016 = App.Vector(-28.8850, 36.2989, 0)
	S010 = Part.Arc(P014, P015, P016)
	P017 = App.Vector(-1.0171, 20.5739, 0)
	S011 = Part.LineSegment(P016, P017)
	P018 = App.Vector(-0.2729, 19.8406, 0)
	P019 = App.Vector(0.0000, 18.8321, 0)
	S012 = Part.Arc(P017, P018, P019)
	P020 = App.Vector(0.0000, 0.0000, 0)
	S013 = Part.LineSegment(P019, P000)
	aShape = Part.Shape([S000, S001, S002, S003, S004, S005, S006, S007, S008, S009, S010, S011, S012, S013])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def ctr_face_scarabase_facePlate_Fa0_Ctr1():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(10.0000, App.Vector(-14.1421, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_facePlate_Fa0_Ctr2():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(10.0000, App.Vector(80.7107, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def face_scarabase_facePlate_Fa0():
	FC000 = ctr_face_scarabase_facePlate_Fa0_Ctr0()
	FC001 = ctr_face_scarabase_facePlate_Fa0_Ctr1()
	FC002 = ctr_face_scarabase_facePlate_Fa0_Ctr2()
	rOneFace = FC000.cut([FC001, FC002])
	rOneFace.check()
	return rOneFace

def scarabase_facePlate():
	FA000 = face_scarabase_facePlate_Fa0()
	rOneFig = FA000
	rOneFig.check()
	return rOneFig

def ctr_face_scarabase_faceBack_Fa0_Ctr0():
	P000 = App.Vector(0.0000, 20.0000, 0)
	P001 = App.Vector(66.5685, 20.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(66.5685, 70.0000, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(0.0000, 70.0000, 0)
	S002 = Part.LineSegment(P002, P003)
	P004 = App.Vector(0.0000, 20.0000, 0)
	S003 = Part.LineSegment(P003, P000)
	aShape = Part.Shape([S000, S001, S002, S003])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def ctr_face_scarabase_faceBack_Fa0_Ctr1():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(2.5000, App.Vector(23.2843, 30.0000, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_faceBack_Fa0_Ctr2():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(2.5000, App.Vector(43.2843, 30.0000, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_faceBack_Fa0_Ctr3():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(2.5000, App.Vector(23.2843, 60.0000, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_faceBack_Fa0_Ctr4():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(2.5000, App.Vector(43.2843, 60.0000, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def face_scarabase_faceBack_Fa0():
	FC000 = ctr_face_scarabase_faceBack_Fa0_Ctr0()
	FC001 = ctr_face_scarabase_faceBack_Fa0_Ctr1()
	FC002 = ctr_face_scarabase_faceBack_Fa0_Ctr2()
	FC003 = ctr_face_scarabase_faceBack_Fa0_Ctr3()
	FC004 = ctr_face_scarabase_faceBack_Fa0_Ctr4()
	rOneFace = FC000.cut([FC001, FC002, FC003, FC004])
	rOneFace.check()
	return rOneFace

def scarabase_faceBack():
	FA000 = face_scarabase_faceBack_Fa0()
	rOneFig = FA000
	rOneFig.check()
	return rOneFig

def ctr_face_scarabase_faceT3_Fa0_Ctr0():
	P000 = App.Vector(0.0000, 0.0000, 0)
	P001 = App.Vector(3.0000, 0.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(3.0000, 20.5839, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(2.7271, 21.5925, 0)
	P004 = App.Vector(1.9829, 22.3258, 0)
	S002 = Part.Arc(P002, P003, P004)
	P005 = App.Vector(-27.4108, 38.9117, 0)
	S003 = Part.LineSegment(P004, P005)
	P006 = App.Vector(-33.2340, 81.5183, 0)
	P007 = App.Vector(9.3726, 75.6950, 0)
	S004 = Part.Arc(P005, P006, P007)
	P008 = App.Vector(25.9585, 46.3014, 0)
	S005 = Part.LineSegment(P007, P008)
	P009 = App.Vector(26.6918, 45.5572, 0)
	P010 = App.Vector(27.7003, 45.2843, 0)
	S006 = Part.Arc(P008, P009, P010)
	P011 = App.Vector(38.8682, 45.2843, 0)
	S007 = Part.LineSegment(P010, P011)
	P012 = App.Vector(39.8768, 45.5572, 0)
	P013 = App.Vector(40.6101, 46.3014, 0)
	S008 = Part.Arc(P011, P012, P013)
	P014 = App.Vector(57.1959, 75.6950, 0)
	S009 = Part.LineSegment(P013, P014)
	P015 = App.Vector(99.8026, 81.5183, 0)
	P016 = App.Vector(93.9793, 38.9117, 0)
	S010 = Part.Arc(P014, P015, P016)
	P017 = App.Vector(64.5857, 22.3258, 0)
	S011 = Part.LineSegment(P016, P017)
	P018 = App.Vector(63.8414, 21.5925, 0)
	P019 = App.Vector(63.5685, 20.5839, 0)
	S012 = Part.Arc(P017, P018, P019)
	P020 = App.Vector(63.5685, 0.0000, 0)
	S013 = Part.LineSegment(P019, P020)
	P021 = App.Vector(66.5685, 0.0000, 0)
	S014 = Part.LineSegment(P020, P021)
	P022 = App.Vector(66.5685, 18.8321, 0)
	S015 = Part.LineSegment(P021, P022)
	P023 = App.Vector(66.8414, 19.8406, 0)
	P024 = App.Vector(67.5857, 20.5739, 0)
	S016 = Part.Arc(P022, P023, P024)
	P025 = App.Vector(95.4536, 36.2989, 0)
	S017 = Part.LineSegment(P024, P025)
	P026 = App.Vector(101.9239, 83.6396, 0)
	P027 = App.Vector(54.5832, 77.1693, 0)
	S018 = Part.Arc(P025, P026, P027)
	P028 = App.Vector(38.8582, 49.3014, 0)
	S019 = Part.LineSegment(P027, P028)
	P029 = App.Vector(38.1249, 48.5572, 0)
	P030 = App.Vector(37.1164, 48.2843, 0)
	S020 = Part.Arc(P028, P029, P030)
	P031 = App.Vector(29.4522, 48.2843, 0)
	S021 = Part.LineSegment(P030, P031)
	P032 = App.Vector(28.4436, 48.5572, 0)
	P033 = App.Vector(27.7103, 49.3014, 0)
	S022 = Part.Arc(P031, P032, P033)
	P034 = App.Vector(11.9854, 77.1693, 0)
	S023 = Part.LineSegment(P033, P034)
	P035 = App.Vector(-35.3553, 83.6396, 0)
	P036 = App.Vector(-28.8850, 36.2989, 0)
	S024 = Part.Arc(P034, P035, P036)
	P037 = App.Vector(-1.0171, 20.5739, 0)
	S025 = Part.LineSegment(P036, P037)
	P038 = App.Vector(-0.2729, 19.8406, 0)
	P039 = App.Vector(0.0000, 18.8321, 0)
	S026 = Part.Arc(P037, P038, P039)
	P040 = App.Vector(0.0000, 0.0000, 0)
	S027 = Part.LineSegment(P039, P000)
	aShape = Part.Shape([S000, S001, S002, S003, S004, S005, S006, S007, S008, S009, S010, S011, S012, S013, S014, S015, S016, S017, S018, S019, S020, S021, S022, S023, S024, S025, S026, S027])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def face_scarabase_faceT3_Fa0():
	FC000 = ctr_face_scarabase_faceT3_Fa0_Ctr0()
	rOneFace = FC000
	rOneFace.check()
	return rOneFace

def ctr_face_scarabase_faceT3_Fa1_Ctr0():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(13.0000, App.Vector(-14.1421, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_faceT3_Fa1_Ctr1():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(10.0000, App.Vector(-14.1421, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def face_scarabase_faceT3_Fa1():
	FC000 = ctr_face_scarabase_faceT3_Fa1_Ctr0()
	FC001 = ctr_face_scarabase_faceT3_Fa1_Ctr1()
	rOneFace = FC000.cut([FC001])
	rOneFace.check()
	return rOneFace

def ctr_face_scarabase_faceT3_Fa2_Ctr0():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(13.0000, App.Vector(80.7107, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def ctr_face_scarabase_faceT3_Fa2_Ctr1():
	# Radius, XYZ-position, orientation
	aCircle = Part.makeCircle(10.0000, App.Vector(80.7107, 62.4264, 0), App.Vector(0, 0, 1))
	aWire = Part.Wire(aCircle)
	rFace = Part.Face(aWire)
	return rFace

def face_scarabase_faceT3_Fa2():
	FC000 = ctr_face_scarabase_faceT3_Fa2_Ctr0()
	FC001 = ctr_face_scarabase_faceT3_Fa2_Ctr1()
	rOneFace = FC000.cut([FC001])
	rOneFace.check()
	return rOneFace

def scarabase_faceT3():
	FA000 = face_scarabase_faceT3_Fa0()
	FA001 = face_scarabase_faceT3_Fa1()
	FA002 = face_scarabase_faceT3_Fa2()
	rOneFig = FA000.fuse([FA001, FA002])
	rOneFig.check()
	return rOneFig

def ctr_face_scarabase_faceSide_Fa0_Ctr0():
	P000 = App.Vector(0.0000, 10.0000, 0)
	P001 = App.Vector(47.0000, 10.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(47.0000, 0.0000, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(50.0000, 0.0000, 0)
	S002 = Part.LineSegment(P002, P003)
	P004 = App.Vector(50.0000, 20.0000, 0)
	S003 = Part.LineSegment(P003, P004)
	P005 = App.Vector(10.0000, 20.0000, 0)
	S004 = Part.LineSegment(P004, P005)
	P006 = App.Vector(10.0000, 70.0000, 0)
	S005 = Part.LineSegment(P005, P006)
	P007 = App.Vector(50.0000, 70.0000, 0)
	S006 = Part.LineSegment(P006, P007)
	P008 = App.Vector(50.0000, 90.0000, 0)
	S007 = Part.LineSegment(P007, P008)
	P009 = App.Vector(47.0000, 90.0000, 0)
	S008 = Part.LineSegment(P008, P009)
	P010 = App.Vector(47.0000, 80.0000, 0)
	S009 = Part.LineSegment(P009, P010)
	P011 = App.Vector(0.0000, 80.0000, 0)
	S010 = Part.LineSegment(P010, P011)
	P012 = App.Vector(0.0000, 10.0000, 0)
	S011 = Part.LineSegment(P011, P000)
	aShape = Part.Shape([S000, S001, S002, S003, S004, S005, S006, S007, S008, S009, S010, S011])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def face_scarabase_faceSide_Fa0():
	FC000 = ctr_face_scarabase_faceSide_Fa0_Ctr0()
	rOneFace = FC000
	rOneFace.check()
	return rOneFace

def ctr_face_scarabase_faceSide_Fa1_Ctr0():
	P000 = App.Vector(70.0000, 0.0000, 0)
	P001 = App.Vector(73.0000, 0.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(73.0000, 10.0000, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(87.0000, 10.0000, 0)
	S002 = Part.LineSegment(P002, P003)
	P004 = App.Vector(87.0000, 0.0000, 0)
	S003 = Part.LineSegment(P003, P004)
	P005 = App.Vector(90.0000, 0.0000, 0)
	S004 = Part.LineSegment(P004, P005)
	P006 = App.Vector(90.0000, 20.0000, 0)
	S005 = Part.LineSegment(P005, P006)
	P007 = App.Vector(70.0000, 20.0000, 0)
	S006 = Part.LineSegment(P006, P007)
	P008 = App.Vector(70.0000, 0.0000, 0)
	S007 = Part.LineSegment(P007, P000)
	aShape = Part.Shape([S000, S001, S002, S003, S004, S005, S006, S007])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def face_scarabase_faceSide_Fa1():
	FC000 = ctr_face_scarabase_faceSide_Fa1_Ctr0()
	rOneFace = FC000
	rOneFace.check()
	return rOneFace

def ctr_face_scarabase_faceSide_Fa2_Ctr0():
	P000 = App.Vector(70.0000, 70.0000, 0)
	P001 = App.Vector(90.0000, 70.0000, 0)
	S000 = Part.LineSegment(P000, P001)
	P002 = App.Vector(90.0000, 90.0000, 0)
	S001 = Part.LineSegment(P001, P002)
	P003 = App.Vector(87.0000, 90.0000, 0)
	S002 = Part.LineSegment(P002, P003)
	P004 = App.Vector(87.0000, 80.0000, 0)
	S003 = Part.LineSegment(P003, P004)
	P005 = App.Vector(73.0000, 80.0000, 0)
	S004 = Part.LineSegment(P004, P005)
	P006 = App.Vector(73.0000, 90.0000, 0)
	S005 = Part.LineSegment(P005, P006)
	P007 = App.Vector(70.0000, 90.0000, 0)
	S006 = Part.LineSegment(P006, P007)
	P008 = App.Vector(70.0000, 70.0000, 0)
	S007 = Part.LineSegment(P007, P000)
	aShape = Part.Shape([S000, S001, S002, S003, S004, S005, S006, S007])
	aWire = Part.Wire(aShape.Edges)
	subFace = Part.Face(aWire)
	subFace.check()
	return subFace

def face_scarabase_faceSide_Fa2():
	FC000 = ctr_face_scarabase_faceSide_Fa2_Ctr0()
	rOneFace = FC000
	rOneFace.check()
	return rOneFace

def scarabase_faceSide():
	FA000 = face_scarabase_faceSide_Fa0()
	FA001 = face_scarabase_faceSide_Fa1()
	FA002 = face_scarabase_faceSide_Fa2()
	rOneFig = FA000.fuse([FA001, FA002])
	rOneFig.check()
	return rOneFig

def fex_subpax_scarabase_plate2():
	FIG = scarabase_facePlate()
	VEX = FIG.extrude(App.Vector(0, 0, 10))
	VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 0.0000)
	VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 0.0000)
	VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), 0.0000)
	VFP = VR3.translate(App.Vector(0.0000, 0.0000, 10.0000))
	return VFP
subpax_scarabase_plate2 = fex_subpax_scarabase_plate2()

def fex_subpax_scarabase_plate4():
	FIG = scarabase_facePlate()
	VEX = FIG.extrude(App.Vector(0, 0, 10))
	VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 0.0000)
	VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 0.0000)
	VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), 0.0000)
	VFP = VR3.translate(App.Vector(0.0000, 0.0000, 70.0000))
	return VFP
subpax_scarabase_plate4 = fex_subpax_scarabase_plate4()

def fex_subpax_scarabase_back():
	FIG = scarabase_faceBack()
	VEX = FIG.extrude(App.Vector(0, 0, 10))
	VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90.0000)
	VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 0.0000)
	VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), 0.0000)
	VFP = VR3.translate(App.Vector(0.0000, 10.0000, 0.0000))
	return VFP
subpax_scarabase_back = fex_subpax_scarabase_back()

def fex_subpax_scarabase_t31():
	FIG = scarabase_faceT3()
	VEX = FIG.extrude(App.Vector(0, 0, 10))
	VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 0.0000)
	VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 0.0000)
	VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), 0.0000)
	VFP = VR3.translate(App.Vector(0.0000, 0.0000, 0.0000))
	return VFP
subpax_scarabase_t31 = fex_subpax_scarabase_t31()

def fex_subpax_scarabase_t35():
	FIG = scarabase_faceT3()
	VEX = FIG.extrude(App.Vector(0, 0, 10))
	VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 0.0000)
	VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 0.0000)
	VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), 0.0000)
	VFP = VR3.translate(App.Vector(0.0000, 0.0000, 80.0000))
	return VFP
subpax_scarabase_t35 = fex_subpax_scarabase_t35()

def fvol_pax_scarabase():
	V000 = subpax_scarabase_plate2
	V001 = V000.fuse(subpax_scarabase_plate4)
	V002 = V001.fuse(subpax_scarabase_back)
	V003 = V002.fuse(subpax_scarabase_t31)
	V004 = V003.fuse(subpax_scarabase_t35)
	VFC = V004.removeSplitter()
	return VFC
pax_scarabase = fvol_pax_scarabase()


pax_scarabase.check()
#pax_scarabase.exportBrep(f"{outFileName}.brep")
#pax_scarabase.exportIges(f"{outFileName}.igs")
#pax_scarabase.exportStep(f"{outFileName}.stp")
pax_scarabase.exportStl(f"{outFileName}.stl")

