‎2023-04-17 01:53 PM - edited ‎2023-04-17 01:58 PM
Hello,
Does anyone know if it's possible to remove the lines highlighted green whilst maintaining the lines highlighted red in the attached image using the hprism command? See example code below. Any help would be greatly appreciated! Getting frustrated with the cumbersome ways Archicad handles curves generated by geometry in elevation, section and 3D.
plateWidth = 0.075
plateHeight = 0.120
plateThickness = 0.005
plateCornerRadius = 0.005
gs_mat = 19
_s = 79
rotx 90
hprism_ gs_mat, gs_mat, gs_mat, gs_mat, ! top_material, bottom_material, side_material, hill_material
10, plateThickness, 0, plateThickness, 1, !n, thickness, angle, hill_height, status
0, 0, _s,
(plateWidth/2)-plateCornerRadius, 0, _s,
plateCornerRadius, 90, 2000 + _s,
(plateWidth/2), plateHeight-plateCornerRadius, _s,
plateCornerRadius, 90, 2000 + _s,
-((plateWidth/2)-plateCornerRadius), plateHeight, _s,
plateCornerRadius, 90, 2000 + _s,
-(plateWidth/2), plateCornerRadius, _s,
plateCornerRadius, 90, 2000 + _s,
0, 0, _s
del 1
Cheers,
Jarrod
‎2023-04-17 05:29 PM
Had the same issue. Could not find any way to solve this. In the end I gave up and am now living with those wrong lines in one of my elevations.
It's a shame, really.
‎2023-04-17 05:44 PM
I had the exact same issue just last week.
Off the top of my head without Archicad in front of me, I think that is the masking code for the edges.
15 = show all edges
15 + 64 (i.e.79) = show only visible edge of curves.
15 - 1 = hide bottom edge
15 - 4 = hide top edge
So I would think you want 15 + 64 - 4 as the mask.
The problem is that that will also hide the lines you highlight in red, which as you say you don't want to happen.
So unfortunately, I don't think there is a solution for this.
It is a shame that the 64 mask does not affect the curvature of the hill as well.
A tip with masks is I always try to write the mask value as ... _s = 1*1 + 2*1 + 4*1 + 8*1 + 16*1 + 32*1 + 64*1
Then you can just change the 1's to 0's to see how each affects the prism.
Barry.
‎2023-04-18 12:39 AM
Thanks @runxel & @Barry Kelly for your assistance. I didn’t think there was a solution, but I thought I would try my luck on the community forums! I guess the only other way to solve this issue would be to generate the same geometry using primitive elements?
‎2023-04-18 01:22 AM
You could try the following... it's literally a patch job, but it seems to work at my end.
plateWidth = 0.075
plateHeight = 0.120
plateThickness = 0.005
plateCornerRadius = 0.005
gs_mat = 23
pen 1
_s = 1*1 + 2*1 + 4*0 + 8*1 + 64*1
if GLOB_CONTEXT = 2 then _s = 15 + 64*1
if GLOB_CONTEXT = 3 then _s = 11 + 64*1
if GLOB_CONTEXT = 4 then
_s = 1 + 2 + 8 + 64*1
rotx 90
add plateCornerRadius-plateWidth/2, plateCornerRadius, plateThickness + 0.0001
s2 = 1
cprism_ gs_mat, gs_mat, gs_mat,
5, 0.0001,
0, 0, s2,
plateWidth - 2 * plateCornerRadius, 0, s2,
plateWidth - 2 * plateCornerRadius, plateHeight - 2 * plateCornerRadius, s2,
0, plateHeight - 2 * plateCornerRadius, s2,
0, 0, -1
del 2
endif
rotx 90
hprism_ gs_mat, gs_mat, gs_mat, gs_mat, ! top_material, bottom_material, side_material, hill_material
10, plateThickness, 0.000, plateThickness, 1, !n, thickness, angle, hill_height, status
0, 0, _s,
(plateWidth/2)-plateCornerRadius, 0, _s,
plateCornerRadius, 90, 2000 + _s,
(plateWidth/2), plateHeight-plateCornerRadius, _s,
plateCornerRadius, 90, 2000 + _s,
-((plateWidth/2)-plateCornerRadius), plateHeight, _s,
plateCornerRadius, 90, 2000 + _s,
-(plateWidth/2), plateCornerRadius, _s,
plateCornerRadius, 90, 2000 + _s,
0, 0, -1
del 1
‎2023-04-18 03:48 AM - edited ‎2023-04-18 03:49 AM
Thanks @DGSketcher ,
I hadn't thought of using a prism above the surface with invisible sides and top/side lines.
You can get away with not offsetting the CPRISM by 0.0001 either.
That means a close up view of the side will be correct.
Barry.
‎2023-04-18 10:12 PM
Nice! 😎🙌
‎2023-04-22 07:24 AM - edited ‎2023-04-22 07:24 AM
Hi All,
Still getting strange shadow artifacts from this solution, I cannot place anything on the front face of the hprism as it hides the lines of the element placed on top. A neat workaround but still not producing the desired result. I think the only solution here is that Graphisoft needs to provide some updated GDL commands!
Cheers,
Jarrod
‎2023-04-22 01:10 PM
I am guessing this is a standard back plate for electrics etc? If it doesn't need to be parametric then it can be created with a Morph using hidden edges. Keep solid edges in the back face then it should display correctly in all environments. You might want to consider the resolution at the corners as everything is faceted.
Save the Morph as an Object and you can then cut & paste the resulting Group from the 3D Script into any other objects which can then have sockets & switches added.
It's getting beyond my experience, but it may be possible to use the ADDGROUP & SUBGROUP on the backplate in the 3D script to form holes if necessary.
I'm sure there are many ways to form the Morph, I just extruded a block & applied fillets to the corners & then the top face.
‎2023-04-23 04:42 PM - edited ‎2023-04-23 04:56 PM
Of course you could possibly take the morph idea a bit further with 3 morph components - Corner, Edge & Centre Plate and use MUL on the components with ADDGROUP to form a parametric plate.
Or even apply ADDGROUP to ELLIPS, TUBE & PRISM, although I'm not sure what will happen to the ELLIPS at the intersection with the TUBE. At least with the Morph option you are in control of the facets.