mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 09:52:34 +01:00
fix plane to expose correct surface
This commit is contained in:
parent
fdde14b8f8
commit
2962ece2ff
2 changed files with 6 additions and 5 deletions
|
|
@ -69,7 +69,6 @@ class BREPSceneFace extends SceneFace {
|
|||
brepFace.data['scene.face'] = this;
|
||||
}
|
||||
|
||||
|
||||
normal() {
|
||||
return this.brepFace.surface.normalInMiddle();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import Vector from 'math/vector';
|
||||
import {STANDARD_BASES} from '../../../math/l3space'
|
||||
import {Plane} from '../../../brep/geom/impl/plane'
|
||||
import {SceneSolid, SceneFace} from './sceneObject'
|
||||
import {SceneFace, SceneSolid} from './sceneObject';
|
||||
import {createBoundingSurfaceFrom2DPoints} from '../../../brep/brep-builder';
|
||||
|
||||
const INIT_WIDTH_H = 750 * 0.5;
|
||||
const INIT_HEIGHT_H = 750 * 0.5;
|
||||
|
|
@ -22,6 +21,9 @@ export class PlaneSceneObject extends SceneSolid {
|
|||
opacity: 0.5
|
||||
}, skin));
|
||||
this.plane = plane;
|
||||
this.surface = createBoundingSurfaceFrom2DPoints([
|
||||
new Vector(0,0,0), new Vector(0,100,0), new Vector(100,100,0), new Vector(100,0,0)
|
||||
], plane);
|
||||
this.sceneFace = new PlaneSceneFace(this);
|
||||
this.sceneFaces.push(this.sceneFace); // as part of the API
|
||||
this.updateBounds(INIT_BOUNDS);
|
||||
|
|
@ -69,7 +71,7 @@ class PlaneSceneFace extends SceneFace {
|
|||
}
|
||||
|
||||
surface() {
|
||||
return this.solid.plane;
|
||||
return this.solid.surface;
|
||||
}
|
||||
|
||||
getBounds() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue