Interface GeomSequence

    • 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.
      • 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 tools DetectInterferences, Fillets, Holes, ShortEdges, SliverFaces, SmallFaces, Spikes, DeleteFaces, or DetachFaces.
        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, or cadps, 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, or cadps, 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.
        Use loaded() 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.
      • 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.
      • 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.
        Use reload() 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.
      • 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 is true, set the geometry to scale property values when the length or angular unit is changed. If scale is false, property values will not be scaled.
        Parameters:
        scale - Scale.
        Returns:
        Geometry sequence.
      • 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.