CSShape ObjectThe CSShape Object represents a 3DCrafter Shape.
Gets the unique identifier for the shape. Syntax shape.GetID() As Variant Gets the name of the shape. Syntax shape.GetName() As Variant Sets the name of the shape. Syntax shape.SetName(Name As Variant) Reduces the number of points in the shape using Direct3D's mesh simplification function. Note that this will result in shape being triangulated. Syntax shape.Reduce(Level as Variant) Remarks Level is the percentage of points you would like to retain in the shape. For example a level of 50 would retain 50% of the original points in the shape. Optimizes the shape to remove unused points, duplicate points, and faces with two or fewer points. Syntax shape.Optimize() Clear Clears the contents of the shape. Syntax shape.Clear() Adds a CSShape shape to the shape. Syntax shape.AddShape(Shape As Variant) Transforms the shape from model coordinates to world coordinates. Syntax shape.Transform() Transforms the shape from world coordinates to model coordinates. Syntax shape.InverseTransform() Gets the shape's bounding box. Syntax shape.GetBoundingBox(MinX As Variant, Creates a CSFace shape and adds it to the shape. Syntax shape.CreateFace() As CSFace Gets the number of CSFace shapes in the shape. Syntax shape.GetFaceCount() As Variant Gets the specified CSFace shape. Syntax shape.GetFace(FaceID As Variant) As CSFace Deletes the specified CSFace from the shape. Syntax shape.DeleteFace(FaceID As Variant) Gets the number of points in the shape. Syntax shape.GetPointCount() As Variant Gets the specified point. Syntax shape.GetPointXYZ(PointID As Variant, Sets the specified point. Syntax shape.SetPointXYZ(PointID As Variant, Adds a point to the shape and returns its index. If an identical point is found the index of the existing point is returned. Syntax shape.AddOptimizedPointXYZ(X As Variant, AddOptimizedNormalXYZ Adds a normal to the shape and returns its index. If an identical normal is found the index of the existing normal is returned. Syntax shape.AddOptimizedNormalXYZ(X As Variant, Gets the number of texture coordinates in the shape. Syntax shape.GetTextureCoordinateCount() As Variant Gets the specified texture coordinate. Syntax shape.GetTextureCoordinateUV(UVID As Variant, Sets the specified texture coordinate. Syntax shape.SetTextureCoordinateUV(UVID As Variant, AddOptimizedTextureCoordinateUV Adds a texture coordinate to the shape and returns its index. If an identical texture coordinate is found the index of the existing texture coordinate is returned. Syntax shape.AddOptimizedTextureCoordinateUV(U As Variant, Generates default creasing (normals) for the shape. Syntax shape.Crease Generates creasing (normals) for the shape based on the crease angle provided. Syntax shape.Crease2(CreasingAngle As Variant) Remarks The creasing angle is in Radians. pi Radians = 180 degrees.
Gets the creasing factor for the shape. Syntax shape.GetCreasingFactor() As Variant Remarks This is a value from 0 to 100. When 3DCrafter generates creasing it considers 100 to mean pi Radians (180 degrees). Sets the creasing factor for the shape. Syntax shape.SetCreasingFactor(CreasingFactor As Variant) Remarks This is a value from 0 to 100. When 3DCrafter generates creasing it considers 100 to mean pi Radians (180 degrees). Gets the number of normals in the shape. Syntax shape.GetNormalCount() As Variant Gets the specified normal. Syntax shape.GetNormalXYZ(NormalID As Variant, Sets the specified normal. Syntax shape.SetNormalXYZ(NormalID As Variant, Gets the number of CSGroup shapes in the scene that behave as bones and affect the shape. Syntax shape.GetBoneCount() As Variant Remarks In 3DCrafter bones are separate shapes, but in the 3DCrafter API bones are simply groups that have been enabled to affect points as they are moved. Gets the specified CSGroup shape that behaves as a bone affecting the shape. Syntax shape.GetBone(BoneID As Variant) As CSGroup Remarks In 3DCrafter bones are separate shapes, but in the 3DCrafter API bones are simply groups that have been enabled to affect points as they are moved. Gets the number of materials used by this shape. Syntax shape.GetMaterialCount() As Variant Gets the specified CSMaterial shape. Syntax shape.GetMaterial(MaterialID As Variant) As CSMaterial Sets a material for the shape. Syntax shape.ApplyMaterial(Material As Variant) Remarks This material will be applied to each face that makes up the shape. Gets an index to the material that has been applied to a face. Syntax shape.GetFaceMaterialID(FaceID As Variant) As Variant Remarks Use this in conjunction with GetMaterial to retrieve the specific material applied to a face. GetParentGroup Gets the CSGroup that is the parent group of the shape. Syntax shape.GetParentGroup() As CSGroup Gets the value of a custom field. Syntax shape.GetCustomFieldValue(FieldID as Variant) As Variant Remarks The FieldID can be determined using GetShapeCustomFieldID of the CSScene shape. Sets the value of a custom field. Syntax shape.SetCustomFieldValue(FieldID as Variant, FieldValue As Variant) Remarks The FieldID can be determined using GetShapeCustomFieldID of the CSScene shape. Gets the number of selected items (points/edges/faces) in the shape. Syntax shape.GetActiveFaceCount() As Variant Gets the ID of the selected item. Syntax shape.GetSelectionItem(Index As Variant) As Variant Remarks The selection item will be either a point, edge or face. The type is given by GetSelectionType. For edges, this will be the face the edge belongs to. Gets the ID of the selected sub-item. Syntax shape.GetSelectionSubItem(Index As Variant) As Variant Remarks This is used only when the
GetSelectionType returns a type of Edge (3). It will be the starting
point of the selected edge within the face identified by
GetSelectionItem. Gets the type of the selection. Syntax shape.GetSelectionType() As Variant Remarks 1 = Face |