Математика

Физика

Химия

Биология

Техника и    технологии

 

Скрипт для выкройки

Загрузить исходник здесь ubka.rar

--Создания юбки

---------------------------------------------------------------------------------------------------------------

--Создания выкройки

---------------------------------------------------------------------------------------------------------------

fn drawLineBetweenTwoPoints pointA pointB =

(

ss = SplineShape pos:pointA

addNewSpline ss

addKnot ss 1 #corner #line PointA

addKnot ss 1 #corner #line PointB

updateShape ss

ss  

)

--****************************************************

--****************************************************

--Создаем первую выкойку

--Создаем прямую1

newSpline1 = drawLineBetweenTwoPoints [0,-16,0] [-0.071,-18,0]

--Создаем прямую2

newSpline2 = drawLineBetweenTwoPoints [-0.071,-18,0] [-6,-18,0]

--Создаем прямую3

newSpline3 = drawLineBetweenTwoPoints [-6,-18,0] [-12,-18,0]

--Создаем прямую4

newSpline4 = drawLineBetweenTwoPoints [-12,-18,0] [-17,-18,0]

--Создаем прямую5

newSpline5 = drawLineBetweenTwoPoints [-17,-18,0] [-24,-18,0]

--Создаем прямую6

newSpline6 = drawLineBetweenTwoPoints [-24,-18,0] [-30,-18,0]

--Создаем прямую7

newSpline7 = drawLineBetweenTwoPoints [-30,-18,0] [-30,-16,0]

--Создаем прямую8

newSpline8 = drawLineBetweenTwoPoints [-30,-16,0] [0,-16,0]

 

--Создаем вторую выкойку

--Создаем прямую

newSpline21 = drawLineBetweenTwoPoints [-47.450,-31.735,0] [-37.356,-31.735,0]

newSpline22 = drawLineBetweenTwoPoints [-37.356,-31.735,0] [-39.711,-19.96,0]

newSpline23 = drawLineBetweenTwoPoints [-39.711,-19.96,0] [-45.598,-19.96,0]

newSpline24 = drawLineBetweenTwoPoints [-45.598,-19.96,0] [-47.450,-31.735,0]

--Создаем 3-ю выкойку

newSpline35 = drawLineBetweenTwoPoints [-35,-31.735,0] [-25,-31.735,0]

newSpline36 = drawLineBetweenTwoPoints [-25,-31.735,0] [-27,-20,0]

newSpline37 = drawLineBetweenTwoPoints  [-27,-20,0] [-33,-20,0]

newSpline38 = drawLineBetweenTwoPoints  [-33,-20,0] [-35,-31.735,0]

--Создаем 4-ю выкойку

newSpline39 = drawLineBetweenTwoPoints [-23,-31.9,0] [-13,-31.9,0]

newSpline40 = drawLineBetweenTwoPoints [-13,-31.9,0] [-15,-20,0]

newSpline41 = drawLineBetweenTwoPoints [-15,-20,0] [-21.7,-20,0]

newSpline42 = drawLineBetweenTwoPoints [-21.7,-20,0] [-23,-31.9,0]

--Создаем 5-ю выкойку

newSpline43 = drawLineBetweenTwoPoints [-10.25,-31.8,0] [-0.5,-31.9,0]

newSpline44 = drawLineBetweenTwoPoints [-0.5,-31.9,0] [-2.5,-19.9,0]

newSpline45 = drawLineBetweenTwoPoints [-2.5,-19.9,0] [-9,-19.9,0]

newSpline46 = drawLineBetweenTwoPoints [-9,-19.9,0] [-10.25,-31.8,0]

--Создаем 6-ю выкойку

newSpline47 = drawLineBetweenTwoPoints [2.719,-32.05,0] [12.469,-32.157,0]

newSpline48 = drawLineBetweenTwoPoints [12.469,-32.157,0] [10.469,-20.157,0]

newSpline49 = drawLineBetweenTwoPoints [10.469,-20.157,0] [3.969,-20.157,0]

newSpline50 = drawLineBetweenTwoPoints [3.969,-20.157,0] [2.719,-32.05,0]

 

 

--и объединяем все прямые

addAndWeld $Shape02 $Shape01 0.1  

addAndWeld $Shape02 $Shape03 0.1

addAndWeld $Shape02 $Shape04 0.1

addAndWeld $Shape02 $Shape05 0.1

addAndWeld $Shape02 $Shape06 0.1

addAndWeld $Shape02 $Shape07 0.1

addAndWeld $Shape02 $Shape08 0.1

addAndWeld $Shape02 $Shape09 0.1

addAndWeld $Shape02 $Shape10 0.1

addAndWeld $Shape02 $Shape11 0.1

addAndWeld $Shape02 $Shape12 0.1

addAndWeld $Shape02 $Shape13 0.1

