This class allows to build incrementally a fault composed of segments, or to set the contiguous segments using a Serie (position of points)

Example

import { Model, FaultBuilder } from '@youwol/vinci'

const model = new Model()

const builder = FaultBuilder.create(model)
.addPoint([0,0])
.addPoint([1,1])
.subdivide(10)
.setBcType('tt')
.addToModel() // put first fault into the model
.addPoint([2,0])
.addPoint([3,1])
.subdivide(20)
.setBcType('tb')
.addToModel() // put second fault into the model (do not forget this call at the end)

Example

import { Model, FaultBuilder } from '@youwol/vinci'

const builder = FaultBuilder.create()
.addPoint([0,0])
.addPoint([1,1])
.subdivide(10)
.setBcType('tt')
// Here, do not call addToModel() as the model is undefined!

// Instead, construct a fault using the builder
const fault = new Fault(builder)

Hierarchy

  • FaultBuilder

Constructors

Accessors

Methods

  • Example

    const builder = new FaultBuilder()
    // create 2 segments
    builder
    .addPoint([0,0])
    .addPoint([1,0])
    .addPoint([2,1])
    .setBcType('bb')
    .setBurger([1,0])
    .addTo(model)
    // or model.addFault(builder.fault)

    Parameters

    Returns FaultBuilder

  • Subdivide each segment in n sub-segments

    Parameters

    • n: number = 2

    Returns FaultBuilder