Milli aviasiya akademiyasi


Rotate komandasının 3d obyektlərə tətbiqi



Yüklə 13,77 Mb.
səhifə237/248
tarix01.01.2022
ölçüsü13,77 Mb.
#104836
1   ...   233   234   235   236   237   238   239   240   ...   248
Rotate komandasının 3d obyektlərə tətbiqi

Sub Rotate_3DBox()

Dim boxObj As Acad3DSolid

Dim length As Double

Dim width As Double

Dim height As Double

Dim center(0 To 2) As Double

center(0) = 5: center(1) = 5: center(2) = 0

length = 5: width = 7: height = 10

Set boxObj = ThisDrawing.ModelSpace.AddBox(center, length, width, height)

' İki nöqtə ətrafında fırlatma

Dim rotatePt1(0 To 2) As Double, rotatePt2(0 To 2) As Double

Dim rotateAngle As Double

rotatePt1(0) = -3: rotatePt1(1) = 4: rotatePt1(2) = 0

rotatePt2(0) = -3: rotatePt2(1) = -4: rotatePt2(2) = 0

rotateAngle = 30

rotateAngle = rotateAngle * 3.141592 / 180#

' Fırlanma

boxObj.Rotate3D rotatePt1, rotatePt2, rotateAngle

ZoomAll


End Sub

3d Mirror

Sub MirrorABox3D()

' prizma

Dim boxObj As Acad3DSolid

Dim length As Double,width As Double,height As Double

Dim center(0 To 2) As Double

center(0) = 5#: center(1) = 5#: center(2) = 0

length = 5#: width = 7: height = 10#

Set boxObj = ThisDrawing.ModelSpace.AddBox(center, length, width, height)

' Simmetriya müstəvisi yaradılır

Dim mirrPt1(0 To 2) As Double,mirrPt2(0 To 2) As Double,mirrPt3(0 To 2) As Double

mirrPt1(0) = 1.25: mirrPt1(1) = 0: mirrPt1(2) = 0

mirrPt2(0) = 1.25: mirrPt2(1) = 2: mirrPt2(2) = 0

mirrPt3(0) = 1.25: mirrPt3(1) = 2: mirrPt3(2) = 2

' Simmetrik çevirmə

Dim mirrorBoxObj As Acad3DSolid

Set mirrorBoxObj = boxObj.Mirror3D(mirrPt1, mirrPt2, mirrPt3)

mirrorBoxObj.Color = acRed

ZoomAll

End Sub


Yüklə 13,77 Mb.

Dostları ilə paylaş:
1   ...   233   234   235   236   237   238   239   240   ...   248




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin