Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1035417 // g22cloneMesh

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10993L/63K).

static G22Mesh g22cloneMesh(G22Mesh m1) {
  new G22Mesh m2;
  Map<G22Mesh.Anchor> anchorMap = new Map;
  for (a1 : m1.anchors())
    anchorMap.put(a1, m2.newAnchor(a1.pt));
    
  for (c1 : m1.curves())
    m2.addCurve(new G22Mesh.Curve(
      anchorMap.get(c1.start),
      anchorMap.get(c1.end),
      new OnePathWithOrigin(c1.path)));
    
  ret m2;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035417
Snippet name: g22cloneMesh
Eternal ID of this version: #1035417/3
Text MD5: fc0d1083d67ef4a9240964140caf0481
Transpilation MD5: c031aedc67bfc0df7126e4bdae3f7208
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-06 20:06:28
Source code size: 367 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 116 / 179
Version history: 2 change(s)
Referenced in: [show references]