@@ -10,7 +10,7 @@ use hypermath::prelude::*;
1010use hyperpuzzle_core:: ComponentList ;
1111use hyperpuzzle_core:: catalog:: { BuildCtx , BuildTask } ;
1212use hyperpuzzle_core:: prelude:: * ;
13- use hyperpuzzle_impl_nd_euclid:: NdEuclidPuzzleGeometry ;
13+ use hyperpuzzle_impl_nd_euclid:: { NdEuclidPuzzleGeometry , ad_hoc_id } ;
1414
1515mod axes;
1616mod from_space;
@@ -170,7 +170,25 @@ impl ProductPuzzleBuilder {
170170 self . shape . build_piece_types ( warn_fn) ?;
171171
172172 let axes = Arc :: new ( self . axes . build_axis_system ( ) ?) ;
173- let mut twists = TwistSystem :: new_empty ( & axes) ;
173+ let mut twists = TwistSystem {
174+ meta : Arc :: new ( CatalogMetadata :: simple (
175+ ad_hoc_id ( id. clone ( ) ) ,
176+ format ! ( "{id} (ad-hoc)" ) ,
177+ ) ) ,
178+ axes : Arc :: clone ( & axes) ,
179+ axis_from_family : Box :: new ( {
180+ let axes = axes. clone ( ) ;
181+ move |family_str| {
182+ // TODO: correct number of underscores
183+ let axis_name = match family_str. split_once ( '_' ) {
184+ Some ( ( first, _) ) => first,
185+ None => family_str,
186+ } ;
187+ axes. names . id_from_name ( axis_name)
188+ }
189+ } ) ,
190+ ..TwistSystem :: new_empty ( )
191+ } ;
174192 let axis_undeorbiters = self . axes . build_axis_undeorbiters ( ) ;
175193
176194 let named_point_names = self . axes . build_named_point_names ( ) ?;
0 commit comments