Create the Knowledge Pattern
You can create the knowledge pattern referencing a user feature to instantiate features.
-
From the
Compass, click
3D Modeling
Apps
and select
3D Templates Capture.
The Engineering Templates app opens.
-
From the
Manage Templates section, click
Knowledge Pattern
.
The Knowledge Pattern Editor opens.
-
Create a list. To do so, click
Add in the
Knowledge Pattern Lists field.
The list is added to the Knowledge Pattern Lists.
-
Enter the following code in the editor:
let i (Integer) let c (Curve) let c2 (Curve) let b (Boolean) let a (AREA) let a2 (AREA) a = area(`Construction objects\Boundary.1` ) b = False i = 1 /* i is incremented automatically by 1 if it is not modified explicitly inside loop */ for i while b == False { /* Method used to create basic (isolated) geometry that is then valuated by geometry constructors */ /* Available types : Point, Line, Curve, Plane, Surface, GeoVolume, Axis System */ c = CreateOrModifyDatum("Curve", Parallels , Relations\Patterns\GenerateParallels\List.1 , i) /* Change the name */ /* curveparallel is a geometry constructor. Use Language browser to find other ones, based on output type */ if i == 1 c2 = curveparallel(`Construction objects\Boundary.1` ,`Inputs\Subdivision Surface.1` , DesignParameters\ParallelCurveOffset , True) else c2 = curveparallel(Relations\Patterns\GenerateParallels\List.1 [i - 1] , `Inputs\Subdivision Surface.1` ,DesignParameters\ParallelCurveOffset , True) /* curveparallel can fail so we handle error to avoid an infinite loop */ if c2 == NULL OR c2.Error == True b = True else { c = c2 a2 = 0mm2 a2 = area(c) /* stop criterion */ if a2 < a/DesignParameters\SurfaceRatioForStopCriterion b = True } }
Notes:- You can use the following keyboard
shortcuts in the editor:
- Ctrl+Z: Undo. Lets you delete the last word you entered.
- Ctrl+Y: Redo.
- Ctrl+F: Search in text.
- Ctrl+A: Select all.
- You can use the following keyboard
shortcuts in the editor:
-
Click
OK to validate.
The knowledge pattern is created.