Skip to content

Commit 57633da

Browse files
committed
fix
1 parent 673e375 commit 57633da

File tree

4 files changed

+107
-69
lines changed

4 files changed

+107
-69
lines changed

include/geode/model/representation/builder/brep_builder.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -146,31 +146,31 @@ namespace geode
146146

147147
[[nodiscard]] const uuid& add_block_collection();
148148

149-
void add_corner( uuid corner_id );
149+
void add_corner( const uuid& corner_id );
150150

151-
void add_corner( uuid corner_id, const MeshImpl& impl );
151+
void add_corner( const uuid& corner_id, const MeshImpl& impl );
152152

153-
void add_line( uuid line_id );
153+
void add_line( const uuid& line_id );
154154

155-
void add_line( uuid line_id, const MeshImpl& impl );
155+
void add_line( const uuid& line_id, const MeshImpl& impl );
156156

157-
void add_surface( uuid surface_id );
157+
void add_surface( const uuid& surface_id );
158158

159-
void add_surface( uuid surface_id, const MeshImpl& impl );
159+
void add_surface( const uuid& surface_id, const MeshImpl& impl );
160160

161-
void add_block( uuid block_id );
161+
void add_block( const uuid& block_id );
162162

163-
void add_block( uuid block_id, const MeshImpl& impl );
163+
void add_block( const uuid& block_id, const MeshImpl& impl );
164164

165-
void add_model_boundary( uuid model_boundary_id );
165+
void add_model_boundary( const uuid& model_boundary_id );
166166

167-
void add_corner_collection( uuid corner_collection_id );
167+
void add_corner_collection( const uuid& corner_collection_id );
168168

169-
void add_line_collection( uuid line_collection_id );
169+
void add_line_collection( const uuid& line_collection_id );
170170

171-
void add_surface_collection( uuid surface_collection_id );
171+
void add_surface_collection( const uuid& surface_collection_id );
172172

173-
void add_block_collection( uuid block_collection_id );
173+
void add_block_collection( const uuid& block_collection_id );
174174

175175
void update_corner_mesh(
176176
const Corner3D& corner, std::unique_ptr< PointSet3D > mesh );

include/geode/model/representation/builder/section_builder.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,25 @@ namespace geode
127127

128128
[[nodiscard]] const uuid& add_surface_collection();
129129

130-
void add_corner( uuid corner_id );
130+
void add_corner( const uuid& corner_id );
131131

132-
void add_corner( uuid corner_id, const MeshImpl& impl );
132+
void add_corner( const uuid& corner_id, const MeshImpl& impl );
133133

134-
void add_line( uuid line_id );
134+
void add_line( const uuid& line_id );
135135

136-
void add_line( uuid line_id, const MeshImpl& impl );
136+
void add_line( const uuid& line_id, const MeshImpl& impl );
137137

138-
void add_surface( uuid surface_id );
138+
void add_surface( const uuid& surface_id );
139139

140-
void add_surface( uuid surface_id, const MeshImpl& impl );
140+
void add_surface( const uuid& surface_id, const MeshImpl& impl );
141141

142-
void add_model_boundary( uuid model_boundary_id );
142+
void add_model_boundary( const uuid& model_boundary_id );
143143

144-
void add_corner_collection( uuid corner_collection_id );
144+
void add_corner_collection( const uuid& corner_collection_id );
145145

146-
void add_line_collection( uuid line_collection_id );
146+
void add_line_collection( const uuid& line_collection_id );
147147

148-
void add_surface_collection( uuid surface_collection_id );
148+
void add_surface_collection( const uuid& surface_collection_id );
149149

150150
void update_corner_mesh(
151151
const Corner2D& corner, std::unique_ptr< PointSet2D > mesh );

src/geode/model/representation/builder/brep_builder.cpp

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -366,69 +366,89 @@ namespace geode
366366
return id;
367367
}
368368

369-
void BRepBuilder::add_corner( uuid corner_id )
369+
void BRepBuilder::add_corner( const uuid& corner_id )
370370
{
371-
create_corner( std::move( corner_id ) );
371+
create_corner( corner_id );
372+
detail::add_mesh_component( *this, brep_.corner( corner_id ) );
372373
}
373374

