draftgeoutils.wires Namespace Reference

Functions

def cleanProjection (shape, tessellate=True, seglength=0.05)
 
def curvetosegment (curve, seglen)
 
def curvetowire (obj, steps)
 
def findWires (edgeslist)
 
def findWiresOld (edges)
 
def findWiresOld2 (edgeslist)
 
def flattenWire (wire)
 
def isReallyClosed (wire)
 
def rebaseWire (wire, vidx=0)
 
def removeInterVertices (wire)
 
def superWire (edgeslist, closed=False)
 
def tessellateProjection (shape, seglen)
 

Variables

 Part = lz.LazyLoader("Part", globals(), "Part")
 

Function Documentation

◆ cleanProjection()

def draftgeoutils.wires.cleanProjection (   shape,
  tessellate = True,
  seglength = 0.05 
)
Return a valid compound of edges, by recreating them.

This is because the projection algorithm somehow creates wrong shapes.
They display fine, but on loading the file the shape is invalid.

Now with tanderson's fix to `ProjectionAlgos`, that isn't the case,
but this function can be used for tessellating ellipses and splines
for DXF output-DF.

References draftgeoutils.wires.curvetowire().

◆ curvetosegment()

def draftgeoutils.wires.curvetosegment (   curve,
  seglen 
)
Discretize the curve and return a list of edges.

Referenced by draftgeoutils.wires.tessellateProjection().

◆ curvetowire()

def draftgeoutils.wires.curvetowire (   obj,
  steps 
)
Discretize the object and return a list of edges.

Referenced by draftgeoutils.wires.cleanProjection().

◆ findWires()

def draftgeoutils.wires.findWires (   edgeslist)
Find wires in a list of edges.

◆ findWiresOld()

def draftgeoutils.wires.findWiresOld (   edges)
Return a list of lists containing edges that can be connected.

Find connected edges in the list.

◆ findWiresOld2()

def draftgeoutils.wires.findWiresOld2 (   edgeslist)
Find connected wires in the given list of edges.

References DraftVecUtils.equals().

◆ flattenWire()

def draftgeoutils.wires.flattenWire (   wire)
Force a wire to get completely flat along its normal.

References WorkingPlane.plane.

◆ isReallyClosed()

def draftgeoutils.wires.isReallyClosed (   wire)
Check if a wire is really closed.

References DraftVecUtils.equals().

◆ rebaseWire()

def draftgeoutils.wires.rebaseWire (   wire,
  vidx = 0 
)
Return a copy of the wire with the first vertex indicated by the index.

Return a new wire which is a copy of the current wire,
but where the first vertex is the vertex indicated by the given
index vidx, starting from 1.
0 will return an exact copy of the wire.

◆ removeInterVertices()

def draftgeoutils.wires.removeInterVertices (   wire)
Remove middle vertices from a straight wire and return a new wire.

Remove unneeded vertices, those that are in the middle of a straight line,
from a wire, return a new wire.

References DraftVecUtils.precision().

◆ superWire()

def draftgeoutils.wires.superWire (   edgeslist,
  closed = False 
)
Force a wire between edges that don't have coincident endpoints.

Forces a wire between edges that don't necessarily
have coincident endpoints. If closed=True, the wire will always be closed.

◆ tessellateProjection()

def draftgeoutils.wires.tessellateProjection (   shape,
  seglen 
)
Return projection with BSplines and Ellipses broken into line segments.

Useful for exporting projected views to DXF files.

References draftgeoutils.wires.curvetosegment().

Variable Documentation

◆ Part

draftgeoutils.wires.Part = lz.LazyLoader("Part", globals(), "Part")