Point3D does not work


#1

Hi All,

I am trying to plot 3D points using Sketchup. I used the Point3D code and the suggestions that are given on the following webpage, but nothing happens. Does anyone know what I am doing wrong?

http://www.sketchup.com/intl/en/developer/docs/ourdoc/point3d

Thanks,

David


#2

Make sure that you have set guides to be visible in your model. (View > Guides)

If that isn’t the issue, then please post back exact code snippet you are trying and any errors you might be getting.


#3

Yes the Guides are visible. There are no errors when I use the code given.

David


#4

Ah, I should have understood what was going on when you first posted, alas.

Geom::Point3d doesn’t represent an entity. It’s a general data structure.
What you want is Sketchup::ConstructionPoint which you add to the model using Sketchup::Entities.add_cpoint.

point = Geom::Point3d.new(1, 2, 3)
Sketchup.active_model.active_entities.add_cpoint(point)

The Sketchup::Entities class’s add_* methods are what you use to add any kind of entity to the model.


#5

Thanks for your help. I used the information you gave me and looked up
this link.
http://www.sketchup.com/intl/en/developer/docs/ourdoc/constructionpoint

The above link provides everything I was looking for.

David