Skip to content

clone follow ups #6471

Open
Open
@jessfraz

Description

@jessfraz

follow up from #5462

for engine folks theres some more information on how I am doing this here: https://kittycadworkspace.slack.com/archives/C07A80B83FS/p1745685445989299?thread_ts=1745588732.350179&cid=C07A80B83FS

need help from engine:

// Clone an imported model.

import "tests/inputs/cube.sldprt" as cube

myCube = cube

clonedCube = clone(myCube)
|> translate(
x = 1020,
)
|> appearance(
       color = "#ff0000",
       metalness = 50,
       roughness = 50
    )
  • getExtrusionFaceInfo is not returning any cap ids for the end and start caps of the cloned solid but works for the original

Uncommenting the code below shows the error where we get no cap ids.

// Sketch on the end of a revolved face by tagging the end face.
// This shows the cloned geometry will have the same tags as the original geometry.


exampleSketch = startSketchOn(XY)
  |> startProfileAt([4, 12], %)
  |> line(end = [2, 0])
  |> line(end = [0, -6])
  |> line(end = [4, -6])
  |> line(end = [0, -6])
  |> line(end = [-3.75, -4.5])
  |> line(end = [0, -5.5])
  |> line(end = [-2, 0])
  |> close()

example001 = revolve(
  exampleSketch,
  axis = Y,
  angle = 180,
  tagEnd = $end01,
)

// example002 = clone(example001)
// |> translate(x = 0, y = 20, z = 0)


// Sketch on the cloned face.
// exampleSketch002 = startSketchOn(example002, face = end01)
// |> startProfileAt([4.5, -5], %)
// |> line(end = [0, 5])
// |> line(end = [5, 0])
// |> line(end = [0, -5])
// |> close()


// example003 = extrude(exampleSketch002, length = 5)

test here shows the issues: https://github.com/KittyCAD/modeling-app/pull/5462/files#diff-e2b9fd5fc74ec12ad4f83a7cc68844c8f2ed19dd3000c2968382afd0e723721aR742 kcl_test_clone_cube_already_closed_sketch

  • need a way to get the MovePathPen id, not being return in getAllChildrenUuids of the original and cloned object (this doesnt seem to cause many issues so perhaps lower priority)

Metadata

Metadata

Labels

enginekclLanguage and compiler features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions