CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

JScript Command used for Suppressing Joint feature in DesignModeler ?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2017, 08:54
Default JScript Command used for Suppressing Joint feature in DesignModeler ?
  #1
New Member
 
Tyne and Wear
Join Date: Oct 2017
Posts: 3
Rep Power: 5
Nawfal is on a distinguished road
Hi Members,
Please, can you tell me what is the appropriate JScript Command specified for suppression of joint feature in DesignModeler, which is pertaining agToolsHandler function as I found it in the jscript file of API scripts called (agEventHandler.js). Sorry, I am newcomer to this forum and I appreciate any help from any member please because I have spent long time managing to find the suitable jscript code to automate this feature.

Thank you too much
Nawfal is offline   Reply With Quote

Old   September 1, 2019, 15:15
Smile using API command to control the Geometry in DesignModeler
  #2
New Member
 
Tyne and Wear
Join Date: Oct 2017
Posts: 3
Rep Power: 5
Nawfal is on a distinguished road
Here is the section used to modify the geometry in DesignModeler to perform the structural optimization in ANSYS






////////////////////////////////////////////////////////////////////////////////////////
//////// This Section is Intended for Hiding "Surrounding Environment" Medium //////////

var AAA = "Surrounding Environment";
HidingBody(AAA);

////////////////////////////////////////////////////////////////////
//////// This Section is Intended for Deleting the Old Joint ///////

var BBB = "Joint1";
DeletingFeature(BBB);

//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
/// This Section is Designed for Manipulating Discrete ///
//////// Set of Design Variables of the Problem //////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
var A1 = "IBeam_A";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.304800; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.128981; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.010871; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.013818; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "IBeam_B";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.457200; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.152425; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.011709; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.017551; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "IBeam_C";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.609600; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.180975; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.015875; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.022098; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "IBeam_D";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.622300; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.204470; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.020320; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.027686; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "IBeam_E";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.381000; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.139725; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.010439; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.015799; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "IBeam_F";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.508000; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.158877; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.012827; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.020193; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Channel_A";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.203200; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.064186; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.012370; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.009906; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Channel_B";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.203200; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.064186; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.012370; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.009906; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Channel_C";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.152400; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.048768; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.005080; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.008712; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Channel_D";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.381000; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.086360; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.010160; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.016510; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Channel_E";
for (var n = 1; n <= 4; n++) {
if (n==1) { var B1 = "W3"; var C1 = 0.177800; UpdatingFeatParameter(A1, B1, C1); }
else if (n==2) { var B1 = "W1"; var B2 = "W2"; var C1 = 0.055728; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
else if (n==3) { var B1 = "t3"; var C1 = 0.007976; UpdatingFeatParameter(A1, B1, C1); }
else if (n==4) { var B1 = "t1"; var B2 = "t2"; var C1 = 0.009296; UpdatingFeatParameter(A1, B1, C1); UpdatingFeatParameter(A1, B2, C1);}
}
var A1 = "Sketch10";
var B1 = "V17";
var C1 = 0.861538;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Crown Gusset";
var B1 = "Thickness (>=0)";
var C1 = 0.015077;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Crown Outer Ring";
var B1 = "Thickness (>=0)";
var C1 = 0.037500;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Crown Inner Ring";
var B1 = "Thickness (>=0)";
var C1 = 0.028500;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
// This Section is Designed for Manipulating Continuous //
//////// Set of Design Variables of the Problem //////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
var A1 = "Sketch6";
var B1 = "R6";
var C1 = 48.679806;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch10";
var B1 = "H16";
var C1 = 1.000000;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch11";
var B1 = "L18";
var C1 = 0.488190;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 68;
var C1 = 0.291067;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 69;
var C1 = 0.345823;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 70;
var C1 = 0.646875;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 71;
var C1 = 3.387683;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 72;
var C1 = 4.545067;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 73;
var C1 = 1.206536;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 74;
var C1 = 3.022823;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 75;
var C1 = 1.864147;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 76;
var C1 = 4.349677;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 77;
var C1 = 1.326099;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
var A1 = "Sketch7";
var B1 = "H" + 78;
var C1 = 2.424696;
UpdatingFeatParameter(A1, B1, C1);
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
var AAA = "Joint";
var BBB = "Joint1";
var CCC = "Target Geometries";
CreatingNewJoint(AAA, BBB, CCC);
//////////////////////////////////////////////////////////
ag.m.ShowAllBodies(); // To Show All Bodies in the Graphics
//ag.m.ShowAllFaces(); // To Show All Faces in the Graphics
//////////////////////////////////////////////////////////
ag.agApplet.GuiModeler.ZoomFit();
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
Nawfal is offline   Reply With Quote

Reply

Tags
designmodeler, editing, joint, jscript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[DesignModeler] Jscript command for Fill in DesignModeler kar.coep ANSYS Meshing & Geometry 8 April 30, 2015 18:48


All times are GMT -4. The time now is 14:39.