# How to correctly focus on nodes in 2D drawings

**URL:** https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872
**Category:** HOOPS Visualize Web
**Created:** [July 17, 2024, 7:55am UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872 "2024-07-17T07:55:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![15089700278](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/15089700278/32/1571_2.png) [@15089700278](https://forum.techsoft3d.com/u/15089700278)
#### Post date: [July 17, 2024, 7:55am UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/1 "2024-07-17T07:55:28Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/8/8c540be9356213a1cee364f24ae600c299e2eb00.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/f/f701ac458e9dbb0f1e7c27d5946e0662d53cfcbe.png)  
I use this API, but I will lose some drawing information

```auto
hwv.view.fitNodes([3401], 300)

```

---

<div class="post-metadata">

### Author: ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)
#### Post date: [July 17, 2024, 2:27pm UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/2 "2024-07-17T14:27:11Z")

</div>

Hello @15089700278,

Do you know the [node type](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/enum/Communicator.NodeType.html#nodetype) for 3401? To quickly check, please run the following in the web browser console:

`Communicator.NodeType[hwv.model.getNodeType(3401)];`

Thanks,  
Tino

---

<div class="post-metadata">

### Author: ![15089700278](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/15089700278/32/1571_2.png) [@15089700278](https://forum.techsoft3d.com/u/15089700278)
#### Post date: [July 18, 2024, 2:59am UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/3 "2024-07-18T02:59:02Z")

</div>

> [@tino](#):
>
> Communicator.NodeType[hwv.model.getNodeType(3401)];

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/e/eed0088bfc20061055f3a5bd4e2579407b5f7535.png)

---

<div class="post-metadata">

### Author: ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)
#### Post date: [July 18, 2024, 3:38pm UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/4 "2024-07-18T15:38:51Z")

</div>

Hello @15089700278,

Thanks for trying the code snippet.

In order for us to do a deeper investigation, we will need to get the SCS file in our hands. If the file is less than 4MB, you can probably just send it to me directly via a direct message here on the forum. If the file is too big to seen via DM, let me know and we’ll work out an alternative solution.

Thanks,  
Tino

---

<div class="post-metadata">

### Author: ![15089700278](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/15089700278/32/1571_2.png) [@15089700278](https://forum.techsoft3d.com/u/15089700278)
#### Post date: [July 19, 2024, 1:48am UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/5 "2024-07-19T01:48:29Z")

</div>

[1.scs.zip](https://forum.techsoft3d.com/uploads/short-url/kjyhT1Fo9DAnEyihGk9BNuYCgLz.zip) (1.4 MB)

---

<div class="post-metadata">

### Author: ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)
#### Post date: [July 19, 2024, 3:27pm UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/6 "2024-07-19T15:27:42Z")

</div>

@15089700278,

Thanks for sending the SCS file.

One interesting point about the drawing is that certain nodes have an inordinately large bounding box (which could be affecting the camera). For example, when I run the function [getNodesBounding](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Model.html#Communicator.Model.getNodesBounding) on node 3401:  
`console.log(JSON.stringify(await hwv.model.getNodesBounding([3401])));`

…this is the result:  
`{"min":{"x":31.42701530456543,"y":100.12189483642578,"z":452.69061279296875},"max":{"x":32.79170608520508,"y":101.69248962402344,"z":452.69061279296875}} `

Notice the z-value. It looks like the drawing on the right has even greater z-values. To get a better sense of the depth of the drawing, you can try switching the [camera projection](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.View.html#Communicator.View.setProjectionMode) to perspective and then zooming out:  
`hwv.view.setProjectionMode(Communicator.Projection.Perspective);`

Was this particular drawing generated using Authoring or was it generated just through Converter?

Thanks,  
Tino

---

<div class="post-metadata">

### Author: ![15089700278](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/15089700278/32/1571_2.png) [@15089700278](https://forum.techsoft3d.com/u/15089700278)
#### Post date: [July 22, 2024, 10:22am UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/7 "2024-07-22T10:22:25Z")

</div>

> [@tino](#):
>
> just through Converter

just through Converter.  
This is the source file  
[激光雕刻机工程图纸.dwg.zip](https://forum.techsoft3d.com/uploads/short-url/krXgTXCtCSyJKnMZKMtIk2eDWUO.zip) (2.3 MB)

---

<div class="post-metadata">

### Author: ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)
#### Post date: [July 25, 2024, 8:05pm UTC](https://forum.techsoft3d.com/t/how-to-correctly-focus-on-nodes-in-2d-drawings/3872/8 "2024-07-25T20:05:57Z")

</div>

Hello @15089700278,

As a quick follow-up to our previous correspondences both on and off the forum, we are creating an internal ticket for the zoom issue manifesting for certain DWG drawings.

Thanks,  
Tino
