Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
236aadce
Commit
236aadce
authored
Dec 9, 2013
by
Maximilien Siavelis
Browse files
Options
Downloads
Patches
Plain Diff
to take into account physical lines when a line is splitted
parent
0f497647
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/Geo.cpp
+22
-0
22 additions, 0 deletions
Geo/Geo.cpp
with
22 additions
and
0 deletions
Geo/Geo.cpp
+
22
−
0
View file @
236aadce
...
...
@@ -3652,6 +3652,7 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
bool
first_periodic
=
true
;
bool
last_periodic
=
false
;
List_T
*
new_list
=
List_Create
(
1
,
List_Nbr
(
c
->
Control_Points
)
/
10
,
sizeof
(
int
));
List_T
*
num_shapes
=
List_Create
(
2
,
1
,
sizeof
(
int
));
Vertex
*
pv
;
for
(
int
i
=
0
;
i
<
List_Nbr
(
c
->
Control_Points
);
i
++
){
List_Read
(
c
->
Control_Points
,
i
,
&
pv
);
...
...
@@ -3662,6 +3663,7 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
if
(
!
(
is_periodic
&&
first_periodic
)){
Curve
*
cnew
=
_create_splitted_curve
(
c
,
new_list
);
List_Add
(
shapes
,
&
cnew
);
List_Add
(
num_shapes
,
&
cnew
->
Num
);
}
first_periodic
=
false
;
List_Reset
(
new_list
);
...
...
@@ -3675,6 +3677,7 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
if
(
List_Nbr
(
new_list
)
>
1
){
Curve
*
cnew
=
_create_splitted_curve
(
c
,
new_list
);
List_Add
(
shapes
,
&
cnew
);
List_Add
(
num_shapes
,
&
cnew
->
Num
);
}
// replace original curve by the new curves in all surfaces (and for
// the opposite curve)
...
...
@@ -3722,9 +3725,28 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
}
}
List_Delete
(
Surfs
);
// replace original curve by the new curves in physical groups
for
(
int
i
=
0
;
i
<
List_Nbr
(
GModel
::
current
()
->
getGEOInternals
()
->
PhysicalGroups
);
i
++
){
PhysicalGroup
*
p
=
*
(
PhysicalGroup
**
)
List_Pointer
(
GModel
::
current
()
->
getGEOInternals
()
->
PhysicalGroups
,
i
);
if
(
p
->
Typ
==
MSH_PHYSICAL_LINE
){
for
(
int
j
=
0
;
j
<
List_Nbr
(
p
->
Entities
);
j
++
){
int
num
;
List_Read
(
p
->
Entities
,
j
,
&
num
);
if
(
num
==
c
->
Num
){
List_Remove
(
p
->
Entities
,
j
);
List_Insert_In_List
(
num_shapes
,
j
,
p
->
Entities
);
j
+=
List_Nbr
(
num_shapes
)
-
1
;
}
}
}
}
DeleteShape
(
c
->
Typ
,
c
->
Num
);
List_Delete
(
new_list
);
List_Delete
(
rshapes
);
List_Delete
(
num_shapes
);
return
true
;
}
...
...
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