Skip to content
August 5, 2012 / jeroencoenders

Methods in NetworkedDesign (Part 1)

Image 1: Methods

Today we will take a look at the concept of Methods in NetworkedDesign. In Part 1 of this post I will introduce methods in general and will zoom in on the definition method.


Methods add definition and actions to Objects. Objects without Methods are empty containers. Methods can be used to add Properties to the container as well as behavior (or actions) that modify Properties.

In this post (and the next few) I will only focus on the currently implemented method types as these are the most well-defined. Please note that NetworkedDesign actually support multiple methods on a single object as long as they are non-conflicting. This means that you can add as many methods as you like and need, but the names of the properties the method is adding to the object cannot be the same, because otherwise the system would not be able to figure out anymore what property you are referring to when you for example are pointing to property “point_1.X”.

In the image (Image 1) you can see a number of methods, these can be recognized by the boxes with rounded corners. Note that this might not be the same for all implementations of NetworkedDesign.

Definition Methods

Well, probably you already guessed it: Definition methods are methods that add definition to the object by adding a number of properties that the user can fill out (or choose to reference to a property on another object so that the system figures out the value). For example, in the example figure, we can see a “point_1” object which started out as an empty container object of the type “Point”. By adding a “definition_by_cartesian_coordinates” definition method, the point gets cartesian definition. In the property window figure (Image 2) we can see that this means that the user has to define a number of properties. First, the “definition” property which specifies to which object this method applies. In this case, we define “point_1”. (Note that the current implementation is a bit limited and not always optimized for usability. We could have actually automatically derived this property for example from the object we had selected on the graphical interface). Next we need to define a number of properties that come along with the cartesian definition: we need to supply a coordinate system to calculate the position against as well as the X, Y and Z components for the three directions which are double precision values. I will leave the other options on the property window interface for now. If we simply press the “Create” button, the method will be added to the model and the properties will be added to the object. Note that NetworkedDesign “detects” the relationship between the object and method in bright red (for specified relationships) and the relationship between the coordinate system object (“coordinate system_1”) and the point object (“point_1”) in dark red (for derived relationships).

Image 2: Property window

You might have noticed the type on the definition property in the figure: it says “Point or CoordinateSystem or Direction”. There is some trickery going on here. Methods “know” to which objects they can be applied and actually it can be multiple types. So, the method type “DefinitionByCartesianCoordinates” knows it can be applied to objects of the type “Point”, the type “CoordinateSystem” or the type “Direction”. If you specify another type, the system will complain and require you to modify it. As you will notice if you would develop for NetworkedDesign, this is a dynamic relationship that can be further expanded. So, for instance, if you create another object type that can also be defined by Cartesian coordinates, say a “Node”, it is possible in the API to specify this extension so that the method knows that it can also be applied to the object type “Node”.

Also note that you can specify primitive values (e.g. Doubles for the X, Y and Z coordinates) and object names as a property value. Object names create relationships to that object.

 In Image 1 another definition method is present: “definition_by_two_points_1”. This method works on the line “line_1” and you already guessed it, it defines the line by specifying two points: the begin and end point of the line. You might wonder why both these properties are referring to the same point (“point_1”). This is another piece of trickery called Replication which will be explained further in one of the next articles.

Other methods you see are of the Transformation Method type and Calculation Method type. These two method types will be covered in the coming articles.

Well, I hope that makes NetworkedDesign another step closer to being a bit clearer for everybody. If you have any questions and/or comments, feel free to post any.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: