Class PartSpatialRuleFactory

java.lang.Object
com.ptc.windchill.collector.api.part.PartSpatialRuleFactory

public class PartSpatialRuleFactory extends Object
Factory for creating spatial rules used by the PartCollector.
Supported rules included box, sphere and proximity. Two modes are supported
for each rule: fully in and partially in. "Fully in" means that only objects
fully within the spatial criteria will be returned, while "partially in" means
that objects that are partially within the spatial criteria will be returned.


Supported API: true

Extendable: false
  • Method Details

    • newBoxSpatialRule

      public static PartSpatialRule newBoxSpatialRule(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, boolean fullyIn) throws WTException
      This constructs a new instance of a box spatial rule. It assigns the
      values for xMin, xMax, yMin, yMax, zMin and zMax. The Max values
      must be greater than the Min values or an IllegalArgumentException
      will be thrown.


      Supported API: true
      Parameters:
      xMin - The X coordinate for the back lower left corner of the box.
      xMax - The X coordinate for the front upper right corner of the box.
      yMin - The Y coordinate for the back lower left corner of the box.
      yMax - The Y coordinate for the front upper right corner of the box.
      zMin - The Z coordinate for the back lower left corner of the box.
      zMax - The Z coordinate for the front upper right corner of the box.
      fullyIn - If true it will select parts that are fully within the spatial criteria, otherwise it will select parts that are partially within.
      Throws:
      WTException
    • newSphereSpatialRule

      public static PartSpatialRule newSphereSpatialRule(double xCenter, double yCenter, double zCenter, double radius, boolean fullyIn) throws WTException
      This constructs a new instance of a sphere spatial filter. It assigns the
      values for x, y, z and radius. The radius value must be greater than zero
      or an IllegalArgumentException will be thrown.


      Supported API: true
      Parameters:
      xCenter - The X coordinate for the center of the sphere.
      yCenter - The Y coordinate for the center of the sphere.
      zCenter - The Z coordinate for the center of the sphere.
      radius - The radius for the sphere.
      fullyIn - If true it will select parts that are fully within the spatial criteria, otherwise it will select parts that are partially within.
      Throws:
      WTException
    • newProximitySpatialRule

      public static PartSpatialRule newProximitySpatialRule(double clearance, wt.occurrence.PathToOccurrence pathOccurrence, WTPart rootPart, boolean fullyIn) throws WTException
      This constructs a new instance of a proximity spatial rule. It assigns
      the values for proximity. The clearance value must be greater than or
      equal to zero or an IllegalArgumentException will be thrown.


      Supported API: true
      Parameters:
      clearance - Specifies offset for the bounding box for the component or the bounding box for the octree representation of the component.
      pathOccurrence - Path of the proximity part.
      fullyIn - If true it will select parts that are fully within the spatial criteria, otherwise it will select parts that are partially within.
      Throws:
      WTException