diff --git a/EXAMPLES/Anisotropic_part_third.py b/EXAMPLES/Anisotropic_part_third.py new file mode 100644 index 0000000..1af912a --- /dev/null +++ b/EXAMPLES/Anisotropic_part_third.py @@ -0,0 +1,110 @@ +# This is file Anisotropic_part_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Anisotropic_part_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020-2021 Dr. Daniel C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, +# see . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'A very important anisotropic part' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'part drawing' +docstatus = 'for review' +sheetnum = 4 +totalsheets = 6 +inversescale = 2 +partnumber = 'P1' +partlist = partnumber +drawingnum = 'TRY4' +year = 2020 +month = 6 +day = 26 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C1side = 100.0 +C1posn = FreeCAD.Vector(0.0,0.0,0.0) +theshape = Part.makeBox(0.5*C1side,C1side,1.5*C1side,C1posn) +scale = 1.0/inversescale +drawingxposn = 100.0 +drawingyposn = 40.0 + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +drawings_adder = eights.third_angle_projection(partnumber, theshape, + drawingviewspacing, + drawingxposn, + drawingyposn, + scale,thepage) + +dummythree = drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit") diff --git a/EXAMPLES/Assembly_back_third.py b/EXAMPLES/Assembly_back_third.py new file mode 100644 index 0000000..fbb0b24 --- /dev/null +++ b/EXAMPLES/Assembly_back_third.py @@ -0,0 +1,117 @@ +# This is file Assembly_back_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Assembly_back_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020-2021 Dr. Daniel C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, see +# . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'A very important assembly laying on its back' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'assembly drawing' +docstatus = 'for review' +sheetnum = 6 +totalsheets = 6 +inversescale = 2 +firstpartnumber = 'C2' +secondpartnumber = 'S1' +partlist = firstpartnumber+','+secondpartnumber +drawingnum = 'TRY6' +year = 2020 +month = 6 +day = 26 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C1side = 100.0 +C1posn = FreeCAD.Vector(0.0,0.0,0.0) +thefirstshape = Part.makeBox(C1side,C1side,C1side,C1posn) +scale = 1.0/inversescale +drawingxposn = 30.0 +drawingyposn = 15.0 +S1diam = 100.0 +S1posn = FreeCAD.Vector(S1diam/2.0,3.0*S1diam/2.0,S1diam/2.0) +thesecondshape = Part.makeSphere(S1diam/2.0,S1posn) +scale = 1.0/inversescale + +theshape = thefirstshape.fuse(thesecondshape) + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +drawings_adder = eights.third_angle_projection('Assembly', theshape, + drawingviewspacing, + drawingxposn, + drawingyposn, + scale,thepage) + +dummythree = drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit") diff --git a/EXAMPLES/Assembly_side_third.py b/EXAMPLES/Assembly_side_third.py new file mode 100644 index 0000000..e9f8116 --- /dev/null +++ b/EXAMPLES/Assembly_side_third.py @@ -0,0 +1,117 @@ +# This is file Assembly_side_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Assembly_side_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020-2021 Dr. Daniel C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, see +# . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'A very important assembly laying on its side' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'assembly drawing' +docstatus = 'for review' +sheetnum = 5 +totalsheets = 6 +inversescale = 2 +firstpartnumber = 'C2' +secondpartnumber = 'S1' +partlist = firstpartnumber+','+secondpartnumber +drawingnum = 'TRY5' +year = 2020 +month = 6 +day = 26 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C1side = 100.0 +C1posn = FreeCAD.Vector(0.0,0.0,0.0) +thefirstshape = Part.makeBox(C1side,C1side,C1side,C1posn) +scale = 1.0/inversescale +drawingxposn = 50.0 +drawingyposn = 40.0 +S1diam = 100.0 +S1posn = FreeCAD.Vector(3.0*S1diam/2.0,S1diam/2.0,S1diam/2.0) +thesecondshape = Part.makeSphere(S1diam/2.0,S1posn) +scale = 1.0/inversescale + +theshape = thefirstshape.fuse(thesecondshape) + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +drawings_adder = eights.third_angle_projection('Assembly', theshape, + drawingviewspacing, + drawingxposn, + drawingyposn, + scale,thepage) + +dummythree = drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit") diff --git a/EXAMPLES/Assembly_third.py b/EXAMPLES/Assembly_third.py new file mode 100644 index 0000000..83e4070 --- /dev/null +++ b/EXAMPLES/Assembly_third.py @@ -0,0 +1,117 @@ +# This is file Assembly_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Assembly_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020 Dr. Daniel C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, see +# . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'A very important assembly' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'assembly drawing' +docstatus = 'for review' +sheetnum = 3 +totalsheets = 6 +inversescale = 2 +firstpartnumber = 'C2' +secondpartnumber = 'S1' +partlist = firstpartnumber+','+secondpartnumber +drawingnum = 'TRY3' +year = 2017 +month = 7 +day = 18 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C1side = 100.0 +C1posn = FreeCAD.Vector(0.0,0.0,0.0) +thefirstshape = Part.makeBox(C1side,C1side,C1side,C1posn) +scale = 1.0/inversescale +drawingxposn = 100.0 +drawingyposn = 40.0 +S1diam = 100.0 +S1posn = FreeCAD.Vector(S1diam/2.0,S1diam/2.0,3.0*S1diam/2.0) +thesecondshape = Part.makeSphere(S1diam/2.0,S1posn) +scale = 1.0/inversescale + +theshape = thefirstshape.fuse(thesecondshape) + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +drawings_adder = eights.third_angle_projection('Assembly', theshape, + drawingviewspacing, + drawingxposn, + drawingyposn, + scale,thepage) + +dummythree = drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit") diff --git a/EXAMPLES/Single_part_third.py b/EXAMPLES/Single_part_third.py new file mode 100644 index 0000000..3b5ebc3 --- /dev/null +++ b/EXAMPLES/Single_part_third.py @@ -0,0 +1,111 @@ +# This is file Single_part_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Single_part_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020-2021 Dr. Daniel +# C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, +# see . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'A very important part' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'part drawing' +docstatus = 'for review' +sheetnum = 1 +totalsheets = 6 +inversescale = 2 +partnumber = 'C1' +partlist = partnumber +drawingnum = 'TRY1' +year = 2017 +month = 7 +day = 11 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C1side = 100.0 +C1posn = FreeCAD.Vector(0.0,0.0,0.0) +theshape = Part.makeBox(C1side,C1side,C1side,C1posn) +scale = 1.0/inversescale +drawingxposn = 100.0 +drawingyposn = 40.0 + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +drawings_adder = eights.third_angle_projection(partnumber, theshape, + drawingviewspacing, + drawingxposn, + drawingyposn, + scale,thepage) + +dummythree = drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit") diff --git a/EXAMPLES/Two_parts_third.py b/EXAMPLES/Two_parts_third.py new file mode 100644 index 0000000..a78678d --- /dev/null +++ b/EXAMPLES/Two_parts_third.py @@ -0,0 +1,127 @@ +# This is file Two_parts_third.py + +# This is an example script intended to be distributed as part of a +# software library centred on file eights.py + +# Two_parts_third.py and eights.py were written by Dr. Daniel C. Hatton + +# Material up to and including release 0.2 copyright (C) 2017 +# University of Plymouth Higher Education Corporation + +# Changes since release 0.2 copyright (C) 2020-2021 Dr. Daniel +# C. Hatton + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation: version 3 of the +# License. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License, and the GNU General Public License +# which it incorporates, for more details. + +# You should have received a copy of the GNU Lesser General Public +# License [in file ../LICENSE] along with this program. If not, see +# . + +# Daniel Hatton thanks Dr. Justin E. Rigden, Specialist Intellectual +# Property Advisor, for authorizing, on behalf of the University of +# Plymouth Higher Education Corporation, the release of this program +# under the licence terms stated above. + +# Daniel Hatton can be contacted on + +import FreeCAD +import Part +import eights + +pagesize = 'A3' +pageorientation = 'Landscape' +creator = 'Joe D. Draftsman' +longtitle = 'Some very important parts' +legalowner = 'Acme Design Company' +approver = 'Jane C. Manager' +doctype = 'part drawings' +docstatus = 'for review' +sheetnum = 2 +totalsheets = 6 +inversescale = 5 +firstpartnumber = 'C2' +secondpartnumber = 'S1' +partlist = firstpartnumber+','+secondpartnumber +drawingnum = 'TRY2' +year = 2017 +month = 7 +day = 11 +revision = 'A' + +# All distances in millimetres + +conelargediameter = 15.0 +conesmalldiameter = 7.5 +drawingviewspacing = 5.0 +symbolviewspacing = drawingviewspacing/3.0 +symbolxposition = 190.0 +symbolyposition = 280.0 + +C2side = 100.0 +C2posn = FreeCAD.Vector(0.0,0.0,0.0) +thefirstshape = Part.makeBox(C2side,C2side,C2side,C2posn) +S1diam = 100.0 +S1posn = FreeCAD.Vector(S1diam/2.0,S1diam/2.0,S1diam/2.0) +thesecondshape = Part.makeSphere(S1diam/2.0,S1posn) +scale = 1.0/inversescale +firstdrawingxposn = 50.0 +firstdrawingyposn = 40.0 +seconddrawingxposn = 300.0 +seconddrawingyposn = 40.0 + +thedocument = FreeCAD.newDocument("try_it") + +pagetitle = "try_this_bit" + +page_creator = eights.create_eights_drawing_sheet(thedocument, pagetitle, + pagesize, pageorientation, + creator, + longtitle, + legalowner, + approver, + doctype, + docstatus, + sheetnum, totalsheets, + inversescale, partlist, + drawingnum, year, + month, day, revision) +dummyone = page_creator.create_it('putanyoldrubbishhere') + +thepage = thedocument.getObject(pagetitle) + +symbol_adder = eights.add_third_angle_projection_symbol(conelargediameter, + conesmalldiameter, + symbolviewspacing, + symbolxposition, + symbolyposition, + thepage) +dummytwo = symbol_adder.put_it_in('putanyoldrubbishhere') + +first_drawings_adder = eights.third_angle_projection(firstpartnumber, + thefirstshape, + drawingviewspacing, + firstdrawingxposn, + firstdrawingyposn, + scale,thepage) + +dummythree = first_drawings_adder.tap('putanyoldrubbishhere') + +second_drawings_adder = eights.third_angle_projection(secondpartnumber, + thesecondshape, + drawingviewspacing, + seconddrawingxposn, + seconddrawingyposn, + scale,thepage) + +dummyfour = second_drawings_adder.tap('putanyoldrubbishhere') + +Gui.getDocument("try_it").show("try_this_bit")