0

Tools experience wear during usage. Machines using these tools need to have their NC (i.e. numerical control) programs corrected, after the wear is measured.

I've already created a XSD model and generated JAXB classes that manage these measures, now I want to automatically generate NC code that sets the measured differences on the machines.

The code to be generated basically has this format (plus possibly some static prefixing/suffixing code):

$TC_DP<x>[<t>, <D>] // 1 < x <= 25, 1 < D <= 12

with tbeing the ID of the tool, D being a cutting edge on this tool, and xbeing a parameter related to the cutting edge.

For different tools t, x and D have different meaning, e.g. $TC_DP1[10, 2] is length of edge 2 on tool 10. $TC_DP1[5, 2] could be width of edge 2 on tool 5.


I'm looking for a way to declaratively define the mapping between the $TC_DP<x>[<t>, <D>] format and the model I've created, in order to have the NC code generated for me.

4

1 回答 1

1

鉴于您提供的信息,几乎任何声明性转换工具都是相同的。

您定义将每个新值与旧值相关联的计算(通常是 OCL 查询)。这些计算包含在映射/关系/规则中,以创建插槽包含新值的新对象。

如果您今天想以声明方式对此进行编码,我建议您使用 ATL 或 Henshin。QVTr 还是有点未来的前景。QVTo 可以为您提供半声明式的解决方案。

于 2018-02-28T13:44:42.723 回答