DXFReaderNETControlAddFace3D Method
|
Adds a 3D face to the current drawing.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax public EntityObject AddFace3D(
Vector3 FirstVertex,
Vector3 SecondVertex,
Vector3 ThirdVertex,
Vector3 FourthVertex,
short ACIColor = 256,
string LayerName = "",
string LineTypeName = ""
)
Public Function AddFace3D (
FirstVertex As Vector3,
SecondVertex As Vector3,
ThirdVertex As Vector3,
FourthVertex As Vector3,
Optional ACIColor As Short = 256,
Optional LayerName As String = "",
Optional LineTypeName As String = ""
) As EntityObject
public:
EntityObject^ AddFace3D(
Vector3 FirstVertex,
Vector3 SecondVertex,
Vector3 ThirdVertex,
Vector3 FourthVertex,
short ACIColor = 256,
String^ LayerName = L"",
String^ LineTypeName = L""
)
member AddFace3D :
FirstVertex : Vector3 *
SecondVertex : Vector3 *
ThirdVertex : Vector3 *
FourthVertex : Vector3 *
?ACIColor : int16 *
?LayerName : string *
?LineTypeName : string
(* Defaults:
let _ACIColor = defaultArg ACIColor 256
let _LayerName = defaultArg LayerName ""
let _LineTypeName = defaultArg LineTypeName ""
*)
-> EntityObject
METHOD AddFace3D(
FirstVertex AS Vector3,
SecondVertex AS Vector3,
ThirdVertex AS Vector3,
FourthVertex AS Vector3,
ACIColor AS SHORT := 256,
LayerName AS STRING := "",
LineTypeName AS STRING := ""
) AS EntityObject
Parameters
- FirstVertex
- Type: DXFReaderNETVector3
The first vertex of the 3D face. - SecondVertex
- Type: DXFReaderNETVector3
The second vertex of the 3D face. - ThirdVertex
- Type: DXFReaderNETVector3
The third vertex of the 3D face. - FourthVertex
- Type: DXFReaderNETVector3
The fourth vertex of the 3D face. - ACIColor (Optional)
- Type: SystemInt16
A number for 0 to 256 corresponding to the AutoCAD Color Index (0 = ByBlock; 256 = ByLayer. Default value = 256). - LayerName (Optional)
- Type: SystemString
The layer name. If omitted, or layername doesn't exist, the CurrentLayer will be used. - LineTypeName (Optional)
- Type: SystemString
The linetype name. If omitted, or linetype doesn't exist, the CurrentLineTypeName will be used.
Return Value
Type:
EntityObjectThe new added
3D face entity.
Remarks The entity is added to the active layout.
Examples
Adds a new 3D face entity to the current drawing with ACI color = 5 (blue).
[C#]
Vector3 FirstVertex = new Vector3(0, 0, 0);
Vector3 SecondVertex = new Vector3(0, 10, 0);
Vector3 ThirdVertex = new Vector3(10, 10, 0);
Vector3 FourthVertex = new Vector3(10, 0, 0);
dxfReaderNETControl1.AddFace3D(FirstVertex, SecondVertex, ThirdVertex, FourthVertex, 5);
[Visual Basic]
Dim FirstVertex As New Vector3(0, 0, 0)
Dim SecondVertex As New Vector3(0, 10, 0)
Dim ThirdVertex As New Vector3(10, 10, 0)
Dim FourthVertex As New Vector3(10, 0, 0)
DxfReaderNETControl1.AddFace3D(FirstVertex, SecondVertex, ThirdVertex, FourthVertex, 5)
Creates a cylinder made with 3D Faces with ACI color = 1 (Red).
[C#]
for (k = 0; k <= 35; k++)
{
double alpha = k * 10 * MathHelper.DegToRad;
double alpha2 = (k + 1) * 10 * MathHelper.DegToRad;
Vector3 FirstVertex = new Vector3(Math.Cos(alpha), Math.Sin(alpha), 0);
Vector3 SecondVertex = new Vector3(Math.Cos(alpha2), Math.Sin(alpha2), 0);
Vector3 ThirdVertex = new Vector3(Math.Cos(alpha2), Math.Sin(alpha2), 1);
Vector3 FourthVertex = new Vector3(Math.Cos(alpha), Math.Sin(alpha), 1);
dxfReaderNETControl1.AddFace3D(FirstVertex, SecondVertex, ThirdVertex, FourthVertex, 1);
}
[Visual Basic]
For k = 0 To 35
Dim alpha As Double = k * 10 * MathHelper.DegToRad
Dim alpha2 As Double = (k + 1) * 10 * MathHelper.DegToRad
Dim FirstVertex As New Vector3(Math.Cos(alpha), Math.Sin(alpha), 0)
Dim SecondVertex As New Vector3(Math.Cos(alpha2), Math.Sin(alpha2), 0)
Dim ThirdVertex As New Vector3(Math.Cos(alpha2), Math.Sin(alpha2), 1)
Dim FourthVertex As New Vector3(Math.Cos(alpha), Math.Sin(alpha), 1)
DxfReaderNETControl1.AddFace3D(FirstVertex, SecondVertex, ThirdVertex, FourthVertex, 1)
Next k
See Also