coordinate system of ViewSection Problem

coordinate system of ViewSection Problem

YF.Yang
Participant Participant
1,819 Views
5 Replies
Message 1 of 6

coordinate system of ViewSection Problem

YF.Yang
Participant
Participant

Hi,

I'm trying to create section by Api, and get the Max and Min point of sectionBox. When I modified the code from the post from Jeremy: https://thebuildingcoder.typepad.com/blog/2012/06/create-section-view-parallel-to-wall.html 

 

XYZ min = new XYZ(-w, minZ - offset, -offset);
XYZ max = new XYZ(w/2, maxZ + offset+10, offset*2);

 

The created views as below, the coordinate system looks like a right handed coordinate.

 Snipaste_2021-04-14_21-50-48.png

But from the API(Version 2018.2), it says: “The view direction of the resulting section will be sectionBox.Transform.BasisZ and the up direction will be sectionBox.Transform.BasisY. The right hand direction will be computed so that (right, up, view direction) form a left handed coordinate system.”

 

Or what questions did I miss ?

0 Likes
Accepted solutions (2)
1,820 Views
5 Replies
Replies (5)
Message 2 of 6

architect.bim
Collaborator
Collaborator

Hi!

When you create ViewSection you use Transform object to define its orientation. And its BasisZ vector means view depth direction (in other words from viewer). But if you get Transform object of the view that has been already created its BasisZ direction will match view's ViewDirection which means "to viewer" direction. That is the difference! So if you try to get view's Transform basises it should look like this (if I'm not mistaken):

210414_1754_024.jpg


Maxim Stepannikov | Architect, BIM Manager, Instructor
0 Likes
Message 3 of 6

YF.Yang
Participant
Participant

Hi,

The transform is true in Orthotropic View3D.

But from the geometric information in this viewsection(see as below), the max , min point and  coordinate system should be what I have labeled above. They don't seem to follow the Api, which is what I’m confused about.

Snipaste_2021-04-15_09-33-49.png

0 Likes
Message 4 of 6

architect.bim
Collaborator
Collaborator
Accepted solution

Are you talking about element you see on the plan (section line with head)? Actually this object is not ViewSection. It is another element of category OST_Viewers. And the quote from documentation you've mentioned is about real section view it corresponds to - ViewSection object.


Maxim Stepannikov | Architect, BIM Manager, Instructor
0 Likes
Message 5 of 6

YF.Yang
Participant
Participant
Accepted solution

Thank you! I know what went wrong.

In the beginning, I thought the dot line area should be the top view of the section box. Because I have drawn some ModelLine to show the sectionbox in 3D view, and the geometric area are the same.

 

Notes for those who are confused by the same problem:

Perspective/Orthographic View3D: right handed coordinate

ViewSection: left handed coordinate

ViewPlan: right handed coordinate

The element(section line) in ViewPlan should be right handed coordinate. When go to ViewSection, its coordinate system will be like this:

 Snipaste_2021-04-15_17-18-32.png

0 Likes
Message 6 of 6

lingchris
Explorer
Explorer
I'm still confused,
0 Likes