1
- import { createMeshGeometry } from 'scene/geoms' ;
2
- import { Plane } from 'geom/impl/plane' ;
1
+ import { createMeshGeometry } from 'scene/geoms' ;
2
+ import { Plane } from 'geom/impl/plane' ;
3
3
import Vector from 'math/vector' ;
4
- import { MOpenFaceShell } from '../../../../../web/app/cad/model/mopenFace' ;
5
- import { PlaneSurfacePrototype } from '../../../../../web/app/cad/model/surfacePrototype' ;
4
+ import { MOpenFaceShell } from '../../../../../web/app/cad/model/mopenFace' ;
5
+ import { PlaneSurfacePrototype } from '../../../../../web/app/cad/model/surfacePrototype' ;
6
6
import CSys from "math/csys" ;
7
- import { EntityKind } from "cad/model/entities" ;
8
- import { TextureLoader , MeshBasicMaterial , MeshLambertMaterial , Mesh , DoubleSide , PlaneGeometry } from "three" ;
9
- //import THREE from "three";
7
+ import { EntityKind } from "cad/model/entities" ;
10
8
11
9
12
-
13
-
14
- function paramsToPlane ( { orientation, datum, depth } , cadRegistry ) {
10
+ function paramsToPlane ( { orientation, datum, depth } ) {
15
11
const csys = datum ? datum . csys : CSys . ORIGIN ;
16
12
17
13
let axis ;
@@ -29,8 +25,8 @@ function paramsToPlane({ orientation, datum, depth }, cadRegistry) {
29
25
}
30
26
31
27
32
- function previewGeomProvider ( params , { cadRegistry } ) {
33
- const plane = paramsToPlane ( params , cadRegistry ) ;
28
+ function previewGeomProvider ( params ) {
29
+ const plane = paramsToPlane ( params ) ;
34
30
const tr = plane . get3DTransformation ( ) ;
35
31
const w = 375 , h = 375 ;
36
32
const a = tr . _apply ( new Vector ( - w , - h , 0 ) ) ;
@@ -65,15 +61,15 @@ export default {
65
61
paramsInfo : ( { depth } ) => `(${ depth } )` ,
66
62
previewGeomProvider,
67
63
run : ( params , { cadRegistry } ) => {
64
+
68
65
return {
69
66
consumed : [ ] ,
70
- created : [ new MOpenFaceShell ( new PlaneSurfacePrototype ( paramsToPlane ( params , cadRegistry ) ) ) ]
67
+ created : [ new MOpenFaceShell ( new PlaneSurfacePrototype ( paramsToPlane ( params ) ) ) ]
71
68
}
72
69
} ,
73
70
form : [
74
71
{
75
72
type : 'choice' ,
76
- style : "dropdown" ,
77
73
label : 'orientation' ,
78
74
name : 'orientation' ,
79
75
style : 'radio' ,
@@ -103,7 +99,6 @@ export default {
103
99
// name: 'image',
104
100
// optional: true,
105
101
// label: 'Optional Image',
106
-
107
102
// },
108
103
] ,
109
104
} ;
0 commit comments