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
ded9bf6d
Commit
ded9bf6d
authored
6 months ago
by
Johannes Junggeburth
Browse files
Options
Downloads
Patches
Plain Diff
GeoDeDuplicator - Fix clone method
parent
6327d3f0
No related branches found
No related tags found
1 merge request
!406
GeoDeDuplicator - Fix clone method
Pipeline
#9979671
passed
6 months ago
Stage: step-A
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GeoModelCore/GeoModelHelpers/src/GeoDeDuplicator.cxx
+6
-6
6 additions, 6 deletions
GeoModelCore/GeoModelHelpers/src/GeoDeDuplicator.cxx
with
6 additions
and
6 deletions
GeoModelCore/GeoModelHelpers/src/GeoDeDuplicator.cxx
+
6
−
6
View file @
ded9bf6d
...
...
@@ -111,18 +111,18 @@ GeoDeDuplicator::GeoIdPtr
return
newId
;
}
PVLink
GeoDeDuplicator
::
clone
(
PVConstLink
vol
)
const
{
PVLink
GeoDeDuplicator
::
clone
(
PVConstLink
cloneMe
)
const
{
PVLink
newVol
{};
bool
tryPhysVolDeDup
{
m_deDuplicatePhysVol
};
GeoLogVolPtr
logVol
{
const_cast
<
GeoLogVol
*>
(
vol
->
getLogVol
())};
if
(
dynamic_cast
<
const
GeoPhysVol
*>
(
vol
.
get
()))
{
GeoLogVolPtr
logVol
{
const_cast
<
GeoLogVol
*>
(
cloneMe
->
getLogVol
())};
if
(
dynamic_cast
<
const
GeoPhysVol
*>
(
cloneMe
.
get
()))
{
newVol
=
make_intrusive
<
GeoPhysVol
>
(
cacheVolume
(
logVol
));
}
else
{
newVol
=
make_intrusive
<
GeoFullPhysVol
>
(
cacheVolume
(
logVol
));
tryPhysVolDeDup
=
false
;
}
for
(
unsigned
int
chNode
=
0
;
chNode
<
newVol
->
getNChildNodes
();
++
chNode
)
{
GeoIntrusivePtr
<
const
GeoGraphNode
>
node
{
*
newVol
->
getChildNode
(
chNode
)};
for
(
unsigned
int
chNode
=
0
;
chNode
<
cloneMe
->
getNChildNodes
();
++
chNode
)
{
GeoIntrusivePtr
<
const
GeoGraphNode
>
node
{
*
cloneMe
->
getChildNode
(
chNode
)};
/** transform nodes */
if
(
typeid
(
*
node
)
==
typeid
(
GeoAlignableTransform
))
{
const
auto
geoTrf
=
dynamic_pointer_cast
<
const
GeoAlignableTransform
>
(
node
);
...
...
@@ -149,7 +149,7 @@ PVLink GeoDeDuplicator::clone(PVConstLink vol) const {
newVol
->
add
(
const_pointer_cast
(
node
));
}
}
if
(
tryPhysVolDeDup
){
if
(
tryPhysVolDeDup
)
{
newVol
=
cacheVolume
(
dynamic_pointer_cast
<
GeoPhysVol
>
(
newVol
));
}
return
newVol
;
...
...
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