Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rotation to represent azimuth tilt and base slope #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions 05 - VerySimpleFixedPVC2_with_electrical_layout.pvc
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@
<mesh>
<source id="rack1MeshSource">
<float_array id="rack1FloatArray" count="12">
0 0 0
-1500 0 0
-1500 -500 200
0 -500 200
-750 -250 0
750 -250 0
750 250 0
-750 250 0
Copy link

@MichalZru MichalZru Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The geometry of a rack will always be a rectangle in XY plane, with center in 0,0,0

</float_array>
<technique_common>
<accessor count="4" source="#rack1FloatArray" stride="3">
Expand Down Expand Up @@ -277,8 +277,11 @@
</library_geometries>
<library_nodes>
<!-- We define the model for a table with 1 rack -->
<node id="TableModel1" sid="TableModel1">
<!-- We instantiate the rack model -->
<node id="TableModel1" sid="TableModel1">
<rotate sid="azimuth">0 0 1 45</rotate>
<rotate sid="base slope">0 1 0 10</rotate>
<rotate sid="tilt">1 0 0 21.8</rotate>
Copy link

@MichalZru MichalZru Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tilt, base_slope and azimuth are <rotate> elements recognized by collada.

Benefits:

  • they are understood by a non-pv 3d software
  • PV software can easily read the last number and based on the sid indentify that tilt is 21.8, azimuth is 45 and base_slope is 10

Notes:

  • the order is important
  • the axis (first three numbers in the element), is constant

<!-- We instantiate the rack model -->
<instance_geometry url="#RackModel1">
<bind_material>
<technique_common>
Expand All @@ -298,9 +301,6 @@
<!-- table tag, child tags for illustrative purpose only -->
<table>
<type>fixed</type>
<tilt>21.8</tilt>
<azimuth>0</azimuth>
<base_slope>0</base_slope>
</table>
</technique>
</extra>
Expand Down