SurfaceBody Object
Description
The SurfaceBody object. See the article in the overviews section.Methods
Name | Description |
BindTransientKeyToObject | Bind the transient key of a subentity on this body to a live object. |
CalculateFacets | Obtain the facetted representation for the given chord-height tolerance. If stored facets available for this tolerance, then those are returned. |
CalculateFacetsAndTextureMap | Obtain the facetted representation for the given chord-height tolerance. If stored facets available for this tolerance, then those are returned. |
CalculateFacetsWithOptions | Method that creates a new set of facets within the specified conditions. |
CalculateStrokes | Obtain the stroked or polygonal representation for the given chord-height tolerance. Client to deallocate pointers with CoTaskMemFree. |
CalculateStrokesWithOptions | Method that creates a new set of strokes within the specified conditions. |
ClearAppearanceOverrides | Method that clears all the appearance overrides that have been applied to faces or features in the body. When the SurfaceBody has its IsSolid return True, this method sets the AppearanceSourceType to kBodyAppearance for all the features and kFeatureAppearance for all the faces in the body. When the SurfaceBody has its IsSolid return False, this method sets the AppearanceSourceType to kBodyAppearance for all the features directly owned by the work surface and kFeatureAppearance for all the faces in the body. |
Delete | Method that deletes this SurfaceBody object. |
FindUsingRay | Please note: As of Autodesk Inventor 5.3 Service Pack 2, the FindUsingRay method below has superseded LocateUsingRay. Please update your applications accordingly. Method that fires a ray through the part or assembly and returns the entities intersected by the ray. The objects intersected by the ray are returned in the order in which they are intersected, with the first entities returned being those closest to the clipping plane. There is also a precedence in the type of entities returned. The entities returned can be Vertex, Edge, or Face objects. The precedence is in that order. If the ray intersects a vertex, then that vertex is returned and none of the edges or faces that connect to that vertex are returned. If the ray intersects an edge, then that edge is returned and none of the faces that connect to the edge are returned. If the ray intersects a face, then that face is returned. If desired, you can use the functionality provided by the B-Rep portion of the API to obtain the various associated objects from the entity returned. For example if you need a face but an edge is returned, you can use the Faces property of the Edge object to get the associated faces. The start point defines the physical starting point from which to determine intersections. Any intersections behind the start point are ignored. However, the ray is infinite from the start point, so all intersections in the direction of the ray will be returned. |
GetAppearanceTextureMappingData | Gets the texture mapping type and alignment. |
GetExistingFacets | Obtain the faceted representation for the given chord-height tolerance as. Fails if the tolerance supplied is not pre-existing/ |
GetExistingFacetsAndTextureMap | Method that returns the specified set of existing display facets. Existing display facets are stored to single-precision floating point accuracy. This is typically adequate accuracy for display purposes. If a more accurate result is required you can use the CalculateFacets method which will calculate new facets to a given tolerance at double-precision accuracy. |
GetExistingFacetTolerances | Method that gets the tolerances that were used to calculate the existing sets of display facets. These can be used to determine if any existing facets have been calculated within your desired accuracy. The tolerance value is also used as an index to specify which set of existing facets to retrieve when using the GetExistingFacets method. |
GetExistingStrokes | Method that returns the specified set of strokes from the SurfaceBody, Face or Edge the method was called from. Existing strokes are stored to single-precision floating point accuracy. This is typically adequate accuracy for display purposes. If a more accurate result is required you can use the CalculateStrokes method, which will calculate new strokes to a given tolerance at double-precision accuracy. If you are using this method within Apprentice, you can use the DisplayAffinity property to optimize Apprentice for access to strokes. Setting this property to True before you begin to traverse an assembly notifies Apprentice not to load any B-rep entities. |
GetExistingStrokeTolerances | Method that gets the tolerances that were used to calculate the existing sets of display strokes. These can be used to determine if any existing strokes have been calculated within your desired accuracy. The tolerance value is also used as an index to specify which set of existing strokes to retrieve when using the GetExistingStrokes method. If you are using this method within Apprentice, you can use the DisplayAffinity property to optimize Apprentice for access to strokes. Setting this property to True before you begin to traverse an assembly notifies Apprentice not to load any B-rep entities. |
GetFaceColors | Method that gets the appearance colors for the faces. The returned ObjectCollection contains the Color objects with the same sequence as the corresponding Face objects in the input Faces argument. |
GetReferenceKey | Method that generates and returns the reference key for this entity. |
IsEntityValid | Method that returns whether an entity passes the quality check at the specified level. |
LocateUsingPoint | Finds the object of specified type within the proximity of the given point. By default an internal tolerance is used to gauge the proximity. |
SetAppearanceTextureMappingData | Method that sets the texture mapping type and alignment. Setting this value is only valid when the appearance assigned to the body has a texture defined. |
Properties
Name | Description |
AffectedByFeatures | Property that returns the features that affected this body. The returned enumerator includes the feature that created this body. This property returns Nothing for transient bodies |
AlternateBody | Property that returns a new SurfaceBody that was derived from the existing body using the specified form input. The primary purpose of this property is to obtain a body that consists entirely of NURBS surfaces. |
Appearance | Gets and sets the current appearance of the body. |
AppearanceSourceType | Gets and sets the source of the appearance for the body. |
Application | Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned. |
AttributeSets | Property that returns the AttributeSets collection object associated with this object. |
ComponentDefinition | Gets the primary that resides in this file. |
ConcaveEdges | Property that returns an that contains all of the concave edges of the surface body. The CollectionType of the output EdgeCollection is set to kAllConcave. |
ConvexEdges | Property that returns an that contains all of the convex edges of the surface body. The CollectionType of the output EdgeCollection is set to kAllConvex. |
CreatedByFeature | Property that returns the feature that resulted in the creation of this body. This property returns Nothing for transient bodies. |
DataIO | Returns the DataIO object. |
Edges | Gets the referenced by this SurfaceBody. |
Exported | Read-write property that gets and sets whether the object is exported. Objects must be marked for export in order for them to be derived. |
Faces | Property that returns a collection object generated as a result of the feature. |
FaceShells | Property that returns the collection object. |
GeometryForm | Gets the form of the underlying geometry as a combination of one or more CurveGeometryFormEnum values. |
IsPointInside | Property that returns a constant indicating whether the specified point is inside, on or outside the body. |
IsSolid | Determine if this SurfaceBody is solid. |
IsTransient | Property that specified if this SurfaceBody is transient or not. |
MassProperties | Read-only property that returns mass properties for this body. |
Name | Gets and sets the name of the body. |
OrientedMinimumRangeBox | Retrieves the oriented minimum range box for this object. |
Parent | Property that returns the parent object from whom this object can logically be reached. |
PreciseRangeBox | Gets a tight fitting bounding box for this body. |
RangeBox | Property that returns a Box object which contains the opposing points of a rectangular box that is guaranteed to enclose this object. |
Type | Returns an ObjectTypeEnum indicating this object's type. |
Vertices | Property that retrieves all vertices on the body. |
Visible | Gets and sets the visibility of the body. |
Volume | Property that returns the volume of the component in database units. |
Wires | Property returning the Wires collection object associated with this SurfaceBody. |
Accessed From
ApplicationUtilities.CreateHolePatch2, ApplicationUtilities.CreateHolePatch3, ComponentGraphics.Body, CoreCavityDefinition.PartBody, CoreCavityDefinition.WorkpieceBody, CoreCavityFeature.Cavity, CoreCavityFeature.Core, CoreCavityFeatureProxy.Cavity, CoreCavityFeatureProxy.Core, Edge.Parent, EdgeLoop.Parent, EdgeLoopProxy.Parent, EdgeProxy.Parent, EdgeUse.Parent, EdgeUseProxy.Parent, Face.AlternateBody, Face.Parent, Face.SurfaceBody, FaceProxy.AlternateBody, FaceProxy.Parent, FaceProxy.SurfaceBody, FaceShell.Parent, FaceShell.SurfaceBody, FaceShellProxy.Parent, FaceShellProxy.SurfaceBody, FlatPattern.Body, InterferenceResult.InterferenceBody, MoldDefinition.Cavity, MoldDefinition.Core, MoldDefinition.PartBody, MoldDefinition.WorkpieceBody, RibDefinition.AffectedBody, RunoffSurfaceDefinition.CreateRunoff, RunoffSurfaceDefinition.CreateSingleRunoffPiece, SilhouetteCurve.Body, SilhouetteCurveProxy.Body, SolidSweepDefinition.ToolBody, SurfaceBodies.Item, SurfaceBody.AlternateBody, SurfaceBodyDefinition.CreateTransientSurfaceBody, SurfaceBodyMassProperties.Parent, SurfaceBodyProxy.AlternateBody, SurfaceBodyProxy.NativeObject, SurfaceGraphics.Body, ToNextExtent.Terminator, TransientBRep.Copy, TransientBRep.CreateIntersectionWithPlane, TransientBRep.CreateRuledSurface, TransientBRep.CreateSilhouetteCurve, TransientBRep.CreateSolidBlock, TransientBRep.CreateSolidCylinderCone, TransientBRep.CreateSolidSphere, TransientBRep.CreateSolidTorus, TransientBRep.ImprintBodies, Vertex.Parent, VertexProxy.Parent, Wire.ParentDerived Classes
SurfaceBodyProxySamples
Name | Description |
SurfaceBody Copy | This sample demonstrates copying a surface body from one part to another. This is equivalent to the Promote command, but the API is much more flexible. In order for the sample to be self-contained, it creates two parts on the fly that will be used to demonstrate copying a body from one part to another. When copying a body into a part, you provide the surface body and a matrix to define its position in the new part. This sample creates a matrix based on the position of these parts within an assembly. |
Client graphics texture-based color mapping | This test applies texture coordinates expressing distance from the origin to 'the triangle mesh of whatever Part you have open. It then creates either a discrete-band or continuous color mapper and allows you to adjust the values of the mapper to change the range of values that map to various colors. |
Associative body copy | The following sample demonstrates copying bodies (associatively and non-associatively) across parts in an assembly. |
Sketch Add | This sample demonstrates the creation of a sketch using the Sketches.Add method. |
Create sheet metal rip feature | This sample demonstrates the creation of a rip sheet metal feature. |
Transient solid body creation | The following sample demonstrates the creation of a transient solid block body. The newly created body is then displayed using client graphics in a part. |
Transient surface body creation | The following sample demonstrates the creation of a transient surface body consisting of a single rectangular face. The body is created in transient space and then copied over to a part document as a base feature. |
Create primitive BRep | This sample demonstrates the creation of primitive (solid) BRep. |
Client graphics creation of 3D primitives | This sample demonstrates the creation of 3D primitives (cylinder, cone, etc.) using client graphics. |