The various types of graphics and the capabilities they support are described in more detail below. In fact, a CustomGraphicsGroup is also derived from the CustomGraphicsEntity object and supports the same capabilities. A CustomGraphicsGroup object can also contain other CustomGroupsGroup objects so it’s possible to build up a hierarchical structure of graphics.Īll of the graphics types are derived from CustomGraphicsEntity which supports all of the general capabilities that all custom graphics support like color, visibility, depth priority, selectability, etc. From the CustomGraphicsGroup object, you can now create custom graphics of various types and they will all be contained within this group. You can create a new CustomGraphicsGroup object using the add method of the CustomGraphicsGroups collection object. This collection is initially empty because by default a component doesn’t contain any custom graphics. In most cases, this will be the root component but it can be any component.įrom the Component object, you access the CustomGraphicsGroups object. The first thing to notice is that you access the custom graphics related objects through the Component object. Custom Graphics Object Modelīefore getting into the details of creating and using custom graphics, here’s an overview of the object model that supports them. We’ll begin with a discussion of the primitive types first. Triangles, lines, and points are the low-level graphics and the other types are a higher level, more intelligent graphics that make some workflows much easier. These are points, lines, triangles, B-Rep bodies, and curves. There are several types of custom graphics objects that can be drawn. If you’ve programmed graphics before using something like DirectX, OpenGL, or WebGL many of these concepts will already be familiar. If you’ve not worked with any low-level graphics before there is a somewhat steep learning curve. When using custom graphics, you’ll also be drawing low-level graphics to represent objects in your application that you want the user to see and interact with. Fusion 360 then maps these low-level graphics to the higher-level object that the user understands. Internally, Fusion draws the graphics that represent the box using 12 triangles (2 for each face) and 12 lines (1 for each edge). For example, when you draw a solid box using Fusion you see a solid cube in the graphics window and can interact with the faces and edges. With custom graphics, you’re defining graphics primitives in the same way that the Fusion 360 core does to draw the high-level objects. The custom graphics portion of the Fusion 360 API is a completely new concept that doesn’t have any parallels in the user interface. For example, creating an extrusion has very many similarities between the UI and the API. When working with most of the Fusion 360 API you can draw parallels between using the API and how you would use the user interface to do the same thing interactively. Below is a detailed description of the custom graphics functionality supported by the Fusion 360 API. It’s your add-in that understands what those graphics represent and provides the expected behavior. These custom graphics display along with the other Fusion 360 graphics but to Fusion 360 they’re just “graphics” without any meaning. The Fusion 360 API supports the ability to draw custom graphics in the graphics window. Or maybe you have an interesting manufacturing process that requires that you label each face. This is typically used in more advanced applications but can also be useful in smaller, simple applications too.įor example, if you are integrating an electromagnetic field simulator application into Fusion 360, there are symbols and analysis results you’ll want to display to the user that are different from any of the standard Fusion geometry. However, there are cases when you want to show something in the graphics window that is not a standard Fusion 360 entity. The creation and display of the graphics that represent the geometry are automatically handled by Fusion 360. When using Fusion 360 interactively or through the API, you create things like features and sketch entities and a side effect of their creation is that they’re displayed in the graphics window. Fusion 360 Custom Graphics Using Custom Graphics Custom Graphics Overview Object Model Triangle Meshes Line Graphics Point Graphics Text Graphics B-Rep Body Graphics CurveGraphics Graphics Colors Solid Color Effect Basic Material Color Effect Appearance Color Effect Vertex Color Effect Show Through Color Effect Additional Graphics Behaviors Orientation Size Combining Orientation and Size Position Custom Graphics OverviewĪ key part of the Fusion 360 user interface is the graphics window where you see and interact with the model and other graphical information.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |