Code Monkey home page Code Monkey logo

Comments (4)

raydeleu avatar raydeleu commented on August 23, 2024

I performed a litte test but have to disappoint you. I exported the shapes I created in the shapeArray below. If you provide a name to the shape, the resulting export will contain a step file with the same name. But neither the colour or the part name are contained in the data of the STEP file itself. The original file can be found at https://github.com/raydeleu/ReplicadManual/blob/main/models/tinkercad.js. I just added names to the first two shapes. I performed the export in the Workbench. The export consists of a zip file that contains a separate STEP file for each of the 23 shapes.

let shapeArray = [
{shape: stdCylinder, color:"orange", name: "stdCylinder"}
,{shape: stdBox, color: "red", name: "stdBox"}
,{shape: stdSphere, color: "blue"}
,{shape:stdRoof, color: "green"}
,{shape:stdHex, color: "darkblue"}
,{shape:stdCone, color: "purple"}
,{shape:piramid, color: "yellow"}
,{shape:halfDome, color: "fuchsia"}
,{shape:cheese, color: "darkblue"}
,{shape:parabol, color: "white"}
,{shape:icosahedron, color: "red"}
,{shape:squareRing, color: "orange"}
,{shape:halfPipe, color: "lightblue"}
,{shape:donut, color: "blue"}
,{shape:capsule, color: "white"}
,{shape:text, color: "green"}
,{shape:roundedCube, color: "purple"}
,{shape:octPilar, color: "orange"}
,{shape:approxPiramidExtrude, color: "yellow"}
,{shape:approxPiramidLoft, color: "yellow"}  
,{shape:spinner, color: "fuchsia"}
,{shape:makeBall, color: "blue"}
,{shape:clover, color: "green"}
]
return shapeArray}

from replicadmanual.

maelp avatar maelp commented on August 23, 2024

Another question : do you know if "copying a shape" rather than creating it again from scratch will allow .STEP export to "deduplicate it" and make the export file smaller?

from replicadmanual.

raydeleu avatar raydeleu commented on August 23, 2024

If you copy a shape you create a new shape. On export Replicad produces a STEP file for each shape that is returned to the Visualizer or Workbench, so I would expect that it makes no difference in the file size. A quick experiment with two (almost) identical shapes resulted in an STEP export of 61kb, creating a copy of one of the shapes resulted in a STEP export of 91kb. So this seems to confirm my assumption. Obviously there is no magic behind the scenes that identifies that the shapes are identical.

image

Perhaps I misunderstood what you are trying to achieve. You can perform the experiment in the Workbench.

from replicadmanual.

maelp avatar maelp commented on August 23, 2024

Thanks!

from replicadmanual.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.