die Instanzen bearbeiten
If you come from an AutoCAD® design environment, you may be familiar with Dynamic Blocks. You may also be familiar with 2D parametric constraints. They are two different functionalities that somewhat overlap.
If you insert AutoCAD dynamic blocks into your BricsCAD drawing, you can, in most cases, edit those block instances. You cannot, however, create or edit dynamic block definitions in BricsCAD. Instead of offering dynamic block functionality, BricsCAD focuses entirely on parametrics. It allows you to create both 2D and 3D block definitions using the same set of tools and workflow. If you’ve never worked with parametric constraints, they may sound scary. But, they’re quite intuitive and logical. And, incredibly powerful!
To define a parametric 2D light fixture block
If you create architectural lighting plans, you probably have a library of blocks like these:
2’ x 2’, 1’ x 1’, 2’ x 4’, 1’ x 4’
Using traditional blocks, each symbol requires a separate block definition. And, if you want to change your design to use a different size, you must delete the existing block instances and insert new ones.
Defining a single parametric block to accommodate all the potential sizes, is a great solution!
Set the workspace
To ensure all the necessary tools are easily accessible, it’s helpful to set the 2D drafting workspace. For this exercise, I’ll use the Quad and other default UI elements. You can, of course, use the Command line as well.
- Right-click on the current workspace in the status bar.
- Select 2D Drafting.
- Start a new drawing.
Draw geometry
Draw the basic geometry for the block you want to define. The exact size doesn’t matter but it’s helpful to draw it close to the scale you want. If you already have the geometry as a block, open the block as its own drawing (DWG).
- Right-click in the drawing area to display the Quad.
- From the Draw tab, choose Rectangle.
- Enter 0,0 for the first corner of the rectangle. This will be the insertion point of the block.
- Enter 48
- Press the Tab key
- Enter 24
- From the Draw tab, choose Rectangle.
- Right-click in the drawing area to display the Quad.
- From the Draw tab, choose Circle.
- Pick a point inside the rectangle to place the center of the circle.
- Enter 6 for the radius.
- From the Draw tab, choose Circle.
Add geometric constraints to the rectangle
A rectangle is nothing more than a closed polyline. If you try to edit it, it may lose its rectangular shape. To ensure a rectangle maintains its shape, you must add geometric constraints. They establish non-numerical relationships between the various parts of geometry.
- From the Parametric menu, choose Fix and select the left endpoint of the bottom line of the rectangle.
Applying a Fix constraint at the insertion point of the block ensures that point will remain fixed even though geometry may move and resize around it. - From the Parametric menu, choose Perpendicular and select the two lines at the lower left corner of the rectangle to ensure they always remain perpendicular to each other.
- From the Parametric menu, choose Parallel and select the two horizontal lines to ensure they always remain parallel to each other.
- From the Parametric menu, choose Parallel and select the two vertical lines to ensure they always remain parallel to each other.
Add dimensional constraints to the rectangle and circle
Dimensional constraints drive the size of geometric elements and the distances or angles between them.
- From the Parametric menu, choose Linear and press enter to accept the default <Entity> option.
- Select the left vertical line.
- Place the dimension to the left of the rectangle.
- Press Enter to accept the default value.
- Press Enter twice to repeat the previous command and <Entity> option.
- Select the bottom horizontal line.
- Place the dimension below the rectangle.
- Press Enter to accept the default value.
- Press Enter to repeat the previous command.
- Select the bottom endpoint of the left vertical line and the center of the circle.
- Place the dimension to the left of the rectangle.
- Press Enter to accept the default value.
- Press Enter to repeat the previous command.
- Select the left endpoint of the bottom horizontal line and the center of the circle.
- Place the dimension below the rectangle.
- Press Enter to accept the default value.
After adding the dimensional constraints, your drawing should look like the following image. The dimension values between the circle and rectangle will vary but you’ll fix that next. You’ll also change the default names (d1, d2, d3, etc) to something more meaningful.
Edit dimensional constraint values
You accepted the default value for each dimensional constraint as you created it, but you could have entered different values. Either way, you can change the dimension values later. You can also enter expressions as values to create dependencies on other dimensions. In this example, you always want the circle to remain at the center of rectangle. Therefore, the distance from the lower left corner of the rectangle to the center of the circle should be half the width and length of the rectangle.
- Select the vertical dimension representing the width of the rectangle and, in the Properties panel, change its name to Width.
- Select the horizontal dimension representing the length of the rectangle and, in the Properties panel, change its name to Length.
- Select the vertical dimension representing the distance to the center of the circle. Change its name to CircleW and its expression to Width/2.
- Select the horizonal dimension representing the distance to the center of the circle. Change its name to CircleL and its expression to Length/2.
As you change the expressions for the circle dimensions, you’ll see the circle move to the center of the rectangle.
Save the parametric drawing
To take advantage of parametric blocks, each block must be saved as its own drawing (DWG) file. And if you don’t want the constraints to show on the inserted block, you must hide them when you save the block definition (DWG).
- From the Parametric menu, choose Hide All Geometric Constraints.
- From the Parametric menu, choose Hide All Dimensional Constraints.
- From the File menu, choose SaveAs and enter 2D Recessed Troffer for the file name.
To insert a parametric drawing as a block
All the tools you used to define the 2D parametric drawing are available in every edition of BricsCAD including BricsCAD Classic. However, to insert the drawing as a parametric block, you must have the Platinum edition.
- At the Command line, enter RUNASLEVEL and choose the BricsCAD option to ensure it’s set to Platinum. If it wasn’t, you must close and relaunch BricsCAD after changing RUNASLEVEL to Platinum.
- Open the drawing in which you want to insert the 2D Recessed Troffer.
- At the Command line, enter BMINSERT and select 2D Recessed Troffer.dwg.
- Choose the Multiple option.
- Place several instances of the block in your current drawing.
- Select any of the inserted blocks and open the Properties panel.
- Modify the Width or Length parameters.
Kommentare
0 Kommentare
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.