Home Reference Source Repository
import {GeometricObject} from 'awv3-next/sketcher/geomobjects.js'
public class | source

GeometricObject

Extends:

three~THREE.Object3DObject3ClassCadObject → GeometricObject

Direct Subclass:

Arc, Line, Point

Each geometric objects has several update functions, here they are:

  1. updateGeometry(movedPoint) must be called after any child point is changed (i.e. line's endpoint or arc's center was moved) recalculates inner parameters of the geometry (if present, i.e. center, angles)
  2. updateSizes(owningView) must be called after camera or object has changed, and after any geometrical changes recalculates any required sizing data (i.e. width value) automatically generated by mixinPixelSizedGeometry
  3. updateVisualization() must be called after anything changes, which may influence visible representation of object updates or rebuilds a THREE.Mesh which visibly represent the object Note that each update function depends on the data obtained from the previous steps.

Here is general advice of how to call update functions:

  • call updateGeometry directly and only inside controls handlers (when smth is edited)
  • do not call other updates directly, just register each object with Sketcher.registerVisualization

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

Inherited Summary

From class ClassCadObject
public get
public

members: *

public

name: *

public

type: *

public

addMember(member: *, markAsFreshlyAdded: *)

public
public
public

setFromObjectTree(objectTreeNode: *)

public
public

Public Constructors

public constructor source

Override:

ClassCadObject#constructor

Public Members

public constraintsSubstrate: * source

Public Methods

public finishedUpdating() source

Override:

ClassCadObject#finishedUpdating