[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2298] contrib/py/scripts/addons/ io_export_dxf: Removed unnecessary GUI stuff.

Vaclav Klecanda vencax at centrum.cz
Sat Sep 3 21:19:11 CEST 2011


Revision: 2298
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2298
Author:   vencax
Date:     2011-09-03 19:19:10 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Removed unnecessary GUI stuff.

Modified Paths:
--------------
    contrib/py/scripts/addons/io_export_dxf/draw_blenders/__init__.py
    contrib/py/scripts/addons/io_export_dxf/export_dxf.py
    contrib/py/scripts/addons/io_export_dxf/operator.py
    contrib/py/scripts/addons/io_export_dxf/primitive_exporters/__init__.py

Added Paths:
-----------
    contrib/py/scripts/addons/io_export_dxf/model/
    contrib/py/scripts/addons/io_export_dxf/model/__init__.py
    contrib/py/scripts/addons/io_export_dxf/model/dxfLibrary.py
    contrib/py/scripts/addons/io_export_dxf/model/migiusModel.py
    contrib/py/scripts/addons/io_export_dxf/model/model.py

Removed Paths:
-------------
    contrib/py/scripts/addons/io_export_dxf/dxfLibrary.py
    contrib/py/scripts/addons/io_export_dxf/model.py

Property Changed:
----------------
    contrib/py/scripts/addons/io_export_dxf/


Property changes on: contrib/py/scripts/addons/io_export_dxf
___________________________________________________________________
Added: svn:ignore
   + *.pydevproject

*.project


Modified: contrib/py/scripts/addons/io_export_dxf/draw_blenders/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_export_dxf/draw_blenders/__init__.py	2011-09-03 13:54:19 UTC (rev 2297)
+++ contrib/py/scripts/addons/io_export_dxf/draw_blenders/__init__.py	2011-09-03 19:19:10 UTC (rev 2298)
@@ -1,5 +1,6 @@
 """ NOTE:
-This stuff was in original code but it is no longer needed.
+This stuff was in original code but it seems it will be no longer needed.
+NOT USED now.
 """
 
 #-----------------------------------------------------

