3dFace

3dFace

Anonymous
Not applicable
391 Views
3 Replies
Message 1 of 4

3dFace

Anonymous
Not applicable
How does it work? I put this in my code:

Dim Obj As Acad3DFace
Dim point1(0 To 2) As Double
Dim point2(0 To 2) As Double
Dim point3(0 To 2) As Double
Dim point4(0 To 2) As Double

point1(0) = 0: point1(1) = 0: point1(2) = 0
point2(0) = 5: point1(1) = 0: point1(2) = 0
point3(0) = 5: point1(1) = 5: point1(2) = 0
point4(0) = 0: point1(1) = 5: point1(2) = 0

Set Obj = ThisDrawing.ModelSpace.Add3DFace(point1, point2, point3, point4)

But no matter the values I put in the point variables, I can never form a square 3dface, only (seemingly) random triangles!
0 Likes
392 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
You keep resetting point1's y and z.

wrote in message news:5963323@discussion.autodesk.com...
How does it work? I put this in my code:

Dim Obj As Acad3DFace
Dim point1(0 To 2) As Double
Dim point2(0 To 2) As Double
Dim point3(0 To 2) As Double
Dim point4(0 To 2) As Double

point1(0) = 0: point1(1) = 0: point1(2) = 0
point2(0) = 5: point1(1) = 0: point1(2) = 0
point3(0) = 5: point1(1) = 5: point1(2) = 0
point4(0) = 0: point1(1) = 5: point1(2) = 0

Set Obj = ThisDrawing.ModelSpace.Add3DFace(point1, point2, point3, point4)

But no matter the values I put in the point variables, I can never form a square 3dface, only (seemingly) random triangles!
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks.... I feel stupid. Should I laugh or cry? Anyways, thanks a lot.

ps: I'm 17, I'm using my dad's AutoCAD for a school project, I'm still getting the hang of it.
0 Likes
Message 4 of 4

Anonymous
Not applicable
We've all been there... Try placing your assignments on multiple lines which
makes it easier to read and find typos.

Dim pt1(2) as Double
pt1(0) = ...
pt1(1) = ...
pt1(2) = ...

Dim pt2(2) as Double
...

wrote in message news:5963327@discussion.autodesk.com...
Thanks.... I feel stupid. Should I laugh or cry? Anyways, thanks a lot.

ps: I'm 17, I'm using my dad's AutoCAD for a school project, I'm still getting the hang of it.
0 Likes