[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Pattern Inquiries

Inquiries
sd-pattern-p
sd-inq-pattern-type
sd-inq-pattern-values
sd-inq-pattern-properties

sd-inq-patterns

sd-inq-pattern-ref-elements
sd-inq-pattern-ref-element-status
sd-inq-pattern-ref-element-orientation
sd-inq-pattern-ref-element-parent
sd-inq-pattern-ref-element-shares
sd-inq-pattern-ref-element-group

Function Index Top of Page

SD-PATTERN-P  [function]

(sd-pattern-p object)
Description:
Determines if the given object is a pattern

Parameters:
object {SEL_ITEM} - the object to check

Return value:
T - the object is a pattern
nil - otherwise

Function Index Top of Page

SD-INQ-PATTERN-TYPE  [function]

(sd-inq-pattern-type pattern)
Description:
Returns the type of the given pattern

Parameters:
pattern {SEL_ITEM} - the pattern to inquire

Return value:
type {KEYWORD} - one of the following:
:linear
:linear-grid
:radial
:radial-grid
:free
nil - an error occurred

Function Index Top of Page

SD-INQ-PATTERN-VALUES  [function]

(sd-inq-pattern-values pattern)
Description:
Returns the defining values of the pattern

Parameters:
pattern {SEL_ITEM} - the pattern to inquire

Return value:
values {PROPERTY LIST} - Depending on the pattern type, different key/value pairs are part of the list

Linear pattern:
:direction {GPNT3D unit vector} - translational direction of the pattern
:distance {NUMBER} - distance between the pattern instances
:number {NUMBER} - number of pattern instances
:start-pos {GPNT3D} - origin of the pattern
Radial pattern:
:number {NUMBER} - number of pattern instances
:radius {NUMBER} - radius of the pattern
:angle {NUMBER} - angle between the pattern instances
:axis {GPNT3D unit vector} - rotation axis of the pattern
:center {GPNT3D} - center point of the pattern
:start-dir {GPNT3D unit vector} - direction from center to the first pattern instance
:start-pos {GPNT3D} - origin of the pattern
Grid patterns: in addition to the values of the singular patterns, the following keys are added to the list
:direction2 {GPNT3D unit vector} - secondary direction of the pattern
:distance2 {NUMBER} - secondary distance between the pattern instances
:number2 {NUMBER} - secondary number of pattern instances
Free pattern:
:start-pos {GPNT3D} - origin of the pattern

Example:
(SD-INQ-PATTERN-VALUES some-pattern)
=> (:direction 1,0,0 :distance 25.0 :number 8 :start-pos 50,50,0)

Function Index Top of Page

SD-INQ-PATTERN-PROPERTIES  [function]

(sd-inq-pattern-properties pattern)
Description:
Returns some properties of the pattern

Parameters:
pattern {SEL_ITEM} - the pattern to inquire

Return value:
properties {PROPERTY LIST} - the current state of the pattern
:elements {NUMBER} - number of pattern instance elements
:sources {NUMBER} - number of pattern seed elements
:excluded {NUMBER} - number of excluded elements
:offset {NUMBER} - number of elements which do have an offset to the calculated position
:unshared {NUMBER} - number of elements which are unshared from the seed element
:open-references {BOOLEAN} - flag to show that the pattern has open references

Function Index Top of Page

SD-INQ-PATTERNS  [function]

(sd-inq-patterns owner)
Description:
Returns all the patterns of the given owner

Parameters:
owner {SEL_ITEM} - the part or assembly to check for patterns

Return value:
patterns {LIST of SEL_ITEMs} - A list containing all patterns of the given owner

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENTS  [function]

(sd-inq-pattern-ref-elements pattern)
Description:
Returns all the elements of a pattern in combination with the according index (which identifies the element within the pattern)

Parameters:
pattern {SEL_ITEM} - the pattern to inquire

Return value:
index/element pairs {LIST of index/SEL_ITEM LISTs}
index {LIST of 3 NUMBERs} - index of the element within the pattern
element {SEL_ITEM} - pattern element

Example:
(SD-INQ-PATTERN-REF-ELEMENTS some-pattern)
=> (((0 0 0) some-feature) ((2 0 0) other-feature) ((0 0 1) other-elem2) ...)

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENT-STATUS  [function]

(sd-inq-pattern-ref-element-status element)
Description:
Returns the status of the given pattern element

Parameters:
element {SEL_ITEM} - the pattern element to inquire

Return value:
properties {PROPERTY LIST}
:offset {BOOLEAN} - element has an offset to the calculated position
:unshared {BOOLEAN} - element is not shared with seed element anymore
nil - if the element is not a supported pattern element

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENT-ORIENTATION  [function]

(sd-inq-pattern-ref-element-orientation element)
Description:
Returns the local coordinate-system of the given pattern element, it is used to determine the relative position of the element within the pattern

Parameters:
element {SEL_ITEM} - the pattern element to inquire

Return value:
orientation {PROPERTY LIST}
:origin {GPNT3D} - origin of the element
:dir1 {GPNT3D unit vector} - main direction of the element
:dir2 {GPNT3D unit vector} - second direction

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENT-PARENT  [function]

(sd-inq-pattern-ref-element-parent element)
Description:
Returns the owning pattern of the given element

Parameters:
element {SEL_ITEM} - the pattern element to inquire

Return value:
pattern {SEL_ITEM} - the owning pattern
nil - if the element is not part of a pattern

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENT-SHARES  [function]

(sd-inq-pattern-ref-element-shares element)
Description:
Returns all the peer instances which are shares of the given element

Parameters:
element {SEL_ITEM} - the pattern element to inquire

Return value:
index/element pairs {LIST of index/SEL_ITEM LISTs} - see SD-INQ-PATTERN-REF-ELEMENTS for details

Function Index Top of Page

SD-INQ-PATTERN-REF-ELEMENT-GROUP  [function]

(sd-inq-pattern-ref-element-group element)
Description:
Returns all the peer instances of the given element which have the same pattern index

Parameters:
element {SEL_ITEM} - the pattern element to inquire

Return value:
index/element pairs {LIST of index/SEL_ITEM LISTs} - see SD-INQ-PATTERN-REF-ELEMENTS for details

[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2023 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved