Return a new Geom object with any implementation-specific options defined in options.
Parameters: |
|
---|
Return the handle of the root set for this instance. The entire geometry in this instance can be accessed from this set.
Return the bounding box of the entire model.
Return the topology level of the geometry as an integer, where 0 = basic entities only, 1 = manifold entities, 2 = non-manifold entities.
Return True if the interface has information about parameterization, False otherwise.
Return a tuple representing the tolerance at the modeler level. The first value is an integer representing the type of the tolerance, where 0 = no tolerance information, 1 = modeler-level tolerance, 2 = entity-level tolerances. If this value is 1, the second value returns the modeler-level tolerance. If this value is 2, use getEntTolerance() to query the tolerance on a per-entity basis.
Load a geometry from a file.
Parameters: |
|
---|
Save the geometry to a file.
Parameters: |
|
---|
Create a sphere with the specified radius.
Parameters: |
|
---|---|
Returns: | The created entity |
Create a sphere with the x, y, and z dimensions specified in dimensions. You may also call this method with createBrick(x, y, z).
Parameters: |
|
---|---|
Returns: | The created entity |
Create a cylinder with the specified height, major_rad, and minor_rad.
Parameters: |
|
---|---|
Returns: | The created entity |
Create a prism with the specified height, sides, major_rad, and minor_rad.
Parameters: |
|
---|---|
Returns: | The created entity |
Create a cylinder with the specified height, major_rad, minor_rad, and top_rad.
Parameters: |
|
---|---|
Returns: | The created entity |
Create a torus with the specified major_rad and minor_rad.
Parameters: |
|
---|---|
Returns: | The created entity |
Delete all entities in the model.
Delete the specified entity.
Parameters: |
|
---|
Get the coordinates of the vertices specified in src.
If dest is supplied, return parameterized coordinates relative to the entity or entities specified in dest. dest may either be an entity (or array of entities) or a tuple of the entities and the basis of the parameterized coordinates. If the basis is not specified, it is inferred from the first entity in dest.
With dest supplied, if src is a single Entity or an array with one element, return the coordinates of that entity relative to each entity in dest. Likewise, if dest is a single entity,return the coordinates of each of src relative to that entity.
Parameters: |
|
---|---|
Returns: | If entities and dest (if specified) are both single Entities, the coordinates of src Otherwise, an array of coordinates. |
Transform the supplied coords relative to the bases in src and dest.
src and dest, if supplied, represent the parameterization of the input and output coordinates, respectively. Both may either be an entity (or array of entities) or a tuple of the entities and the basis of the parameterized coordinates. If the basis is not specified, it is inferredfrom the first entity in src or dest.
If src is supplied, coords should be parameterized relative to the entities in src. If src is a single Entity or an array with one element, transform the coordinates of each element in coords relative to that element. Likewise, if coords is a single vector, transform the its coordinates relative to that each entity in src.
If dest is supplied, the resulting coordinates will be parameterized relative to the entities in dest. A similar relation between arrays and single elements of dest exists as with src.
Parameters: |
|
---|---|
Returns: | If source is a single vector, and src and dest (if specified) are both single Entities, then a single transformed coordinates. Otherwise, an array of coordinates. |
Return the measure (length, area, or volume, as applicable) of the specified entities.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, the measure of that entity. Otherwise, an array of measures. |
Get the entity type for the specified entities.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, the type of the entity. Otherwise, an array of the entity types. |
Return an implementation-defined string describing the type of the specified face.
Parameters: |
|
---|---|
Returns: | A string describing the face’s type |
Return whether the specified entities have parameterization.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a boolean representing whether the entity has parameterization. Otherwise, an array of booleans. |
Return whether the specified entities are periodic.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a boolean representing whether the entity is periodic. Otherwise, an array of booleans. |
Return whether the specified faces are degenerate.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a boolean representing whether the face is degenerate. Otherwise, an array of booleans. |
Return the bounding box for the specified entities.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, the coordinates of the bounding box. Otherwise, an array of coordinates. |
Return the parametric range of the specified entities. If basis is specified, assume that the parameterization of entities is in that basis. Otherwise, infer the basis from the first element of entities.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a pair of vectors representing the parametric range. Otherwise, A pair of arrays of vectors. |
Return the tolerance for the specified entities.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, the tolerance (as a float). Otherwise, an array of tolerances. |
Get entities of the specified type adjacent to elements of entities. If entities is a single Entity, returns an array of adjacent entities. If entities is an array of entities, return an OffsetListSingle instance.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, an array of adjacent entities. Otherwise, an OffsetListSingle instance. |
Get “2nd order” adjacencies to an array of entities, that is, from each entity, through other entities of a specified “bridge” dimension, to other entities of another specified “to” dimension. If entities is a single Entity, returns an array of adjacent entities. If entities is an array of entities, return an OffsetListSingle instance.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, an array of adjacent entities. Otherwise, an OffsetListSingle instance. |
Return an array indicating whether the entities in the array entities1 are pairwise adjacent to those in entities2. If entities1 is a single Entity or an array with one element, then return an array indicating that entity’s adjacency with each entity in entities2 (likewise when entities2 is a single entity).
Parameters: |
|
---|---|
Returns: | If entities1 and entities2 are both single Entities, a boolean indicating whether they are adjacent. Otherwise, an array of booleans. |
Return the pairwise closest points on entities to the points specified in coords. If entities is a single Entity or an array with one element, return the closest points on that entity to the points in coords. Likewise, if coords is a single point, return the closest points on each of entities to that point.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, and coords is a vector, return a vector representing the closest point. Otherwise, return an array of vectors. |
Return the pairwise normals on entities at the points specified in coords. If entities is a single Entity or an array with one element, return the normals on that entity at the points in coords. Likewise, if coords is a single point, return the normals on each of entities at that point.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, and coords is a vector, return a vector representing the normal. Otherwise, return an array of vectors. |
Return the pairwise closest points and normals on entities to/at the points specified in coords. If entities is a single Entity or an array with one element, return the closest points/normals on that entity at the points in coords. Likewise, if coords is a single point, return the closest points/normalson each of entities at that point.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, and coords is a vector, return a tuple of the closest point and the normal. Otherwise, return a tuple of arrays of the closest points and normals. |
Return the pairwise tangents on entities at the points specified in coords. If entities is a single Entity or an array with one element, return the tangents on that entity at the points in coords. Likewise, if coords is a single point, return the tangents on each of entities at that point.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, and coords is a vector, return a vector representing the tangent. Otherwise, return an array of vectors. |
Return the pairwise curvatures on entities at the points specified in coords. If entities is a single Entity or an array with one element, return the curvatures on that entity at the points in coords. Likewise, if coords is a single point, return the curvatures on each of entities at that point.
If type is specified, this method assumes that the elements of entities are of that type. Otherwise, the type is inferred from the first element of entities.
Parameters: | |
---|---|
Returns: | If entities or coords are arrays, a pair of arrays of vectors representing the two curvatures of each entity. Otherwise, either 1) a single curvature vector when entities is a single edge, a vector, or 2) a pair of curvature vectors when entities is a single face. |
Note
If entities or coords are arrays, this method will always return pairs of curvatures, even for edges. Only the first curvature is valid, however.
Return pairwise data about entities at the points specified in coords. If entities is a single Entity or an array with one element, return the data for that entity at the points in coords. Likewise, if coords is a single point, return the data for each of entities at that point.
The data returned depends on the type of the entities. If type is edge, return the closest point, tangent, and curvature of entities at coords. If type is face, return the closest point, normal, and bothcurvatures of entities at coords. If type is unspecified, it is inferred from the first element of entities.
Parameters: |
|
---|---|
Returns: | If entities or coords are arrays, a tuple of arrays of vectors representing the data for each entity. Otherwise, a tuple of vectors. |
Return pairwise data about the 1st deriviative of the specified entities at coords as an OffsetListTuple instance with fields named u and v.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a pair of vectors representing the 1st derivative. Otherwise, an OffsetListTuple instance with fields named u and v. |
Return pairwise data about the 2nd deriviative of the specified entities at coords as an OffsetListTuple instance with fields named uu, vv, and uv.
Parameters: |
|
---|---|
Returns: | If entities is a single Entity, a triple of vectors representing the 2nd derivative. Otherwise, an OffsetListTuple instance with fields named uu, vv, and uv. |
Intersect a ray or rays with the model and return the entities intersected, the coordinates of intersection, and the distances along the ray(s) at which the intersection occurred. If points and vectors are single vectors, return a tuple containing the above data. If both arearrays of vectors, return an OffsetListTuple instance with fields named entities, isect, and param.
Parameters: |
|
---|---|
Returns: | If points and vectors are single vectors, a tuple of intersection data. If both are arrays of vectors, an OffsetListTuple instance with fields named entities, isect, and param. |
Return the entity (or entities) on which a point (or points) lies.
Parameters: |
|
---|---|
Returns: | If points is a single point, the entity on which it lies. Otherwise, an array of entities. |
Return the pairwise sense of a face or array of faces with respect to a region or array of regions. The sense is returned as -1, 0, or 1, representing “reversed”, “both”, or “forward”. A sense value of “both” indicates that face bounds the region once with each sense.
If faces is a single Entity or an array with one element, return the sense of that entity with respect to each entity in regions. Likewise, if regions is a single Entity, return the sense of each of faces with respect to that region.
Parameters: |
|
---|---|
Returns: | If faces and regions are both single Entities, return the sense (as an integer). Otherwise, return an array of senses. |
Return the pairwise sense of an edge or array of edges with respect to a face or array of faces. The sense is returned as -1, 0, or 1, representing “reversed”, “both”, or “forward”. A sense value of “both” indicates that edge bounds the face once with each sense.
If edges is a single Entity or an array with one element, return the sense of that entity with respect to each entity in faces. Likewise, if faces is a single Entity, return the sense of each of edges with respect to that face.
Parameters: |
|
---|---|
Returns: | If edges and faces are both single Entities, return the sense (as an integer). Otherwise, return an array of senses. |
Return the pairwise sense of a pair of vertices or pair of array of vertices with respect to an edge or array of edges. The sense is returned as -1, 0, or 1, representing “reversed”, “both”, or “forward”. A sense value of “both” indicates that the vertices bound the edge once with each sense.
If vertices1 and vertices2 are both single Entities or arrays with one element each, return the sense of those vertices with respect to each entity in edges. Likewise, if edges is a single Entity, return the sense of each of vertices1 and vertices2 with respect to that edge.
Parameters: |
|
---|---|
Returns: | If edges, vertices1, and vertices2 are alll single Entities, return the sense (as an integer). Otherwise, return an array of senses. |
Copy the specified entity and return the duplicate.
Parameters: |
|
---|---|
Returns: | The created entity |
Translate an entity in a particular direction.
Parameters: |
|
---|
Rotate an entity about an axis.
Parameters: |
|
---|
Reflect an entity about an axis.
Parameters: |
|
---|
Scale an entity in the x, y, and z directions.
Parameters: |
|
---|
Sweep (extrude) the specified entity about an axis.
Parameters: |
|
---|---|
Returns: | The created entity |
Geometrically unite the specified entities and return the result. This method may also be called with uniteEnts(ent1, ent2, ent3).
Parameters: |
|
---|---|
Returns: | The resulting entity |
Geometrically subtract entity2 from entity1 and return the result.
Parameters: |
|
---|---|
Returns: | The resulting entity |
Geometrically intersect entity1 and entity2 and return the result.
Parameters: |
|
---|---|
Returns: | The resulting entity |
Section an entity along a plane and return the result.
Parameters: |
|
---|---|
Returns: | The resulting entity |
Imprint the specified entities.
Parameters: |
|
---|
Merge the specified entities if they are within the specified tolerance.
Parameters: |
|
---|
Create an EntitySet, either ordered or unordered. Unordered entity sets can contain a given entity or set only once.
Parameters: |
|
---|---|
Returns: | The newly-created EntitySet |
Destroy an entity set.
Parameters: |
|
---|
Create a Tag with specified name, size, and type. The tag’s size is the number of values of type type that can be held. type can be a NumPy dtype (or an object convertible to one; int and Entity are special-cased), or a single character:
Type object | Type char | Result |
---|---|---|
numpy.int32 | 'i' | Integer |
numpy.float64 | 'd' | Double |
Entity | 'E' | Entity handle |
numpy.byte | 'b' | Binary data |
Parameters: |
|
---|---|
Returns: | The created Tag |
Destroy a Tag. If force is true and entities still have values set for this tag, the tag is deleted anyway and those values disappear. Otherwise the tag is not deleted if entities still have values set for it.
Parameters: |
|
---|
Get the handle of an existing tag with the specified name.
Parameters: |
|
---|---|
Returns: | The Tag with the specified name |
Get all the tags associated with a specified entity or entity set.
Parameters: |
|
---|
Return a new set referring to the handled contained in set. If set is an itaps.iBase.EntitySet instance, instance must also be specified.
Return the number of entities in the entity set. Equivalent to entset.getNumOfType(iBase.Type.all).
Return an iterator over the elements in the entity set. Equivalent to entset.iterate().
Return whether this entity set is ordered.
Get the number of entities with the specified type in this entity set.
Parameters: |
|
---|---|
Returns: | The number of entities in this entity set of the requested type |
Get entities of a specific type in this entity set. All entities of a given type are requested by specifying itaps.iBase.Type.all.
Parameters: |
|
---|---|
Returns: | Array of entity handles from this entity set meeting the requirements of type |
Get the number of sets contained in this entity set. If this entity set is not the root set, hops indicates the maximum number of contained sets from this set to one of the contained sets, inclusive of this set.
Parameters: |
|
---|---|
Returns: | Number of entity sets found |
Get the sets contained in this entity set. If this entity set is not the root set, hops indicates the maximum number of contained sets from this set to one of the contained sets, inclusive of this set.
Parameters: |
|
---|---|
Returns: | Array of entity sets found |
Add an entity, entity set, or array of entities to this entity set.
Parameters: |
|
---|
Remove an entity, entity set, or array of entities from this entity set.
Parameters: |
|
---|
Return whether an entity, entity set, or array of entities is contained in this entity set.
Parameters: |
|
---|---|
Returns: | If entities is an array of entities, an array of booleans corresponding to each element of entities. Otherwise, a single boolean. |
Return whether an entity set is a child of this entity set.
Parameters: |
|
---|---|
Returns: | True if set is a child of this entity set, false otherwise |
Get the number of child sets linked from this entity set. If hops is non-zero, this represents the maximum hops from this entity set to any child in the count.
Parameters: |
|
---|---|
Returns: | Number of children |
Get the number of parent sets linked from this entity set. If hops is non-zero, this represents the maximum hops from this entity set to any parents in the count.
Parameters: |
|
---|---|
Returns: | Number of parents |
Get the child sets linked from this entity set. If hops is non-zero, this represents the maximum hops from this entity set to any child in the result.
Parameters: |
|
---|---|
Returns: | Array of children |
Get the parents sets linked from this entity set. If hops is non-zero, this represents the maximum hops from this entity set to any parent in the result.
Parameters: |
|
---|---|
Returns: | Array of parents |
Add set as a child to this entity set.
Parameters: |
|
---|
Remove set as a child from this entity set.
Parameters: |
|
---|
Initialize an Iterator over the specified entity type for this entity set. If count is greater than 1, each step of the iteration returns an array of count entities. Equivalent to:
itaps.iGeom.Iterator(self, type, count)
Parameters: |
|
---|---|
Returns: | An Iterator instance |
Subtract contents of an entity set from this set. Equivalent to self - set.
Parameters: |
|
---|---|
Returns: | Resulting entity set |
Intersect contents of an entity set with this set. Equivalent to self & set.
Parameters: |
|
---|---|
Returns: | Resulting entity set |
Unite contents of an entity set with this set. Equivalent to self | set.
Parameters: |
|
---|
Return a new iterator on the entity set set to iterate over entities of the specified type. If count is greater than 1, each step of the iteration will return an array of count entities. All entities of a given type are requested by specifying itaps.iBase.Type.all.
Parameters: |
|
---|
Return the :class:Geom instance from which this iterator was created.
Resets the iterator to the beginning.
Return a new tag referring to the handled contained in tag. If tag is an itaps.iBase.Tag instance, instance must also be specified.
Get the tag data for an entity, entity set, or array of entities.
Set the tag data for an entity, entity set, or array of entities to data.
Remove the tag data for an entity, entity set, or array of entities.
Get the name for this tag.
Get the size in number of values for this tag.
Get the size in bytes for this tag.
Get the data type for this tag as a character code (see above).
Get the tag data for an entity, entity set, or array of entities. This method is equivalent to tag[entities]`.
Parameters: |
|
---|---|
Returns: | The tag data for entities |
Get the tag data for an entity, entity set, or array of entities. This method is deprecated in favor of tag[entities].
Set the tag data for an entity, entity set, or array of entities to data. This method is deprecated in favor of tag[entities] = data.
Remove the tag data for an entity, entity set, or array of entities. This method is deprecated in favor of del tag[entities].