2016-07-31 2 views

답변

0

가장 쉬운 방법은 얼굴에 두 개의 추가 포인트 헬퍼를 사용하는 것입니다.이 방법을 사용하면 간단한 위치 스크립트를 사용하여 얼굴을 계산할 수 있습니다. 예 무슨 말인지 표시하려면

(
    delete objects 
    local sphere1 = Sphere segments:32 radius:10 pos:[35, 65, 0] 
    local sphere2 = Sphere segments:32 radius:20 pos:[20, 5, 15] 
    local point01 = Point wirecolor:green 
    local point02 = Point wirecolor:green 
    local point03 = Point size:5 box:on wirecolor:red 

    point01.position.controller = Attachment node:sphere1 align:false 
    point02.position.controller = Attachment node:sphere2 align:false 

    local face1 = AttachCtrl.addNewKey point01.position.controller 0 
    local face2 = AttachCtrl.addNewKey point02.position.controller 0 

    face1.face = 440 
    face1.coord = [0.5, 0] 

    face2.face = 540 
    face2.coord = [0.5, 0] 

    local ctrl = Position_Script() 
    ctrl.addObject #point01 point01 
    ctrl.addObject #point02 point02 
    ctrl.script = "point01.position + 0.8 * (point02.position - point01.position)" 
    point03.position.controller = ctrl 
) 
+0

내 친구에게 답변을 주셔서 감사합니다. 하지만이 작업은 특히 하나의 개체 안에 있습니다. 예를 들어 특정 거리 비율에서 두 개의 특정 다각형 사이의 sphere001 내에서 box001은 중간이 아닙니다. 및 sphere001의 배율이나 위치를 변경하면 box001은 다각형 사이의 거리 비율을 동시에 유지합니다. – mamitha

+0

두 개의 다른 객체의면에 도우미를 연결하는 대신 한 객체의 두 면만 사용하는 대신 솔루션이 적용됩니다. – Swordslayer

+0

플러스 비율은 거기에, 당신이 그것이 두 얼굴의 거리의 0.8 때 중간에 개체를 유지 것이라고 추측 할 줄 모르겠다. – Swordslayer

0

덕분에 내 친구, 내가이 생각을하고 완벽하게 실행됩니다

fn obb obj nod r t= 

( 글로벌 X1P = nod.pos 글로벌 V1P = polyOp.getFaceCenter OBJ R 글로벌 V2P = polyOp.getFaceCenter OBJ의 t)는 FN
obbnew OBJ 끄덕임 R2는 T2 S1 S2 S3 = ( 글로벌 v1p2 = polyOp.getFaceCenter OBJ R2 글로벌 V 2P2 = polyOp.getFaceCenter OBJ T2 글로벌 C1 = (S2 + S3)/2 전역 C2 = (v1p2 v2p2 +)/2 전역 CN = C1-C2를 nod.pos에서의 S1 = + CN

)

롤아웃 getset "알라 두발"폭 : 285 신장 325 ("이전 POS 뼈"POS 인 btn1 버튼 [22,16] 폭 : 126 신장 "새 POS"POS btn2 34 버튼 [24 가로 : 126 높이 : 34 레이블 : ll1 "pos : [66,58] 너비 : 36 높이 : 21 레이블 : lbl2" "위치 : [67,133] 너비 : 36 높이 : 21 on btn1 pressed do (누르면 btn2에 617,451,515,--- lCollar OBB $ 문자 $의 PtlCollar 8958 9498 글로벌 X1 = X1P 글로벌 Y1 = V1P 글로벌 Z1 = V2P lbl1.caption = "확인" ) ( obbnew $ 문자 $을 모든

변경 -

세트 pelves POS

- PtlCollar 8958 9498 X1 Y1의 Z1 lbl2.caption = "확인" 는)

) createDialog는 을 getset

- 스킨 가져 오기

+0

$ character = the mesh, ----- nod = 메쉬 내부의 도우미입니다. $ PtlCollar, ------ r 및 t =는면의 ID입니다. – mamitha

관련 문제