374-
void BRepBuilder::add_corner( uuid corner_id, const MeshImpl& impl )
375+
void BRepBuilder::add_corner( const uuid& corner_id, const MeshImpl& impl )
375376
{
376-
create_corner( std::move( corner_id ), impl );
377+
create_corner( corner_id, impl );
378+
detail::add_mesh_component( *this, brep_.corner( corner_id ) );
377379
}
378380

379-
void BRepBuilder::add_line( uuid line_id )
381+
void BRepBuilder::add_line( const uuid& line_id )
380382
{
381-
create_line( std::move( line_id ) );
383+
create_line( line_id );
384+
detail::add_mesh_component( *this, brep_.line( line_id ) );
382385
}
383386

384-
void BRepBuilder::add_line( uuid line_id, const MeshImpl& impl )
387+
void BRepBuilder::add_line( const uuid& line_id, const MeshImpl& impl )
385388
{
386-
create_line( std::move( line_id ), impl );
389+
create_line( line_id, impl );
390+
detail::add_mesh_component( *this, brep_.line( line_id ) );
387391
}
388392

389-
void BRepBuilder::add_surface( uuid surface_id )
393+
void BRepBuilder::add_surface( const uuid& surface_id )
390394
{
391-
create_surface( std::move( surface_id ) );
395+
create_surface( surface_id );
396+
detail::add_mesh_component( *this, brep_.surface( surface_id ) );
392397
}
393398

394-
void BRepBuilder::add_surface( uuid surface_id, const MeshImpl& impl )
399+
void BRepBuilder::add_surface(
400+
const uuid& surface_id, const MeshImpl& impl )
395401
{
396-
create_surface( std::move( surface_id ), impl );
402+
create_surface( surface_id, impl );
403+
detail::add_mesh_component( *this, brep_.surface( surface_id ) );
397404
}
398405

399-
void BRepBuilder::add_block( uuid block_id )
406+
void BRepBuilder::add_block( const uuid& block_id )
400407
{
401-
create_block( std::move( block_id ) );
408+
create_block( block_id );
409+
detail::add_mesh_component( *this, brep_.block( block_id ) );
402410
}
403411

404-
void BRepBuilder::add_block( uuid block_id, const MeshImpl& impl )
412+
void BRepBuilder::add_block( const uuid& block_id, const MeshImpl& impl )
405413
{
406-
create_block( std::move( block_id ), impl );
414+
create_block( block_id, impl );
415+
detail::add_mesh_component( *this, brep_.block( block_id ) );
407416
}
408417

409-
void BRepBuilder::add_model_boundary( uuid model_boundary_id )
418+
void BRepBuilder::add_model_boundary( const uuid& model_boundary_id )
410419
{
411-
create_model_boundary( std::move( model_boundary_id ) );
420+
create_model_boundary( model_boundary_id );
421+
detail::add_collection_component(
422+
*this, brep_.model_boundary( model_boundary_id ) );
412423
}
413424

414-
void BRepBuilder::add_corner_collection( uuid corner_collection_id )
425+
void BRepBuilder::add_corner_collection( const uuid& corner_collection_id )
415426
{
416-
create_corner_collection( std::move( corner_collection_id ) );
427+
create_corner_collection( corner_collection_id );
428+
detail::add_collection_component(
429+
*this, brep_.corner_collection( corner_collection_id ) );
417430
}
418431

419-
void BRepBuilder::add_line_collection( uuid line_collection_id )
432+
void BRepBuilder::add_line_collection( const uuid& line_collection_id )
420433
{
421-
create_line_collection( std::move( line_collection_id ) );
434+
create_line_collection( line_collection_id );
435+
detail::add_collection_component(
436+
*this, brep_.line_collection( line_collection_id ) );
422437
}
423438

424-
void BRepBuilder::add_surface_collection( uuid surface_collection_id )
439+
void BRepBuilder::add_surface_collection(
440+
const uuid& surface_collection_id )
425441
{
426-
create_surface_collection( std::move( surface_collection_id ) );
442+
create_surface_collection( surface_collection_id );
443+
detail::add_collection_component(
444+
*this, brep_.surface_collection( surface_collection_id ) );
427445
}
428446

429-
void BRepBuilder::add_block_collection( uuid block_collection_id )
447+
void BRepBuilder::add_block_collection( const uuid& block_collection_id )
430448
{
431-
create_block_collection( std::move( block_collection_id ) );
449+
create_block_collection( block_collection_id );
450+
detail::add_collection_component(
451+
*this, brep_.block_collection( block_collection_id ) );
432452
}
433453

