[Bf-python] Last minut addition

Stephen Swaney sswaney at centurytel.net
Sat Jul 1 21:13:01 CEST 2006


On Sun, Jul 02, 2006 at 02:58:38AM +1000, Campbell Barton wrote:
> Hi, just added a last minut addition to BPy-
> Its a scanfill wrapper so you can scanfill polylines made up of a  list 
> of vectors
> (saves a lot of messing with adding objects and meshes to the scene to 
> do meshes .fill() )
> 
> I added this to
> Blender.Mathutils.PolyFill
> 
> On IRC Stivs thinks that because this is a geometry function it should 
> go in Draw or have its own module "Geometry" maybe?
> 
> We had to agree to disagree on this point- IMHO Draw is for Gui  and 
> Mathutils alredy has Line intersetcion and ray/tri intersecton.
> 
> Adding a new module at this point would only have 1 function, could 
> duplicate some from mathutils anddeprecate them but all things 
> considered Im not keen on that.

As Cam said, we discussed this on IRC.  My position is that
the polygon fill routine does not belong in Mathutils.

Strictly speaking, Draw is the bpy interface to OpenGL.  If we are not
going to create a new module, Draw is probably a better place than
Mathutils.

Scan conversion is a necessary step before rendering a polygon.  I
would argue that a routine to scan-convert a polygon more properly
belongs in a rendering or geometry utility module than Mathutils since
it is not strictly a mathematical operation like matrix inversion, for
example.

I am less concerned about initially creating a new module with only a
single member than I am with getting the module structure correct and
sensible.  Other things that could end up in a Geometry module are
analytic geometry utilites like intersection tests and conveniece
routings for creating geometric objects.

Ken has a valid point about adding new functionality during
a CVS freeze without any preceding discussion.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list