Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dodecahedron.kcl #108

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/output-from-kcl-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
python output_from_kcl.py

- name: check for changes
- name: Check for changes
id: git-check
run: |
git add .
Expand Down
50 changes: 15 additions & 35 deletions dodecahedron/dodecahedron.kcl
Original file line number Diff line number Diff line change
Expand Up @@ -48,53 +48,33 @@ planeBottomSide = {
}
}

// Define a plane for the top angled face
planeTopSide = {
plane: {
origin: [
inscR * cos(toRadians(toDegrees(dihedral) - 90)),
0,
inscR + inscR * sin(toRadians(toDegrees(dihedral) - 90))
],
xAxis: [
-cos(dihedral),
0.000000,
-sin(dihedral)
],
yAxis: [0, 1, 0],
zAxis: [sin(dihedral), 0, -cos(dihedral)]
}
}

// Define a plane for the top of the dodecahedron
planeTop = {
plane: {
origin: [0, 0, 2 * inscR],
xAxis: [-1, 0, 0],
yAxis: [0, -1, 0],
zAxis: [0, 0, 1]
}
}

// Extrude the faces in each plane
bottom = extrude(wallThickness, ngon("XY", 5, pentR))
top = extrude(-wallThickness, ngon(planeTop, 5, pentR))
bottomSide = extrude(wallThickness, ngon(planeBottomSide, 5, pentR))
topSide = extrude(-wallThickness, ngon(planeTopSide, 5, pentR))

// Pattern the sides so we have a full dodecahedron
patternCircular3d({
bottomBowl = patternCircular3d({
instances: 5,
axis: [0, 0, 1],
center: [0, 0, 0],
arcDegrees: 360,
rotateDuplicates: true
}, bottomSide)

// pattern the bottom to create the top face
patternCircular3d({
instances: 5,
axis: [0, 0, 1],
center: [0, 0, 0],
instances: 2,
axis: [0, 1, 0],
center: [0, 0, inscR],
arcDegrees: 360,
rotateDuplicates: true
}, bottom)

// pattern the bottom angled faces to create the top
patternCircular3d({
instances: 2,
axis: [0, 1, 0],
center: [0, 0, inscR],
arcDegrees: 360,
rotateDuplicates: true
}, topSide)
}, bottomBowl)
Binary file modified screenshots/dodecahedron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion step/80-20-rail.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:16.932901720+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:39.923586913+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/a-parametric-bearing-pillow-block.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:00.984038317+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:28.553745795+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/ball-bearing.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:01.615335683+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:29.060389538+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/bracket.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:01.424914043+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:28.689144775+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/brake-caliper.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:00.705821618+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:28.215472026+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/car-wheel-assembly.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:07.790737459+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:36.260160092+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
2 changes: 1 addition & 1 deletion step/car-wheel.step
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
FILE_NAME('dump.step', '2024-10-25T17:14:06.396292047+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_NAME('dump.step', '2024-10-25T17:20:33.446751778+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
ENDSEC;
DATA;
Expand Down
Loading