Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Bug in FeatureScript sample "Brick"
Hello,
i already described the issue in https://forum.onshape.com/discussion/6774/lego-dimensions-incorrect
but as it seems to be the incorrect forum, noone answered.
i printed some individual Lego parts for my son and face some incorrect dimensions with larger column counts.
It seems the script uses 7.8 mm for the distance of the circles.
vector((0.78 + (c * 0.78)) + definition.dx, (0.78 + (r * 0.78)) + definition.dz) * centimeter,
while the raster is 8mm, the width of the 1-column bricks is indeed 7.8 mm to have enough space between blocks.
but the distance of the circles has to follow the 8 mm raster.
check:
https://de.wikipedia.org/wiki/Datei:Lego_dimensions.svg
https://de.wikipedia.org/wiki/Lego
Well, i created a version where i tried to correct this issue.
https://cad.onshape.com/documents/73d1e7b782747d598d58b2e5/w/4070eb539350d14cf6212790/e/1a3c6c5551430a86d1d06cc0
I (hopefully) applied all correct values and the bricks work fine with existing ones.
(also added those small noses for a tighter grip at stud positions present in original LEGO)
Am i missing something or is the the OnShape provided FeatureScript for Lego bricks just incorrect and nobody noticed?
BR,
Georg
Comments
-
Thank you for the corrections, I've incorporated your changes and versioned the document.
The FeatureScript Bricks was intended as a language tutorial and not for manufacturing, and so I simply missed this inaccuracy in development.
Thanks!
-Mark0 -
okay thanks for correcting that
BR,
Georg
0 -
The version of Bricks Featurecript in the Community Spotlight page link still produces a brick with a stud pitch of 7.8mm instead of 8.0mm
0 -
-
Not mine - but i will walk over to the web people and see if i can get this fixed
Philip Thomas - Onshape0 -
The web people are fixing it - thank you
Philip Thomas - Onshape0 -
Ok, new plan - i copied the code fix into the existing document and versioned it so that all other users of this very important 'brick' custom feature will be notified of the fix!

Philip Thomas - Onshape1 -
Isn't that how the Featurescript versioning system is supposed to work? :-)philip_thomas said:Ok, new plan - i copied the code fix into the existing document and versioned it so that all other users of this very important 'brick' custom feature will be notified of the fix!
0 -
^^^^^ Absolutely!
Philip Thomas - Onshape0


