Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GeoModelDev
GeoModel
Commits
e6bced08
Commit
e6bced08
authored
1 year ago
by
Riccardo Maria Bianchi
Browse files
Options
Downloads
Patches
Plain Diff
Use getDefTransform() to get default position for AXF. Closes
#97
parent
f2392d69
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!220
Use getDefTransform() to get default position for AlignableTransforms
Pipeline
#6480162
passed
1 year ago
Stage: step-A
Stage: step-B
Stage: step-C
Stage: step-D
Stage: step-E
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
+26
-14
26 additions, 14 deletions
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
with
26 additions
and
14 deletions
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
+
26
−
14
View file @
e6bced08
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
// Added support for "Verbose" output
// Added support for "Verbose" output
// - Feb 2023 - R.M.Bianchi <riccardo.maria.bianchi@cern.ch>
// - Feb 2023 - R.M.Bianchi <riccardo.maria.bianchi@cern.ch>
// Added 'setLoglevel' method, to steer output messages
// Added 'setLoglevel' method, to steer output messages
// - Nov 2023 - R.M.Bianchi <riccardo.maria.bianchi@cern.ch>
// Updated to use the AlignableTransform 'default position',
// which does not include alignment constants
//
// local includes
// local includes
#include
"GeoModelWrite/WriteGeoModel.h"
#include
"GeoModelWrite/WriteGeoModel.h"
...
@@ -796,22 +800,30 @@ unsigned int WriteGeoModel::storeTranform(const GeoTransform* node) {
...
@@ -796,22 +800,30 @@ unsigned int WriteGeoModel::storeTranform(const GeoTransform* node) {
* get the 12 matrix elements
* get the 12 matrix elements
*/
*/
// Get the 9 rotation coefficients
// Get the 9 rotation coefficients
double
xx
=
node
->
getTransform
()(
0
,
0
);
// NOTE: we use the 'getDefTransform' method,
double
xy
=
node
->
getTransform
()(
0
,
1
);
// instead of the 'getTransform' one,
double
xz
=
node
->
getTransform
()(
0
,
2
);
// because we want to get the 'default position'
// for GeoAlignableTransforms.
double
yx
=
node
->
getTransform
()(
1
,
0
);
// For GeoAlignableTransform, in fact,
double
yy
=
node
->
getTransform
()(
1
,
1
);
// the 'getTransform' method returns the transformation plus
double
yz
=
node
->
getTransform
()(
1
,
2
);
// the alignment constants.
// Both methods return the same transform for GeoTransforms.
double
zx
=
node
->
getTransform
()(
2
,
0
);
double
xx
=
node
->
getDefTransform
()(
0
,
0
);
double
zy
=
node
->
getTransform
()(
2
,
1
);
double
xy
=
node
->
getDefTransform
()(
0
,
1
);
double
zz
=
node
->
getTransform
()(
2
,
2
);
double
xz
=
node
->
getDefTransform
()(
0
,
2
);
double
yx
=
node
->
getDefTransform
()(
1
,
0
);
double
yy
=
node
->
getDefTransform
()(
1
,
1
);
double
yz
=
node
->
getDefTransform
()(
1
,
2
);
double
zx
=
node
->
getDefTransform
()(
2
,
0
);
double
zy
=
node
->
getDefTransform
()(
2
,
1
);
double
zz
=
node
->
getDefTransform
()(
2
,
2
);
// Get the 3 translation coefficients
// Get the 3 translation coefficients
double
dx
=
node
->
getTransform
()(
0
,
3
);
double
dx
=
node
->
get
Def
Transform
()(
0
,
3
);
double
dy
=
node
->
getTransform
()(
1
,
3
);
double
dy
=
node
->
get
Def
Transform
()(
1
,
3
);
double
dz
=
node
->
getTransform
()(
2
,
3
);
double
dz
=
node
->
get
Def
Transform
()(
2
,
3
);
// Instanciate an Eigen's 3D Transformation
// Instanciate an Eigen's 3D Transformation
GeoTrf
::
Transform3D
tr
;
GeoTrf
::
Transform3D
tr
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment