The Solid class gives you access to solid cards in PRIMER. More...
The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
| Name | Type | Description |
| a1 | real | x component of material direction a |
| a2 | real | y component of material direction a |
| a3 | real | z component of material direction a |
| colour | Colour | The colour of the solid |
| d1 | real | x component of material in-plane vector |
| d2 | real | y component of material in-plane vector |
| d3 | real | z component of material in-plane vector |
| dof | logical | If DOF option is set. Can be true or false |
| edges | constant | Bitwise code of Solid.EDGE_1, Solid.EDGE_2, Solid.EDGE_3, Solid.EDGE_4, Solid.EDGE_5, Solid.EDGE_6, Solid.EDGE_7, Solid.EDGE_8, Solid.EDGE_9, Solid.EDGE_10, Solid.EDGE_11 and Solid.EDGE_12 representing which edges of the solid are free faces |
| eid | integer | Solid number. Also see the label property which is an alternative name for this. |
| exists (read only) | logical | true if solid exists, false if referred to but not defined. |
| faces | constant | Bitwise code of Solid.FACE_1, Solid.FACE_2, Solid.FACE_3, Solid.FACE_4, Solid.FACE_5 and Solid.FACE_6 representing which faces of the solid are internal faces. Note that this is calculated from the solids that are currently visible so blanking solids will affect this property once graphics have been updated. |
| h20 | logical | If _H20 option is set. Can be true or false |
| h27 | logical | If _H27 option is set. Can be true or false |
| h64 | logical | If _H64 option is set. Can be true or false |
| h8toh20 | logical | If _H8TOH20 option is set. Can be true or false |
| h8toh27 | logical | If _H8TOH27 option is set. Can be true or false |
| h8toh64 | logical | If _H8TOH64 option is set. Can be true or false |
| include | integer | The Include file number that the solid is in. |
| label | integer | Solid number. Also see the eid property which is an alternative name for this. |
| model (read only) | integer | The Model number that the solid is in. |
| n1 | integer | Node number 1 |
| n10 | integer | Node number 10 |
| n11 | integer | Node number 11 |
| n12 | integer | Node number 12 |
| n13 | integer | Node number 13 |
| n14 | integer | Node number 14 |
| n15 | integer | Node number 15 |
| n16 | integer | Node number 16 |
| n17 | integer | Node number 17 |
| n18 | integer | Node number 18 |
| n19 | integer | Node number 19 |
| n2 | integer | Node number 2 |
| n20 | integer | Node number 20 |
| n21 | integer | Node number 21 |
| n22 | integer | Node number 22 |
| n23 | integer | Node number 23 |
| n24 | integer | Node number 24 |
| n25 | integer | Node number 25 |
| n26 | integer | Node number 26 |
| n27 | integer | Node number 27 |
| n28 | integer | Node number 28 |
| n29 | integer | Node number 29 |
| n3 | integer | Node number 3 |
| n30 | integer | Node number 30 |
| n31 | integer | Node number 31 |
| n32 | integer | Node number 32 |
| n33 | integer | Node number 33 |
| n34 | integer | Node number 34 |
| n35 | integer | Node number 35 |
| n36 | integer | Node number 36 |
| n37 | integer | Node number 37 |
| n38 | integer | Node number 38 |
| n39 | integer | Node number 39 |
| n4 | integer | Node number 4 |
| n40 | integer | Node number 40 |
| n41 | integer | Node number 41 |
| n42 | integer | Node number 42 |
| n43 | integer | Node number 43 |
| n44 | integer | Node number 44 |
| n45 | integer | Node number 45 |
| n46 | integer | Node number 46 |
| n47 | integer | Node number 47 |
| n48 | integer | Node number 48 |
| n49 | integer | Node number 49 |
| n5 | integer | Node number 5 |
| n50 | integer | Node number 50 |
| n51 | integer | Node number 51 |
| n52 | integer | Node number 52 |
| n53 | integer | Node number 53 |
| n54 | integer | Node number 54 |
| n55 | integer | Node number 55 |
| n56 | integer | Node number 56 |
| n57 | integer | Node number 57 |
| n58 | integer | Node number 58 |
| n59 | integer | Node number 59 |
| n6 | integer | Node number 6 |
| n60 | integer | Node number 60 |
| n61 | integer | Node number 61 |
| n62 | integer | Node number 62 |
| n63 | integer | Node number 63 |
| n64 | integer | Node number 64 |
| n7 | integer | Node number 7 |
| n8 | integer | Node number 8 |
| n9 | integer | Node number 9 |
| nodes (read only) | integer | Number of nodes solid has |
| ns1 | integer | Scalar Node number 1 |
| ns2 | integer | Scalar Node number 2 |
| ns3 | integer | Scalar Node number 3 |
| ns4 | integer | Scalar Node number 4 |
| ns5 | integer | Scalar Node number 5 |
| ns6 | integer | Scalar Node number 6 |
| ns7 | integer | Scalar Node number 7 |
| ns8 | integer | Scalar Node number 8 |
| ortho | logical | If _ORTHO option is set. Can be true or false |
| p21 | logical | If _P21 option is set. Can be true or false |
| p40 | logical | If _P40 option is set. Can be true or false |
| pid | integer | Part number |
| t15 | logical | If _T15 option is set. Can be true or false |
| t20 | logical | If _T20 option is set. Can be true or false |
| tet4totet10 | logical | If _TET4TOTET10 option is set. Can be true or false |
| transparency | integer | The transparency of the solid (0-100) 0% is opaque, 100% is transparent. |
Detailed DescriptionThe Solid class allows you to create, modify, edit and manipulate solid cards. See the documentation below for more details. |
Constructornew Solid(Model[Model], options [object])DescriptionCreate a new Solid object. If you are creating a 4 noded solid either only give 4 nodes or give 8 nodes but make nodes 4 to 8 the same number. If you are creating a 6 noded solid either only give 6 nodes or give 8 nodes but make nodes 5 and 6 the same number and nodes 7 and 8 the same number. |
Model that solid will be created in
Options for creating the solid
Object has the following properties:
| Name | Type | Description |
| eid | integer | Solid number |
| nodes | array | Array of Node IDs for the solid. At least 4 nodes must be given |
| pid | integer | Part number |
ReturnsSolid object Return typeSolid |
ExampleTo create a new solid in model m with label 100, part 10 and nodes 1, 2, 3, 4: var s = new Solid(m, {eid: 100, pid: 10, nodes: [1,2,3,4]} );
|
new Solid(Model[Model], eid[integer], pid[integer], n1[integer], n2[integer], n3[integer], n4[integer], n5 (optional)[integer], n6 (optional)[integer], n7 (optional)[integer], n8 (optional)[integer]) [deprecated]This function is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionCreate a new Solid object. Use either 4, 6 or 8 nodes when creating a new solid. If you are creating a 4 noded solid either only give 4 nodes or give 8 nodes but make nodes 4 to 8 the same number. If you are creating a 6 noded solid either only give 6 nodes or give 8 nodes but make nodes 5 and 6 the same number and nodes 7 and 8 the same number. |
Model that solid will be created in
Solid number
Part number
Node number 1 or array containing all nodes (in which case other no other arguement has to be given after this)
Node number 2
Node number 3
Node number 4
Node number 5
Node number 6
Node number 7
Node number 8
ReturnsSolid object Return typeSolid |
ExampleTo create a new solid in model m with label 100, part 10 and nodes 1, 2, 3, 4, 5, 6, 7, 8: var s = new Solid(m, 100, 10, 1, 2, 3, 4, 5, 6, 7, 8);
|
Details of functionsAspectRatio()DescriptionCalculates the aspect ratio for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the aspect ratio for solid s: var ratio = s.AspectRatio();
|
AssociateComment(Comment[Comment])DescriptionAssociates a comment with a solid. |
Comment that will be attached to the solid
ReturnsNo return value |
ExampleTo associate comment c to the solid s: s.AssociateComment(c);
|
Blank()DescriptionBlanks the solid |
No arguments
ReturnsNo return value |
ExampleTo blank solid s: s.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the solids in the model. |
Model that all solids will be blanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the solids in model m: Solid.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged solids in the model. |
Model that all the flagged solids will be blanked in
Flag set on the solids that you want to blank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the solids in model m flagged with f: Solid.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the solid is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if solid s is blanked: if (s.Blanked() ) do_something...
|
Browse(modal (optional)[boolean])DescriptionStarts an edit panel in Browse mode. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Browse solid s: s.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the solid. |
Flag to clear on the solid
ReturnsNo return value |
ExampleTo clear flag f for solid s: s.ClearFlag(f);
|
CoordsToIsoparametric(Model[Model], x[real], y[real], z[real], n1[integer], n2[integer], n3[integer], n4[integer]) [static]DescriptionCalculates the isoparametric coordinates for a point on 3 or 4 noded segment |
Model designated model
X coordinate of point
Y coordinate of point
Z coordinate of point
node 1 of segment
node 2 of segment
node 3 of segment
node 4 of segment
ExampleTo calculate the isoparametric coordinates of point (100, 100, 20) on segment defined by nodes 11,12,13,14: var isocoords = Solid.CoordsToIsoparametric(100, 100, 20, 11, 12, 13, 14);
|
Copy(range (optional)[boolean])DescriptionCopies the solid. The target include of the copied solid can be set using Options.copy_target_include. |
If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer().
ReturnsSolid object Return typeSolid |
ExampleTo copy solid s into solid z: var z = s.Copy();
|
Create(Model[Model], modal (optional)[boolean]) [static]DescriptionStarts an interactive editing panel to create a solid |
Model that the solid will be created in.
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
ReturnsSolid object (or null if not made). Return typeSolid |
ExampleTo start creating a solid in model m: var s = Solid.Create(m);
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a solid. |
Comment that will be detached from the solid
ReturnsNo return value |
ExampleTo detach comment c from the solid s: s.DetachComment(c);
|
Edit(modal (optional)[boolean])DescriptionStarts an interactive editing panel. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Edit solid s: s.Edit();
|
ElemCut(Database cross section label[integer])DescriptionReturns coordinates of the intersections between a solid and a database cross section. |
The label of the database cross section.
Returns |
Object with the following properties:
| Name | Type | Description |
| face1 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 1. Null if no cut on this face. |
| face2 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 2. Null if no cut on this face. |
| face3 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 3. Null if no cut on this face. |
| face4 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 4. Null if no cut on this face. |
| face5 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 5. Null if no cut on this face. |
| face6 | Array of reals | An array containing the x1,y1,z1,x2,y2,z2 coordinates of the cut line on the face 6. Null if no cut on this face. |
object
Error(message[string], details (optional)[string])DescriptionAdds an error for solid. For more details on checking see the Check class. |
The error message to give
An optional detailed error message
ReturnsNo return value |
ExampleTo add an error message "My custom error" for solid s: s.Error("My custom error");
|
ExtractColour()DescriptionExtracts the actual colour used for solid. |
No arguments
Returnscolour value (integer) Return typeNumber |
ExampleTo return the colour used for drawing solid s: var colour = s.ExtractColour();
|
FindSolidInBox(Model[Model], xmin[real], xmax[real], ymin[real], ymax[real], zmin[real], zmax[real], flag (optional)[integer], excl (optional)[integer], vis_only (optional)[integer]) [static]DescriptionReturns an array of Solid objects for the solids within a box. Please note this function provides a list of all solids that could potentially be in the box (using computationally cheap bounding box comparison) it is not a rigorous test of whether the solid is actually in the box. This may include solids that are ostensibly outside box. The user should apply their own test. (this function is intended to provide an upper bound of elems to test) Setting the "excl" flag will require that the solid is fully contained but this may not capture all the solids you want to process. |
Model designated model
Minimum bound in global x
Maximum bound in global x
Minimum bound in global y
Maximum bound in global y
Minimum bound in global z
Maximum bound in global z
Optional flag to restrict solids considered, if 0 all solids considered
Optional flag ( 0) Apply inclusive selection ( 1) Apply exclusive selection inclusive selection means elements intersect box exclusive selection means elements contained in box
Optional flag to consider visible elements only (1), if (0) all elements considered
ReturnsArray of Solid objects Return typeArray |
ExampleTo get an array of Solid objects for flagged solids within defined box (inclusive selection) var s = Solid.FindSolidInBox(m, xmin, xmax, ymin, ymax, zmin, zmax, flag, 0, 0);
|
FindSolidInit(Model[Model], flag (optional)[Flag]) [static] [deprecated]This function is deprecated in version 20.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. DescriptionInitialize setup so that all flagged solids in model can be tested to see if they are within box. In v20.0 this function is obsolete and the flagging bit (if required) should be specified in Solid.FindSolidInBox() |
Model in which shells have been flagged
Optional flag that has been set on the solids, if 0 all solids considered
ReturnsNo return value |
ExampleTo initialize find setup for flagged solids in model m: Solid.FindSolidInit(m, flag);
|
First(Model[Model]) [static]DescriptionReturns the first solid in the model. |
Model to get first solid in
ReturnsSolid object (or null if there are no solids in the model). Return typeSolid |
ExampleTo get the first solid in model m: var s = Solid.First(m);
|
FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the first free solid label in the model. Also see Solid.LastFreeLabel(), Solid.NextFreeLabel() and Model.FirstFreeItemLabel(). |
Model to get first free solid label in
Include file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels).
ReturnsSolid label. Return typeNumber |
ExampleTo get the first free solid label in model m: var label = Solid.FirstFreeLabel(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the solids in the model with a defined flag. |
Model that all solids will be flagged in
Flag to set on the solids
ReturnsNo return value |
ExampleTo flag all of the solids with flag f in model m: Solid.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the solid is flagged or not. |
Flag to test on the solid
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if solid s has flag f set on it: if (s.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each solid in the model. |
Model that all solids are in
Function to call for each solid
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array of Solid objects or properties for all of the solids in a model in PRIMER. If the optional property argument is not given then an array of Solid objects is returned. If the property argument is given, that property value for each solid is returned in the array instead of a Solid object |
Model to get solids from
Name for property to get for all solids in the model
ReturnsArray of Solid objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a solid. |
No arguments
ReturnsArray of Comment objects (or null if there are no comments associated to the node). Return typeArray |
ExampleTo get the array of comments associated to the solid s: var comm_array = s.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of Solid objects for all of the flagged solids in a model in PRIMER If the optional property argument is not given then an array of Solid objects is returned. If the property argument is given, then that property value for each solid is returned in the array instead of a Solid object |
Model to get solids from
Flag set on the solids that you want to retrieve
Name for property to get for all flagged solids in the model
ReturnsArray of Solid objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the Solid object for a solid ID. |
Model to find the solid in
number of the solid you want the Solid object for
ReturnsSolid object (or null if solid does not exist). Return typeSolid |
ExampleTo get the Solid object for solid 100 in model m var s = Solid.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a Solid property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the Solid.ViewParameters() method and 'method chaining' (see the examples below). |
solid property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Jacobian()DescriptionCalculates the jacobian for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the jacobian for solid s: var jacobian = s.Jacobian();
|
Keyword()DescriptionReturns the keyword for this solid (*SOLID, *SOLID_SCALAR or *SOLID_SCALAR_VALUE). Note that a carriage return is not added. See also Solid.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for solid s: var key = s.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the solid. Note that a carriage return is not added. See also Solid.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for solid s: var cards = s.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last solid in the model. |
Model to get last solid in
ReturnsSolid object (or null if there are no solids in the model). Return typeSolid |
ExampleTo get the last solid in model m: var s = Solid.Last(m);
|
LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the last free solid label in the model. Also see Solid.FirstFreeLabel(), Solid.NextFreeLabel() and see Model.LastFreeItemLabel() |
Model to get last free solid label in
Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used.
ReturnsSolid label. Return typeNumber |
ExampleTo get the last free solid label in model m: var label = Solid.LastFreeLabel(m);
|
Next()DescriptionReturns the next solid in the model. |
No arguments
ReturnsSolid object (or null if there are no more solids in the model). Return typeSolid |
ExampleTo get the solid in model m after solid s: var s = s.Next();
|
NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the next free (highest+1) solid label in the model. Also see Solid.FirstFreeLabel(), Solid.LastFreeLabel() and Model.NextFreeItemLabel() |
Model to get next free solid label in
Include file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels).
ReturnsSolid label. Return typeNumber |
ExampleTo get the next free solid label in model m: var label = Solid.NextFreeLabel(m);
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a solid. |
Text to display as a prompt to the user
If the argument is a Model then only solids from that model can be picked. If the argument is a Flag then only solids that are flagged with limit can be selected. If omitted, or null, any solids from any model can be selected. from any model.
If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal.
By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.
ReturnsSolid object (or null if not picked) Return typeSolid |
ExampleTo pick a solid from model m giving the prompt 'Pick solid from screen': var s = Solid.Pick('Pick solid from screen', m);
|
Previous()DescriptionReturns the previous solid in the model. |
No arguments
ReturnsSolid object (or null if there are no more solids in the model). Return typeSolid |
ExampleTo get the solid in model m before solid s: var s = s.Previous();
|
RenumberAll(Model[Model], start[integer]) [static]DescriptionRenumbers all of the solids in the model. |
Model that all solids will be renumbered in
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the solids in model m, from 1000000: Solid.RenumberAll(m, 1000000);
|
RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]DescriptionRenumbers all of the flagged solids in the model. |
Model that all the flagged solids will be renumbered in
Flag set on the solids that you want to renumber
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the solids in model m flagged with f, from 1000000: Solid.RenumberFlagged(m, f, 1000000);
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select solids using standard PRIMER object menus. |
Flag to use when selecting solids
Text to display as a prompt to the user
If the argument is a Model then only solids from that model can be selected. If the argument is a Flag then only solids that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any solids can be selected. from any model.
If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal.
ReturnsNumber of solids selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the solid. |
Flag to set on the solid
ReturnsNo return value |
ExampleTo set flag f for solid s: s.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the solid. The solid will be sketched until you either call Solid.Unsketch(), Solid.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the solid is sketched. If omitted redraw is true. If you want to sketch several solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch solid s: s.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged solids in the model. The solids will be sketched until you either call Solid.Unsketch(), Solid.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged solids will be sketched in
Flag set on the solids that you want to sketch
If model should be redrawn or not after the solids are sketched. If omitted redraw is true. If you want to sketch flagged solids several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all solids flagged with flag in model m: Solid.SketchFlagged(m, flag);
|
TetCollapse()DescriptionCalculates the tetrahedral collapse for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the tet collapse for solid s: var tet collapse = s.TetCollapse();
|
TiedNodeCheck(Contact label[integer], Flag[Flag], Option1[integer], Option2[integer])DescriptionChecks if nodes of solid are tied by contact or directly attached (non-zero option1). |
The label of the tied contact. If zero the tied contact is found for the solid by reverse lookup.
flag bit
Directly tied node (logical OR) 0:NONE 1:NRB/C_EXNO 2:BEAM 4:SHELL 8:SOLID 16:TSHELL
0:No action 1:report error if directly attached node (acc. option1) also captured by contact
Returnsstring Return typeString |
ExampleTo check if all nodes of solid h are tied by contact 200 or attach directly to constraint or shell: var message = h.TiedNodeCheck(200, flag, 1|4, 1)
|
Timestep()DescriptionCalculates the timestep for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the timestep for solid s: var timestep = s.Timestep();
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of solids in the model. |
Model to get total for
true if only existing solids should be counted. If false or omitted referenced but undefined solids will also be included in the total.
Returnsnumber of solids Return typeNumber |
ExampleTo get the total number of solids in model m: var total = Solid.Total(m);
|
Unblank()DescriptionUnblanks the solid |
No arguments
ReturnsNo return value |
ExampleTo unblank solid s: s.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the solids in the model. |
Model that all solids will be unblanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the solids in model m: Solid.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged solids in the model. |
Model that the flagged solids will be unblanked in
Flag set on the solids that you want to unblank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the solids in model m flagged with f: Solid.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the solids in the model. |
Model that the defined flag for all solids will be unset in
Flag to unset on the solids
ReturnsNo return value |
ExampleTo unset the flag f on all the solids in model m: Solid.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the solid. |
If model should be redrawn or not after the solid is unsketched. If omitted redraw is true. If you want to unsketch several solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch solid s: s.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all solids. |
Model that all solids will be unblanked in
If model should be redrawn or not after the solids are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all solids in model m: Solid.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged solids in the model. |
Model that all solids will be unsketched in
Flag set on the solids that you want to unsketch
If model should be redrawn or not after the solids are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all solids flagged with flag in model m: Solid.UnsketchAll(m, flag);
|
No arguments
ReturnsSolid object. Return typeSolid |
ExampleTo check if Solid property s.example is a parameter by using the Solid.GetParameter() method: if (s.ViewParameters().GetParameter(s.example) ) do_something...
|
Volume()DescriptionCalculates the volume for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the volume for solid s: var volume = s.Volume();
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for solid. For more details on checking see the Check class. |
The warning message to give
An optional detailed warning message
ReturnsNo return value |
ExampleTo add a warning message "My custom warning" for solid s: s.Warning("My custom warning");
|
Warpage()DescriptionCalculates the warpage for the solid |
No arguments
Returnsreal Return typeNumber |
ExampleTo calculate the warpage for solid s: var warpage = s.Warpage();
|
Xrefs()DescriptionReturns the cross references for this solid. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for solid s: var xrefs = s.Xrefs();
|
toString()DescriptionCreates a string containing the solid data in keyword format. Note that this contains the keyword header and the keyword cards. See also Solid.Keyword() and Solid.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for solid s in keyword format var str = s.toString();
|