Ifc object with multiple colors - colors

Is it possible, within IFC 4.0, to define an Ifc object (IFC Wall for example) with multiple colors (which are IfcStyledItem)? How can we activate each color inside a BIM Viewer program (like layer in AutoCAD)?
Thanks,

Formally, you can have only one IfcStyledItem per IfcRepresentationItem, but the styled item can refer to multiple presentation styles (IfcPresentationStyle). Similarly, you could have one IfcPresentationLayerWitStyle per IfcPresentationItem referring to multiple presentation styles. A viewer application could then provide user interactions to switch styles on or off per representation item or layer. However I believe that is not the right interpretation of those presentation style sets. The standard is not clear about it, but I would rather assume these styles are supposed to aggregate, that is you have both curve and fill style for example, which complement each other rather than being alternatives.
A more high-level solution and idiomatic with CAD applications is assignment on the level of the whole IfcPresentation (as opposed to the items of a presentation). If you are concerned about styles on the level of product geometry like a whole wall, that would be sufficient detail. You would do this through layer assignment. Layers then have styles and can be switched on and off. Since one presentation can be assigned to multiple layers this would likely resemble the functionality you have in mind.

Related

Visual Paradigm: Underline togetherness in class diagram

I have to create a class diagram with different design patterns inside. I would like to underline the togetherness of the classes belonging to the same design pattern.
What is the "official" or best way in UML to achieve this? I have to use Visual Paradigm and found a solution using packages.
But these packages seems to be very unhandy. I need something more freeform like. I think about just using different background colors for the different patterns.
The coloring of element is not the concern in UML as it won't affect the model structure and their relationships. Specifying different color is a good way for visualize categorize your elements in diagram level (same element on different diagram can have different presentation setting). If you want to categorize the elements in model level then you may consider to use stereotypes plus stereotype based presentations so that elements applying the stereotype can automatically inherit the presentation settings (see https://www.visual-paradigm.com/tutorials/stereotypeappearance.jsp)

UML: additional properties of model attributes

I'm using Enterprise Architect 10.
I need to define additional properties of model attributes, example: show condition (text), edit condition (text), location in data tree from remote source (text) and others. Those properties are for documentation purposes at the moment. But it may occur that some of those properties will be used during generating source code by custom generator.
Use tagged values for this purpose. Creating Advanced/Properties is not really possible. Tagged values can be shown in compartments if you switch that on in the Feature and Compartment Visibility. Shape scripts can use them to render individual shapes and the code generator can also evaluate them.
As Geert points out, start looking into MDG creation. Though it's quite some start-up you have to do, it will pay off in rather short terms.

Display next features in UML use case Diagram

Is there any standard to display features(use cases) that I want to add to system in next version in use case diagram?Or I have to display them for example with specific color,shape or ... ?
There is no standard here.
What I do in such cases is to create a profile that contains stereotyped elements like <<enhancement>> <<feature request>> etc. which simply extend the class meta class. I link them via a (<<trace>> stereotyped) dependency to the relevant element (like e.g. use cases).
The advantage is that I can add tagged values where I can set additional information like target build, responsible, etc.
It's true, there is no standard.
Using colors is a handy approach because changes are visible at a glance e. g. when shown in presentations. Assuming of course that you are not yet using colors for other semantic purposes.
You can also use UML notes.
Generally it makes sense to have diagrams versioned, so you can trace back diagram and model changes.
Some tools allow to store a version in the elements' metadata but you need to check where these can be used, because they are not necessarily visible in your diagrams as well.

Mass-Replacing Objects using Unity's label tags?

Im currently working on an exercise, for which I want to create a technical design documentation.
Therefore, I need to evaluate possible solutions to a bunch of problems coming with my fictional project.
Here's a quick glance at the exercise:
The game's art & core game design are split up very harshly - basically, the core system, game mechanics and design are created to be very abstract, in order to allow them to work with a very wide variety of art settings. Also, one of the restrictions is to re-use as many assets, levels & designs as possible.
Now to my question:
I want the level designers to create levels using "template" objects (object which have all the technical features that are required, ie slots for attachments, correct scale, textures etc) and later replace these objects with set of assets I receive from my outsourcer.
Since I dont want to manually replace all objects whenever I get a new set of assets, this is what I wanted to do:
Each template object gets a descriptive label, and each asset delivered by the outsourcer needs to have the exact same label name as its corresponding template-counterpart stored in it as well (for example as a custom attribute, a channel, or simply in its name).
I now want to replace all templates with the related asset using a script.
This would be done for each set of assets. I would also keep several deployments of my engine, one per set, but initially, they'd all start out with the templates that need to be replaced (since there will need to be some modifications for each setting, both visually and from a game design perspective, keeping all assets in one trunk/project didn't make any sense to me).
To make this easier i'd use a "database" of some sorts (probably a simple dictionary which the engine script could query and which would be filled out beforehand by another script upon delivery of new assets?).
My question is: is this possible? If yes, how difficult would this be from a programmers perspective? I have only limited knowledge in this field, so I'd love to hear what you lads & ladies think about this.
Also (very important) - do you know of a better way to achieve this "replacability" of assets? Or simply have an easier way to achieve what I want to do? I appreciate any feedback! Thank you!
quick edit: This would not only be applied to 3d Objects; textures would also need to be replaced, obviously
I think you are looking for Prefabs.
Basically prefabs implements a sort of prototype pattern.
Instead of putting into scene's hierarchy directly a GameObject you can make it a prefab and put into the scene a GameObject that is an instance of that prefab.
When a GameObject into the scene is linked to a prefab, and the prefab will be modified, the linked object will be modified too.
If you have several instances of the same prefab, all istances will be updated as well.
The only strong limitation to this feature is that, since now, nested prefabs aren't supported.
I want the level designers to create levels using "template" objects
(object which have all the technical features that are required, ie
slots for attachments, correct scale, textures etc) and later replace
these objects with set of assets I receive from my outsourcer.
This is the tipical use case. You have a placeholder into the scene (es. a Cube) that will be subistitued by a model when the artists will provide it.
If you instantiate 100 cubes into the scene, when you need to substitute them, you would do it manually for all objects.
If instead you have created a prefab (lets call it ModelPrefab) and the cubes into the scene are instances of that prefab, when you'll have the new 3d model you can simply update the prefab and all linked instances will be updated too.
My question is: is this possible? If yes, how difficult would this be
from a programmers perspective?
If you can work without nested prefabs you have to do nothing, it's already implemented. If you need to implement nested prefabs, it might not be so straightforward.
quick edit: This would not only be applied to 3d Objects; textures
would also need to be replaced, obviously
I made the example above using the models, but you can make a prefab from each GameObject that is actually a collection of Components (have a look at Component Based Object Management if you are interested).
EDIT
Yes, it is possible to update prefabs throught script the required functions are in the UnityEditor namespace, so they mast be used through an editor extension.
You can found all you need in PrefabUtility class.

Value object or not for 3d points?

I need to develop a geometry library in python, describing points, lines and planes in 3d space, and various geometry operations. Related to my previous question.
The main issue in the design is if these entities should have identity or not. I was wondering if there's a similar library out there (developed in another language) to take inspiration from, what is the chosen design, and in particular the reason for one choice vs. the other.
I am not familiar with other libraries, but it seems that there 3d points should be (immutable) value objects.
- allows sharing of a point between several containers (lines, planes, etc.)
- Avoids defensive getters and setters
- In real-life a 3d point has no identity.
Also, Josh Bloch is saying (see http://www.infoq.com/presentations/effective-api-design
) that one of the mistakes they did in the design of Java's standard library was that they did not define the Size class as immutable.

Resources