Wstęga Möbiusa
Mobius Strip

Działanie skryptu:
-
Umożliwia określenie podstawowych ustawień geometrii:
-
wymiary wstęgi Möbiusa
Dział zatytułowany „wymiary wstęgi Möbiusa”
Diameter = 100.0 Width = 20.0 Height = 5.0
liczba obrotów o 360 stopni we wstędze Möbiusa
Dział zatytułowany „liczba obrotów o 360 stopni we wstędze Möbiusa”Rotations = 2
większa liczba kroków = większa dokładność
Dział zatytułowany „większa liczba kroków = większa dokładność”Steps = 30
-
Tworzy nową część
-
Tworzy serię płaszczyzn odniesienia, każdą ze szkicem
-
Łączy szkice wyciągnięciem po profilach, aby utworzyć geometrię końcową
# creates a mobius strip with a configurable number of rotations
Mobius = Part('Mobius')
# dimensions of mobius stripDiameter = 100.0Width = 20.0Height = 5.0# number of 360 degree twists in mobius stripRotations = 2# more steps = better accuracySteps = 30
# calculate how far we rotate through 360 degrees for each stepRotationPerStep = Rotations / float(Steps) * 360.0DegreesPerStep = 360.0 / Steps
# create the base sketch we will use as a template for all other sketchesS0Plane = Mobius.GetPlane('XY-Plane')S0 = Mobius.AddSketch('S0', S0Plane)S0.AddRectangle(Diameter, -Height / 2, Diameter + Width, Height / 2, False)Sketches = [S0]
# generate sketchesfor Step in range (1, Steps): Plane = Mobius.AddPlane('S' + str(Step), S0Plane, Mobius.GetAxis('Y-Axis'), DegreesPerStep * Step) Sketch = Mobius.AddSketch('S' + str(Step), Plane) Sketch.CopyFrom(S0, RotationPerStep * Step, Diameter + (Width / 2), 0, 0, 0, 0, 0, 100.0) Sketches.append(Sketch)
# create loft, connecting endsMobius.AddLoftBoss('Strip', Sketches, True, True, False, True)Oryginał: Mobius Strip