Hello
Is there any way to invoke 3D Warehouse interface like "3D Warehouse / Get model" does, but for a given collection or some search query, instead of main page?
Hello
Is there any way to invoke 3D Warehouse interface like "3D Warehouse / Get model" does, but for a given collection or some search query, instead of main page?
@thomthom said:
Instead of
t = Geom::Transformation.scaling(2.0)
use this variant:
t = Geom::Transformation.scaling(2.0, 2.0, 2.0)
Think that works.
Wow... Thanks.
Just curious: how did you find out this?
@chris fullmer said:
TIG!!! That might be it! I'll try to commit that to code shortly. I really like the idea, lets hope it works as nicely as it sounds,
Chris
Has anybody positive results with this technique?
I've tried to make always_face_camera false, scale and then return back always_face_camera to true, but on the last step, model becomes shifted and has "jumping" behavior.
@thomthom said:
You are testing the definition - definitions are not placed in the model and therefore can't be visible or hidden. ComponentInstances are what you need to test against.
Thanks for this remark, I'll adjust my code.
Since ComponentDefinition is inherited from Drawingelement, calling visible? and hidden? seems not to be some incorrect operation leading to undefined behaviour. Yes, they may not represent actual state of geometry, but this shows that visible? is not the same as !hidden? at least at implementation level, and thus can it be safely assumed that they are the same in all other cases?
It seems visible? and !hidden? are not the same...
I've attached model. visible?==!hidden? for all entities except the deepest one.
Here is log from my Ruby window:
m=Sketchup.active_model #<Sketchup::Model:0xb2ce678> m.entities[0].definition.entities[0].definition.visible? true m.entities[0].definition.entities[0].definition.hidden? true
and from my observation visible? is closer to the truth
Thanks for answers.
We ended up with approach similar to one of described by TIG: we have a separate layer with known and recognizable name and store all our geometry there. Any operation gets required data (actually it's only box size) from that layer and thus the problem with losing references to our stuff is solved.
Of course problem with appearance of our geometry in saved modelы is still relevant, but it seems we can and will have to live with that (because after reopening the plugin catches existing geometry)...
Hello
During implementation of plugin I faced with requirement to show some geometry to user which should not appear in saved files and preferably be absent in "undo" stack.
It's a helper entity - basically bounding box which shows to user bounds of area for model fitting.
Does anyone know ways to do such things in Sketchup?
P.S.
We already considered approach of creating a tool, but it's important to allow user to edit model with other tools while the plugin is active.