draftgeoutils.offsets Namespace Reference

Functions

def offset (edge, vector, trim=False)
 
def offsetWire (wire, dvec, bind=False, occ=False, widthList=None, offsetMode=None, alignList=[], normal=None, basewireOffset=0)
 
def pocket2d (shape, offset)
 

Variables

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

Function Documentation

◆ offset()

def draftgeoutils.offsets.offset (   edge,
  vector,
  trim = False 
)
Return a copy of the edge at a certain vector offset.

If the edge is an arc, the vector will be added at its first point
and a complete circle will be returned.

None if there is a problem.

◆ offsetWire()

def draftgeoutils.offsets.offsetWire (   wire,
  dvec,
  bind = False,
  occ = False,
  widthList = None,
  offsetMode = None,
  alignList = [],
  normal = None,
  basewireOffset = 0 
)
Offset the wire along the given vector.

Parameters
----------
wire as a list of edges (use the list directly),
or previously as a wire or a face (Draft Wire with MakeFace True
or False supported).

The vector will be applied at the first vertex of the wire. If bind
is True (and the shape is open), the original wire and the offsetted one
are bound by 2 edges, forming a face.

If widthList is provided (values only, not lengths - i.e. no unit),
each value will be used to offset each corresponding edge in the wire.

The 1st value overrides 'dvec' for 1st segment of wire;
if a value is zero, value of 'widthList[0]' will follow;
if widthList[0]' == 0, but dvec still provided, dvec will be followed

offsetMode="BasewireMode" or None

If alignList is provided,
each value will be used to offset each corresponding edge
in the wire with corresponding index.

'basewireOffset' corresponds to 'offset' in ArchWall which offset
the basewire before creating the wall outline

OffsetWire() is now aware of width and align per edge
Primarily for use with ArchWall based on Sketch object

To Do
-----
`dvec` vector to offset is now derived (and can be ignored)
in this function if widthList and alignList are provided
- 'dvec' to be obsolete in future?

References DraftVecUtils.equals(), and DraftVecUtils.scaleTo().

◆ pocket2d()

def draftgeoutils.offsets.pocket2d (   shape,
  offset 
)
Return a list of wires obtained from offseting wires from the shape.

Return a list of wires obtained from offsetting the wires
from the given shape by the given offset, and intersection if needed.

Variable Documentation

◆ Part

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