I’m making an attempt to create entities in Sketchup however an issue is each time I create them the unit of the worth that I exploit to create is all the time in inch.
mod = Sketchup.active_model
ents = mod.entities
#Radius
r = 5
ents.add_circle([0,0,0],[0,0,1],r)
The created circle all the time have radius in inch which convert from 5.
I’m wondering if there’s anyway to create them to have a unit as setting, like having 5 meters on this case.
SketchUp extends the Ruby Numeric class with strategies for models conversion. Amongst these are ones that inform the Ruby interpreter {that a} numeric worth in your code is to be taken to have specific models. For instance,
r = 5.m
converts the worth 5 in meters into the equal inside inches (196.8503937007874) that SketchUp all the time makes use of for lengths.