pw::Source

Global actions for source entities

Derives From

pw::Object

Summary
pw::SourceGlobal actions for source entities
Static Actions
saveThis action saves all source entities in the native file format.
getAllThis action gets a list of all source entities.
getCountThis action gets the number of soure entities.
getByNameThis action gets a source entity using the name.
getExtentsThis action gets the extents of the source entities.
getSizeThis action gets the size at the given XYZ coordinates from source evaluation.
getAutomaticSizeThis action gets the size at the given XYZ coordinates from automatic (curvature-based) size field evaluation.
importThis action creates a new source point cloud object imported from a file.

Static Actions

save

pw::Source save ?-compress level? ?-noOverwrite? filename

This action saves all source entities in the native file format.

Parameters

-compress levelThis optional parameter sets the integer file compression level with the range [0, 9].  The default is 0.
-noOverwriteThis optional flag is notification to not save if filename already exists.
filenameThis parameter is the full path and name string of the file to save.

Returns

This action returns nothing.

Information

This command supports progress updates.

For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum.  Higher levels of compression take longer to save.

getAll

pw::Source getAll ?< -grid entities | -shape entities >? ?-framework framework? ?-global?

This action gets a list of all source entities.

Parameters

-grid entitiesThis optional parameter is a list of pw::GridEntity objects to limit the source entities returned to only be those that possibly effect these grid entities.
-shape entitiesThis optional parameter is a list of pw::GridShape objects to limit the source entities returned to only be those that possibly effect these shape entities.
-frameworkIf specified, this argument specifies which pw::Framework to query.  If not specified, the active pw::Framework is used as the target.
-globalIf specified, the sources from all frameworks are collected.  The return value will be a list of framework_entity.

Returns

This action returns a list of pw::SourceEntity objects, or a list of framework_entity when -global is specified.

Notes

Only one of the -grid or -shape parameters can be given at the same time.  If both are given, an error is returned.

getCount

pw::Source getCount

This action gets the number of soure entities.

Parameters

This action has no parameters.

Returns

This action returns an integer value.

getByName

pw::Source getByName name

This action gets a source entity using the name.

Parameters

nameThis parameter is a name string.

Returns

This action returns a pw::SourceEntity object.

getExtents

pw::Source getExtents ?-enabledOnly? ?-visibleOnly?

This action gets the extents of the source entities.

Parameters

-enabledOnlyThis flag, if present, restricts the calculations to only enabled entities, regardless of their visibility.  Enabled entities in off layers are included, for example.
-visibleOnlyThis flag, if present, restricts the calculations to only visible entities.

Returns

This action returns a list of two vectors representing the min and max xyz points of the extents.

getSize

pw::Source getSize points background_spacing ?-include source_list? ?-exclude source_list? ?-calculationMethod method?

This action gets the size at the given XYZ coordinates from source evaluation.

Parameters

pointsThis parameter is a list of vector point positions at which the size is requested.
background_spacingThis parameter is the desired spacing far away from all sources.
-include source_listThis optional parameter is a list of pw::SourceEntity objects to be included in the size field calculation.  If not specified, all sources will be included.
-exclude source_listThis optional parameter is a list of pw::SourceEntity objects to be excluded from the size field calculation.  If not specified, nothing will be excluded.
-calculationMethod methodThis optional parameter is the string method that controls how spacing is calculated for size field point primitives with options < MinimumDistance | InverseDistance | BlendDistance | MinimumValue >.  If not specified, MinimumDistance will be used.

Returns

This action returns a list of float sizes at the point locations.

getAutomaticSize

This action gets the size at the given XYZ coordinates from automatic (curvature-based) size field evaluation.

Parameters

pointsThis parameter is a list of vector point positions at which the size is requested.
background_spacingThis parameter is the desired spacing far away from all sources.
decay_factorThis parameter is the desired decay factor.
-maxAngularDeviationThis optional parameter is the desired maximum angular deviation used to compute the geometric curvature-based size field.
-maxAbsoluteDeviationThis optional parameter is the desired maximum absolute deviation used to compute the geometric curvature-based size field.

Returns

This action returns a list of float sizes at the point locations.

import

pw::Source import ?-type file_type? ?-report report_var? filename

This action creates a new source point cloud object imported from a file.

Parameters

-type file_typeThis optional parameter is the string file type of the file with options < Automatic | PCD >.  The default is PCD (the only supported format).
-report report_varThis optional parameter is a variable name to receive a string reporting the low-level details of the import.
filenameThis parameter is the string full path and name of the file to import.

Information

This command supports progress updates.

File Types

Automaticdetermine the file type based on the filename extension
PCDPoint Cloud Library file format

Returns

This action returns a new pw::SourcePointCloud object.

pw::Source save ?-compress level? ?-noOverwrite? filename
This action saves all source entities in the native file format.
pw::Source getAll ?< -grid entities | -shape entities >? ?-framework framework? ?-global?
This action gets a list of all source entities.
pw::Source getCount
This action gets the number of soure entities.
pw::Source getByName name
This action gets a source entity using the name.
pw::Source getExtents ?-enabledOnly? ?-visibleOnly?
This action gets the extents of the source entities.
pw::Source getSize points background_spacing ?-include source_list? ?-exclude source_list? ?-calculationMethod method?
This action gets the size at the given XYZ coordinates from source evaluation.
pw::Source import ?-type file_type? ?-report report_var? filename
This action creates a new source point cloud object imported from a file.
Base type for all glyph types
An integer is a whole number.
A string is an array of characters.
Base type for all grid entities.
Grid shape type
Framework type
A framework_entity is a reference to an entity in a pw::Framework.
Base type for all source entities
A vector is a list of float values.
A float is a fractional number.
Source point cloud type
Close