Some Improvements to Sheetmetal.py script attached.
help on sheet metal script
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: help on sheet metal script
- Attachments
-
- SheetMetalCmd.py
- (29.98 KiB) Downloaded 51 times
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: help on sheet metal script
Some Bug fix & New Command Sketch Based Wall [ Create Sketch on Face with Edge as reference as shown in the pic ]
- Attachments
-
- SheetMetalSketchCmd.py
- (19.49 KiB) Downloaded 56 times
-
- SheetMetalCmd.py
- (30.35 KiB) Downloaded 54 times
Re: help on sheet metal script
Just wondering if you'd be interested in using git in your development process to show your development (and possibly inspire others to contribue) ?jaisejames wrote: ↑Fri Oct 05, 2018 12:45 pm Some Bug fix & New Command Sketch Based Wall [ Create Sketch on Face with Edge as reference as shown in the pic ]
You can read more about this at: Github
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: help on sheet metal script
You may consider to add 'Annotations' in TechDraw instead of Draft-text.ulrich1a wrote: ↑Sun Sep 23, 2018 1:49 pm I did experiment with the new features to create drawings. Exporting the Visgroups into a DXF-file is no problem. It turns out, that it is difficult to put the bendlabels into a Techdraw drawing. The bendlabels are Draft-text. The bendlabels can be put into a Techdraw drawing by inserting a DraftView. But they need to be aligned manually, which is only possible, when the are inserted as last element into the Drawing. And it is tedious, because the labels do not move with the mouse, but show only up at the correct position after updating the drawing view by scaling it.
It looks like, there is some tweaking necessary.
Ulrich
Annotations can be placed with coding and moved later with the mouse.
from this thread
https://forum.freecadweb.org/viewtopic. ... 78#p261662
Code: Select all
#https://forum.freecadweb.org/viewtopic.php?f=22&t=31478&p=261679
#bestfit.py
templateFile = App.getResourceDir() + "Mod/TechDraw/Templates/A3_Landscape_ISO7200TD.svg"
for obj in FreeCAD.ActiveDocument.Objects:
#for each part, techdraw 1 drawing with 3 views
page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','page')
page.Label=obj.Label
template = FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
template.Template = templateFile
page.Template = template
page.ViewObject.show()
featName = obj.Name
feat = FreeCAD.ActiveDocument.getObject(featName)
#first view
view = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewPart','View')
rc = page.addView(view)
view.Source = [feat]
view.Direction = (0.0,0.0,1.0)
view.Scale = (3.0)
view.X = 225
view.Y =150.0
FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewAnnotation','Annotation')
FreeCAD.ActiveDocument.page.addView(App.activeDocument().Annotation)
FreeCAD.ActiveDocument.getObject("Annotation").Text = [u"My note", ]
FreeCAD.ActiveDocument.getObject("Annotation").X = 172.0
FreeCAD.ActiveDocument.getObject("Annotation").Y = 161.0
FreeCAD.ActiveDocument.recompute()
Re: help on sheet metal script
I made this Draft-text objects in order to correlate bend lines in the automatically created unbend object with the automatically created bend table in a spreadsheet. Ideally both objects could be used to create a TechDraw page. The Draft-text objects could be exported in a DXF-file, if the fix for this would be done properly. It worked for me, with the applied fix in the DXF exporter. The whole point is, you can create easily a drawing in LibreCAD from the exported DXF. But it is not possible to create a proper drawing from the same objects in TechDraw due to current limitations. See here: https://forum.freecadweb.org/viewtopic. ... 21#p259192
Ulrich
Re: help on sheet metal script
Are there any news on merging this
Can't find something on Github
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: help on sheet metal script
sheetmetal with auto mitering added
- Attachments
-
- SheetMetalCmd.py
- (36.83 KiB) Downloaded 52 times
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: help on sheet metal script
As Kunda1 mentioned, can you use git to fork from https://github.com/shaise/FreeCAD_SheetMetal
It will be much easier to merge your changes, which are very good features.
shai
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: help on sheet metal script
I need to learn git. I will try.