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

Coordinate System Inquiries

Concepts

A coordinate system has 3 different types of elements which can be accessed or inquired. These are:

Every coordinate system consists of exactly these elements. Settings are always valid for the hole coordinate system object.

Function Index Top of Page

SD-COORD-SYS-OBJECT-P  [function]

(sd-coord-sys-object-p object)
Description:
Predicate to determine whether the passed object is a coordinate system.

Parameters:
object {SEL_ITEM}

Return Value:
t - object is a coordinate system
nil - object is not a coordinate system

Function Index Top of Page

SD-COORD-SYS-ELEM-P  [function]

(sd-coord-sys-elem-p element)
Description:
Predicate to determine whether the passed element is an element of a coordinate system (origin, axis or plane).

Parameters:
element {SEL_ITEM}

Return Value:
t - element is an element of a coordinate system
nil - element is not an element of a coordinate system

Function Index Top of Page

SD-COORD-SYS-ORIGIN-P  [function]

(sd-coord-sys-origin-p element)
Description:
Predicate to determine whether the passed element is a coordinate system origin.

Parameters:
element {SEL_ITEM}

Return Value:
t - element is a coordinate system origin
nil - element is not a coordinate system origin

Function Index Top of Page

SD-COORD-SYS-AXIS-P  [function]

(sd-coord-sys-axis-p element)
Description:
Predicate to determine whether the passed element is a coordinate system axis.

Parameters:
element {SEL_ITEM}

Return Value:
t - element is a coordinate system axis
nil - element is a not coordinate system axis

Function Index Top of Page

SD-COORD-SYS-PLANE-P  [function]

(sd-coord-sys-plane-p element)
Description:
Predicate to determine whether the passed element is a coordinate system plane.

Parameters:
element {SEL_ITEM}

Return Value:
t - element is a coordinate system plane
nil - element is not a coordinate system plane

Function Index Top of Page

SD-INQ-COORD-SYS-ELEM  [function]

(sd-inq-coord-sys-elem coord-sys
                       :origin origin
                       :x-axis x-axis
                       :y-axis y-axis
                       :z-axis z-axis
                       :xy-plane xy-plane
                       :yz-plane yz-plane
                       :zx-plane zx-plane
                       :all all)
Description:
Inquire the elements of a given coordinate system.

Parameters:
coord-sys {SEL_ITEM} - The coordinate system to inquire.
origin {BOOLEAN [nil]} - Include coordinate system origin.
x-axis {BOOLEAN [nil]} - Include coordinate system x-axis.
y-axis {BOOLEAN [nil]} - Include coordinate system y-axis.
z-axis {BOOLEAN [nil]} - Include coordinate system z-axis.
xy-plane {BOOLEAN [nil]} - Include coordinate system xy-plane.
yz-plane {BOOLEAN [nil]} - Include coordinate system yz-plane.
zx-plane {BOOLEAN [nil]} - Include coordinate system zx-plane.
all {BOOLEAN [nil]} - Inquire all coordinate system elements.

Return Value:
property-list {LIST} - A property list containing key/value pairs for the requested elements.
:origin {SEL_ITEM}
:x-axis {SEL_ITEM}
:y-axis {SEL_ITEM}
:z-axis {SEL_ITEM}
:xy-plane {SEL_ITEM}
:yz-plane {SEL_ITEM}
:zx-plane {SEL_ITEM}

Example:
(sd-inq-coord-sys-elem some-coordinate-system :origin t :x-axis t)
=> (:ORIGIN sel-item-of-origin
    :X-AXIS sel-item-of-x-axis)

Function Index Top of Page

SD-INQ-COORD-SYS-ELEM-TYPE  [function]

(sd-inq-coord-sys-elem-type item)
Description:
Inquire the element type of a given coordinate system or coordinate system element.

Parameters:
item {SEL_ITEM} - The coordinate system or coordinate system element to inquire.

Return Value:
:object - item is a coordinate system object.
:origin - item is an origin of a coordinate system.
:x-axis - item is an x-axis of a coordinate system.
:y-axis - item is an y-axis of a coordinate system.
:z-axis - item is an z-axis of a coordinate system.
:xy-plane - item is a xy-plane of a coordinate system.
:yz-plane - item is a yz-plane of a coordinate system.
:zx-plane - item is a zx-plane of a coordinate system.

Example:
(sd-inq-coord-sys-elem-type some-coordinate-system)
=> :OBJECT
(sd-inq-coord-sys-elem-type some-coordinate-system-element)
=> :X-AXIS

(sd-inq-coord-sys-elem-type
  (getf (sd-inq-coord-sys-elem some-coordinate-system :all t) :xy-plane))
=> :XY-PLANE

Function Index Top of Page

SD-INQ-COORD-SYS-ELEM-VALUE  [function]

(sd-inq-coord-sys-elem-value coord-sys
                             :origin origin
                             :x-axis x-axis
                             :y-axis y-axis
                             :z-axis z-axis
                             :xy-plane xy-plane
                             :yz-plane yz-plane
                             :zx-plane zx-plane
                             :all all
                             :dest-space space)
