Solid
Description:
A 3d solid.
A 3d solid.
Remarks:
A solid is defined by the faces and edges that form its boundary.
A solid is defined by the faces and edges that form its boundary.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Solid
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Solid
public class Solid : GeometryObject
private void GetAndTransformSolidInfo(Application application, Element element, Options geoOptions)
{
// Get geometry element of the selected element
Autodesk.Revit.DB.GeometryElement geoElement = element.get_Geometry(geoOptions);
// Get geometry object
foreach (GeometryObject geoObject in geoElement)
{
// Get the geometry instance which contains the geometry information
Autodesk.Revit.DB.GeometryInstance instance = geoObject as Autodesk.Revit.DB.GeometryInstance;
if (null != instance)
{
foreach (GeometryObject instObj in instance.SymbolGeometry)
{
Solid solid = instObj as Solid;
if (null == solid || 0 == solid.Faces.Size || 0 == solid.Edges.Size)
{
continue;
}
Transform instTransform = instance.Transform;
// Get the faces and edges from solid, and transform the formed points
foreach (Face face in solid.Faces)
{
Mesh mesh = face.Triangulate();
foreach (XYZ ii in mesh.Vertices)
{
XYZ point = ii;
XYZ transformedPoint = instTransform.OfPoint(point);
}
}
foreach (Edge edge in solid.Edges)
{
foreach (XYZ ii in edge.Tessellate())
{
XYZ point = ii;
XYZ transformedPoint = instTransform.OfPoint(point);
}
}
}
}
}
}
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| ComputeCentroid() | XYZ | Returns the Centroid of this solid. | |
| GetBoundingBox() | BoundingBoxXYZ | Retrieves a box that circumscribes the solid geometry. | |
| IntersectWithCurve(Curve, SolidCurveIntersectionOptions) | The intersection results. | Calculates and returns the intersection between a curve and this solid. | |
| Dispose() | None | Causes the object to release immediately any resources it may be utilizing. | APIObject |
| op_Equality(GeometryObject, GeometryObject) | bool | Determines whether two GeometryObjects are the same. | GeometryObject |
| Equals(Object) | bool | Determines whether the specified is equal to the current . | GeometryObject |
| GetHashCode() | int | Gets the integer value of the geometry object as hash code | GeometryObject |
| op_Inequality(GeometryObject, GeometryObject) | bool | Determines whether two GeometryObjects are different. | GeometryObject |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| Edges | EdgeArray | The edges that belong to the solid. | |
| Faces | FaceArray | The faces that belong to the solid. | |
| SurfaceArea | double | Returns the total surface area of this solid. | |
| Volume | double | Returns the signed volume of this solid. | |
| IsReadOnly | bool | Identifies if the object is read-only or modifiable. | APIObject |
| GraphicsStyleId | ElementId | The ElementId of the GeometryObject's GraphicsStyle | GeometryObject |
| Id | int | A unique integer identifying the GeometryObject in its associated non view-specific GeometryElement. | GeometryObject |
| IsElementGeometry | bool | Indicates whether this geometry is obtained directly from an Element. | GeometryObject |
| Visibility | Visibility | The visibility. | GeometryObject |