addAndWeld $Shape02 $Shape14 0.1

addAndWeld $Shape02 $Shape15 0.1

addAndWeld $Shape02 $Shape16 0.1

addAndWeld $Shape02 $Shape17 0.1

addAndWeld $Shape02 $Shape18 0.1

addAndWeld $Shape02 $Shape19 0.1

addAndWeld $Shape02 $Shape20 0.1

addAndWeld $Shape02 $Shape21 0.1

addAndWeld $Shape02 $Shape22 0.1

addAndWeld $Shape02 $Shape23 0.1

addAndWeld $Shape02 $Shape24 0.1

addAndWeld $Shape02 $Shape25 0.1

addAndWeld $Shape02 $Shape26 0.1

addAndWeld $Shape02 $Shape27 0.1

addAndWeld $Shape02 $Shape28 0.1

--Применяеи модификатор

 

--2.Выделяем кривую

select $Shape02 --L5

 

--3.Перейти Line>Vertex

 

--Метод топора

 

max modify mode -- open mod panel

 

subobjectLevel = 0

 

modPanel.setCurrentObject $Shape02.baseObject

 

subobjectLevel = 1

 

modPanel.setCurrentObject $Shape02.baseObject

 

-- нужно выделить vertex

 

select $Shape02

 

--splineSelect

 

actionMan.executeAction 0 "40021"

 

max select all

 

--5.Нажать Break

 

--***************************

 

splineOps.startBreak $Shape02

 

--.Загрузить Garment_Maker()

 

  max modify mode -- open mod panel

 

  myGarment2=Garment_Maker()

 

  addModifier $Shape02   (myGarment2)

 

--***********************************************************

 

--***********************************************************

 

--Делаем швы

$Shape02.modifiers[#garmentmaker].setSeamTolerance 0.950000

 

 

$Shape02.Garment_Maker.selectSplines #{16,12}

subobjectLevel = 1

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{11,19}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{22,10}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{9,25}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{8,28}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

--Делаем швы между

$Shape02.Garment_Maker.selectSplines #{15,3}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

 

$Shape02.Garment_Maker.selectSplines #{18,4}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{21,5}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{24,6}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.selectSplines #{2,27}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

 

$Shape02.Garment_Maker.selectSplines #{13,7}

 $Shape02.Garment_Maker.ButtonCreateSeam()

 

$Shape02.Garment_Maker.setSeamParamsByIndex 2 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 3 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 4 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 5 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 6 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 7 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 8 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 9 90.0 25.0 on 50

$Shape02.Garment_Maker.setSeamParamsByIndex 10 90.0 25.0 on 50

 

 

--Расположения понелей

--In the Panels rollout > Deformation group choose Curved. Enter a Curvature value of -1.7 around the X-axis.

$Shape02.modifiers[#garment_maker].setPanelMatrix 1 (matrix3 [1,0,0] [0,0,1] [0,-1,0] [23.6399,-14.019,27.7087])

$Shape02.modifiers[#garment_maker].setPanelDeformType 1 1

$Shape02.modifiers[#garment_maker].setPanelAxis 1 0 --x=0

$Shape02.modifiers[#garment_maker].setPanelCurvature 1 -0.17

 

 

 

$Shape02.modifiers[#garment_maker].setPanelMatrix 2 (matrix3 [-0.207852,-0.97814,-0.0062837] [-0.000564626,-0.00630402,0.99998] [-0.97816,0.207852,0.000758023] [-8.92293,-46.4835,28.5739])

 

$Shape02.modifiers[#garment_maker].setPanelMatrix 3 (matrix3 [0.506142,-0.857597,0.0913683] [0.023866,0.119827,0.992508] [-0.86212,-0.500169,0.0811169] [16.8521,-37.8495,32.1582])

 

$Shape02.modifiers[#garment_maker].setPanelMatrix 4 (matrix3 [0.986366,0.146381,0.0752] [-0.110693,0.252,0.961376] [0.121777,-0.956592,0.264768] [26.4618,-11.9289,29.9653])

 

$Shape02.modifiers[#garment_maker].setPanelMatrix 5 (matrix3 [0.427998,1.03287,0.0022589] [-0.38,0.15547,0.911827] [0.756574,-0.411169,0.385404] [16.1372,-5.00191,28.7393])

 

$Shape02.modifiers[#garment_maker].setPanelMatrix 6 (matrix3 [-0.797528,0.603245,0.00676232] [-0.101456,-0.145164,0.984192] [0.59469,0.784234,0.176975] [21.5024,-8.25233,28.8976])

 

 

 

--Перемещаем $Shape02 в  точку пространства

 

--move $Shape02 [-1,0,-8]

 

$Shape02.pos = [-8,8,-15];

 

---------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------

 

 

Назад

 

Hosted by uCoz