Deleted: contrib/py/scripts/addons/io_export_dxf/dxfLibrary.py
===================================================================
--- contrib/py/scripts/addons/io_export_dxf/dxfLibrary.py	2011-09-03 13:54:19 UTC (rev 2297)
+++ contrib/py/scripts/addons/io_export_dxf/dxfLibrary.py	2011-09-03 19:19:10 UTC (rev 2298)
@@ -1,927 +0,0 @@
-#dxfLibrary.py : provides functions for generating DXF files
-# --------------------------------------------------------------------------
-__version__ = "v1.35 - 2010.06.23"
-__author__ = "Stani Michiels(Stani), Remigiusz Fiedler(migius)"
-__license__ = "GPL"
-__url__ = "http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Export/DXF"
-__bpydoc__ ="""The library to export geometry data to DXF format r12 version.
-
-Copyright %s
-Version %s
-License %s
-Homepage %s
-
-See the homepage for documentation.
-Dedicated thread on BlenderArtists: http://blenderartists.org/forum/showthread.php?t=136439
-
-IDEAs:
--
-
-TODO:
-- add support for DXFr14 version (needs extended file header)
-- add support for DXF-SPLINEs (possible first in DXFr14 version)
-- add support for DXF-MTEXT
-- add user preset for floating point precision (3-16?)
-
-History
-v1.35 - 2010.06.23 by migius
- - added (as default) writing to DXF file without RAM-buffering: faster and low-RAM-machines friendly
-v1.34 - 2010.06.20 by migius
- - bugfix POLYFACE
- - added DXF-flags for POLYLINE and VERTEX class (NURBS-export)
-v1.33 - 2009.07.03 by migius
- - fix MTEXT newline bug (not supported by DXF-Exporter yet)
- - modif _point(): converts all coords to floats
- - modif LineType class: implement elements
- - added VPORT class, incl. defaults
- - fix Insert class
-v1.32 - 2009.06.06 by migius
- - modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0
- - modif Text class: alignment parameter reactivated
-v1.31 - 2009.06.02 by migius
- - modif _Entity class: added paperspace,elevation
-v1.30 - 2009.05.28 by migius
- - bugfix 3dPOLYLINE/POLYFACE: VERTEX needs x,y,z coordinates, index starts with 1 not 0
-v1.29 - 2008.12.28 by Yorik
- - modif POLYLINE to support bulge segments
-v1.28 - 2008.12.13 by Steeve/BlenderArtists
- - bugfix for EXTMIN/EXTMAX to suit Cycas-CAD
-v1.27 - 2008.10.07 by migius
- - beautifying output code: keys whitespace prefix
- - refactoring DXF-strings format: NewLine moved to the end of
-v1.26 - 2008.10.05 by migius
- - modif POLYLINE to support POLYFACE
-v1.25 - 2008.09.28 by migius
- - modif FACE class for r12
-v1.24 - 2008.09.27 by migius
- - modif POLYLINE class for r12
- - changing output format from r9 to r12(AC1009)
-v1.1 (20/6/2005) by www.stani.be/python/sdxf
- - Python library to generate dxf drawings
-______________________________________________________________
-""" % (__author__,__version__,__license__,__url__)
-
-# --------------------------------------------------------------------------
-# DXF Library: copyright (C) 2005 by Stani Michiels (AKA Stani)
-#                       2008/2009 modif by Remigiusz Fiedler (AKA migius)
-# --------------------------------------------------------------------------
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-
-#import Blender
-#from Blender import Mathutils, Window, Scene, sys, Draw
-#import BPyMessages
-
-try:
-	import copy
-	#from struct import pack
-except:
-	copy = None
-
-####1) Private (only for developpers)
-_HEADER_POINTS=['insbase','extmin','extmax']
-
-#---helper functions-----------------------------------
-def _point(x,index=0):
-	"""Convert tuple to a dxf point"""
-	return '\n'.join([' %s\n%s'%((i+1)*10+index,float(x[i])) for i in range(len(x))])
-
-def _points(plist):
-	"""Convert a list of tuples to dxf points"""
-	out = '\n'.join([_point(plist[i],i)for i in range(len(plist))])
-	return out
-
-#---base classes----------------------------------------
-class _Call:
-	"""Makes a callable class."""
-	def copy(self):
-		"""Returns a copy."""
-		return copy.deepcopy(self)
-
-	def __call__(self,**attrs):
-		"""Returns a copy with modified attributes."""
-		copied=self.copy()
-		for attr in attrs:setattr(copied,attr,attrs[attr])
-		return copied
-
-#-------------------------------------------------------
-class _Entity(_Call):
-	"""Base class for _common group codes for entities."""
-	def __init__(self,paperspace=None,color=None,layer='0',
-				 lineType=None,lineTypeScale=None,lineWeight=None,
-				 extrusion=None,elevation=None,thickness=None,
-				 parent=None):
-		"""None values will be omitted."""
-		self.paperspace	  = paperspace
-		self.color		  = color
-		self.layer		  = layer
-		self.lineType	   = lineType
-		self.lineTypeScale  = lineTypeScale
-		self.lineWeight	 = lineWeight
-		self.extrusion	  = extrusion
-		self.elevation	  = elevation
-		self.thickness	  = thickness
-		#self.visible	  = visible
-		self.parent		 = parent
-
-	def _common(self):
-		"""Return common group codes as a string."""
-		if self.parent:parent=self.parent
-		else:parent=self
-		result =''
-		if parent.paperspace==1: result+='  67\n1\n'
-		if parent.layer!=None: result+='  8\n%s\n'%parent.layer
-		if parent.color!=None: result+=' 62\n%s\n'%parent.color
-		if parent.lineType!=None: result+='  6\n%s\n'%parent.lineType
-		# TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight
-		# TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible
-		if parent.lineTypeScale!=None: result+=' 48\n%s\n'%parent.lineTypeScale
-		if parent.elevation!=None: result+=' 38\n%s\n'%parent.elevation
-		if parent.thickness!=None: result+=' 39\n%s\n'%parent.thickness
-		if parent.extrusion!=None: result+='%s\n'%_point(parent.extrusion,200)
-		return result
-
-#--------------------------
-class _Entities:
-	"""Base class to deal with composed objects."""
-	def __dxf__(self):
-		return []
-
-	def __str__(self):
-		return ''.join([str(x) for x in self.__dxf__()])
-
-#--------------------------
-class _Collection(_Call):
-	"""Base class to expose entities methods to main object."""
-	def __init__(self,entities=[]):
-		self.entities=copy.copy(entities)
-		#link entities methods to drawing
-		for attr in dir(self.entities):
-			if attr[0]!='_':
-				attrObject=getattr(self.entities,attr)
-				if callable(attrObject):
-					setattr(self,attr,attrObject)
-
-####2) Constants
-#---color values
-BYBLOCK=0
-BYLAYER=256
-
-#---block-type flags (bit coded values, may be combined):
-ANONYMOUS =1  # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application
-NON_CONSTANT_ATTRIBUTES =2  # This block has non-constant attribute definitions (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all)
-XREF =4  # This block is an external reference (xref)
-XREF_OVERLAY =8  # This block is an xref overlay
-EXTERNAL =16 # This block is externally dependent
-RESOLVED =32 # This is a resolved external reference, or dependent of an external reference (ignored on input)
-REFERENCED =64 # This definition is a referenced external reference (ignored on input)
-
-#---mtext flags
-#attachment point
-TOP_LEFT = 1
-TOP_CENTER = 2
-TOP_RIGHT = 3
-MIDDLE_LEFT = 4
-MIDDLE_CENTER = 5
-MIDDLE_RIGHT	= 6
-BOTTOM_LEFT = 7
-BOTTOM_CENTER = 8
-BOTTOM_RIGHT = 9
-#drawing direction
-LEFT_RIGHT = 1
-TOP_BOTTOM = 3
-BY_STYLE = 5 #the flow direction is inherited from the associated text style
-#line spacing style (optional):
-AT_LEAST = 1 #taller characters will override
-EXACT = 2 #taller characters will not override
-
-#---polyline flag 70
-CLOSED =1	  # This is a closed polyline (or a polygon mesh closed in the M direction)
-CURVE_FIT =2	  # Curve-fit vertices have been added
-SPLINE_FIT =4	  # Spline-fit vertices have been added
-POLYLINE_3D =8	  # This is a 3D polyline
-POLYGON_MESH =16	 # This is a 3D polygon mesh
-CLOSED_N =32	 # The polygon mesh is closed in the N direction
-POLYFACE_MESH =64	 # The polyline is a polyface mesh
-CONTINOUS_LINETYPE_PATTERN =128	# The linetype pattern is generated continuously around the vertices of this polyline
-
-#---polyline flag 75, = curve type
-QUADRIC_NURBS = 5
-CUBIC_NURBS = 6
-BEZIER_CURVE = 8
-
-
-#---text flags
-#horizontal
-LEFT = 0
-CENTER = 1
-RIGHT = 2
-ALIGNED = 3 #if vertical alignment = 0
-MIDDLE = 4 #if vertical alignment = 0
-FIT = 5 #if vertical alignment = 0
-#vertical
-BASELINE = 0
-BOTTOM	= 1
-MIDDLE = 2
-TOP = 3
-
-####3) Classes
-#---entitities -----------------------------------------------
-#--------------------------
-class Arc(_Entity):
-	"""Arc, angles in degrees."""
-	def __init__(self,center=(0,0,0),radius=1,
-				 startAngle=0.0,endAngle=90,**common):
-		"""Angles in degrees."""
-		_Entity.__init__(self,**common)
-		self.center=center
-		self.radius=radius
-		self.startAngle=startAngle
-		self.endAngle=endAngle
-	def __str__(self):
-		return '  0\nARC\n%s%s\n 40\n%s\n 50\n%s\n 51\n%s\n'%\
-			   (self._common(),_point(self.center),
-				self.radius,self.startAngle,self.endAngle)
-

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list