434454
void BRepBuilder::update_corner_mesh(

src/geode/model/representation/builder/section_builder.cpp

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -204,54 +204,72 @@ namespace geode
204204
return id;
205205
}
206206

207-
void SectionBuilder::add_corner( uuid corner_id )
207+
void SectionBuilder::add_corner( const uuid& corner_id )
208208
{
209-
create_corner( std::move( corner_id ) );
209+
create_corner( corner_id );
210+
detail::add_mesh_component( *this, section_.corner( corner_id ) );
210211
}
211212

212-
void SectionBuilder::add_corner( uuid corner_id, const MeshImpl& impl )
213+
void SectionBuilder::add_corner(
214+
const uuid& corner_id, const MeshImpl& impl )
213215
{
214-
create_corner( std::move( corner_id ), impl );
216+
create_corner( corner_id, impl );
217+
detail::add_mesh_component( *this, section_.corner( corner_id ) );
215218
}
216219

217-
void SectionBuilder::add_line( uuid line_id )
220+
void SectionBuilder::add_line( const uuid& line_id )
218221
{
219-
create_line( std::move( line_id ) );
222+
create_line( line_id );
223+
detail::add_mesh_component( *this, section_.line( line_id ) );
220224
}
221225

222-
void SectionBuilder::add_line( uuid line_id, const MeshImpl& impl )
226+
void SectionBuilder::add_line( const uuid& line_id, const MeshImpl& impl )
223227
{
224-
create_line( std::move( line_id ), impl );
228+
create_line( line_id, impl );
229+
detail::add_mesh_component( *this, section_.line( line_id ) );
225230
}
226231

227-
void SectionBuilder::add_surface( uuid surface_id )
232+
void SectionBuilder::add_surface( const uuid& surface_id )
228233
{
229-
create_surface( std::move( surface_id ) );
234+
create_surface( surface_id );
235+
detail::add_mesh_component( *this, section_.surface( surface_id ) );
230236
}
231237

232-
void SectionBuilder::add_surface( uuid surface_id, const MeshImpl& impl )
238+
void SectionBuilder::add_surface(
239+
const uuid& surface_id, const MeshImpl& impl )
233240
{
234-
create_surface( std::move( surface_id ), impl );
241+
create_surface( surface_id, impl );
242+
detail::add_mesh_component( *this, section_.surface( surface_id ) );
235243
}
236244

237-
void SectionBuilder::add_model_boundary( uuid model_boundary_id )
245+
void SectionBuilder::add_model_boundary( const uuid& model_boundary_id )
238246
{
239-
create_model_boundary( std::move( model_boundary_id ) );
247+
create_model_boundary( model_boundary_id );
248+
detail::add_collection_component(
249+
*this, section_.model_boundary( model_boundary_id ) );
240250
}
241251

242-
void SectionBuilder::add_corner_collection( uuid corner_collection_id )
252+
void SectionBuilder::add_corner_collection(
253+
const uuid& corner_collection_id )
243254
{
244-
create_corner_collection( std::move( corner_collection_id ) );
255+
create_corner_collection( corner_collection_id );
256+
detail::add_collection_component(
257+
*this, section_.corner_collection( corner_collection_id ) );
245258
}
246259

247-
void SectionBuilder::add_line_collection( uuid line_collection_id )
260+
void SectionBuilder::add_line_collection( const uuid& line_collection_id )
248261
{
249-
create_line_collection( std::move( line_collection_id ) );
262+
create_line_collection( line_collection_id );
263+
detail::add_collection_component(
264+
*this, section_.line_collection( line_collection_id ) );
250265
}
251266

252-
void SectionBuilder::add_surface_collection( uuid surface_collection_id )
267+
void SectionBuilder::add_surface_collection(
268+
const uuid& surface_collection_id )
253269
{
254-
create_surface_collection( std::move( surface_collection_id ) );
270+
create_surface_collection( surface_collection_id );
271+
detail::add_collection_component(
272+
*this, section_.surface_collection( surface_collection_id ) );
255273
}
256274

257275
void SectionBuilder::update_corner_mesh(

0 commit comments

Comments
 (0)