hybridshapefill function of CATIA - vba

I am currently working on an CATIA V5 macro, that uses the generative shape design function named "hybridshapefill". Sometimes it says the set of normals is too scattered to construct the hybridshapefill.
Does someone know how the hybridshapefill can be constructed anyways, or why this error occurs?
What does the hybrid shape fill exactly construct? Is it something like a minimal surface? Does CATIA provide any insight in its functions?

Related

What exactly are the limits of Open Shading Language (OSL) in terms of new materials/BSDFs?

I'm doing research on BRDF description and implementation techniques, and OSL is one of the main languages to do so. I'm curious about the way one could implement a new BRDF using OSL, or if it's even possible to do so without messing around with its source code.
The OSL documentation gives a set of materials that are to be expected of any renderer. Blender, for examples, provides an an extended set of implemented materials ready to be used in OSL (these materials are actually already available as nodes in Cycles). I'm interested in creating new materials (BRDFs). According to this thread, OSL is not meant to be used like this, instead the users are supposed to make use of the already available material closures (BSDFs) to create new materials. The OP in that thread was trying to implement a BRDF but couldn't progress because he couldn't find a way to obtain certain vectors needed.
Finally, my question is: in order to create new materials (BRDFs) to be used in OSL, is it necessary to implement them first in C++ and recompile OSL, to finally make them usable? I wasn't able to find a definitive answer to this question.
Starting from the Introduction in the OSL spec,
OSL’s surface and volume shaders compute an explicit symbolic description, called a ”closure”,
of the way a surface or volume scatters light, in units of radiance.
In blender, the cycles nodes with a green output socket are the "closure" nodes, they provide the BRDF/BSDF calculations that give the appearance in the render. Cycles provides the type of closures that are available, OSL cannot implement new closure types.
So yes, you would have to alter blenders code to offer different closure types, but an OSL script can add plenty of customisation to a cycles node tree without you having to alter blenders code. The OSL script is compiled using LLVM's JIT compiler to run on the current CPU being used. So an OSL script does "inject" new code into the render engine, it is just limited in how it can alter the final result.
Note that an OSL script does not have to provide a closure output, it may output float or colour values which allows it to provide intermediate nodes within a node tree.
As example OSL scripts, the LGHexTiles.osl provides a complete node that can be used by itself as a material. While the MAscales.osl provides colour and float outputs that make only one node in the material.
And like many things, OSL scripts can be abused. Here you will find info about the old Amiga Juggler being implemented in an OSL script. Yes, a simple render engine, written in OSL. I'm pretty sure he continued to develop the raytracer further.

Debugger tool in GAMS

I want to find my mistake in GAMS model. I don't have any errors , but my model doesn't work well
Is there any debugging tools in GAMS ?( like debugger tools in other software, e.g MATLAB)
Best
Unfortunately, I have not come across any.
If you have no errors in GAMS, it rather points to a modelling problem rather than a GAMS one. GAMS is like any other programming/modelling software, what you put in is what you get out. However, there are some commands and some intuitive ways you can find out the problem with your model:
One common way is by using the display and $stop commands. If you have loops within your GAMS code, it is best to track the progress of the loop by displaying some key variables either to your .lst file or using put utility (also a nice tool). I use the put utility, and write the code to display key variables at each point of my code to identify where things may have gone wrong.
The $stop command terminates your GAMS code at the line in which it is written.
Hope this helps.

Modelica class diagrams

I am looking for a tool that can (automatically) create class diagrams like this one from Modelica code:
https://trac.modelica.org/Modelica/attachment/ticket/85/classDiagramModelicaMedia.png
I need to create a couple of such diagrams and an automated solution would help a lot!
So far, I found this article about Modelica CDV (class diagram viewer):
https://www.modelica.org/events/modelica2006/Proceedings/sessions/Session1c1.pdf
but not a ready to use tool. Any ideas?
This can be done with SystemModeler and Mathematica. The relevant function is a little bit hidden, but it's there. Here's an example:
WSMLink`Library`WSMDependencyGraph["Modelica.Mechanics.Rotational.Components.Spring"]
When hovering over the classes, the full name appears:
The object returned from the function includes a Graph, so you can operate on it with all the graph functionality in Mathematica. Also the function takes the same arguments as Graph, so you can get different graph layouts if needed.
I don't have any specific suggestions, but you might find that a tool like OpenModelica could extract and output sufficient information to construct such diagrams. It seems to have many command line switches for outputting lots of information (debugging and otherwise).

Color profiles conversion

I have a project on color profile conversion in C++, where the idea is to use CIELAB as transition between RGB and all others (CMY; CMYK; HSV; HSL;...).But I have one big big problem. I have searched everywhere and I cannot find any formula or descrition how could I convert CIELAB to others(CMY; CMYK; HSV; HSL; ...) only I got is what I found here : http://www.easyrgb.com/index.php?X=MATH&H=14#text14 . Can someone please help me with formula or with an idea how to get to them? Thank you so so much.
Regards,
magic :)
Color conversion with mathematical formulas yields very poor results with no serious application. Color systems are far too complex to capture them in simple, closed mathematical formulas let alone in linear formulas.
Good results can only be achived by using color profile files. And the conversion basically invovles interpolation between samples stored in these files.
Have a look at Little CMS. It probably does everything you need. Or if your software will run on Windows, you can use the built-in Windows Color System to do the conversion.

how to generate call graph with PC-Lint?

I'm having trouble figuring out how to generate a call graph with PC-lint.
I have tried adding the -vhm flag to pc lint but nothing happens.
Can anyone tell me how to get PC-Lint to generate the call graph?
The -vh option is used to display a graph of the "Strong Type Hierarchy" and the -vm option just prints the names of source code files as they are processed. As of the current version of PC-Lint, there is no way to cause it to display a call graph although there are plenty of other tools that can do this.