It is True. One of the future works should be to export the step format. If anyone could help, I would be grateful.ickby wrote:Actually occ step importer does super it, and i suppose exporter too. So with some work it should be possible to include it in step. But don't know if it is somehow possible to make this available for modules if there is no gd&t data type in the part workbench, where the exporter lives.NormandC wrote:It's a pity though that this info will surely be lost at STEP export as I doubt FreeCAD's STEP exporter supports this.
https://www.opencascade.com/comment/19633
Great work by the way!
GD&T Workbench for FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: GD&T Workbenk for FreeCAD
Re: GD&T Workbench for FreeCAD
It would be nice if this workbench/ functions are accessible everywhere. since it are basic functions in a CAD package.
And of course automatically added by Techdraw
More for phase 2 i think
And of course automatically added by Techdraw
More for phase 2 i think
Re: GD&T Workbenk for FreeCAD
you can have a look at the STEP improvements here:juanvanyo wrote: It is True. One of the future works should be to export the step format. If anyone could help, I would be grateful.
https://forum.freecadweb.org/viewtopic. ... 24#p166173
just follow the author work... he is doing a lot for STEP improvements and the next step will be the exporter for hierarchy
Maurice
Re: GD&T Workbench for FreeCAD
Looking good.
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: GD&T Workbench for FreeCAD
Downloaded from here: https://github.com/juanvanyo/FreeCAD-GDT approx 17:45UTC today.
1) Select face on Part::Cube
2) Press "Add Annotation Plane"
Same result with padded sketch.
wf
OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: debug
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 7.1.0
1) Select face on Part::Cube
2) Press "Add Annotation Plane"
Code: Select all
Running the Python command 'dd_annotationPlane' failed:
Traceback (most recent call last):
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/annotationPlane.py", line 39, in Activated
gdt.activate(idGDT = self.idGDT, dialogTitle=self.toolTip, dialogIconPath=self.iconPath, endFunction=self.Activated, dictionary=self.dictionary)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1392, in activate
self.taskDialog = GDTDialog( self.dialogTitle, self.dialogIconPath, self.idGDT, extraWidgets + self.dialogWidgets, self.ContainerOfData)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1398, in __init__
self.createForm()
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1402, in createForm
self.form = GDTGuiClass( title, idGDT, dialogWidgets, ContainerOfData)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1422, in __init__
self.initUI( self.title , self.idGDT, self.ContainerOfData)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1430, in initUI
w = widg.generateWidget(self.idGDT,self.ContainerOfData)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1536, in generateWidget
FreeCADGui.Snapper.grid.set()
'NoneType' object has no attribute 'set'
wf
OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: debug
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 7.1.0
Re: GD&T Workbench for FreeCAD
Does the Draft module work properly?wandererfan wrote:Downloaded from here: https://github.com/juanvanyo/FreeCAD-GDT approx 17:45UTC today.
1) Select face on Part::Cube
2) Press "Add Annotation Plane"
Same result with padded sketch.Code: Select all
Running the Python command 'dd_annotationPlane' failed: Traceback (most recent call last): File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/annotationPlane.py", line 39, in Activated gdt.activate(idGDT = self.idGDT, dialogTitle=self.toolTip, dialogIconPath=self.iconPath, endFunction=self.Activated, dictionary=self.dictionary) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1392, in activate self.taskDialog = GDTDialog( self.dialogTitle, self.dialogIconPath, self.idGDT, extraWidgets + self.dialogWidgets, self.ContainerOfData) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1398, in __init__ self.createForm() File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1402, in createForm self.form = GDTGuiClass( title, idGDT, dialogWidgets, ContainerOfData) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1422, in __init__ self.initUI( self.title , self.idGDT, self.ContainerOfData) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1430, in initUI w = widg.generateWidget(self.idGDT,self.ContainerOfData) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1536, in generateWidget FreeCADGui.Snapper.grid.set() 'NoneType' object has no attribute 'set'
wf
OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: debug
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 7.1.0
FreeCADGui.Snapper.grid.set() is used to show the grid from Draft module
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: tag: 0.16.6706
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Re: GD&T Workbench for FreeCAD
@juanvanyo you must verify that the grid exists before calling its set() method:
Code: Select all
if hasattr(Gui,"Snapper"):
if Gui.Snapper.grid:
Gui.Snapper.grid.set()
Re: GD&T Workbench for FreeCAD
I do it in my showGrid() method.yorik wrote:@juanvanyo you must verify that the grid exists before calling its set() method:
Code: Select all
if hasattr(Gui,"Snapper"): if Gui.Snapper.grid: Gui.Snapper.grid.set()
Code: Select all
def showGrid():
if hasattr(FreeCADGui,"Snapper"):
if FreeCADGui.Snapper.grid:
if FreeCADGui.Snapper.grid.Visible == False:
FreeCADGui.Snapper.grid.reset()
FreeCADGui.Snapper.grid.on()
FreeCADGui.Snapper.forceGridOff=False
else:
FreeCADGui.Snapper.show()
Code: Select all
if hasattr(FreeCADGui,"Snapper"):
if FreeCADGui.Snapper.grid:
FreeCAD.DraftWorkingPlane.alignToPointAndAxis(self.ContainerOfData.PointWithOffset, self.ContainerOfData.Direction, 0.0)
FreeCADGui.Snapper.grid.set()
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: GD&T Workbench for FreeCAD
Yes, Draft seems to work fine.juanvanyo wrote:Does the Draft module work properly?
Got farther with new version. Do you want issues created on your github?
1) Select face on Part::Cube
2) add annotation plane
3) press "Add Datum Feature" in toolbar
4) press "Add Datum Feature" in TaskView
Code: Select all
Traceback (most recent call last):
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1171, in updateData
fp.circumferenceBool = True if (True in [l.Closed for l in fp.faces[0][0].Shape.getElement(fp.faces[0][1]).Edges] and len(fp.faces[0][0].Shape.getElement(fp.faces[0][1]).Vertexes) == 2) else False
<type 'exceptions.TypeError'>: must be string, not tuple
Traceback (most recent call last):
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1451, in createObject
obj = makeDatumFeature(self.textName, self.ContainerOfData)
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 834, in makeDatumFeature
makeAnnotation(ContainerOfData.faces, ContainerOfData.annotationPlane, DF=obj, GT=[])
File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1243, in makeAnnotation
obj.p1 = (obj.faces[0][0].Shape.getElement(obj.faces[0][1]).CenterOfMass).projectToPlane(obj.AP.PointWithOffset, obj.AP.Direction)
TypeError: must be string, not tuple
Re: GD&T Workbench for FreeCAD
Hi wandererfan, I can not reproduce your problem. Can you enter the following lines in the Python console?wandererfan wrote:Yes, Draft seems to work fine.juanvanyo wrote:Does the Draft module work properly?
Got farther with new version. Do you want issues created on your github?
1) Select face on Part::Cube
2) add annotation plane
3) press "Add Datum Feature" in toolbar
4) press "Add Datum Feature" in TaskViewCode: Select all
Traceback (most recent call last): File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1171, in updateData fp.circumferenceBool = True if (True in [l.Closed for l in fp.faces[0][0].Shape.getElement(fp.faces[0][1]).Edges] and len(fp.faces[0][0].Shape.getElement(fp.faces[0][1]).Vertexes) == 2) else False <type 'exceptions.TypeError'>: must be string, not tuple Traceback (most recent call last): File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1451, in createObject obj = makeDatumFeature(self.textName, self.ContainerOfData) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 834, in makeDatumFeature makeAnnotation(ContainerOfData.faces, ContainerOfData.annotationPlane, DF=obj, GT=[]) File "/home/user/.FreeCAD/Mod/FreeCAD-GDT/GDT.py", line 1243, in makeAnnotation obj.p1 = (obj.faces[0][0].Shape.getElement(obj.faces[0][1]).CenterOfMass).projectToPlane(obj.AP.PointWithOffset, obj.AP.Direction) TypeError: must be string, not tuple
Code: Select all
import GDT
GDT.getAllAnnotationObjects()[0].faces
This indicate that I selected the Face3 of Part piece when I tried to create the new Datum Feature.
And if you select the Face3 and Face6 the result is: [(<Part::PartFeature>, 'Face3'), (<Part::PartFeature>, 'Face6')]
I use that for the annotation to begin in the center of mass of the first selected face, so that if that face is modified, the starting point will be modified to the new mass center.
If you insert the lines that I mentioned to you and you get a result similar to mine, you should not have problems when running those lines since the value of "fp.faces [0] [1]" is a String.
And, of course you can create these issues on my github.