Lights = Model.DS.LightList;
Min = Model.GMin;
Max = Model.GMax;
Pos = Model.GCenter;
Rad = Model.SphereRad;
$$FileName = Action.ModelFilename
function ActiveFilePath()
{
return $$FileName.substring(0, $$FileName.lastIndexOf("\\") + 1);
}
function ActiveFileNameS_RasshireniyemTolko()
{
return $$FileName.substring($$FileName.lastIndexOf("\\") + 1, $$FileName.length);
}
if(ActiveFilePath().indexOf("!!!!!!!!!!!!!!Серийные")>-1)
{seriynoye=true} else {seriynoye=false}
//скрыть 2д объекты
UnSelectAll();
/*
Action.Control.Owner.Select2DObjects()
Action.Control.Owner.SelectAuxObjects()
Action.Control.Owner.HideSelection()
Action.Control.Owner.LimitsVisible=false
*/
Action.Control.Owner.Owner.FindComponent('a3Select2DElems').Execute();
Action.Control.Owner.Owner.FindComponent('a3SelectAuxLines').Execute();
//Action.Control.Owner.Owner.FindComponent('a1HideSelection').Execute();
//Model.Selections.
for(i=0;i< Model.SelectionCount;i++ )
{
o = Model.Selections[i]
o.Visible=false
}
Model.DS.DrawLimits=false
//
//zakryt_()
Model.DS.DrawMode=4
Action.Control.FSAALevel=4
Model.DS.LineSmooth=true
Model.DS.ActiveViewport.ViewOffset.TopLeft.X=-1000
if(seriynoye){
DelLights()
UnSelectAll();
MakeLights()
} else
{
}
Camera0()
//f="\\\\192.168.137.5\\!заказы\\фонУЮТ - копия.jpg"
//Action.Control.Owner.Control3D.Background.Image = f
GladkostDugMax()
OtrisovkaSohraneniye1()
//GladkostDugMin()
//DelLights()
/*
Camera2()
OtrisovkaSohraneniye("фф")
yestAnim = false
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{yestAnim = true}
});
if (yestAnim)
{
//system.include("\\\\192.168.137.5\\!заказы\\__________ПО\\Bazis8\\Scripts\\ОткрытьДвериЯщики.js")
//alert('Двери ящики открылись?' )
otkryt_()
ViewAll();
if(seriynoye){
DelLights()
MakeLights()
}
OtrisovkaSohraneniye("ффф")
}
*/
GladkostDugMin()
DelLights()
/*if(seriynoye){
DelLights()
}
*/
Action.Control.FSAALevel=0
Model.DS.LineSmooth=false
Action.DS.Perspective = false
Model.DS.DrawLimits=true
Model.SetVisibleAllObjects()
//system.include("\\\\192.168.137.5\\!заказы\\__________ПО\\Bazis8\\Scripts\\ОткрытьДвериЯщики.js")
//zakryt_()
/////////////////////////
function OtrisovkaSohraneniye1(){
if(seriynoye){
Action.Control.Owner.Render()
//alert('Дождись отрисовки, потом жми ОК.' )
result = confirm('Дождись отрисовки, потом жми ОК.\n\nЕсли не начало отрисовываться жми "Отмена".' )
if(!result){
//OtrisovkaSohraneniye(fileName)
Action.Control.Owner.Render()
alert('Дождись отрисовки, потом жми ОК.' )
}
}
//+Action.Control.Owner.Control3D.Rendering
//while ()
for(i=4;i<9;i++)
{
f = ActiveFilePath()+'\\ф'+i+'.jpg'
if(!system.fileExists(f))
{break}
}
//fileName = prompt("Введите имя файла","ф4")
Action.Control.SavePicture(f)
}
function OtrisovkaSohraneniye(fileName){
if(seriynoye){
Action.Control.Owner.Render()
alert('Дождись отрисовки, потом жми ОК, чтобы сохранить '+fileName+'.jpg.' )
}
//+Action.Control.Owner.Control3D.Rendering
//while ()
f = ActiveFilePath()+'\\'+fileName+'.jpg'
Action.Control.Owner.SaveToPicture(f)
}
function MakeLights() {
koef_Udaleniya = Model.GMax.y/1000
if(Model.GMax.y<1000){koef_Udaleniya = 1}
//alert(koef_Udaleniya)
nl = NewVector(Model.GMin.x-300,Model.GMin.y-100,Model.GMax.z+200*koef_Udaleniya)
np = NewVector(Model.GMax.x+300,Model.GMin.y-100,Model.GMax.z+200*koef_Udaleniya)
vp = NewVector(Model.GMax.x+300,Model.GMax.y+300,Model.GMax.z+400*koef_Udaleniya)
vl = NewVector(Model.GMin.x-300,Model.GMax.y+300,Model.GMax.z+400*koef_Udaleniya)
Asm = AddAssembly("НизЛево");
Asm.Load('ЛампаНиз.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = nl;
lamp.Name = "НизЛево" ;
Asm = AddAssembly("НизПраво");
Asm.Load('ЛампаНиз.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = np;
lamp.Name = "НизПраво" ;
Asm = AddAssembly("ВерхЛево");
Asm.Load('ЛампаВерх.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = vl;
lamp.Name = "ВерхЛево" ;
Asm = AddAssembly("ВерхПраво");
Asm.Load('ЛампаВерхМягкая.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = vp;
//lamp.Softness = 0.5
lamp.Name = "ВерхПраво" ;
}
function Camera0()
{
/*Action.DS.AngleX=15
Action.DS.AngleY=30
if(seriynoye){
*/
//Action.DS.Perspective = true
/*}else{Action.DS.Perspective = false}
ViewAll();
*/
}
function Camera1()
{
Action.DS.AngleX=15
Action.DS.AngleY=30
if(seriynoye){
Action.DS.Perspective = true
}else{Action.DS.Perspective = false}
ViewAll();
}
function Camera2()
{
Action.DS.AngleX=15
Action.DS.AngleY=30-50
if(seriynoye){
Action.DS.Perspective = true
}else{Action.DS.Perspective = false}
ViewAll();
}
function GladkostDugMax()
{
Action.Control.Background.Mode=2
Action.Control.DS.ModelAccuracy=0
Model.DS.ModelAccuracy=0
}
function GladkostDugMin()
{
Action.Control.Background.Mode=0
Action.Control.DS.ModelAccuracy=1
Model.DS.ModelAccuracy=0
}
function DelLights()
{
Lights = Model.DS.LightList;
while (Lights.Count > 0)
DeleteObject(Lights.Light[0]);
}
function otkryt_(){
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{
obj.Animation.AnimPos=1
}
});
}
function zakryt_(){
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{
obj.Animation.AnimPos=0
}
});
}
/*QualityRendering()
function QualityRendering() {
system.secureExec("" +
"AQAA/wF4nGNigAA2IA7OLy1KTv0PBIwgIUaYlCaQ" +
"cGRIZihhyGTIZ8hj0GNwBtMlDEVAOgfID2JIZKgE" +
"iiYyFANFNcAypQypDDoMCljZmgzWDAAvIhVd" +
"");
}
*/Lights = Model.DS.LightList;
Min = Model.GMin;
Max = Model.GMax;
Pos = Model.GCenter;
Rad = Model.SphereRad;
$$FileName = Action.ModelFilename
function ActiveFilePath()
{
return $$FileName.substring(0, $$FileName.lastIndexOf("\\") + 1);
}
function ActiveFileNameS_RasshireniyemTolko()
{
return $$FileName.substring($$FileName.lastIndexOf("\\") + 1, $$FileName.length);
}
if(ActiveFilePath().indexOf("!!!!!!!!!!!!!!Серийные")>-1)
{seriynoye=true} else {seriynoye=false}
//скрыть 2д объекты
UnSelectAll();
/*
Action.Control.Owner.Select2DObjects()
Action.Control.Owner.SelectAuxObjects()
Action.Control.Owner.HideSelection()
Action.Control.Owner.LimitsVisible=false
*/
Action.Control.Owner.Owner.FindComponent('a3Select2DElems').Execute();
Action.Control.Owner.Owner.FindComponent('a3SelectAuxLines').Execute();
//Action.Control.Owner.Owner.FindComponent('a1HideSelection').Execute();
//Model.Selections.
for(i=0;i< Model.SelectionCount;i++ )
{
o = Model.Selections[i]
o.Visible=false
}
Model.DS.DrawLimits=false
//
//zakryt_()
Model.DS.DrawMode=4
Action.Control.FSAALevel=4
Model.DS.LineSmooth=true
Model.DS.ActiveViewport.ViewOffset.TopLeft.X=-1000
if(seriynoye){
DelLights()
UnSelectAll();
MakeLights()
} else
{
}
Camera0()
//f="\\\\192.168.137.5\\!заказы\\фонУЮТ - копия.jpg"
//Action.Control.Owner.Control3D.Background.Image = f
GladkostDugMax()
OtrisovkaSohraneniye1()
//GladkostDugMin()
//DelLights()
/*
Camera2()
OtrisovkaSohraneniye("фф")
yestAnim = false
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{yestAnim = true}
});
if (yestAnim)
{
//system.include("\\\\192.168.137.5\\!заказы\\__________ПО\\Bazis8\\Scripts\\ОткрытьДвериЯщики.js")
//alert('Двери ящики открылись?' )
otkryt_()
ViewAll();
if(seriynoye){
DelLights()
MakeLights()
}
OtrisovkaSohraneniye("ффф")
}
*/
GladkostDugMin()
DelLights()
/*if(seriynoye){
DelLights()
}
*/
Action.Control.FSAALevel=0
Model.DS.LineSmooth=false
Action.DS.Perspective = false
Model.DS.DrawLimits=true
Model.SetVisibleAllObjects()
//system.include("\\\\192.168.137.5\\!заказы\\__________ПО\\Bazis8\\Scripts\\ОткрытьДвериЯщики.js")
//zakryt_()
/////////////////////////
function OtrisovkaSohraneniye1(){
if(seriynoye){
Action.Control.Owner.Render()
//alert('Дождись отрисовки, потом жми ОК.' )
result = confirm('Дождись отрисовки, потом жми ОК.\n\nЕсли не начало отрисовываться жми "Отмена".' )
if(!result){
//OtrisovkaSohraneniye(fileName)
Action.Control.Owner.Render()
alert('Дождись отрисовки, потом жми ОК.' )
}
}
//+Action.Control.Owner.Control3D.Rendering
//while ()
for(i=4;i<9;i++)
{
f = ActiveFilePath()+'\\ф'+i+'.jpg'
if(!system.fileExists(f))
{break}
}
//fileName = prompt("Введите имя файла","ф4")
Action.Control.SavePicture(f)
}
function OtrisovkaSohraneniye(fileName){
if(seriynoye){
Action.Control.Owner.Render()
alert('Дождись отрисовки, потом жми ОК, чтобы сохранить '+fileName+'.jpg.' )
}
//+Action.Control.Owner.Control3D.Rendering
//while ()
f = ActiveFilePath()+'\\'+fileName+'.jpg'
Action.Control.Owner.SaveToPicture(f)
}
function MakeLights() {
koef_Udaleniya = Model.GMax.y/1000
if(Model.GMax.y<1000){koef_Udaleniya = 1}
//alert(koef_Udaleniya)
nl = NewVector(Model.GMin.x-300,Model.GMin.y-100,Model.GMax.z+200*koef_Udaleniya)
np = NewVector(Model.GMax.x+300,Model.GMin.y-100,Model.GMax.z+200*koef_Udaleniya)
vp = NewVector(Model.GMax.x+300,Model.GMax.y+300,Model.GMax.z+400*koef_Udaleniya)
vl = NewVector(Model.GMin.x-300,Model.GMax.y+300,Model.GMax.z+400*koef_Udaleniya)
Asm = AddAssembly("НизЛево");
Asm.Load('ЛампаНиз.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = nl;
lamp.Name = "НизЛево" ;
Asm = AddAssembly("НизПраво");
Asm.Load('ЛампаНиз.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = np;
lamp.Name = "НизПраво" ;
Asm = AddAssembly("ВерхЛево");
Asm.Load('ЛампаВерх.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = vl;
lamp.Name = "ВерхЛево" ;
Asm = AddAssembly("ВерхПраво");
Asm.Load('ЛампаВерхМягкая.fr3d');
lamp = Asm.Objects[0]
lamp.Owner = Model;
Asm.Free();
lamp.Position = vp;
//lamp.Softness = 0.5
lamp.Name = "ВерхПраво" ;
}
function Camera0()
{
/*Action.DS.AngleX=15
Action.DS.AngleY=30
if(seriynoye){
*/
//Action.DS.Perspective = true
/*}else{Action.DS.Perspective = false}
ViewAll();
*/
}
function Camera1()
{
Action.DS.AngleX=15
Action.DS.AngleY=30
if(seriynoye){
Action.DS.Perspective = true
}else{Action.DS.Perspective = false}
ViewAll();
}
function Camera2()
{
Action.DS.AngleX=15
Action.DS.AngleY=30-50
if(seriynoye){
Action.DS.Perspective = true
}else{Action.DS.Perspective = false}
ViewAll();
}
function GladkostDugMax()
{
Action.Control.Background.Mode=2
Action.Control.DS.ModelAccuracy=0
Model.DS.ModelAccuracy=0
}
function GladkostDugMin()
{
Action.Control.Background.Mode=0
Action.Control.DS.ModelAccuracy=1
Model.DS.ModelAccuracy=0
}
function DelLights()
{
Lights = Model.DS.LightList;
while (Lights.Count > 0)
DeleteObject(Lights.Light[0]);
}
function otkryt_(){
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{
obj.Animation.AnimPos=1
}
});
}
function zakryt_(){
Model.forEach(function(obj) {
if ((obj.AnimType >0))
{
obj.Animation.AnimPos=0
}
});
}
/*QualityRendering()
function QualityRendering() {
system.secureExec("" +
"AQAA/wF4nGNigAA2IA7OLy1KTv0PBIwgIUaYlCaQ" +
"cGRIZihhyGTIZ8hj0GNwBtMlDEVAOgfID2JIZKgE" +
"iiYyFANFNcAypQypDDoMCljZmgzWDAAvIhVd" +
"");
}
*/
[свернуть]