Skip to content

Commit

Permalink
Improved rendering of part and assembly aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
openvmp committed Oct 11, 2024
1 parent a713d1f commit 72aa163
Show file tree
Hide file tree
Showing 20 changed files with 204 additions and 72 deletions.
54 changes: 43 additions & 11 deletions examples/feature_interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,59 @@ pc inspect -a -p placement=inner connect-mates

## Assemblies

### connect-ports
<table><tr>
<td valign=top><img src="./connect-ports.svg" width="200" height="200"></td>
<td valign=top>Demonstrates how to connect parts by specifying ports.</td>
<td valign=top>Parameters:<br/><ul><li>placement: <ul><li>inner</li><li><b>outer</b></li></ul></li><li>motor_tr_connect_to: <ul><li><b>TR</b></li><li>TL</li><li>BR</li><li>BL</li></ul></li></ul></td>
</tr></table>

### connect-interfaces
<table><tr>
<td valign=top><img src="./connect-interfaces.svg" width="200" height="200"></td>
<td valign=top><a href="connect-interfaces.assy"><img src="././connect-interfaces.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Demonstrates how to connect parts by specifying interfaces.</td>
<td valign=top>Parameters:<br/><ul><li>placement: <ul><li>inner</li><li><b>outer</b></li></ul></li><li>motor_tr_connect_to: <ul><li><b>TR</b></li><li>TL</li><li>BR</li><li>BL</li></ul></li></ul></td>
<td valign=top>Parameters:<br/><ul>
<li>placement: <ul>
<li>inner</li><li><b>outer</b></li>
</ul>
</li>
<li>motor_tr_connect_to: <ul>
<li><b>TR</b></li>
<li>TL</li><li>BR</li><li>BL</li></ul>
</li>
</ul>
</td>
</tr></table>

### connect-mates
<table><tr>
<td valign=top><img src="./connect-mates.svg" width="200" height="200"></td>
<td valign=top><a href="connect-mates.assy"><img src="././connect-mates.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Demonstrates how to provide the minimum information while letting PartCAD
determine the rest using the interfaces' mating metadata.
</td>
<td valign=top>Parameters:<br/><ul><li>placement: <ul><li>inner</li><li><b>outer</b></li></ul></li><li>motor_tr_connect_to: <ul><li><b>TR</b></li><li>TL</li><li>BR</li><li>BL</li></ul></li></ul></td>
<td valign=top>Parameters:<br/><ul>
<li>placement: <ul>
<li>inner</li><li><b>outer</b></li>
</ul>
</li>
<li>motor_tr_connect_to: <ul>
<li><b>TR</b></li>
<li>TL</li><li>BR</li><li>BL</li></ul>
</li>
</ul>
</td>
</tr></table>

### connect-ports
<table><tr>
<td valign=top><a href="connect-ports.assy"><img src="././connect-ports.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Demonstrates how to connect parts by specifying ports.</td>
<td valign=top>Parameters:<br/><ul>
<li>placement: <ul>
<li>inner</li><li><b>outer</b></li>
</ul>
</li>
<li>motor_tr_connect_to: <ul>
<li><b>TR</b></li>
<li>TL</li><li>BR</li><li>BL</li></ul>
</li>
</ul>
</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
24 changes: 19 additions & 5 deletions examples/produce_assembly_assy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,33 @@ pc inspect logo_embedded

## Assemblies

### primitive
<img src="./primitive.svg" width="200" height="200">

### logo
<table><tr>
<td valign=top><img src="./logo.svg" width="200" height="200"></td>
<td valign=top><a href="logo.assy"><img src="././logo.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>PartCAD logo</td>
</tr></table>

### logo_embedded
<table><tr>
<td valign=top><img src="./logo_embedded.svg" width="200" height="200"></td>
<td valign=top><a href="logo_embedded.assy"><img src="././logo_embedded.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>PartCAD logo using embedded assemblies</td>
</tr></table>

### partcad_logo (alias to logo)
<table><tr>
<td valign=top><a href="partcad_logo.assy"><img src="././logo.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>PartCAD logo</td>
</tr></table>

