DimMethodsMixin is a mixin containing methods that can be used by other designs.
We do not use it alone; instead, it is used to add the methods to other designs.
Parameter Rules
getLocalCoordValue: |
method: | return function(p0, unitDir) { |
var vr = p0.sub(this.origin); |
var result =unitDir.dot(vr); |
return result; |
} |
getLocalPoint: |
method: | return function(p0) { |
var vr = p0.sub(this.origin); |
var x = this.unitX.dot(vr); |
var y = this.unitY.dot(vr); |
var z = this.unitZ.dot(vr); |
return p(x,y,z,R.world.transform); |
} |
midpoint: |
method: | return function (p0,p1) { |
var dist=p0.get3().clone().distanceTo(p1.get3().clone()); |
var vr=p1.get3().clone().sub(p0.get3().clone()).normalize(); |
var offset=vr.multiplyScalar(dist/2.0); |
var p2 = p0.get3().clone().add(offset); |
return new Point(p2); |
} |
projectPoint: |
method: | return function(p, o, n) { |
return p.addv(n.scale(n.dot(p.sub(o))).negate()); |
}; |
Mixins
BaseAssembly
AssemblyRenderMixin
Render3Mixin
FrameMixin
AssemblyMixin
FrameMixin
BaseNode
BaseModel
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
dimMeasurementFormatted |
string |
Formula |
Derived |
Cached |
dimScaledMeasurement |
number |
Formula |
Derived |
Cached |
measurement |
number |
Formula |
Derived |
Cached |
measurementDirection |
vector |
Formula |
Derived |
Cached |