Package com.comsol.model
Interface GeomSequence
-
- All Superinterfaces:
GeomContainer
,GeomInfo
,IPlotAndImageExport
,ModelEntity
,PrimitiveModelEntity
- All Known Subinterfaces:
GeomSubsequence
public interface GeomSequence extends GeomContainer, IPlotAndImageExport
Geometry sequence.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description double
absRepairTol()
Returns default absolute repair tolerance used when creating new features.void
absRepairTol(double absrepairtol)
Sets default absolute repair tolerance to use when creating new features.java.lang.String
angularUnit()
Returns the angular unit.GeomSequence
angularUnit(java.lang.String angularUnit)
Sets the angular unit.ModelParam
argument()
Deprecated.UseinputParam()
instead.GeomAttributeList
attribute()
Returns all user-defined geometry attributes in the geometry sequence.GeomAttribute
attribute(java.lang.String tag)
Returns a geometry attribute with the given tag.boolean
autoBuildNew()
Get the value of the automatic build setting for new geometry operations.GeomSequence
autoBuildNew(boolean auto)
Set the automatic build setting for new geometry operations.java.lang.String
autoRebuild()
Get the value of the geometry's automatic rebuild setting.GeomSequence
autoRebuild(java.lang.String auto)
Set the geometry's automatic rebuild setting.GeomSequence
axisymmetric(boolean isaxi)
Declares geometry to be axisymmetric or non-axisymmetric.java.lang.String
commentsInFile()
For a loaded part, get the comments from the mph file.java.lang.String
constrDimBuild()
Get the constraints and dimensions to use when building.GeomSequence
constrDimBuild(java.lang.String value)
Determine what constraint and dimension features to use when building.java.lang.String
constrDimStatus()
Get a description the overall status of the constraints and dimensions.GeomFeature
create(java.lang.String tag, java.lang.String type)
Creates a geometry feature.java.lang.String
current()
Returns the current feature's tag.java.lang.String
dateModifiedInFile()
For a loaded part, get the modification date from the mph file.GeomDefeature
defeaturing(java.lang.String tag)
Gets one of the defeaturing toolsDetectInterferences
,Fillets
,Holes
,ShortEdges
,SliverFaces
,SmallFaces
,Spikes
,DeleteFaces
, orDetachFaces
.void
delete(java.lang.String[] obj)
Deletes geometry objects.java.lang.String[]
deleteEdges(java.lang.String obj, int[] edges)
Delete edges from a curve object coming from a Polygon or CompositeCurve feature in 2D.boolean
designBooleans()
Check if Design Module Boolean operations are enabled.GeomSequence
designBooleans(boolean use)
Enable or disable Design Module Boolean operations.GeomExport
export()
Gets the geometry export tool.java.lang.String
export(java.lang.String filename)
Export the geometry objects selected in the geometry export tool to a mphbin or mphtxt file.java.lang.String
exportFinal(java.lang.String filename)
Export the finalized geometry to a mphbin or mphtxt file.GeomFeatureList
feature()
Returns all geometry features in the geometry sequence.GeomFeature
feature(java.lang.String fTag)
Returns a geometry feature with the given tag.java.lang.String
filename()
Get the filename for a loaded part.void
filename(java.lang.String filename)
Changes the filename for a loaded part.java.lang.String
geomRep()
Returns the geometry representation:comsol
, meaning the COMSOL geometry kernel, orcadps
, meaning the CAD Import Module kernel.GeomSequence
geomRep(java.lang.String geomrep)
Set the geometry representation:comsol
, meaning the COMSOL geometry kernel, orcadps
, meaning the CAD Import Module kernel.double
geomScaleFactor()
Returns the geometry's length unit expressed the model's length unit.ModelParam
inputParam()
Get input parameters of the part.void
insertFile(java.lang.String filename, java.lang.String sequencename)
Insert all geometry features from a geometry sequence in an mph file into this sequence.void
insertSequence(java.lang.String modeltag, java.lang.String sequencename)
Insert all geometry features from a geometry sequence in a different model into this sequence.boolean
isAxisymmetric()
Check if the geometry is axisymmetric.boolean
keepSelInInstances()
Returns true for a part if its instances keeps selections by default.GeomSequence
keepSelInInstances(boolean keep)
Set the attribute to keep selections by default in instances of a part.java.lang.String
labelInFile()
Get the label of a loaded part in the mph file.java.lang.String
lengthUnit()
Returns the geometry's length unit.GeomSequence
lengthUnit(java.lang.String lengthUnit)
Sets the geometry's length unit.boolean
linked()
Deprecated.Useloaded()
instead.boolean
loaded()
Check if a part if it is loaded.ModelParam
localParam()
Get local parameters of the part.GeomMeasure
measure()
Return the measurement tool for geometry objects.GeomMeasureFinal
measureFinal()
Returns the measurement tool for the finalized geometry.void
move(java.lang.String[] obj, double[] dist)
Apply a move transform to a set of objects.NodeGroupList
nodeGroup()
Returns all node groups.NodeGroup
nodeGroup(java.lang.String tag)
Returns a node group.GeomObject
obj(java.lang.String name)
Returns the geometry object with the given name.GeomObject
object(java.lang.String arg0)
Deprecated.Useobj(String)
instead.java.lang.String[]
objectNames()
Returns the names of all objects that exist in the current state, that is, are produced, and have not been eaten, by features up to the current feature.ModelParam
param()
Deprecated.UselocalParam()
instead.boolean
partVariant()
Check if a part is a part variant.GeomSequence
partVariant(boolean isPartVariant)
Set the part variant attribute of a part.java.lang.String[]
problems()
Return features with errors or warnings.void
relink()
Deprecated.Usereload()
instead.void
reload()
Reloads a loaded part.double
repairTol()
Returns default relative repair tolerance used when creating new features.void
repairTol(double repairtol)
Sets default relative repair tolerance to use when creating new features.java.lang.String
repairTolType()
Returns default type of repair tolerance used when creating new features.void
repairTolType(java.lang.String repairtoltype)
Sets default type of repair tolerance to use when creating new features.void
run()
Build all features.GeomSequence
run(java.lang.String fTag)
Build all features up to the feature with tag fTag.GeomSequence
runAll()
Deprecated.Userun()
orrun(String)
.GeomSequence
runCurrent()
Build all features up to the current feature.GeomSequence
runPre(java.lang.String fTag)
Build all features preceding a feature.void
scale(java.lang.String[] obj, double[] factor, double[] center)
Apply an anisotropic scaling transform to a set of objects.void
scale(java.lang.String[] obj, double factor, double[] center)
Apply an isotropic scaling transform to a set of objects.boolean
scaleUnitValue()
Check if property values are scaled when the geometry's lengthor angular unit is changed.GeomSequence
scaleUnitValue(boolean scale)
If scale istrue
, set the geometry to scale property values when the length or angular unit is changed.GeomObjectSelectionFeatureList
selection()
Access list of named geometry object selections.GeomObjectSelectionFeature
selection(java.lang.String selTag)
Access named geometry object selections.void
setGeom(java.lang.String fileName)
Set the finalized geometry by importing it from the specified file.GeomSequence
stepInto(java.lang.String partInstanceTag)
Step into a part instance feature.java.lang.String
tagInFile()
Get the tag of a loaded part in the mph file.GeomSequence
tagInFile(java.lang.String tag)
Changes the tag in file for a loaded part.boolean
useConstrDim()
Check if constraints and dimensions functionality is enabled.GeomSequence
useConstrDim(boolean enabled)
Enable or disable the constraints and dimensions functionality.java.lang.String
versionInFile()
For a loaded part, get the version from the mph file.-
Methods inherited from interface com.comsol.model.GeomInfo
check, edgeCurvature, edgeDDDX, edgeDDX, edgeDX, edgeMaxFaceAngle, edgeNormal, edgeParamRange, edgeTorsion, edgeX, exists, faceDDX, faceDX, faceFF1, faceFF2, faceGaussCurvature, faceMeanCurvature, faceNormal, faceParamRange, faceX, getAdj, getAdj, getAdjExt, getAdjExt, getAdjExtOrient, getAdjExtOrient, getAdjOrient, getAdjOrient, getAdjSparse, getBoundingBox, getEdge, getFace, getNBoundaries, getNDomains, getNEdges, getNEntities, getNEntitiesMesh, getNFaces, getNFiniteVoids, getNVertices, getPEdge, getPVertex, getSD, getSDim, getStartEnd, getType, getUpDown, getUpDownExt, getVertex, getVertexCoord, getVertexDomain, getVtx, hasCadRep, isAssembly, isMesh, isVirtual, voidsAreLabeled
-
Methods inherited from interface com.comsol.model.IPlotAndImageExport
image
-
Methods inherited from interface com.comsol.model.ModelEntity
active, author, author, comments, comments, dateCreated, dateModified, docMarker, docMarker, help, help, icon, isactive, isActive, label, label, lastModifiedBy, model, model, name, name, resetAuthor, scope, tag, tag, timeCreated, timeModified, version, version
-
Methods inherited from interface com.comsol.model.PrimitiveModelEntity
getContainer, getDisplayString, resolveModelPath
-
-
-
-
Method Detail
-
absRepairTol
double absRepairTol()
Returns default absolute repair tolerance used when creating new features.- Returns:
- Default absolute repair tolerance.
-
absRepairTol
void absRepairTol(double absrepairtol)
Sets default absolute repair tolerance to use when creating new features.- Parameters:
absrepairtol
- Absolute repair tolerance.
-
angularUnit
java.lang.String angularUnit()
Returns the angular unit.- Returns:
- Angular unit.
-
angularUnit
GeomSequence angularUnit(java.lang.String angularUnit)
Sets the angular unit.- Parameters:
angularUnit
- Angular unit.- Returns:
- Geometry sequence.
-
argument
@Deprecated ModelParam argument()
Deprecated.UseinputParam()
instead.
-
attribute
GeomAttributeList attribute()
Returns all user-defined geometry attributes in the geometry sequence.- Returns:
- List of user-defined geometry attributes.
-
attribute
GeomAttribute attribute(java.lang.String tag)
Returns a geometry attribute with the given tag.- Parameters:
tag
- Geometry attribute tag.- Returns:
- Geometry attribute.
-
autoBuildNew
boolean autoBuildNew()
Get the value of the automatic build setting for new geometry operations.- Returns:
- Automatic build setting for new geometry operations.
-
autoBuildNew
GeomSequence autoBuildNew(boolean auto)
Set the automatic build setting for new geometry operations.true
means that new geometry operations can be automatically built if its input selections are satisfied when created from the user interface.false
disables the automatic build logic.- Parameters:
auto
- Automatic build setting for new geometry operations.- Returns:
- Geometry sequence.
-
autoRebuild
java.lang.String autoRebuild()
Get the value of the geometry's automatic rebuild setting.- Returns:
- Autorebuild setting.
-
autoRebuild
GeomSequence autoRebuild(java.lang.String auto)
Set the geometry's automatic rebuild setting.on
means that the geometry is automatically rebuilt when a non-geometry node is selected in the model builder in the COMSOL desktop.off
disables the automatic rebuild logic.- Parameters:
auto
- Automatic rebuild setting.- Returns:
- Geometry sequence.
-
axisymmetric
GeomSequence axisymmetric(boolean isaxi)
Declares geometry to be axisymmetric or non-axisymmetric.- Parameters:
isaxi
- True if axisymmetric. False if non-axisymmetric.- Returns:
- Geometry sequence.
-
commentsInFile
java.lang.String commentsInFile()
For a loaded part, get the comments from the mph file.- Returns:
- Comments.
-
constrDimBuild
java.lang.String constrDimBuild()
Get the constraints and dimensions to use when building. The default is "all".- Returns:
- Constraints and dimension to use.
-
constrDimBuild
GeomSequence constrDimBuild(java.lang.String value)
Determine what constraint and dimension features to use when building. Valid values are: "all": All (enabled) constraint and dimension features are used. "none": No constraint and dimension features are used. "uptotarget": All (enabled) constraint and dimension features up to the feature to build are used.- Parameters:
value
- New value.- Returns:
- Geometry sequence.
-
constrDimStatus
java.lang.String constrDimStatus()
Get a description the overall status of the constraints and dimensions.- Returns:
- Status string.
-
create
GeomFeature create(java.lang.String tag, java.lang.String type)
Creates a geometry feature.- Parameters:
tag
- Tag of the created feature.type
- Type of the created feature.- Returns:
- Created geometry feature.
-
current
java.lang.String current()
Returns the current feature's tag. If the current feature is the beginning of the sequence, the empty string "" is returned.- Returns:
- Current feature tag.
-
dateModifiedInFile
java.lang.String dateModifiedInFile()
For a loaded part, get the modification date from the mph file.- Returns:
- Modification date.
-
defeaturing
GeomDefeature defeaturing(java.lang.String tag)
Gets one of the defeaturing toolsDetectInterferences
,Fillets
,Holes
,ShortEdges
,SliverFaces
,SmallFaces
,Spikes
,DeleteFaces
, orDetachFaces
.- Parameters:
tag
- Defeaturing tool tag.- Returns:
- Geometry defeaturing feature.
-
delete
void delete(java.lang.String[] obj)
Deletes geometry objects.- Parameters:
obj
- Vector of tags.
-
deleteEdges
java.lang.String[] deleteEdges(java.lang.String obj, int[] edges)
Delete edges from a curve object coming from a Polygon or CompositeCurve feature in 2D. This is done by modifying the feature or by splitting it into several features.- Parameters:
obj
- Name of curve object.edges
- Edges to delete.- Returns:
- The tags of the remaining (if any) and created (if any) features.
-
designBooleans
boolean designBooleans()
Check if Design Module Boolean operations are enabled.- Returns:
true
if enabled.
-
designBooleans
GeomSequence designBooleans(boolean use)
Enable or disable Design Module Boolean operations.- Parameters:
use
-true
to enable Design Module Boolean operations.- Returns:
- Geometry sequence.
-
export
GeomExport export()
Gets the geometry export tool.- Returns:
- Geometry export tool.
-
export
java.lang.String export(java.lang.String filename)
Export the geometry objects selected in the geometry export tool to a mphbin or mphtxt file.- Parameters:
filename
- File to export to.- Returns:
- Full path of exported file.
-
exportFinal
java.lang.String exportFinal(java.lang.String filename)
Export the finalized geometry to a mphbin or mphtxt file.- Parameters:
filename
- File to export to.- Returns:
- Full path of exported file.
-
feature
GeomFeatureList feature()
Returns all geometry features in the geometry sequence.- Returns:
- List of geometry features.
-
feature
GeomFeature feature(java.lang.String fTag)
Returns a geometry feature with the given tag.- Parameters:
fTag
- Geometry feature tag.- Returns:
- Geometry feature.
-
filename
java.lang.String filename()
Get the filename for a loaded part.- Returns:
- Filename.
-
filename
void filename(java.lang.String filename)
Changes the filename for a loaded part.- Parameters:
filename
- The new filename.
-
geomRep
java.lang.String geomRep()
Returns the geometry representation:comsol
, meaning the COMSOL geometry kernel, orcadps
, meaning the CAD Import Module kernel.- Returns:
- Geometry representation.
-
geomRep
GeomSequence geomRep(java.lang.String geomrep)
Set the geometry representation:comsol
, meaning the COMSOL geometry kernel, orcadps
, meaning the CAD Import Module kernel. When changing the geometry representation, existing features are changed to use the selected kernel, but they are not rebuilt. Some features do not support the CAD Import Module kernel - these features always use the COMSOL kernel.- Parameters:
geomrep
- Geometry representation.- Returns:
- Geometry sequence.
-
geomScaleFactor
double geomScaleFactor()
Returns the geometry's length unit expressed the model's length unit. If a length is x geometry length units, it is x*geomScaleFactor() model length units.- Returns:
- Geometry scale factor.
-
inputParam
ModelParam inputParam()
Get input parameters of the part.- Returns:
- Input parameters.
-
insertFile
void insertFile(java.lang.String filename, java.lang.String sequencename)
Insert all geometry features from a geometry sequence in an mph file into this sequence.- Parameters:
filename
- File name.sequencename
- Sequence tag.
-
insertSequence
void insertSequence(java.lang.String modeltag, java.lang.String sequencename)
Insert all geometry features from a geometry sequence in a different model into this sequence.- Parameters:
modeltag
- Model tag.sequencename
- Sequence tag.
-
isAxisymmetric
boolean isAxisymmetric()
Check if the geometry is axisymmetric.- Returns:
true
if axisymmetric.
-
keepSelInInstances
boolean keepSelInInstances()
Returns true for a part if its instances keeps selections by default.- Returns:
true
if the part's instances keeps selections by default.
-
keepSelInInstances
GeomSequence keepSelInInstances(boolean keep)
Set the attribute to keep selections by default in instances of a part.- Parameters:
keep
- New value of the attribute.- Returns:
- Geometry sequence.
-
labelInFile
java.lang.String labelInFile()
Get the label of a loaded part in the mph file.- Returns:
- Part label.
-
lengthUnit
java.lang.String lengthUnit()
Returns the geometry's length unit.- Returns:
- Length unit.
-
lengthUnit
GeomSequence lengthUnit(java.lang.String lengthUnit)
Sets the geometry's length unit.- Parameters:
lengthUnit
- Length unit.- Returns:
- Geometric entity.
-
linked
@Deprecated boolean linked()
Deprecated.Useloaded()
instead.
-
loaded
boolean loaded()
Check if a part if it is loaded.- Returns:
true
for a loaded part.
-
localParam
ModelParam localParam()
Get local parameters of the part.- Returns:
- Local parameters.
-
measure
GeomMeasure measure()
Return the measurement tool for geometry objects.- Returns:
- Geometry measure tool.
-
measureFinal
GeomMeasureFinal measureFinal()
Returns the measurement tool for the finalized geometry.- Returns:
- Geometry measurement tool.
-
move
void move(java.lang.String[] obj, double[] dist)
Apply a move transform to a set of objects. If all objects can be moved by modifying properties in the features that generated the objects, the move operation is performed by modifying the properties. Otherwise the move operation is performed by adding a Move feature to the geometry sequence.- Parameters:
obj
- Object tags of objects to move.dist
- The translation vector. Length must be equal to the space dimension.
-
nodeGroup
NodeGroupList nodeGroup()
Returns all node groups.- Returns:
- List of node groups.
-
nodeGroup
NodeGroup nodeGroup(java.lang.String tag)
Returns a node group.- Parameters:
tag
- Group tag.- Returns:
- Node group.
-
obj
GeomObject obj(java.lang.String name)
Returns the geometry object with the given name.- Parameters:
name
- Geometry object name.- Returns:
- Geometry object.
-
object
@Deprecated GeomObject object(java.lang.String arg0)
Deprecated.Useobj(String)
instead.
-
objectNames
java.lang.String[] objectNames()
Returns the names of all objects that exist in the current state, that is, are produced, and have not been eaten, by features up to the current feature.- Returns:
- List of geometry object names.
-
param
@Deprecated ModelParam param()
Deprecated.UselocalParam()
instead.
-
partVariant
boolean partVariant()
Check if a part is a part variant.- Returns:
true
for a part variant.
-
partVariant
GeomSequence partVariant(boolean isPartVariant)
Set the part variant attribute of a part.- Parameters:
isPartVariant
- New value of the attribute.- Returns:
- Geometry sequence.
-
problems
java.lang.String[] problems()
Return features with errors or warnings.- Returns:
- Array with feature tags.
-
relink
@Deprecated void relink()
Deprecated.Usereload()
instead.
-
reload
void reload()
Reloads a loaded part.
-
repairTol
double repairTol()
Returns default relative repair tolerance used when creating new features.- Returns:
- Default relative repair tolerance.
-
repairTol
void repairTol(double repairtol)
Sets default relative repair tolerance to use when creating new features.- Parameters:
repairtol
- Relative repair tolerance.
-
repairTolType
java.lang.String repairTolType()
Returns default type of repair tolerance used when creating new features.- Returns:
- Default type of repair tolerance.
-
repairTolType
void repairTolType(java.lang.String repairtoltype)
Sets default type of repair tolerance to use when creating new features.- Parameters:
repairtoltype
- Type of repair tolerance.
-
run
void run()
Build all features. If the current feature was before the Finalize (Form Union/Assembly) feature, the feature preceding Finalize will become current. Otherwise, the last feature will become current.
-
run
GeomSequence run(java.lang.String fTag)
Build all features up to the feature with tag fTag.- Parameters:
fTag
- Feature tag.- Returns:
- Geometry sequence.
-
runAll
@Deprecated GeomSequence runAll()
Deprecated.Userun()
orrun(String)
.
-
runCurrent
GeomSequence runCurrent()
Build all features up to the current feature.- Returns:
- Geometry sequence.
-
runPre
GeomSequence runPre(java.lang.String fTag)
Build all features preceding a feature.- Parameters:
fTag
- Feature tag.- Returns:
- Geometry sequence.
-
scale
void scale(java.lang.String[] obj, double factor, double[] center)
Apply an isotropic scaling transform to a set of objects. If all objects can be scaled by modifying properties in the features that generated the objects, the scale operation is performed by modifying the properties. Otherwise the scale operation is performed by adding a Scale feature to the geometry sequence.- Parameters:
obj
- Object tags of objects to scale.factor
- Scale factor.center
- Center of scaling. Length must be equal to the space dimension.
-
scale
void scale(java.lang.String[] obj, double[] factor, double[] center)
Apply an anisotropic scaling transform to a set of objects. If all objects can be scaled by modifying properties in the features that generated the objects, the scale operation is performed by modifying the properties. Otherwise the scale operation is performed by adding a Scale feature to the geometry sequence.- Parameters:
obj
- Object tags of objects to scale.factor
- Scale factor. Length must be equal to the space dimension.center
- Center of scaling. Length must be equal to the space dimension.
-
scaleUnitValue
boolean scaleUnitValue()
Check if property values are scaled when the geometry's lengthor angular unit is changed.- Returns:
true
if scaled.
-
scaleUnitValue
GeomSequence scaleUnitValue(boolean scale)
If scale istrue
, set the geometry to scale property values when the length or angular unit is changed. If scale isfalse
, property values will not be scaled.- Parameters:
scale
- Scale.- Returns:
- Geometry sequence.
-
selection
GeomObjectSelectionFeatureList selection()
Access list of named geometry object selections.- Returns:
- List of named selections.
-
selection
GeomObjectSelectionFeature selection(java.lang.String selTag)
Access named geometry object selections.- Parameters:
selTag
- Tag of named geometry object selection to access.- Returns:
- Specified named geometry object selection.
-
setGeom
void setGeom(java.lang.String fileName)
Set the finalized geometry by importing it from the specified file. Use it with caution.- Parameters:
fileName
- File name.
-
stepInto
GeomSequence stepInto(java.lang.String partInstanceTag)
Step into a part instance feature.- Parameters:
partInstanceTag
- Part instance feature tag.- Returns:
- Local copy of part.
-
tagInFile
java.lang.String tagInFile()
Get the tag of a loaded part in the mph file.- Returns:
- Part tag.
-
tagInFile
GeomSequence tagInFile(java.lang.String tag)
Changes the tag in file for a loaded part.- Parameters:
tag
- New tag in file.- Returns:
- This part.
-
useConstrDim
boolean useConstrDim()
Check if constraints and dimensions functionality is enabled.- Returns:
true
if enabled.
-
useConstrDim
GeomSequence useConstrDim(boolean enabled)
Enable or disable the constraints and dimensions functionality.- Parameters:
enabled
- True to enable constraints and dimensions.- Returns:
- Geometry sequence.
-
versionInFile
java.lang.String versionInFile()
For a loaded part, get the version from the mph file.- Returns:
- Part version.
-
-