OpenSCAD2Dgeom Namespace Reference

Classes

class  Overlappingfaces
 

Functions

def edgestofaces (edges, algo=3, eps=0.001)
 
def edgestowires (edgelist, eps=0.001)
 
def endpointdistance (edges)
 
def endpointdistancedebuglist (debuglist)
 
def findConnectedEdges (edgelist, eps=1e-6, debug=False)
 
def fusefaces (faces)
 
def importDXFface (filename, layer=None, doc=None)
 
def subtractfaces (faces)
 
def subtractfaces2 (faces)
 
def superWireReverse (debuglist, closed=False)
 

Function Documentation

◆ edgestofaces()

def OpenSCAD2Dgeom.edgestofaces (   edges,
  algo = 3,
  eps = 0.001 
)

◆ edgestowires()

def OpenSCAD2Dgeom.edgestowires (   edgelist,
  eps = 0.001 
)
takes list of edges and returns a list of wires

References endpointdistancedebuglist(), findConnectedEdges(), and superWireReverse().

Referenced by edgestofaces().

◆ endpointdistance()

def OpenSCAD2Dgeom.endpointdistance (   edges)
return the distance of vertices in path (list of edges) as
maximum, minimum and distance between start and endpoint
it expects the edges to be traversed forward starting from Vertex 0

◆ endpointdistancedebuglist()

def OpenSCAD2Dgeom.endpointdistancedebuglist (   debuglist)
return the distance of vertices in path (list of edges) as
maximum, minimum and distance between start and endpoint
it expects a 'not reversed' flag for every edge

Referenced by edgestowires().

◆ findConnectedEdges()

def OpenSCAD2Dgeom.findConnectedEdges (   edgelist,
  eps = 1e-6,
  debug = False 
)
returns a list of list of connected edges

Referenced by edgestowires().

◆ fusefaces()

def OpenSCAD2Dgeom.fusefaces (   faces)

◆ importDXFface()

def OpenSCAD2Dgeom.importDXFface (   filename,
  layer = None,
  doc = None 
)

◆ subtractfaces()

def OpenSCAD2Dgeom.subtractfaces (   faces)
searches for the biggest face and subtracts all smaller ones from the
first. Only makes sense if all faces overlap.

Referenced by edgestofaces(), and subtractfaces2().

◆ subtractfaces2()

def OpenSCAD2Dgeom.subtractfaces2 (   faces)
Sort faces, check if they overlap. Subtract overlapping face and fuse
nonoverlapping groups.

References fusefaces(), and subtractfaces().

Referenced by edgestofaces().

◆ superWireReverse()

def OpenSCAD2Dgeom.superWireReverse (   debuglist,
  closed = False 
)
superWireReverse(debuglist,[closed]): forces a wire between edges
that don't necessarily have coincident endpoints. If closed=True, wire
will always be closed. debuglist has a tuple for every edge.The first
entry is the edge, the second is the flag 'does not need to be inverted'

References draftgeoutils.edges.findMidpoint().

Referenced by edgestowires().