Oasys.PRIMER.IGA1DBrep class¶
Properties¶
- property IGA1DBrep.brid: integer¶
IGA1DBrepnumber. Also see thelabelproperty which is an alternative name for this
- property IGA1DBrep.entries(read only): integer¶
Number of Parametric Edge IDs (eid) added in IGA_1D_BREP. Can be used as index to add a new entry
- property IGA1DBrep.exists(read only): boolean¶
true if IGA 1D Brep exists, false if referred to but not defined
Constructor¶
Static methods¶
- classmethod IGA1DBrep.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a IGA 1D Brep
- Parameters:
model (Model) –
Modelthat the IGA 1D Brep will be created inmodal (boolean) – Optional. 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
- Returns:
IGA1DBrep object (or None if not made)
- Return type:
IGA1DBrep
Example
To start creating a IGA 1D Brep in model m:
ig1b = Oasys.PRIMER.IGA1DBrep.Create(m)
- classmethod IGA1DBrep.First(model)¶
Returns the first IGA 1D Brep in the model
- Parameters:
model (Model) –
Modelto get first IGA 1D Brep in- Returns:
IGA1DBrep object (or None if there are no IGA 1D Breps in the model)
- Return type:
IGA1DBrep
Example
To get the first IGA 1D Brep in model m:
ig1b = Oasys.PRIMER.IGA1DBrep.First(m)
- classmethod IGA1DBrep.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free IGA 1D Brep label in the model. Also see
IGA1DBrep.LastFreeLabel(),IGA1DBrep.NextFreeLabel()andModel.FirstFreeItemLabel()
- Parameters:
- Returns:
IGA1DBrep label
- Return type:
int
Example
To get the first free IGA 1D Brep label in model m:
label = Oasys.PRIMER.IGA1DBrep.FirstFreeLabel(m)
- classmethod IGA1DBrep.FlagAll(model, flag)¶
Flags all of the IGA 1D Breps in the model with a defined flag
- Parameters:
model (Model) –
Modelthat all IGA 1D Breps will be flagged inflag (Flag) – Flag to set on the IGA 1D Breps
- Returns:
No return value
- Return type:
None
Example
To flag all of the IGA 1D Breps with flag f in model m:
Oasys.PRIMER.IGA1DBrep.FlagAll(m, f)
- classmethod IGA1DBrep.GetAll(model, property=Oasys.gRPC.defaultArg)¶
Returns a list of IGA1DBrep objects or properties for all of the IGA 1D Breps in a model in PRIMER. If the optional property argument is not given then a list of IGA1DBrep objects is returned. If the property argument is given, that property value for each IGA 1D Brep is returned in the list instead of a IGA1DBrep object
- Parameters:
model (Model) –
Modelto get IGA 1D Breps fromproperty (string) – Optional. Name for property to get for all IGA 1D Breps in the model
- Returns:
List of IGA1DBrep objects or properties
- Return type:
list
Example
To make a list of IGA1DBrep objects for all of the IGA 1D Breps in model m:
a = Oasys.PRIMER.IGA1DBrep.GetAll(m)To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for each IGA 1D Brep in model m:
a = Oasys.PRIMER.IGA1DBrep.GetAll(m, 'foo')
- classmethod IGA1DBrep.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)¶
Returns a list of IGA1DBrep objects for all of the flagged IGA 1D Breps in a model in PRIMER If the optional property argument is not given then a list of IGA1DBrep objects is returned. If the property argument is given, then that property value for each IGA 1D Brep is returned in the list instead of a IGA1DBrep object
- Parameters:
model (Model) –
Modelto get IGA 1D Breps fromflag (Flag) – Flag set on the IGA 1D Breps that you want to retrieve
property (string) – Optional. Name for property to get for all flagged IGA 1D Breps in the model
- Returns:
List of IGA1DBrep objects or properties
- Return type:
list
Example
To make a list of IGA1DBrep objects for all of the IGA 1D Breps in model m flagged with f:
ig1b = Oasys.PRIMER.IGA1DBrep.GetFlagged(m, f)To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for all of the IGA 1D Breps in model m flagged with f:
a = Oasys.PRIMER.IGA1DBrep.GetFlagged(m, f, 'foo')
- classmethod IGA1DBrep.GetFromID(model, number)¶
Returns the IGA1DBrep object for a IGA 1D Brep ID
- Parameters:
model (Model) –
Modelto find the IGA 1D Brep innumber (integer) – number of the IGA 1D Brep you want the IGA1DBrep object for
- Returns:
IGA1DBrep object (or None if IGA 1D Brep does not exist)
- Return type:
IGA1DBrep
Example
To get the IGA1DBrep object for IGA 1D Brep 100 in model m
ig1b = Oasys.PRIMER.IGA1DBrep.GetFromID(m, 100)
- classmethod IGA1DBrep.Last(model)¶
Returns the last IGA 1D Brep in the model
- Parameters:
model (Model) –
Modelto get last IGA 1D Brep in- Returns:
IGA1DBrep object (or None if there are no IGA 1D Breps in the model)
- Return type:
IGA1DBrep
Example
To get the last IGA 1D Brep in model m:
ig1b = Oasys.PRIMER.IGA1DBrep.Last(m)
- classmethod IGA1DBrep.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free IGA 1D Brep label in the model. Also see
IGA1DBrep.FirstFreeLabel(),IGA1DBrep.NextFreeLabel()and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
IGA1DBrep label
- Return type:
int
Example
To get the last free IGA 1D Brep label in model m:
label = Oasys.PRIMER.IGA1DBrep.LastFreeLabel(m)
- classmethod IGA1DBrep.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) IGA 1D Brep label in the model. Also see
IGA1DBrep.FirstFreeLabel(),IGA1DBrep.LastFreeLabel()andModel.NextFreeItemLabel()
- Parameters:
- Returns:
IGA1DBrep label
- Return type:
int
Example
To get the next free IGA 1D Brep label in model m:
label = Oasys.PRIMER.IGA1DBrep.NextFreeLabel(m)
- classmethod IGA1DBrep.RenumberAll(model, start)¶
Renumbers all of the IGA 1D Breps in the model
- Parameters:
model (Model) –
Modelthat all IGA 1D Breps will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the IGA 1D Breps in model m, from 1000000:
Oasys.PRIMER.IGA1DBrep.RenumberAll(m, 1000000)
- classmethod IGA1DBrep.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged IGA 1D Breps in the model
- Parameters:
model (Model) –
Modelthat all the flagged IGA 1D Breps will be renumbered inflag (Flag) – Flag set on the IGA 1D Breps that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the IGA 1D Breps in model m flagged with f, from 1000000:
Oasys.PRIMER.IGA1DBrep.RenumberFlagged(m, f, 1000000)
- classmethod IGA1DBrep.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select IGA 1D Breps using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting IGA 1D Breps
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Modelthen only IGA 1D Breps from that model can be selected. If the argument is aFlagthen only IGA 1D Breps that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any IGA 1D Breps can be selected. from any modelmodal (boolean) – Optional. 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
- Returns:
Number of IGA 1D Breps selected or None if menu cancelled
- Return type:
int
Example
To select IGA 1D Breps from model m, flagging those selected with flag f, giving the prompt ‘Select IGA 1D Breps’:
Oasys.PRIMER.IGA1DBrep.Select(f, 'Select IGA 1D Breps', m)To select IGA 1D Breps, flagging those selected with flag f but limiting selection to IGA 1D Breps flagged with flag l, giving the prompt ‘Select IGA 1D Breps’:
Oasys.PRIMER.IGA1DBrep.Select(f, 'Select IGA 1D Breps', l)
- classmethod IGA1DBrep.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged IGA 1D Breps in the model. The IGA 1D Breps will be sketched until you either call
IGA1DBrep.Unsketch(),IGA1DBrep.UnsketchFlagged(),Model.UnsketchAll(), or delete the model
- Parameters:
model (Model) –
Modelthat all the flagged IGA 1D Breps will be sketched inflag (Flag) – Flag set on the IGA 1D Breps that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the IGA 1D Breps are sketched. If omitted redraw is true. If you want to sketch flagged IGA 1D Breps several times and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To sketch all IGA 1D Breps flagged with flag in model m:
Oasys.PRIMER.IGA1DBrep.SketchFlagged(m, flag)
- classmethod IGA1DBrep.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of IGA 1D Breps in the model
- Parameters:
model (Model) –
Modelto get total forexists (boolean) – Optional. true if only existing IGA 1D Breps should be counted. If false or omitted referenced but undefined IGA 1D Breps will also be included in the total
- Returns:
number of IGA 1D Breps
- Return type:
int
Example
To get the total number of IGA 1D Breps in model m:
total = Oasys.PRIMER.IGA1DBrep.Total(m)
- classmethod IGA1DBrep.UnflagAll(model, flag)¶
Unsets a defined flag on all of the IGA 1D Breps in the model
- Parameters:
model (Model) –
Modelthat the defined flag for all IGA 1D Breps will be unset inflag (Flag) – Flag to unset on the IGA 1D Breps
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the IGA 1D Breps in model m:
Oasys.PRIMER.IGA1DBrep.UnflagAll(m, f)
- classmethod IGA1DBrep.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all IGA 1D Breps
- Parameters:
model (Model) –
Modelthat all IGA 1D Breps will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the IGA 1D Breps 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()- Returns:
No return value
- Return type:
None
Example
To unsketch all IGA 1D Breps in model m:
Oasys.PRIMER.IGA1DBrep.UnsketchAll(m)
- classmethod IGA1DBrep.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged IGA 1D Breps in the model
- Parameters:
model (Model) –
Modelthat all IGA 1D Breps will be unsketched inflag (Flag) – Flag set on the IGA 1D Breps that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the IGA 1D Breps 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()- Returns:
No return value
- Return type:
None
Example
To unsketch all IGA 1D Breps flagged with flag in model m:
Oasys.PRIMER.IGA1DBrep.UnsketchAll(m, flag)
Instance methods¶
- IGA1DBrep.AssociateComment(comment)¶
Associates a comment with a IGA 1D Brep
- Parameters:
comment (Comment) –
Commentthat will be attached to the IGA 1D Brep- Returns:
No return value
- Return type:
None
Example
To associate comment c to the IGA 1D Brep ig1b:
ig1b.AssociateComment(c)
- IGA1DBrep.Browse(modal=Oasys.gRPC.defaultArg)¶
Starts an edit panel in Browse mode
- Parameters:
modal (boolean) – Optional. 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
- Returns:
no return value
- Return type:
None
Example
To Browse IGA 1D Brep ig1b:
ig1b.Browse()
- IGA1DBrep.ClearFlag(flag)¶
Clears a flag on the IGA 1D Brep
- Parameters:
flag (Flag) – Flag to clear on the IGA 1D Brep
- Returns:
No return value
- Return type:
None
Example
To clear flag f for IGA 1D Brep ig1b:
ig1b.ClearFlag(f)
- IGA1DBrep.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the IGA 1D Brep. The target include of the copied IGA 1D Brep can be set using
Options.copy_target_include
- Parameters:
range (boolean) – Optional. 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()- Returns:
IGA1DBrep object
- Return type:
IGA1DBrep
Example
To copy IGA 1D Brep ig1b into IGA 1D Brep z:
z = ig1b.Copy()
- IGA1DBrep.DetachComment(comment)¶
Detaches a comment from a IGA 1D Brep
- Parameters:
comment (Comment) –
Commentthat will be detached from the IGA 1D Brep- Returns:
No return value
- Return type:
None
Example
To detach comment c from the IGA 1D Brep ig1b:
ig1b.DetachComment(c)
- IGA1DBrep.Edit(modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel
- Parameters:
modal (boolean) – Optional. 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
- Returns:
no return value
- Return type:
None
Example
To Edit IGA 1D Brep ig1b:
ig1b.Edit()
- IGA1DBrep.Flagged(flag)¶
Checks if the IGA 1D Brep is flagged or not
- Parameters:
flag (Flag) – Flag to test on the IGA 1D Brep
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if IGA 1D Brep ig1b has flag f set on it:
if ig1b.Flagged(f): do_something..
- IGA1DBrep.GetComments()¶
Extracts the comments associated to a IGA 1D Brep
- Returns:
List of Comment objects (or None if there are no comments associated to the node)
- Return type:
list
Example
To get the list of comments associated to the IGA 1D Brep ig1b:
comm_list = ig1b.GetComments()
- IGA1DBrep.GetData(index)¶
Returns the data for eid in *IGA_1D_BREP
- Parameters:
index (integer) – Index you want the data for. Note that indices start at 0
- Returns:
The ID of parametric edge, *IGA_EDGE_UVW
- Return type:
int
Example
To get the 3rd data entry in IGA 1d brep ig1b:
data = ig1b.GetData(2)
- IGA1DBrep.GetParameter(prop)¶
Checks if a IGA1DBrep 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_namesoption to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using theIGA1DBrep.ViewParameters()method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – IGA 1D Brep property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
Parameter
Example
To check if IGA1DBrep property ig1b.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if ig1b.GetParameter(ig1b.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if IGA1DBrep property ig1b.example is a parameter by using the GetParameter method:
if ig1b.ViewParameters().GetParameter(ig1b.example): do_something..
- IGA1DBrep.Keyword()¶
Returns the keyword for this IGA 1d brep (*IGA_1D_BREP). Note that a carriage return is not added. See also
IGA1DBrep.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for IGA 1d brep ig1b:
key = ig1b.Keyword()
- IGA1DBrep.KeywordCards()¶
Returns the keyword cards for the IGA 1d brep. Note that a carriage return is not added. See also
IGA1DBrep.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for IGA 1d brep ig1b:
cards = ig1b.KeywordCards()
- IGA1DBrep.Next()¶
Returns the next IGA 1D Brep in the model
- Returns:
IGA1DBrep object (or None if there are no more IGA 1D Breps in the model)
- Return type:
IGA1DBrep
Example
To get the IGA 1D Brep in model m after IGA 1D Brep ig1b:
ig1b = ig1b.Next()
- IGA1DBrep.Previous()¶
Returns the previous IGA 1D Brep in the model
- Returns:
IGA1DBrep object (or None if there are no more IGA 1D Breps in the model)
- Return type:
IGA1DBrep
Example
To get the IGA 1D Brep in model m before IGA 1D Brep ig1b:
ig1b = ig1b.Previous()
- IGA1DBrep.RemoveData(index)¶
Removes eid for an index in *IGA_1D_BREP
- Parameters:
index (integer) – The index you want to delete eid for. Note that indices start at 0, not 1
- Returns:
No return value
- Return type:
None
Example
To delete the eid for the 3rd index for *IGA_1D_BREP in model m:
if ig1b.entries >= 3: ig1b.RemoveData(2)
- IGA1DBrep.SetData(index, eid)¶
Sets eid in *IGA_1D_BREP
- Parameters:
index (integer) – Index you want to set the eid for. Note that indices start at 0
eid (integer) – The ID of parametric edge
- Returns:
No return value
- Return type:
None
Example
To add an entry to the *IGA_1D_BREP ig1b with id 10 by using “entries” property to get the next available index:
i = ig1b.entries ig1b.SetData(i, 10)To change an entry in 3rd field for *IGA_1D_BREP ig1b with id 30:
ig1b.SetData(2, 30)
- IGA1DBrep.SetFlag(flag)¶
Sets a flag on the IGA 1D Brep
- Parameters:
flag (Flag) – Flag to set on the IGA 1D Brep
- Returns:
No return value
- Return type:
None
Example
To set flag f for IGA 1D Brep ig1b:
ig1b.SetFlag(f)
- IGA1DBrep.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the IGA 1D Brep. The IGA 1D Brep will be sketched until you either call
IGA1DBrep.Unsketch(),IGA1DBrep.UnsketchAll(),Model.UnsketchAll(), or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the IGA 1D Brep is sketched. If omitted redraw is true. If you want to sketch several IGA 1D Breps and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To sketch IGA 1D Brep ig1b:
ig1b.Sketch()
- IGA1DBrep.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the IGA 1D Brep
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the IGA 1D Brep is unsketched. If omitted redraw is true. If you want to unsketch several IGA 1D Breps and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unsketch IGA 1D Brep ig1b:
ig1b.Unsketch()
- IGA1DBrep.ViewParameters()¶
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. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with ‘method chaining’ (see the example below) to make sure a property argument is correct
- Returns:
IGA1DBrep object
- Return type:
IGA1DBrep
Example
To check if IGA1DBrep property ig1b.example is a parameter by using the
IGA1DBrep.GetParameter()method:if ig1b.ViewParameters().GetParameter(ig1b.example): do_something..
- IGA1DBrep.Xrefs()¶
Returns the cross references for this IGA 1D Brep
- Returns:
Xrefs object
- Return type:
Xrefs
Example
To get the cross references for IGA 1D Brep ig1b:
xrefs = ig1b.Xrefs()