ThreePipe
    Preparing search index...

    Class ShapeTubeExtrudePlugin

    ShapeTubeExtrudePlugin

    Provides interactive extrusion of flat geometry along a curve path. Takes a selected planar mesh, auto-detects its flat axis, extracts a 2D Shape from the vertices, then extrudes it along a curve using the TubeShape geometry generator.

    Features:

    • Extrude any flat geometry along a circle curve
    • Auto-detect planar axis (X, Y, or Z) and extract 2D shape
    • Configurable shape/tube segments, shape scale, and material splits
    • Multi-material support via configurable split positions

    This could also be used as a sample plugin to create custom interactive geometry plugins.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    dependencies: (typeof PickingPlugin | typeof GeometryGeneratorPlugin)[] = ...
    enabled: boolean = true
    horizontalSplits: boolean = true
    isViewerPluginSync: true = ...
    materialSplits: string = '0.3, 0.6'
    shapeScaleX: number = 1
    shapeScaleY: number = 1
    shapeSegments: number = 32
    toJSON: any = undefined
    tubularSegments: number = 32
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "ShapeTubeExtrudePlugin" = 'ShapeTubeExtrudePlugin'

    Accessors

    Methods

    • Extrude a mesh's geometry along a curve path. The mesh must be a flat/planar geometry (aligned to one axis).

      Parameters

      • object: Mesh
      • curve: any
      • shapeSegments: number = ...
      • tubularSegments: number = ...
      • shapeScaleX: number = ...
      • shapeScaleY: number = ...
      • materialSplits: string = ...
      • horizontalSplits: boolean = ...

      Returns void

    • Convert a planar 3D geometry to a 2D Shape by auto-detecting the flat axis. The geometry must be aligned to one of the principal axes (X, Y, or Z bounding box extent near zero).

      Parameters

      • geometry: BufferGeometry

        The geometry to convert (must be planar/flat)

      • sort: boolean = true

        Whether to sort points starting from the leftmost point

      Returns Shape

      A 2D Shape suitable for extrusion

      If geometry has no position attribute, is too large (>500 vertices), or is not axis-aligned planar