Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-station-module-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
amos-station-module-view
Commits
b2396581
Commit
b2396581
authored
Jun 10, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改缺陷
parent
dbfb0677
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
11 deletions
+38
-11
MathUtils.js
mods/components/3dviewConvertor/utils/MathUtils.js
+16
-0
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+15
-4
dataProcessor.js
mods/components/3dviewConvertor/view/dataProcessor.js
+4
-3
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+3
-4
No files found.
mods/components/3dviewConvertor/utils/MathUtils.js
0 → 100644
View file @
b2396581
export
const
chunk
=
(
arr
,
size
)
=>
{
let
objArr
=
[];
let
index
=
0
;
let
objArrlen
=
arr
.
length
/
size
;
for
(
let
i
=
0
;
i
<
objArrlen
;
i
++
){
let
arrTemp
=
[];
for
(
let
j
=
0
;
j
<
size
;
j
++
){
arrTemp
[
j
]
=
arr
[
index
++
];
if
(
index
===
arr
.
length
){
break
;
}
}
objArr
[
i
]
=
arrTemp
;
}
return
objArr
;
};
mods/components/3dviewConvertor/view/View3D.js
View file @
b2396581
...
@@ -270,9 +270,7 @@ class View3D extends Component {
...
@@ -270,9 +270,7 @@ class View3D extends Component {
this
.
r3d
.
on
(
'keydown'
,
evt
=>
{
this
.
r3d
.
on
(
'keydown'
,
evt
=>
{
// 返回上级
// 返回上级
if
(
this
.
lensLevel
===
LENS_LEVEL
.
SUB
&&
evt
.
code
===
'Backspace'
)
{
if
(
this
.
lensLevel
===
LENS_LEVEL
.
SUB
&&
evt
.
code
===
'Backspace'
)
{
this
.
lensJumpFactory
.
jumpRoot
(
obj
=>
{
this
.
initModelDisplay
();
this
.
lensJumpFactory
.
fadeIn
(
obj
);
});
this
.
outlineFactory
.
toggleOutline
([]);
//清除选中
this
.
outlineFactory
.
toggleOutline
([]);
//清除选中
this
.
lensLevel
=
LENS_LEVEL
.
ROOT
;
this
.
lensLevel
=
LENS_LEVEL
.
ROOT
;
}
}
...
@@ -1572,6 +1570,7 @@ class View3D extends Component {
...
@@ -1572,6 +1570,7 @@ class View3D extends Component {
});
});
}
else
if
(
type
===
'out_except_model'
){
}
else
if
(
type
===
'out_except_model'
){
this
.
stagePilot
.
positionCtl
.
clearDrag
();
this
.
stagePilot
.
positionCtl
.
clearDrag
();
this
.
initModelDisplay
();
if
(
isAreaSave
){
if
(
isAreaSave
){
this
.
setState
({
promptData
:
this
.
setState
({
promptData
:
{
{
...
@@ -1601,6 +1600,18 @@ class View3D extends Component {
...
@@ -1601,6 +1600,18 @@ class View3D extends Component {
}
}
}
}
/**
*
*初始化模型显示(显示所有3维模型),清除选中
* @memberof View3D
*/
initModelDisplay
=
()
=>
{
this
.
lensJumpFactory
.
jumpRoot
(
obj
=>
{
this
.
lensJumpFactory
.
fadeIn
(
obj
);
});
this
.
outlineFactory
.
toggleOutline
([]);
}
setHeaderName
=
(
name
)
=>
{
setHeaderName
=
(
name
)
=>
{
this
.
setState
({
headerName
:
name
});
this
.
setState
({
headerName
:
name
});
}
}
...
@@ -1775,7 +1786,7 @@ class View3D extends Component {
...
@@ -1775,7 +1786,7 @@ class View3D extends Component {
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
{
isEditMode
&&
this
.
renderAreas
()}
{
isEditMode
&&
this
.
renderAreas
()}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
focus
Position
=
{
this
.
focusPosition
}
/>
}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
focus
Object
=
{
this
.
focusObject
}
/>
}
<
/A3DDesigner
>
<
/A3DDesigner
>
<
/div
>
<
/div
>
{
isEditMode
&&
{
isEditMode
&&
...
...
mods/components/3dviewConvertor/view/dataProcessor.js
View file @
b2396581
...
@@ -377,19 +377,20 @@ export const cacheObjsSave = (instance,obj,LENS_LEVEL)=>{
...
@@ -377,19 +377,20 @@ export const cacheObjsSave = (instance,obj,LENS_LEVEL)=>{
* @param {object} obj
* @param {object} obj
*/
*/
export
const
flyToSubView
=
(
instance
,
obj
,
LENS_LEVEL
)
=>
{
export
const
flyToSubView
=
(
instance
,
obj
,
LENS_LEVEL
)
=>
{
if
(
obj
.
userData
&&
obj
.
userData
.
level
&&
obj
.
userData
.
level
===
'root'
){
const
{
level
,
key
:
objKey
,
fitView
}
=
obj
.
userData
||
{};
if
(
level
&&
objKey
&&
level
===
'root'
&&
(
instance
.
processorLevel
[
objKey
]
||
[]).
length
>
0
){
Object
.
keys
(
instance
.
processorLevel
).
forEach
(
key
=>
{
Object
.
keys
(
instance
.
processorLevel
).
forEach
(
key
=>
{
// 隐藏所有一级
// 隐藏所有一级
instance
.
_cacheObj
[
key
].
visible
=
false
;
instance
.
_cacheObj
[
key
].
visible
=
false
;
// 隐藏非目标二级
// 隐藏非目标二级
if
(
key
!==
obj
.
userData
.
k
ey
){
if
(
key
!==
obj
K
ey
){
instance
.
processorLevel
[
key
].
forEach
(
sec
=>
{
instance
.
processorLevel
[
key
].
forEach
(
sec
=>
{
instance
.
_cacheObj
[
sec
].
visible
=
false
;
instance
.
_cacheObj
[
sec
].
visible
=
false
;
});
});
}
}
});
});
// 镜头切换
// 镜头切换
obj
.
userData
.
fitView
&&
instance
.
cameraFactory
.
fitView
(
obj
.
userData
.
fitView
);
//视角调整为最近视角
fitView
&&
instance
.
cameraFactory
.
fitView
(
fitView
);
//视角调整为最近视角
instance
.
lensLevel
=
LENS_LEVEL
.
SUB
;
instance
.
lensLevel
=
LENS_LEVEL
.
SUB
;
}
else
{
}
else
{
instance
.
focusObject
(
obj
);
instance
.
focusObject
(
obj
);
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
b2396581
...
@@ -44,10 +44,9 @@ class ExceptionArea extends Component {
...
@@ -44,10 +44,9 @@ class ExceptionArea extends Component {
}
}
onMarkerClick
=
(
marker
)
=>
{
onMarkerClick
=
(
marker
)
=>
{
console
.
log
(
marker
);
const
{
extData
,
node
}
=
marker
;
const
{
extData
}
=
marker
;
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'into_except_model'
,
extData
.
id
);
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'into_except_model'
,
extData
.
id
);
this
.
props
.
focus
Position
(
this
.
toCameraPosition
(
extData
.
position
)
);
this
.
props
.
focus
Object
&&
this
.
props
.
focusObject
(
node
);
}
}
...
@@ -111,7 +110,7 @@ class ExceptionArea extends Component {
...
@@ -111,7 +110,7 @@ class ExceptionArea extends Component {
ExceptionArea
.
propTypes
=
{
ExceptionArea
.
propTypes
=
{
markers
:
PropTypes
.
array
,
markers
:
PropTypes
.
array
,
handleExceptModel
:
PropTypes
.
func
,
handleExceptModel
:
PropTypes
.
func
,
focus
Position
:
PropTypes
.
func
focus
Object
:
PropTypes
.
func
};
};
export
default
ExceptionArea
;
export
default
ExceptionArea
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment