How to insert components by guide points (point clouds)?
-
hello everyone,
i am desperate in locating lots of components on an exact points imported by points cloud (points from station total in format: x,y,z). Practically i want to put several different components (eg. bone, stone, pollen) on their exact position (xyz). i have tried to work by layers, several csv files, and group the points. But the problem is the points only look different by its color. For advance presentation, i want to change groups of points by components such as i have mentioned above.
Is there anybody know the sollution of this issue?regards,
ruly fauzi -
Let's assume you have the objects imported into a SKP as components with logically placed axes/insertion points [and with NO instances!].
Let's assume you have a set of points in a CSV file and you import them into this 'empty' SKP.
Ensure Layer0 is the active layer.
Select them and make a group.
Name the group after the objects the points will eventually represent.
Put the group on a new layer [also named after the object] and switch it off.
Repeat for other CSV files/objects.
Now you have a set of grouped points logically named on their own layers.
Switch all layers back on.
Use the Outliner to enter the edit context of a group.
Select all to pick the points and run this one-liner in the Ruby console to add a component instance at each point.m=Sketchup.active_model;a=m.active_entities;m.selection.each{|p|next unless p.is_a?(Sketchup;;ConstructionPoint);a.add_instance(m.definitions["COMPO"],Geom;;Transformation.new(p.position))}
where
COMPO
is replaced with the desired component-definition's real name inside ""...
An instance of the specified component is placed at each point.
You can always clear the guides after you have used them all. -
Super! Thanks a lot Tig, i have also found out that the plugin guide tools (insert components at Cpoint) is so helpfull. But it seems your method is more simple.
thanks,
Advertisement