Documentation of 'jvx.geom.PwUnfold' Java class
PwUnfold ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.geom

Class PwUnfold

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, PsTimeListenerIf, PsUpdateIf, PjWorkshopIf


    public class PwUnfold
    extends PjWorkshop
    implements PsTimeListenerIf, java.lang.Runnable
    Workshop for unfolding of geometries. Unfolding may be animated. Optionally tabs that help to create a paper model of the geometry can be generated.
    See Also:
    Serialized Form
    Author:
    Klaus Hildebrandt
    Version:
    08.05.08, 2.30 revised (ur) Cut splices if the angle is too big.
    13.09.06, 2.20 revised (ur) Enabled selecting edges by hand.
    28.11.03, 2.10 revised (kp) Update improved.
    30.04.03, 2.00 revised (kh) Method improve unfolding and related methods added.
    30.04.03, 1.20 revised (kh) Removed inner class priority queue class now uses jvx.geom.PuPriorityQueue.
    29.01.02, 1.10 revised (kh) Unfolding now accepts elements of arbitrary size.
    00.00.01, 1.00 created (kh)
    • Field Detail

      • WEIGHT_EDGELENGTH

        public static final int WEIGHT_EDGELENGTH
        Compute unfolding respecting the length of the edges.
        See Also:
        Constant Field Values
      • WEIGHT_ELEMENTINDEX

        public static final int WEIGHT_ELEMENTINDEX
        Compute unfolding respecting at each interior edge the absolute of the difference of the two adjacent elements.
        See Also:
        Constant Field Values
      • WEIGHT_BY_SELECTION

        public static final int WEIGHT_BY_SELECTION
        Compute unfolding respecting which are edges selected by the user. Selected edges are weighted by 0, unselected edges by 1. Not selected edges are more likely to be cut.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PwUnfold

        public PwUnfold()
        Constructor.
    • Method Detail

      • init

        public void init()
        Initialization.
        Overrides:
        init in class PjWorkshop
      • reset

        public void reset()
        Reset workshop and geometry to original state.
        Overrides:
        reset in class PjWorkshop
      • ok

        public void ok()
        Accept current version of the geometry as new version. Close workshop. The copy of the original geometry is ignored.
        Overrides:
        ok in class PjWorkshop
      • cancel

        public void cancel()
        Stop any animation and restore the geometry to its original state.
        Overrides:
        cancel in class PjWorkshop
      • setGeometry

        public void setGeometry(PgElementSet geom)
        Set geometry to work on.
        Parameters:
        geom - Geometry will be unfolded.
      • showPolygonSet

        public void showPolygonSet(boolean bShow)
        Add a polygonSet to the display. This polygonSet may be used to mark edges, which the user does not want to be cut.
        Author:
        Ulrich Reitebuch
        Version:
        13.09.06, 1.00 created (ur)
      • unselectAllEdges

        public void unselectAllEdges()
        Unselect all edges.
        Author:
        Ulrich Reitebuch
        Version:
        13.09.06, 1.00 created (ur)
      • setWeight

        public void setWeight(int weight)
        Set the weight used to compute the unfolding. Weight is not used by improve unfolding
      • getWeight

        public int getWeight()
        Get the weight used to compute the unfolding. Weight is not used by improve unfolding
      • flatten

        public void flatten(double d)
        Incrementally flatten the registered geometry.
        Parameters:
        d - parameter in [0,1] describes the flattening state.
        Version:
        08.05.08, 1.20 revised (ur) Added step unfold mode.
        09.11.02, 1.10 revised (kp) Method made public.
        00.00.01, 1.00 created (kh)
      • storeEdges

        public void storeEdges()
        Store the cutting edges to the geometry. For this purpose the geometry will be set to the initial state. Edges are enabled, glued edges are selected and the geometry is saved as jvx file.
        Author:
        Ulrich Reitebuch
        Version:
        20.09.06, 1.00 created (ur)
      • setEnabledFixingElement

        public void setEnabledFixingElement(boolean flag)
        Enable/Disable freezing of the position of one element while the animation runs. This avoids unnecessary bouncing of the geometry during the animation.
        See Also:
        isEnabledFixingElement(), setFixedElement(int), getFixedElement()
      • setFixedElement

        public void setFixedElement(int anIndex)
        Give index of element to be fixed. The position of this element are freezed when the animation runs.
        See Also:
        isEnabledFixingElement(), getFixedElement()
      • fitGeometry

        public void fitGeometry(boolean flag)
        Enable/Disable fitting of geometry to the display after each step of the animation.
        See Also:
        isFittingGeometry()
      • isFittingGeometry

        public boolean isFittingGeometry()
        Check if fitting of geometry to the display after each step of the animation is enabled.
        See Also:
        fitGeometry(boolean)
      • isShowingSplices

        public boolean isShowingSplices()
        Check visibility of splices along cuts of the flattened surface.
        Since:
        JavaView 2.87.000
        Version:
        23.07.03, 1.00 created (kp)
      • showSplices

        public void showSplices(boolean flag)
        Enable visibility of splices along cuts of the flattened surface. This enables to glue papers models to closed surfaces.

        Note, splices are only visible if the model is fully flattened. During all other states splices are automatically switched off.

        Since:
        JavaView 2.87.000
        Version:
        23.07.03, 1.00 created (kp)
      • unfold

        public void unfold()
        Unfold the actual geometry.
        See Also:
        refold()
      • refold

        public void refold()
        Refold the geometry to its original position.
        See Also:
        unfold()
      • improveUnfolding

        public boolean improveUnfolding()
        Method to reduce the number of components the unfolding consists of. The method unfold must be called in advance.
        Returns:
        boolean true is the number of components has been reduces, false if not.
      • isRunning

        public boolean isRunning()
        Check whether smoothing prcess will be stopped.
        Returns:
        false, if the energy minimizer will stop (just shutting down regularely).
      • isStopped

        public boolean isStopped()
        Check whether smoothing prcess is currently NOT running a thread.
      • start

        public void start()
        Start smoothing in separate thread.
        See Also:
        stop()
      • stop

        public void stop()
        Stop smoothing in separate thread.
        See Also:
        start()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.