### partcad_logo_short (alias to logo)
<table><tr>
<td valign=top><a href="partcad_logo_short.assy"><img src="././logo.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>PartCAD logo</td>
</tr></table>

### primitive
<a href="primitive.assy"><img src="././primitive.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
4 changes: 3 additions & 1 deletion examples/produce_part_3mf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ pc inspect cube

### cube
<table><tr>
<td valign=top><img src="./cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.3mf"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube defined in 3MF</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
6 changes: 3 additions & 3 deletions examples/produce_part_ai_build123d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ pc inspect tetrahedron

### cube
<table><tr>
<td valign=top><img src="././cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.py"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube</td>
</tr></table>

### prism
<table><tr>
<td valign=top><img src="././prism.svg" width="200" height="200"></td>
<td valign=top><a href="prism.py"><img src="././prism.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A hexagonal prism</td>
</tr></table>

### tetrahedron
<table><tr>
<td valign=top><img src="././tetrahedron.svg" width="200" height="200"></td>
<td valign=top><a href="tetrahedron.py"><img src="././tetrahedron.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A tetrahedron</td>
</tr></table>

Expand Down
6 changes: 3 additions & 3 deletions examples/produce_part_ai_cadquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ pc inspect tetrahedron

### cube
<table><tr>
<td valign=top><img src="././cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.py"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube</td>
</tr></table>

### prism
<table><tr>
<td valign=top><img src="././prism.svg" width="200" height="200"></td>
<td valign=top><a href="prism.py"><img src="././prism.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A hexagonal prism</td>
</tr></table>

### tetrahedron
<table><tr>
<td valign=top><img src="././tetrahedron.svg" width="200" height="200"></td>
<td valign=top><a href="tetrahedron.py"><img src="././tetrahedron.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A tetrahedron</td>
</tr></table>

Expand Down
6 changes: 3 additions & 3 deletions examples/produce_part_ai_openscad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ pc inspect tetrahedron

### cube
<table><tr>
<td valign=top><img src="././cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.scad"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube</td>
</tr></table>

### prism
<table><tr>
<td valign=top><img src="././prism.svg" width="200" height="200"></td>
<td valign=top><a href="prism.scad"><img src="././prism.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A hexagonal prism</td>
</tr></table>

### tetrahedron
<table><tr>
<td valign=top><img src="././tetrahedron.svg" width="200" height="200"></td>
<td valign=top><a href="tetrahedron.scad"><img src="././tetrahedron.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A tetrahedron</td>
</tr></table>

Expand Down
4 changes: 3 additions & 1 deletion examples/produce_part_build123d_primitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ pc inspect cube

### cube
<table><tr>
<td valign=top><img src="./cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.py"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Sample part defined using build123d</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
14 changes: 8 additions & 6 deletions examples/produce_part_cadquery_logo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ pc inspect bone

## Parts

### head_half
### bone
<table><tr>
<td valign=top><img src="./head_half.svg" width="200" height="200"></td>
<td valign=top>Bracket used as one side of the head on PartCAD logo</td>
<td valign=top><a href="bone.py"><img src="././bone.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Plate used as one of the bones on PartCAD logo</td>
</tr></table>

### bone
### head_half
<table><tr>
<td valign=top><img src="./bone.svg" width="200" height="200"></td>
<td valign=top>Plate used as one of the bones on PartCAD logo</td>
<td valign=top><a href="head_half.py"><img src="././head_half.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Bracket used as one side of the head on PartCAD logo</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
37 changes: 31 additions & 6 deletions examples/produce_part_cadquery_primitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,50 @@ pc inspect cylinder

## Parts

### cube
### box (alias to cube)
<table><tr>
<td valign=top><img src="./cube.svg" width="200" height="200"></td>
<td valign=top><a href="box.py"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>This is a cube from examples</td>
<td valign=top>Parameters:<br/><ul><li>width: 10.0</li><li>length: 10.0</li><li>height: 10.0</li></ul></td>
<td valign=top>Parameters:<br/><ul>
<li>width: 10.0</li>
<li>length: 10.0</li>
<li>height: 10.0</li>
</ul>
</td>
<td valign=top>Aliases:<br/><ul><li>box</li></ul></td>
</tr></table>

### brick
<table><tr>
<td valign=top><img src="./brick.svg" width="200" height="200"></td>
<td valign=top><a href="brick.py"><img src="././brick.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>This is a cube from examples</td>
<td valign=top>Parameters:<br/><ul>
<li>width: 20.0</li>
<li>length: 10.0</li>
<li>height: 7.5</li>
</ul>
</td>
</tr></table>

### cube
<table><tr>
<td valign=top><a href="cube.py"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>This is a cube from examples</td>
<td valign=top>Parameters:<br/><ul><li>width: 20.0</li><li>length: 10.0</li><li>height: 7.5</li></ul></td>
<td valign=top>Parameters:<br/><ul>
<li>width: 10.0</li>
<li>length: 10.0</li>
<li>height: 10.0</li>
</ul>
</td>
<td valign=top>Aliases:<br/><ul><li>box</li></ul></td>
</tr></table>

### cylinder
<table><tr>
<td valign=top><img src="./cylinder.svg" width="200" height="200"></td>
<td valign=top><a href="cylinder.py"><img src="././cylinder.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>This is a cylinder from examples</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
16 changes: 9 additions & 7 deletions examples/produce_part_extrude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ pc inspect clock

## Parts

### clock
<table><tr>
<td valign=top><a href="clock.extrude"><img src="././clock.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Extrude a clock sketch to create a 3D clock.</td>
</tr></table>

### cylinder
<table><tr>
<td valign=top><img src="./cylinder.svg" width="200" height="200"></td>
<td valign=top><a href="cylinder.extrude"><img src="././cylinder.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Extrude a circle sketch to create a cylinder.</td>
</tr></table>

### dxf
<table><tr>
<td valign=top><img src="./dxf.svg" width="200" height="200"></td>
<td valign=top><a href="dxf.extrude"><img src="././dxf.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Extrude a DXF sketch to create a 3D part.</td>
</tr></table>

### clock
<table><tr>
<td valign=top><img src="./clock.svg" width="200" height="200"></td>
<td valign=top>Extrude a clock sketch to create a 3D clock.</td>
</tr></table>
<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
4 changes: 3 additions & 1 deletion examples/produce_part_openscad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ pc inspect cube

### cube
<table><tr>
<td valign=top><img src="./cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.scad"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube defined in SCAD</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
25 changes: 24 additions & 1 deletion examples/produce_part_step/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,32 @@ pc inspect bolt

### bolt
<table><tr>
<td valign=top><img src="./bolt.svg" width="200" height="200"></td>
<td valign=top><a href="bolt.step"><img src="././bolt.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>M8x30-screw</td>
<td valign=top>Aliases:<br/><ul><li>hexhead</li></ul></td>
</tr></table>

### fastener (alias to bolt)
<table><tr>
<td valign=top><a href="fastener.step"><img src="././bolt.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>M8x30-screw</td>
<td valign=top>Aliases:<br/><ul><li>hexhead</li></ul></td>
</tr></table>

### hexhead (alias to bolt)
<table><tr>
<td valign=top><a href="hexhead.step"><img src="././bolt.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>M8x30-screw</td>
<td valign=top>Aliases:<br/><ul><li>hexhead</li></ul></td>
</tr></table>

### screw (alias to bolt)
<table><tr>
<td valign=top><a href="screw.step"><img src="././bolt.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>M8x30-screw</td>
<td valign=top>Aliases:<br/><ul><li>hexhead</li></ul></td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
4 changes: 3 additions & 1 deletion examples/produce_part_stl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ pc inspect cube

### cube
<table><tr>
<td valign=top><img src="./cube.svg" width="200" height="200"></td>
<td valign=top><a href="cube.stl"><img src="././cube.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>A cube defined in STL</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
Loading

0 comments on commit 72aa163

Please sign in to comment.