Skip to content
bitli edited this page Aug 17, 2014 · 1 revision

#Up/Down skin generation

The skin code generates the fully filled areas. This includes the top and bottom (unless generation of top and bottom are suppressed) and the generation of top and bottom of any hanging area. It does this with some heavy boolean Clipper action. The skin step uses data from different layers to get the job done. Check the code for details. The sparse infill area code is almost the same as the skin code. With the difference that it keeps the other areas and uses different offsets.

These skin generation generates the areas, not the actual infill lines. The infill line paths are generated later on. So the result of this step are list of Polygons which are the areas that need to be filled.

Implementation notes

Skin.generateTopAndBottomLayers()

The generation is by Layer / LayerPart, bottom up. This generates the skinOutline for the part (a combination of the up skin and down skin that may be applicable to that layer). The generation starts from the inside most inset less half the extrusion width. If there is more than one inset, then a polygon is added to fill some space between this insets (TBD WHY, In CuraEngien this was used for infillOverlap and the math is slightly different)

The the layer at the 'number of layer for top bottom' is compared with the current layer (taking all parts into account) and the difference is add as top/bottom layer respectively (TBD impact on vertical resolution?). There is some optimization as calculating the difference can be a pretty expensive operation.

Combine UP DOWN

TBD - Remove the skins that are too small to be extruded reliably.

Skin.generateSparse()

  • Generates sparseOutline.
  • Generate Wipe tower, raft, skirt
    • wipe: wipeTower polygon is added if requested
    • raft: A raftOutline is created from an extended layer 0 outline if requested. In various parts of the code the height of the raft was added to the Z.