|
|
@ -203,6 +203,7 @@ async def generate_2d_drawing(file_name): |
|
|
|
def addDimension(edgeA, edgeB, posY): |
|
|
|
def addDimension(edgeA, edgeB, posY): |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim.Type = 'DistanceX' |
|
|
|
dim.Type = 'DistanceX' |
|
|
|
|
|
|
|
dim.FormatSpec = '%.1f' |
|
|
|
dim.References2D = [(view, (getFeatureName(edgeA), getFeatureName(edgeB)))] |
|
|
|
dim.References2D = [(view, (getFeatureName(edgeA), getFeatureName(edgeB)))] |
|
|
|
visibleEdgeA = visibleEdges[edges.index(edgeA)] |
|
|
|
visibleEdgeA = visibleEdges[edges.index(edgeA)] |
|
|
|
visibleEdgeB = visibleEdges[edges.index(edgeB)] |
|
|
|
visibleEdgeB = visibleEdges[edges.index(edgeB)] |
|
|
@ -214,6 +215,7 @@ async def generate_2d_drawing(file_name): |
|
|
|
if abs(edgeB.BoundBox.XLength - 6.5) > 0.01: |
|
|
|
if abs(edgeB.BoundBox.XLength - 6.5) > 0.01: |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim.Type = 'Diameter' |
|
|
|
dim.Type = 'Diameter' |
|
|
|
|
|
|
|
dim.FormatSpec = '%.1f' |
|
|
|
dim.References2D = [(view, ('Edge'+str(edges.index(edgeB)),))] |
|
|
|
dim.References2D = [(view, ('Edge'+str(edges.index(edgeB)),))] |
|
|
|
dim.X = visibleEdgeB.BoundBox.Center.x + 6.0 |
|
|
|
dim.X = visibleEdgeB.BoundBox.Center.x + 6.0 |
|
|
|
dim.Y = -6.0 |
|
|
|
dim.Y = -6.0 |
|
|
@ -222,6 +224,7 @@ async def generate_2d_drawing(file_name): |
|
|
|
if abs(edgeB.BoundBox.Center.y) > 0.01 and lowestEdgeName != '': |
|
|
|
if abs(edgeB.BoundBox.Center.y) > 0.01 and lowestEdgeName != '': |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim = doc.addObject('TechDraw::DrawViewDimension','Dimension') |
|
|
|
dim.Type = 'DistanceY' |
|
|
|
dim.Type = 'DistanceY' |
|
|
|
|
|
|
|
dim.FormatSpec = '%.1f' |
|
|
|
dim.References2D = [(view, (getFeatureName(edgeB),lowestEdgeName))] |
|
|
|
dim.References2D = [(view, (getFeatureName(edgeB),lowestEdgeName))] |
|
|
|
dim.X = visibleEdgeB.BoundBox.Center.x + 2.0 |
|
|
|
dim.X = visibleEdgeB.BoundBox.Center.x + 2.0 |
|
|
|
dim.Y = -6.0 |
|
|
|
dim.Y = -6.0 |
|
|
|