'三角化
ApplyTopoOp "TriangulatePolygons", "HEAD05", siUnspecified, siPersistentOperation
'川端スクリプト ここから
'☆はじめに☆記載されているHEAD05を対応したHEAD番号に置き換える
'古いモデルを消して新規モデルにする
SelectObj "HEAD05", "BRANCH"
DeleteObj "B:HEAD05"
SelectObj "HEAD_BASE"
Copy
Paste
SelectObj "HEAD_BASE1"
CutObj
SetValue "HEAD_BASE1.Name", "HEAD05"
'変形用のラティス作成
SelectObj "HEAD05"
GetPrimLattice
SetValue "lattice.lattice.subdivx", 12
SetValue "lattice.lattice.subdivy", 12
SetValue "lattice.lattice.subdivz", 1
SetValue "lattice.lattice.sizex", 140
SetValue "lattice.lattice.sizey", 140
SetValue "lattice.lattice.sizez", 120
SelectObj "HEAD_BASE"
AddToSelection "lattice"
Align , siY, siAlignGMIDDLE, siAlignGMIN, siAlignGMIDDLE, siAlignGMIDDLE, siAlignFMIN, siAlignGMIDDLE, False
'ここから個々の変形スクリプトを記述
SelectObj "lattice"
SelectFilter "object"
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,4,0),(6,4,1),(6,5,0),(6,5,1),(6,6,0),(6,6,1),(6,7,0),(6,7,1)]"
Translate , 0, 9.15877317748742, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,8,0),(6,8,1)]"
Translate , 0, 4.89346338902018, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(5,4,0),(5,4,1),(5,5,0),(5,5,1),(5,6,0),(5,6,1),(5,7,0),(5,7,1),(5,8,0),(5,8,1)]"
AddToSelection "lattice.pnt[(7,4,0),(7,4,1),(7,5,0),(7,5,1),(7,6,0),(7,6,1),(7,7,0),(7,7,1),(7,8,0),(7,8,1)]", , True
Translate , 0, 2.29118732605353, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,3,0),(6,3,1)]"
Translate , 0, 8.8374368290636, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(5,3,0),(5,3,1),(7,3,0),(7,3,1)]"
ActivateVertexSelTool
ActivateVertexSelTool
AddToSelection "lattice.pnt[(6,3,0),(6,3,1)]", , True
Translate , 0, 7.20087445331108, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(5,3,0),(5,3,1),(5,4,0),(5,4,1),(6,3,0),(6,3,1),(6,4,0),(6,4,1),(7,3,0),(7,3,1),(7,4,0),(7,4,1)]"
Translate , 0, 2.61849980120403, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(4,3,0),(4,3,1),(4,4,0),(4,4,1),(5,3,0),(5,3,1),(5,4,0),(5,4,1)]"
AddToSelection "lattice.pnt[(7,3,0),(7,3,1),(7,4,0),(7,4,1)]", , True
AddToSelection "lattice.pnt[(8,3,0),(8,3,1),(8,4,0),(8,4,1)]", , True
AddToSelection "lattice.pnt[(6,3,0),(6,3,1),(6,4,0),(6,4,1)]", , True
Scale , 0.697054698457223, 1, 1, siRelative, siLocal, siObj, siXYZ, , , , , , , , 0
SelectFilter "object"
ToggleVisibility
SelectObj "lattice"
ActivateVertexSelTool
ActivateVertexSelTool
ActivateVertexSelTool
ActivateVertexSelTool
RemoveFromSelection "lattice.pnt[(4,3,0),(4,3,1),(5,3,0),(5,3,1)]"
RemoveFromSelection "lattice.pnt[(6,3,0),(6,3,1)]"
RemoveFromSelection "lattice.pnt[(7,3,0),(7,3,1)]"
RemoveFromSelection "lattice.pnt[(8,3,0),(8,3,1)]"
Translate , 0, 5.02010015294876, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(4,3,0),(4,3,1)]"
AddToSelection "lattice.pnt[(5,3,0),(5,3,1)]", , True
AddToSelection "lattice.pnt[(6,3,0),(6,3,1)]", , True
AddToSelection "lattice.pnt[(7,3,0),(7,3,1)]", , True
AddToSelection "lattice.pnt[(8,3,0),(8,3,1)]", , True
Translate , 0, 5.73725731765573, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,1,0),(6,1,1),(6,2,0),(6,2,1)]"
Translate , 0, -4.54199537647745, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,2,0),(6,2,1)]"
Translate , 0, -3.10768104706352, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(5,2,0),(5,2,1)]"
AddToSelection "lattice.pnt[(7,2,0),(7,2,1)]", , True
Translate , 0, -4.54199537647745, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,1,0),(6,1,1),(6,2,0),(6,2,1)]"
Translate , 0, 10.7573574706045, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,1,0),(6,1,1)]"
Translate , 0, -6.45441448236269, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
Translate , 0, 2.86862865882786, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,2,0),(6,2,1)]"
Translate , 0, 14.8212480706106, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
SelectObj "lattice"
SelectFilter "object"
ActivateVertexSelTool
ActivateVertexSelTool
SelectGeometryComponents "lattice.pnt[(6,2,0),(6,2,1)]"
Translate , 0, -16.0165100117889, 0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
'ラティスをフリーズし、下端を揃える
ActivateObjectSelTool
SelectObj "HEAD05"
FreezeObj
SelectObj "lattice"
DeleteObj "lattice"
ActivateObjectSelTool
SelectObj "HEAD_BASE"
AddToSelection "HEAD05", , True
Align , siY, siAlignGMIDDLE, siAlignGMIN, siAlignGMIDDLE, siAlignGMIDDLE, siAlignGMIN,siAlignGMIDDLE, False
DeselectAll
ActivateObjectSelTool
'終了
'川端スクリプト ここまで
'ここでブールを行うとXSIが落ちる 2010/11/8
'変形の済んだHEAD05を顔部分と頭部分にモデルを分ける
SelectObj "HEAD05"
SelectObj "HEAD05.polymsh.cls.ClsCNST*"
SelectMembers "HEAD05.polymsh.cls.ClsCNST*"
ActivateObjectSelTool
ActivateObjectSelTool
Duplicate "HEAD05", , 2, 1, 1, 0, 0, 1, 0, 1, , , , , , , , , , , 0
ActivateRaycastPolySelTool
ActivateRaycastPolySelTool
InvertSelection "Polygon"
ApplyTopoOp "DeleteComponent", "HEAD31.poly[0-243,358-LAST]", siUnspecified, siPersistentOperation
DeselectAll
ActivateObjectSelTool
ActivateObjectSelTool
SetValue "HEAD31.Name", "HEAD05_F"
SelectObj "HEAD05"
ActivateRaycastPolySelTool
ActivateRaycastPolySelTool
ApplyTopoOp "DeleteComponent", "HEAD05.poly[244-357]", siUnspecified, siPersistentOperation
DeselectAll
ActivateObjectSelTool
ActivateObjectSelTool
DeselectAll
'穴あけ用シリンダー"TUNNEL"を作る
CreatePrim "Cylinder", "MeshSurface"
Scale , 17.3915, 1, 1, siAbsolute, siPivot, siObj, siX, , , , , , , , 0
Scale , 1, 1, 17.3915, siAbsolute, siPivot, siObj, siZ, , , , , , , , 0
Scale , 1, 33.9526, 1, siAbsolute, siPivot, siObj, siY, , , , , , , , 0
Rotate , 90, 0, 0, siRelative, siGlobal, siObj, siXYZ, , , , , , , , 0
SetValue "cylinder.Name", "TUNNEL"
SetValue "TUNNEL.polymsh.geom.subdivu", 16
SetValue "TUNNEL.polymsh.geom.subdivv", 1
FreezeObj
FreezeModeling
Translate , 0, 21.9574378024267, 0, siRelative, siGlobal, siObj, siXYZ, , , , , , , , , , 0
Translate , 0, -0.25483789792376, 0, siRelative, siGlobal, siObj, siXYZ, , , , , , , , , , 0
SelectObj "HEAD05"
ToggleVisibility
SelectObj "HEAD05_F"
ToggleVisibility
'"TUNNEL"で頭部と顔を抜く
SelectObj "HEAD05_F"
ApplyTopoOp "BooleanDifference", "HEAD05_F;TUNNEL", 3, siPersistentOperation
FreezeObj
FreezeModeling
SelectObj "HEAD05", , True
ApplyTopoOp "BooleanDifference", "HEAD05;TUNNEL", 3, siPersistentOperation
FreezeObj
FreezeModeling
SelectObj "TUNNEL", , True
DeleteObj "TUNNEL"
DeselectAll
SelectObj "HEAD05_F", , True
SelectObj "HEAD05_F.polymsh.cls.ClsCNST_t1__1-1_AUTO"
SelectMembers "HEAD05_F.polymsh.cls.ClsCNST_t1__1-1_AUTO"
InvertSelection "Polygon"
ApplyTopoOp "DeleteComponent", "HEAD05_F.poly[1-64]", siUnspecified, siPersistentOperation
DeselectAll
ActivateObjectSelTool
ActivateObjectSelTool
SelectObj "HEAD05", , True
ParentObj "HEAD05", "HEAD05_F"
SelectObj "HEAD05_F"
DeselectAll
0 件のコメント:
コメントを投稿