diff --git a/__test__/Geometry/EdgeGeometry.test.ts b/__test__/Geometry/EdgeGeometry.test.ts index 40b07dd56..2e0a7a950 100644 --- a/__test__/Geometry/EdgeGeometry.test.ts +++ b/__test__/Geometry/EdgeGeometry.test.ts @@ -12,7 +12,7 @@ test('EdgeGeometry生成', () => let obj = br.GetDrawObjectFromRenderType(RenderType.Wireframe); - let line = obj.children[0] as Line; + let line = obj as Line; let geo = line.geometry; diff --git a/src/DatabaseServices/Entity.ts b/src/DatabaseServices/Entity.ts index 63830d107..e69a5c99f 100644 --- a/src/DatabaseServices/Entity.ts +++ b/src/DatabaseServices/Entity.ts @@ -251,7 +251,8 @@ export class Entity extends CADObject UpdateVisible() { - this._drawObject.visible = !this._isErase && this._Visible; + if (this._drawObject) + this._drawObject.visible = !this._isErase && this._Visible; } //#endregion