Replies: 3 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
Replicad itself does not load files, it requires an already loaded Blob.
If you're running replicad via nodejs (few people do) then chatgpt's solution with Scriptcad executes replicad code in the browser, very similar to how Studio works, but it pre-setups a slightly modified JavaScript environment. Thus you can |
Beta Was this translation helpful? Give feedback.
-
Thanks, I tested the solution to encode the step file as a base64 string and then parse it as part of the input file. As proof that the solid can be used for further operations within Replicad I applied fillets to the imported shape and mirrored it. I also tried the solution of downloading the file from a public location. I think I solved that one too, but I have to run more experiments as the files I tried using this method did not yield a proper solid. For now, below is the code with the included base64 file. // convert step file to base 64
// openssl base64 -A -in <infile> -out <outfile>
// -A is needed to have a single large string without new lines
let {importSTEP} = replicad
async function main()
{
let stepFile = "SVNPLTEwMzAzLTIxOwpIRUFERVI7CkZJTEVfREVTQ1JJUFRJT04oKCdPcGVuIENBU0NBREUgTW9kZWwnKSwnMjsxJyk7CkZJTEVfTkFNRSgnT3BlbiBDQVNDQURFIFNoYXBlIE1vZGVsJywnMjAyMy0xMS0wN1QyMzo1MDoyMycsKCdBdXRob3InKSwoCiAgICAnT3BlbiBDQVNDQURFJyksJ09wZW4gQ0FTQ0FERSBTVEVQIHByb2Nlc3NvciA3LjYnLCdPcGVuIENBU0NBREUgNy42JwogICwnVW5rbm93bicpOwpGSUxFX1NDSEVNQSgoCidBUDI0Ml9NQU5BR0VEX01PREVMX0JBU0VEXzNEX0VOR0lORUVSSU5HX01JTV9MRi4gezEgMCAxMDMwMyA0NDIgMSAxIDQgCn0nKSk7CkVORFNFQzsKREFUQTsKIzEgPSBBUFBMSUNBVElPTl9QUk9UT0NPTF9ERUZJTklUSU9OKCdpbnRlcm5hdGlvbmFsIHN0YW5kYXJkJywKICAnYXAyNDJfbWFuYWdlZF9tb2RlbF9iYXNlZF8zZF9lbmdpbmVlcmluZycsMjAxMywjMik7CiMyID0gQVBQTElDQVRJT05fQ09OVEVYVCgnTWFuYWdlZCBtb2RlbCBiYXNlZCAzZCBlbmdp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EX0NPTlRFWFQoKCM0NDEpKSBHTE9CQUxfVU5JVF9BU1NJR05FRF9DT05URVhUCigoIzQzOCwjNDM5LCM0NDApKSBSRVBSRVNFTlRBVElPTl9DT05URVhUKCdDb250ZXh0ICMxJywKICAnM0QgQ29udGV4dCB3aXRoIFVOSVQgYW5kIFVOQ0VSVEFJTlRZJykgKTsKIzQzOCA9ICggTEVOR1RIX1VOSVQoKSBOQU1FRF9VTklUKCopIFNJX1VOSVQoLk1JTExJLiwuTUVUUkUuKSApOwojNDM5ID0gKCBOQU1FRF9VTklUKCopIFBMQU5FX0FOR0xFX1VOSVQoKSBTSV9VTklUKCQsLlJBRElBTi4pICk7CiM0NDAgPSAoIE5BTUVEX1VOSVQoKikgU0lfVU5JVCgkLC5TVEVSQURJQU4uKSBTT0xJRF9BTkdMRV9VTklUKCkgKTsKIzQ0MSA9IFVOQ0VSVEFJTlRZX01FQVNVUkVfV0lUSF9VTklUKExFTkdUSF9NRUFTVVJFKDEuRS0wNyksIzQzOCwKICAnZGlzdGFuY2VfYWNjdXJhY3lfdmFsdWUnLCdjb25mdXNpb24gYWNjdXJhY3knKTsKIzQ0MiA9IFBST0RVQ1RfUkVMQVRFRF9QUk9EVUNUX0NBVEVHT1JZKCdwYXJ0JywkLCgjNykpOwpFTkRTRUM7CkVORC1JU08tMTAzMDMtMjE7Cg=="
// function to convert base64 to blob
const base64ToBlob = async (base64, type = 'text/html') =>
fetch(`data:${type};base64,${base64}`)
.then(res => res.blob())
// create blob from string above
const blobFile = await base64ToBlob(stepFile)
let shape = await importSTEP(blobFile)
console.log(shape) // check that result is DS_Solid
// shape = shape.fillet(5,(e)=>e.inDirection("Z"))
// shape = shape.fillet(5,(e)=>e.inPlane("XY",20))
let shapeRounded = shape.clone().fillet(8).mirror("XZ",10)
return [shape,shapeRounded]
} |
Beta Was this translation helpful? Give feedback.
-
I am looking for an example how to import a file into the code. I noticed importers for STEP and STL in the Replicad code and did find an example how it could work on https://scriptcad.com/paulftw/hacklab-RPi-Case, but this code does not work in the Replicad Workbench.
ChatGPT offers the following solution:
The Workbench then throws the error that
require
is not defined.In the Replicad code I also found functions like
fileReader
but my knowledge of javascript is too limited to make it work.This is how far I have come:The code seems correct, but the console reports that
textArray
is undefined. Can someone show me an example how to import step files and text files into the Replicad Workbench?What I want to achieve is importing STEP files but perhaps even G-code (as text). Sometimes it is complicated to define a sketch in Replicad. In that case I would like to try to create a 2D sketch in SolveSpace, import it into Replicad and then convert this into a
draw()
object (perhaps by stringing all [x,y] coordinates in the G-code withlineTo
steps).Beta Was this translation helpful? Give feedback.
All reactions