@@ -14,20 +14,20 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
1414 // Create various Mesh objects to demonstrate OBJ export
1515
1616 // 1. Simple cube
17- let cube: Mesh < ( ) > = Mesh :: cube ( 20.0 , None ) . center ( ) ;
17+ let cube: Mesh < ( ) > = Mesh :: cube ( 20.0 , ( ) ) . center ( ) ;
1818 export_to_obj ( & cube, "cube" , "Simple 20x20x20mm cube" ) ?;
1919
2020 // 2. Sphere
21- let sphere: Mesh < ( ) > = Mesh :: sphere ( 15.0 , 32 , 16 , None ) ;
21+ let sphere: Mesh < ( ) > = Mesh :: sphere ( 15.0 , 32 , 16 , ( ) ) ;
2222 export_to_obj ( & sphere, "sphere" , "Sphere with 15mm radius" ) ?;
2323
2424 // 3. Cylinder
25- let cylinder: Mesh < ( ) > = Mesh :: cylinder ( 8.0 , 25.0 , 24 , None ) ;
25+ let cylinder: Mesh < ( ) > = Mesh :: cylinder ( 8.0 , 25.0 , 24 , ( ) ) ;
2626 export_to_obj ( & cylinder, "cylinder" , "Cylinder: 8mm radius, 25mm height" ) ?;
2727
2828 // 4. Complex boolean operation: cube with spherical cavity
29- let cube_large: Mesh < ( ) > = Mesh :: cube ( 30.0 , None ) . center ( ) ;
30- let sphere_cavity: Mesh < ( ) > = Mesh :: sphere ( 12.0 , 24 , 12 , None ) . translate ( 5.0 , 5.0 , 0.0 ) ;
29+ let cube_large: Mesh < ( ) > = Mesh :: cube ( 30.0 , ( ) ) . center ( ) ;
30+ let sphere_cavity: Mesh < ( ) > = Mesh :: sphere ( 12.0 , 24 , 12 , ( ) ) . translate ( 5.0 , 5.0 , 0.0 ) ;
3131 let cube_with_cavity = cube_large. difference ( & sphere_cavity) ;
3232 export_to_obj (
3333 & cube_with_cavity,
@@ -36,8 +36,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
3636 ) ?;
3737
3838 // 5. Union operation: cube + sphere
39- let cube_small: Mesh < ( ) > = Mesh :: cube ( 16.0 , None ) . center ( ) ;
40- let sphere_union: Mesh < ( ) > = Mesh :: sphere ( 10.0 , 20 , 10 , None ) . translate ( 8.0 , 8.0 , 8.0 ) ;
39+ let cube_small: Mesh < ( ) > = Mesh :: cube ( 16.0 , ( ) ) . center ( ) ;
40+ let sphere_union: Mesh < ( ) > = Mesh :: sphere ( 10.0 , 20 , 10 , ( ) ) . translate ( 8.0 , 8.0 , 8.0 ) ;
4141 let union_object = cube_small. union ( & sphere_union) ;
4242 export_to_obj (
4343 & union_object,
@@ -46,8 +46,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
4646 ) ?;
4747
4848 // 6. Intersection operation
49- let cube_intersect: Mesh < ( ) > = Mesh :: cube ( 25.0 , None ) . center ( ) ;
50- let sphere_intersect: Mesh < ( ) > = Mesh :: sphere ( 15.0 , 24 , 12 , None ) . translate ( 5.0 , 5.0 , 0.0 ) ;
49+ let cube_intersect: Mesh < ( ) > = Mesh :: cube ( 25.0 , ( ) ) . center ( ) ;
50+ let sphere_intersect: Mesh < ( ) > = Mesh :: sphere ( 15.0 , 24 , 12 , ( ) ) . translate ( 5.0 , 5.0 , 0.0 ) ;
5151 let intersection_object = cube_intersect. intersection ( & sphere_intersect) ;
5252 export_to_obj (
5353 & intersection_object,
@@ -56,8 +56,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5656 ) ?;
5757
5858 // 7. More complex shape: cube with cylindrical hole
59- let cube_base: Mesh < ( ) > = Mesh :: cube ( 40.0 , None ) . center ( ) ;
60- let hole_cylinder: Mesh < ( ) > = Mesh :: cylinder ( 6.0 , 50.0 , 16 , None )
59+ let cube_base: Mesh < ( ) > = Mesh :: cube ( 40.0 , ( ) ) . center ( ) ;
60+ let hole_cylinder: Mesh < ( ) > = Mesh :: cylinder ( 6.0 , 50.0 , 16 , ( ) )
6161 . rotate ( 90.0 , 0.0 , 0.0 ) // Rotate to align with X-axis
6262 . translate ( 0.0 , 0.0 , 0.0 ) ;
6363 let cube_with_hole = cube_base. difference ( & hole_cylinder) ;
@@ -238,7 +238,7 @@ mod tests {
238238 #[ test]
239239 fn test_obj_export ( ) {
240240 // Test basic OBJ export functionality
241- let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , None ) ;
241+ let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , ( ) ) ;
242242
243243 #[ cfg( feature = "obj-io" ) ]
244244 {
@@ -258,7 +258,7 @@ mod tests {
258258
259259 #[ test]
260260 fn test_obj_content_format ( ) {
261- let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , None ) ; // Low res for testing
261+ let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , ( ) ) ; // Low res for testing
262262
263263 #[ cfg( feature = "obj-io" ) ]
264264 {
@@ -314,8 +314,8 @@ mod tests {
314314 #[ test]
315315 fn test_boolean_operations_obj_export ( ) {
316316 // Test that boolean operations export correctly
317- let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , None ) ;
318- let sphere: Mesh < ( ) > = Mesh :: sphere ( 6.0 , 8 , 4 , None ) ;
317+ let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , ( ) ) ;
318+ let sphere: Mesh < ( ) > = Mesh :: sphere ( 6.0 , 8 , 4 , ( ) ) ;
319319
320320 #[ cfg( feature = "obj-io" ) ]
321321 {
@@ -345,7 +345,7 @@ mod tests {
345345 #[ test]
346346 fn test_ply_export ( ) {
347347 // Test basic PLY export functionality
348- let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , None ) ;
348+ let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , ( ) ) ;
349349
350350 #[ cfg( feature = "ply-io" ) ]
351351 {
@@ -388,7 +388,7 @@ mod tests {
388388
389389 #[ test]
390390 fn test_ply_format_structure ( ) {
391- let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , None ) ; // Low res for testing
391+ let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , ( ) ) ; // Low res for testing
392392
393393 #[ cfg( feature = "ply-io" ) ]
394394 {
@@ -452,7 +452,7 @@ mod tests {
452452 #[ test]
453453 fn test_amf_export ( ) {
454454 // Test basic AMF export functionality
455- let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , None ) ;
455+ let cube: Mesh < ( ) > = Mesh :: cube ( 10.0 , ( ) ) ;
456456
457457 #[ cfg( feature = "amf-io" ) ]
458458 {
@@ -488,7 +488,7 @@ mod tests {
488488
489489 #[ test]
490490 fn test_amf_with_color ( ) {
491- let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , None ) ; // Low res for testing
491+ let sphere: Mesh < ( ) > = Mesh :: sphere ( 5.0 , 8 , 4 , ( ) ) ; // Low res for testing
492492
493493 #[ cfg( feature = "amf-io" ) ]
494494 {
@@ -516,7 +516,7 @@ mod tests {
516516
517517 #[ test]
518518 fn test_amf_xml_structure ( ) {
519- let cube: Mesh < ( ) > = Mesh :: cube ( 8.0 , None ) ;
519+ let cube: Mesh < ( ) > = Mesh :: cube ( 8.0 , ( ) ) ;
520520
521521 #[ cfg( feature = "amf-io" ) ]
522522 {
0 commit comments