Face between two arc curve
-
I am looking for a way to create a face between two arc curve.
` model = Sketchup.active_model
entities = model.entities
group = entities.add_group
entities = group.entitiesHalbkreis nach rechts / half curve to right
center = Geom::Point3d.new 150.mm,0,0
normal = Geom::Vector3d.new 0,0,1
xaxis = Geom::Vector3d.new 1,0,0
start_a = Math::PI/-2
end_a = Math::PI/2
edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a
edge = edgearray[0]
arccurve = edge.curveHalbkreis nach links / half curve to left
center = Geom::Point3d.new 50.mm,0,0
normal = Geom::Vector3d.new 0,0,1
xaxis = Geom::Vector3d.new 0,1,0
start_a = 0.0
end_a = Math::PI
edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a
edge = edgearray[0]
arccurve = edge.curveface = entities.add_face arccurve
status = face.pushpull 20.mm`Thank for help.

-
Use
arccurve1and thenarccurve2for the two curves...
then combine them
face=entities.add_face(arccurve1+arccurve2)
???
OR
arccurve[0].find_faces
BUT there's no automatic references to the new face
although it is still get-able... -
hermann, The problem is that if you use edges or curves to add a face, they must form a closed figure which yours doesn't. What you need to do is extract and use the vertices of the two arcs to define the face. So after the first arc, add verts=arccurve.vertices. After the second arc, add verts+=arccurve.vertices. The add_face statement would then be face=entities.add_face verts.
model = Sketchup.active_model entities = model.entities group = entities.add_group entities = group.entities # Halbkreis nach rechts / half curve to right center = Geom;;Point3d.new 150.mm,0,0 normal = Geom;;Vector3d.new 0,0,1 xaxis = Geom;;Vector3d.new 1,0,0 start_a = Math;;PI/-2 end_a = Math;;PI/2 edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a edge = edgearray[0] arccurve = edge.curve verts = arccurve.vertices # Halbkreis nach links / half curve to left center = Geom;;Point3d.new 50.mm,0,0 normal = Geom;;Vector3d.new 0,0,1 xaxis = Geom;;Vector3d.new 0,1,0 start_a = 0.0 end_a = Math;;PI edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a edge = edgearray[0] arccurve = edge.curve verts += arccurve.vertices face = entities.add_face verts status = face.pushpull 20.mm
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement