Parts and variables
Build a solid part from a sketch and use named dimensions to make changes easier.
A parametric model uses and relationships to define a part. Instead of moving its faces until it looks right, you change the values that control its shape.
Start with the Plate outline from Sketches: a 70 × 40 mm rectangle with two 4.5 mm holes, centered 40 mm apart. The should contain no solid parts yet.
Add thickness
Finish the plate sketch and start . Select Solid → New, then select the plate region, leaving the two hole regions unselected. Use a Blind depth of 3 mm in the positive Z direction. You should get one solid plate with two through holes, extending from Z = 0 to Z = 3 mm.
If Onshape selects the hole regions automatically, remove them from the selection. Check the preview before accepting: two openings should remain, rather than two filled circles. Rename the feature Plate thickness and the part Plate.
The Extrude result options do different jobs:
| Result | Use |
|---|---|
| New | Make a separate part |
| Add | Join material to an existing part |
| Remove | Cut material away |
| Intersect | Keep only the overlapping material |
For a later hole or slot, make a new sketch and use Remove. Select Through all when the cut should pass through the entire part even after its thickness changes.
Rename important features by function, such as Plate outline, Plate thickness, and Cable slot. A teammate should be able to find the mounting pattern without reopening every sketch.
Named dimensions
A gives a value a name. Add these before the sketch so both the sketch and the extrusion can use them:
- Drag the bar in the feature list to just above
Plate outline, below the default reference geometry. The sketch and extrusion become temporarily inactive; they are still in the document. - Choose Variable in the Part Studio toolbar. Create the three Length variables below, accepting each one.
- Right-click the rollback bar and choose Roll to end. The original plate should reappear.
| Variable | Type | Practice value |
|---|---|---|
plateThickness | Length | 3 mm |
mountSpacing | Length | 40 mm |
holeDiameter | Length | 4.5 mm |
Edit Plate outline. Double-click the 4.5 mm diameter dimension and replace its value with #holeDiameter. The Equal constraint controls the second circle's diameter, so do not add another diameter dimension.
Replace each 20 mm horizontal hole-center dimension with #mountSpacing / 2. Keep the centers on opposite sides of the . Accept the sketch, then edit Plate thickness and replace its depth with #plateThickness.
The order should now be:
plateThickness = 3 mm
mountSpacing = 40 mm
holeDiameter = 4.5 mm
Plate outline
Plate thicknessThe Parts list still contains one Plate. The variables and sketch are features that define it, not extra parts.
Choose variables for dimensions you actually need to change together. Hole spacing may come from the device you are mounting, while plate width depends on the room available. If you make the hole spacing a fraction of the width, widening the plate will move the holes away from the places they need to be.
Feature order
Later features depend on earlier geometry. A that rounds an edge may remove the sharp edge another sketch was attached to. A deleted face can break a later feature.
Where possible, attach sketches to , the origin, or reference geometry you have created for that purpose. Put cosmetic edge rounding late in the feature list. Keep functional features, such as a guide surface or a required internal radius, in the order that makes their dependencies clear.
When something fails after an edit, start with the first failed feature. Later red features may be consequences of that one failure.
Patterns and symmetry
A repeats a feature or part. A reflects geometry across a plane or line. Use them for features that should change together.
Use a pattern for evenly spaced ventilation holes. Use a mirror for identical left and right mounting holes. Before mirroring a complete plate, check whether both sides really use the same orientation, cable opening, and direction.
Check the part
Edit plateThickness to 4 mm. Measure the solid: its thickness should change while the holes stay open. Change mountSpacing to 44 mm; each hole center should move 2 mm farther from the origin. Change holeDiameter to 5 mm; the centers should stay in place.
Restore 3 mm thickness, 40 mm spacing, and 4.5 mm diameter before continuing. Confirm one part measuring 70 × 40 × 3 mm, with hole centers 15 mm from the short ends and 20 mm from the long edges.
After these checks, you should be able to change the plate’s thickness, hole spacing, and hole size without breaking the other dimensions. To make a physical part, select material and manufacturing allowances using Design for manufacturing. The 3 mm practice thickness is not a recommendation for a loaded robot bracket.
Continue with Assemblies.