parameters: (obj)
return_statement: return result
docstring: Return a DXF representation from a TechDraw/Drawing view.
docstring_summary: Return a DXF representation from a TechDraw/Drawing view.
docstring_tokens: Return a DXF representation from a TechDraw / Drawing view .
function: def getDXF(obj):
      """Return a DXF representation from a TechDraw/Drawing view."""
      allOn = True
      if hasattr(obj,"AllOn"):
          allOn = obj.AllOn
      elif hasattr(obj,"AlwaysOn"):
          allOn = obj.AlwaysOn
      showHidden = False
      if hasattr(obj,"showCut"):
          showHidden = obj.showCut
      elif hasattr(obj,"showHidden"):
          showHidden = obj.showHidden
      result = []
      import Drawing,Part
      if not obj.Source:
          return result
      source = obj.Source
      objs,cutplane,onlySolids,clip,direction = getSectionData(source)
      if not objs:
          return result
      if not allOn:
              objs = Draft.removeHidden(objs)
      objs = [o for o in objs if ((not(Draft.getType(o) in ["Space","Dimension","Annotation"])) and (not (o.isDerivedFrom("Part::Part2DObject"))))]
      vshapes,hshapes,sshapes,cutface,cutvolume,invcutvolume = getCutShapes(objs,cutplane,onlySolids,clip,False,showHidden)
      if vshapes:
          result.append(Drawing.projectToDXF(Part.makeCompound(vshapes),direction))
      if sshapes:
          result.append(Drawing.projectToDXF(Part.makeCompound(sshapes),direction))
      if hshapes:
          result.append(Drawing.projectToDXF(Part.makeCompound(hshapes),direction))
      return result
function_tokens: def getDXF ( obj ) : allOn = True if hasattr ( obj , "AllOn" ) : allOn = obj . AllOn elif hasattr ( obj , "AlwaysOn" ) : allOn = obj . AlwaysOn showHidden = False if hasattr ( obj , "showCut" ) : showHidden = obj . showCut elif hasattr ( obj , "showHidden" ) : showHidden = obj . showHidden result = [ ] import Drawing , Part if not obj . Source : return result source = obj . Source objs , cutplane , onlySolids , clip , direction = getSectionData ( source ) if not objs : return result if not allOn : objs = Draft . removeHidden ( objs ) objs = [ o for o in objs if ( ( not ( Draft . getType ( o ) in [ "Space" , "Dimension" , "Annotation" ] ) ) and ( not ( o . isDerivedFrom ( "Part::Part2DObject" ) ) ) ) ] vshapes , hshapes , sshapes , cutface , cutvolume , invcutvolume = getCutShapes ( objs , cutplane , onlySolids , clip , False , showHidden ) if vshapes : result . append ( Drawing . projectToDXF ( Part . makeCompound ( vshapes ) , direction ) ) if sshapes : result . append ( Drawing . projectToDXF ( Part . makeCompound ( sshapes ) , direction ) ) if hshapes : result . append ( Drawing . projectToDXF ( Part . makeCompound ( hshapes ) , direction ) ) return result