Description:
Inquire the values of the elements of a given coordinate system.

Parameters:
coord-sys {SEL_ITEM} - The coordinate system to inquire.
origin {BOOLEAN [nil]} - Include coordinate system origin.
x-axis {BOOLEAN [nil]} - Include coordinate system x-axis.
y-axis {BOOLEAN [nil]} - Include coordinate system y-axis.
z-axis {BOOLEAN [nil]} - Include coordinate system z-axis.
xy-plane {BOOLEAN [nil]} - Include coordinate system xy-plane.
yz-plane {BOOLEAN [nil]} - Include coordinate system yz-plane.
zx-plane {BOOLEAN [nil]} - Include coordinate system zx-plane.
all {BOOLEAN [nil]} - Inquire all coordinate system elements.
space {KEYWORD or SEL_ITEM [:local]}
:local - Data is returned in the local coordinate system space.
:global - Data is returned in the global coordinate system.
SEL_ITEM - Represents either an object or an element. Data is returned in the coordinate system of the given item.

Return Value:
property-list {LIST} - A property list containing key/value pairs for the requested elements.
:origin {GPNT3D}
:x-axis {GPNT3D}
:y-axis {GPNT3D}
:z-axis {GPNT3D}
:xy-plane {GPNT3D}
:yz-plane {GPNT3D}
:zx-plane {GPNT3D}

Example:
(sd-inq-coord-sys-elem-value some-coordinate-system :all t :dest-space :local)
=> (:ORIGIN 0.0,0.0,0.0
    :X-AXIS 1.0,0.0,0.0
    :Y-AXIS 0.0,1.0,0.0
    :Z-AXIS 0.0,0.0,1.0
    :XY-PLANE 0.0,0.0,1.0
    :YZ-PLANE 1.0,0.0,0.0
    :ZX-PLANE 0.0,1.0,0.0)
                
(getf (sd-inq-coord-sys-elem-value some-coordinate-system :x-axis t :dest-space :global) :x-axis)
=> 0.81866139454567677,0.39809667510347946,-0.41389921279471203

Function Index Top of Page

SD-INQ-COORD-SYS-COLOR  [function]

(sd-inq-coord-sys-color coord-sys)
Description:
Returns the color of the specified coordinate system.

Parameters:
coord-sys {SEL_ITEM}

Return Value:
color {GPNT3D} - R,G,B color vector.

Function Index Top of Page

SD-INQ-COORD-SYS-SIZE  [function]

(sd-inq-coord-sys-size coord-sys)
Description:
Returns the size of the specified coordinate system in internal system units [mm].

Parameters:
coord-sys {SEL_ITEM}

Return Value:
size {LONG-FLOAT}

Function Index Top of Page

SD-INQ-COORD-SYS-AXIS-LABEL  [function]

(sd-inq-coord-sys-axis-label coord-sys)
Description:
Returns the axis label of the 3 axis of the specified coordinate system.

Parameters:
coord-sys {SEL_ITEM}

Return Value:
property-list {LIST} - A property list containing key/value pairs for the 3 axis.
:x-axis {STRING}
:y-axis {STRING}
:z-axis {STRING}

Example:
(sd-inq-coord-sys-axis-label some-coordinate-system)
=> (:X-AXIS "u"
    :Y-AXIS "v"
    :Z-AXIS "w")
                
(getf (sd-inq-coord-sys-axis-label some-coordinate-system) :x-axis)
=> "u"

Function Index Top of Page

SD-INQ-COORD-SYS-DEFAULT-COLOR  [function]

(sd-inq-coord-sys-default-color)
Description:
Returns the default color used for all newly created coordinate systems.

Return Value:
color {GPNT3D} - R,G,B color vector.

Function Index Top of Page

SD-INQ-COORD-SYS-DEFAULT-SIZE  [function]

(sd-inq-coord-sys-default-size)
Description:
Returns the default size used for all newly created coordinate systems (value is returned in internal units [mm]).

Return Value:
size {LONG-FLOAT}

Function Index Top of Page

SD-INQ-COORD-SYS-DEFAULT-AXIS-LABEL  [function]

(sd-inq-coord-sys-default-axis-label)
Description:
Returns the default axis label used for all newly created coordinate systems.

Return Value:
property-list {LIST} - A property list containing key/value pairs for the 3 axis.
:x-axis {STRING}
:y-axis {STRING}
:z-axis {STRING}

Example:
(sd-inq-coord-sys-default-axis-label)
=> (:X-AXIS "u"
    :Y-AXIS "v"
    :Z-AXIS "w")

Function Index Top of Page

SD-INQ-COORD-SYS-STORE-VISIBILITY-FLAG  [function]

(sd-inq-coord-sys-store-visibility-flag)
Description:
The store-visibility-flag defines the behaviour of coordinate systems in connection with filing. The visibility can be stored with the file or not. If the flag is true then changing the visibility of coordinate systems sets the owner of the coordinate system modified.

Return Value:
t - the visibility of coordinate systems is stored with the file
nil - the visibility of coordinate systems is not stored with the file
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2019 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved